Class: FastSpring::Customer
- Inherits:
-
Object
- Object
- FastSpring::Customer
- Defined in:
- lib/fastspring-saasy/customer.rb
Instance Attribute Summary collapse
-
#company ⇒ Object
Returns the value of attribute company.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#phone_number ⇒ Object
Returns the value of attribute phone_number.
Instance Method Summary collapse
-
#initialize(details) ⇒ Customer
constructor
A new instance of Customer.
Constructor Details
#initialize(details) ⇒ Customer
Returns a new instance of Customer.
5 6 7 8 9 10 11 |
# File 'lib/fastspring-saasy/customer.rb', line 5 def initialize(details) @first_name = details.fetch('firstName', '') @last_name = details.fetch('lastName', '') @company = details.fetch('company', '') @email = details.fetch('email') @phone_number = details.fetch('phoneNumber', '') end |
Instance Attribute Details
#company ⇒ Object
Returns the value of attribute company.
3 4 5 |
# File 'lib/fastspring-saasy/customer.rb', line 3 def company @company end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/fastspring-saasy/customer.rb', line 3 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
3 4 5 |
# File 'lib/fastspring-saasy/customer.rb', line 3 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name.
3 4 5 |
# File 'lib/fastspring-saasy/customer.rb', line 3 def last_name @last_name end |
#phone_number ⇒ Object
Returns the value of attribute phone_number.
3 4 5 |
# File 'lib/fastspring-saasy/customer.rb', line 3 def phone_number @phone_number end |