Class: Paymongo::Entities::PaymentMethod
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Paymongo::Entities::PaymentMethod
- Defined in:
- lib/paymongo/entities/payment_method.rb
Instance Attribute Summary collapse
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#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.
-
#source_id ⇒ Object
readonly
Returns the value of attribute source_id.
-
#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) ⇒ PaymentMethod
constructor
A new instance of PaymentMethod.
Constructor Details
#initialize(api_resource) ⇒ PaymentMethod
Returns a new instance of PaymentMethod.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/paymongo/entities/payment_method.rb', line 14 def initialize(api_resource) @id = api_resource.id @billing = BillingEntity.new(api_resource.attributes['billing']) @details = api_resource.attributes['details'] @livemode = api_resource.attributes['livemode'] @metadata = api_resource.attributes['metadata'] @source_id = api_resource.attributes['source_id'] @type = api_resource.attributes['type'] @created_at = api_resource.attributes['created_at'] @updated_at = api_resource.attributes['updated_at'] end |
Instance Attribute Details
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def billing @billing end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def created_at @created_at end |
#details ⇒ Object (readonly)
Returns the value of attribute details.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def details @details end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def @metadata end |
#source_id ⇒ Object (readonly)
Returns the value of attribute source_id.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.rb', line 4 def source_id @source_id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/paymongo/entities/payment_method.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/payment_method.rb', line 4 def updated_at @updated_at end |