Class: Twilio::REST::Content::V1::ContentList::CatalogItem

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/content/v1/content.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ CatalogItem

Returns a new instance of CatalogItem.



146
147
148
149
150
151
152
153
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 146

def initialize(payload)
        @id = payload["id"]
        @section_title = payload["section_title"]
        @name = payload["name"]
        @media_url = payload["media_url"]
        @price = payload["price"]
        @description = payload["description"]
end

Instance Attribute Details

#descriptionObject

Parameters:



145
146
147
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 145

def description
  @description
end

#idObject

Parameters:



145
146
147
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 145

def id
  @id
end

#media_urlObject

Parameters:



145
146
147
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 145

def media_url
  @media_url
end

#nameObject

Parameters:



145
146
147
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 145

def name
  @name
end

#priceObject

Parameters:



145
146
147
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 145

def price
  @price
end

#section_titleObject

Parameters:



145
146
147
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 145

def section_title
  @section_title
end

Instance Method Details

#to_json(options = {}) ⇒ Object



154
155
156
157
158
159
160
161
162
163
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 154

def to_json(options = {})
{
        "id": @id,
        "section_title": @section_title,
        "name": @name,
        "media_url": @media_url,
        "price": @price,
        "description": @description,
}.to_json(options)
end