Class: WhatsappSdk::Resource::Address
- Inherits:
-
Object
- Object
- WhatsappSdk::Resource::Address
- Defined in:
- lib/whatsapp_sdk/resource/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street ⇒ Object
Returns the value of attribute street.
-
#type ⇒ Object
Returns the value of attribute type.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
-
#initialize(street:, city:, state:, zip:, country:, country_code:, type: AddressType::Home) ⇒ Address
constructor
A new instance of Address.
- #to_h ⇒ Object
Constructor Details
#initialize(street:, city:, state:, zip:, country:, country_code:, type: AddressType::Home) ⇒ Address
8 9 10 11 12 13 14 15 16 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 8 def initialize(street:, city:, state:, zip:, country:, country_code:, type: AddressType::Home) @street = street @city = city @state = state @zip = zip @country = country @country_code = country_code @type = type end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def country @country end |
#country_code ⇒ Object
Returns the value of attribute country_code.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def country_code @country_code end |
#state ⇒ Object
Returns the value of attribute state.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def state @state end |
#street ⇒ Object
Returns the value of attribute street.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def street @street end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def type @type end |
#zip ⇒ Object
Returns the value of attribute zip.
6 7 8 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 6 def zip @zip end |
Instance Method Details
#to_h ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/whatsapp_sdk/resource/address.rb', line 18 def to_h { street: @street, city: @city, state: @state, zip: @zip, country: @country, country_code: @country_code, type: @type } end |