Class: Twilio::REST::Content::V1::ContentList::TwilioLocation
- Inherits:
-
Object
- Object
- Twilio::REST::Content::V1::ContentList::TwilioLocation
- Defined in:
- lib/twilio-ruby/rest/content/v1/content.rb,
lib/twilio-ruby/rest/content/v1/content.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ TwilioLocation
constructor
A new instance of TwilioLocation.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ TwilioLocation
Returns a new instance of TwilioLocation.
431 432 433 434 435 436 437 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 431 def initialize(payload) @latitude = payload["latitude"] @longitude = payload["longitude"] @label = payload["label"] @id = payload["id"] @address = payload["address"] end |
Instance Attribute Details
#address ⇒ Object
430 431 432 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 430 def address @address end |
#id ⇒ Object
430 431 432 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 430 def id @id end |
#label ⇒ Object
430 431 432 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 430 def label @label end |
#latitude ⇒ Object
430 431 432 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 430 def latitude @latitude end |
#longitude ⇒ Object
430 431 432 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 430 def longitude @longitude end |
Instance Method Details
#to_json(options = {}) ⇒ Object
438 439 440 441 442 443 444 445 446 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 438 def to_json( = {}) { "latitude": @latitude, "longitude": @longitude, "label": @label, "id": @id, "address": @address, }.to_json() end |