Class: Paymongo::Entities::Customer
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Paymongo::Entities::Customer
- Defined in:
- lib/paymongo/entities/customer.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#default_device ⇒ Object
readonly
Returns the value of attribute default_device.
-
#default_payment_method_id ⇒ Object
readonly
Returns the value of attribute default_payment_method_id.
-
#deleted ⇒ Object
readonly
Returns the value of attribute deleted.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#first_name ⇒ Object
readonly
Returns the value of attribute first_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_name ⇒ Object
readonly
Returns the value of attribute last_name.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(api_resource) ⇒ Customer
constructor
A new instance of Customer.
Constructor Details
#initialize(api_resource) ⇒ Customer
Returns a new instance of Customer.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/paymongo/entities/customer.rb', line 17 def initialize(api_resource) @id = api_resource.id @default_device = api_resource.attributes['default_device'] @default_payment_method_id = api_resource.attributes['default_payment_method_id'] @deleted = api_resource.attributes['deleted'] @email = api_resource.attributes['email'] @first_name = api_resource.attributes['first_name'] @last_name = api_resource.attributes['last_name'] @livemode = api_resource.attributes['livemode'] @phone = api_resource.attributes['phone'] @type = api_resource.data['type'] @created_at = api_resource.attributes['created_at'] @updated_at = api_resource.attributes['updated_at'] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def created_at @created_at end |
#default_device ⇒ Object (readonly)
Returns the value of attribute default_device.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def default_device @default_device end |
#default_payment_method_id ⇒ Object (readonly)
Returns the value of attribute default_payment_method_id.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def default_payment_method_id @default_payment_method_id end |
#deleted ⇒ Object (readonly)
Returns the value of attribute deleted.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def deleted @deleted end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def email @email end |
#first_name ⇒ Object (readonly)
Returns the value of attribute first_name.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def first_name @first_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def id @id end |
#last_name ⇒ Object (readonly)
Returns the value of attribute last_name.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def last_name @last_name end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def livemode @livemode end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def phone @phone end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def type @type end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/paymongo/entities/customer.rb', line 4 def updated_at @updated_at end |