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.
423 424 425 426 427 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 423 def initialize(payload) @latitude = payload["latitude"] @longitude = payload["longitude"] @label = payload["label"] end |
Instance Attribute Details
#label ⇒ Object
422 423 424 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 422 def label @label end |
#latitude ⇒ Object
422 423 424 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 422 def latitude @latitude end |
#longitude ⇒ Object
422 423 424 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 422 def longitude @longitude end |
Instance Method Details
#to_json(options = {}) ⇒ Object
428 429 430 431 432 433 434 |
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 428 def to_json( = {}) { "latitude": @latitude, "longitude": @longitude, "label": @label, }.to_json() end |