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

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(payload) ⇒ TwilioLocation

Returns a new instance of TwilioLocation.



434
435
436
437
438
439
440
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 434

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

Instance Attribute Details

#address ⇒ Object

Parameters:



433
434
435
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 433

def address
  @address
end

#id ⇒ Object

Parameters:



433
434
435
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 433

def id
  @id
end

#label ⇒ Object

Parameters:



433
434
435
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 433

def label
  @label
end

#latitude ⇒ Object

Parameters:



433
434
435
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 433

def latitude
  @latitude
end

#longitude ⇒ Object

Parameters:



433
434
435
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 433

def longitude
  @longitude
end

Instance Method Details

#to_json(options = {}) ⇒ Object



441
442
443
444
445
446
447
448
449
# File 'lib/twilio-ruby/rest/content/v1/content.rb', line 441

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