Class: Payrex::Entities::PaymentMethod
- Inherits:
-
Object
- Object
- Payrex::Entities::PaymentMethod
- Defined in:
- lib/entities/payment_method.rb
Instance Attribute Summary collapse
-
#billing_details ⇒ Object
readonly
Returns the value of attribute billing_details.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#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.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#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.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/entities/payment_method.rb', line 13 def initialize(api_resource) @id = api_resource.data["id"] @resource = api_resource.data["resource"] @type = api_resource.data["type"] @billing_details = api_resource.data["billing_details"] @livemode = api_resource.data["livemode"] = api_resource.data["metadata"] @created_at = api_resource.data["created_at"] @updated_at = api_resource.data["updated_at"] end |
Instance Attribute Details
#billing_details ⇒ Object (readonly)
Returns the value of attribute billing_details.
4 5 6 |
# File 'lib/entities/payment_method.rb', line 4 def billing_details @billing_details end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/entities/payment_method.rb', line 4 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/entities/payment_method.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/entities/payment_method.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/entities/payment_method.rb', line 4 def end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
4 5 6 |
# File 'lib/entities/payment_method.rb', line 4 def resource @resource end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/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/entities/payment_method.rb', line 4 def updated_at @updated_at end |