Class: Fabychy::DataTypes::TemplateAttachment
- Inherits:
-
Attachment
- Object
- Base
- Attachment
- Fabychy::DataTypes::TemplateAttachment
- Defined in:
- lib/fabychy/data_types/template_attachment.rb
Instance Method Summary collapse
-
#initialize(*params) ⇒ TemplateAttachment
constructor
A new instance of TemplateAttachment.
- #validations ⇒ Object
Constructor Details
#initialize(*params) ⇒ TemplateAttachment
Returns a new instance of TemplateAttachment.
6 7 8 9 |
# File 'lib/fabychy/data_types/template_attachment.rb', line 6 def initialize *params super(*params) @type = 'template' end |
Instance Method Details
#validations ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/fabychy/data_types/template_attachment.rb', line 11 def validations super.merge( { payload: {required: true, class: [GenericTemplatePayload, ReceiptTemplatePayload, ButtonTemplatePayload] } } ) end |