Class: Twilio::REST::Content::V1::ContentList::TwilioLocation

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) ⇒ 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

#labelObject

Parameters:



422
423
424
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 422

def label
  @label
end

#latitudeObject

Parameters:



422
423
424
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 422

def latitude
  @latitude
end

#longitudeObject

Parameters:



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(options = {})
{
        "latitude": @latitude,
        "longitude": @longitude,
        "label": @label,
}.to_json(options)
end