Class: WhatsappSdk::Resource::Location
- Inherits:
-
Object
- Object
- WhatsappSdk::Resource::Location
- Defined in:
- lib/whatsapp_sdk/resource/location.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the address of the location.
-
#latitude ⇒ Object
Returns the latitude of the location.
-
#longitude ⇒ Object
Returns the longitude of the location.
-
#name ⇒ Object
Returns the name of the location.
Instance Method Summary collapse
-
#initialize(latitude:, longitude:, name:, address:) ⇒ Location
constructor
A new instance of Location.
- #to_json ⇒ Object
Constructor Details
#initialize(latitude:, longitude:, name:, address:) ⇒ Location
Returns a new instance of Location.
27 28 29 30 31 32 |
# File 'lib/whatsapp_sdk/resource/location.rb', line 27 def initialize(latitude:, longitude:, name:, address:) @latitude = latitude @longitude = longitude @name = name @address = address end |
Instance Attribute Details
#address ⇒ Object
Returns the address of the location.
25 26 27 |
# File 'lib/whatsapp_sdk/resource/location.rb', line 25 def address @address end |
#latitude ⇒ Object
Returns the latitude of the location.
10 11 12 |
# File 'lib/whatsapp_sdk/resource/location.rb', line 10 def latitude @latitude end |
#longitude ⇒ Object
Returns the longitude of the location.
15 16 17 |
# File 'lib/whatsapp_sdk/resource/location.rb', line 15 def longitude @longitude end |
#name ⇒ Object
Returns the name of the location.
20 21 22 |
# File 'lib/whatsapp_sdk/resource/location.rb', line 20 def name @name end |
Instance Method Details
#to_json ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/whatsapp_sdk/resource/location.rb', line 34 def to_json { latitude: latitude, longitude: longitude, name: name, address: address } end |