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.



401
402
403
404
405
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 401

def initialize(payload)
        @latitude = payload["latitude"]
        @longitude = payload["longitude"]
        @label = payload["label"]
end

Instance Attribute Details

#labelObject

Parameters:



400
401
402
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 400

def label
  @label
end

#latitudeObject

Parameters:



400
401
402
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 400

def latitude
  @latitude
end

#longitudeObject

Parameters:



400
401
402
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 400

def longitude
  @longitude
end

Instance Method Details

#to_json(options = {}) ⇒ Object



406
407
408
409
410
411
412
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 406

def to_json(options = {})
{
        "latitude": @latitude,
        "longitude": @longitude,
        "label": @label,
}.to_json(options)
end