Class: TocaroWebhook::Payload::Attachments::Attachment

Inherits:
Object
  • Object
show all
Defined in:
lib/tocaro_webhook/payload.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}, &block) ⇒ Attachment

Returns a new instance of Attachment.



48
49
50
51
52
# File 'lib/tocaro_webhook/payload.rb', line 48

def initialize(options={}, &block)
  @title     = options[:title]     || ""
  @value     = options[:value]     || ""
  @image_url = options[:image_url] || ""
end

Instance Method Details

#to_attributes_arrayObject



54
55
56
# File 'lib/tocaro_webhook/payload.rb', line 54

def to_attributes_array
  { title: @title, value: @value, image_url: @image_url }
end