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
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.
406 407 408 409 410 411 412 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 406 def initialize(payload) @latitude = payload["latitude"] @longitude = payload["longitude"] @label = payload["label"] @id = payload["id"] @address = payload["address"] end |
Instance Attribute Details
#address ⇒ Object
405 406 407 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 405 def address @address end |
#id ⇒ Object
405 406 407 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 405 def id @id end |
#label ⇒ Object
405 406 407 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 405 def label @label end |
#latitude ⇒ Object
405 406 407 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 405 def latitude @latitude end |
#longitude ⇒ Object
405 406 407 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 405 def longitude @longitude end |
Instance Method Details
#to_json(options = {}) ⇒ Object
413 414 415 416 417 418 419 420 421 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 413 def to_json( = {}) { "latitude": @latitude, "longitude": @longitude, "label": @label, "id": @id, "address": @address, }.to_json() end |