Class: Payrex::Entities::Customer
- Inherits:
-
Object
- Object
- Payrex::Entities::Customer
- Defined in:
- lib/entities/customer.rb
Instance Attribute Summary collapse
-
#billing_statement_prefix ⇒ Object
readonly
Returns the value of attribute billing_statement_prefix.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#next_billing_statement_sequence_number ⇒ Object
readonly
Returns the value of attribute next_billing_statement_sequence_number.
-
#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.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/entities/customer.rb', line 15 def initialize(api_resource) data = api_resource.data @id = data["id"] @billing_statement_prefix = data["billing_statement_prefix"] @currency = data["currency"] @email = data["email"] @livemode = data["livemode"] @name = data["name"] = data["metadata"] @next_billing_statement_sequence_number = data["next_billing_statement_sequence_number"] @created_at = data["created_at"] @updated_at = data["updated_at"] end |
Instance Attribute Details
#billing_statement_prefix ⇒ Object (readonly)
Returns the value of attribute billing_statement_prefix.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def billing_statement_prefix @billing_statement_prefix end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def currency @currency end |
#email ⇒ Object (readonly)
Returns the value of attribute email.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def email @email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def name @name end |
#next_billing_statement_sequence_number ⇒ Object (readonly)
Returns the value of attribute next_billing_statement_sequence_number.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def next_billing_statement_sequence_number @next_billing_statement_sequence_number end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/entities/customer.rb', line 4 def updated_at @updated_at end |