Class: Starling::Resources::CustomerResource
- Inherits:
-
BaseResource
- Object
- BaseResource
- Starling::Resources::CustomerResource
- Defined in:
- lib/starling/resources/customer_resource.rb
Overview
A resource representing the response returned from the Customer API
Instance Method Summary collapse
-
#customer_uid ⇒ String
The Starling internal ID of the customer.
-
#date_of_birth ⇒ Date
The date of birth of the customer.
-
#email ⇒ String
The email address of the customer.
-
#first_name ⇒ String
The first name of the customer.
-
#last_name ⇒ String
The last name of the customer.
-
#phone ⇒ String
The phone number of the customer.
Methods inherited from BaseResource
Constructor Details
This class inherits a constructor from Starling::Resources::BaseResource
Instance Method Details
#customer_uid ⇒ String
Returns the Starling internal ID of the customer.
6 7 8 |
# File 'lib/starling/resources/customer_resource.rb', line 6 def customer_uid parsed_data['customerUid'] end |
#date_of_birth ⇒ Date
Returns the date of birth of the customer.
21 22 23 |
# File 'lib/starling/resources/customer_resource.rb', line 21 def date_of_birth present_date(parsed_data['dateOfBirth']) end |
#email ⇒ String
Returns the email address of the customer.
26 27 28 |
# File 'lib/starling/resources/customer_resource.rb', line 26 def email parsed_data['email'] end |
#first_name ⇒ String
Returns the first name of the customer.
11 12 13 |
# File 'lib/starling/resources/customer_resource.rb', line 11 def first_name parsed_data['firstName'] end |
#last_name ⇒ String
Returns the last name of the customer.
16 17 18 |
# File 'lib/starling/resources/customer_resource.rb', line 16 def last_name parsed_data['lastName'] end |
#phone ⇒ String
Returns the phone number of the customer.
31 32 33 |
# File 'lib/starling/resources/customer_resource.rb', line 31 def phone parsed_data['phone'] end |