Class: MusicTodayApiWrapper::Resources::Checkout::Billing::Customer
- Inherits:
-
Object
- Object
- MusicTodayApiWrapper::Resources::Checkout::Billing::Customer
- Defined in:
- lib/resources/checkout/billing/customer.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#email ⇒ Object
Returns the value of attribute email.
-
#lastname ⇒ Object
Returns the value of attribute lastname.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street ⇒ Object
Returns the value of attribute street.
-
#zip_code ⇒ Object
Returns the value of attribute zip_code.
Instance Method Summary collapse
- #as_hash ⇒ Object
-
#initialize(name = '', lastname = '', street = '', city = '', state = '', zip_code = '', phone = '', email = '', country = 'US') ⇒ Customer
constructor
rubocop:disable ParameterLists.
Constructor Details
#initialize(name = '', lastname = '', street = '', city = '', state = '', zip_code = '', phone = '', email = '', country = 'US') ⇒ Customer
rubocop:disable ParameterLists
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/resources/checkout/billing/customer.rb', line 19 def initialize(name = '', lastname = '', street = '', city = '', state = '', zip_code = '', phone = '', email = '', country = 'US') @name = name @lastname = lastname @street = street @city = city @state = state @zip_code = zip_code @phone = phone @email = email @country = country end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def country @country end |
#email ⇒ Object
Returns the value of attribute email.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def email @email end |
#lastname ⇒ Object
Returns the value of attribute lastname.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def lastname @lastname end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def name @name end |
#phone ⇒ Object
Returns the value of attribute phone.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def phone @phone end |
#state ⇒ Object
Returns the value of attribute state.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def state @state end |
#street ⇒ Object
Returns the value of attribute street.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def street @street end |
#zip_code ⇒ Object
Returns the value of attribute zip_code.
8 9 10 |
# File 'lib/resources/checkout/billing/customer.rb', line 8 def zip_code @zip_code end |
Instance Method Details
#as_hash ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/resources/checkout/billing/customer.rb', line 32 def as_hash { firstName: @name, lastName: @lastname, street: @street, street2: '', city: @city, state: @state, postalCode: @zip_code, country: @country, phone: @phone, email: @email }.compact end |