Class: Payrex::Entities::Payment
- Inherits:
-
Object
- Object
- Payrex::Entities::Payment
- Defined in:
- lib/entities/payment.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#amount_refunded ⇒ Object
readonly
Returns the value of attribute amount_refunded.
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#customer ⇒ Object
readonly
Returns the value of attribute customer.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#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.
-
#net_amount ⇒ Object
readonly
Returns the value of attribute net_amount.
-
#payment_intent_id ⇒ Object
readonly
Returns the value of attribute payment_intent_id.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#refunded ⇒ Object
readonly
Returns the value of attribute refunded.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(api_resource) ⇒ Payment
constructor
A new instance of Payment.
Constructor Details
#initialize(api_resource) ⇒ Payment
Returns a new instance of Payment.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/entities/payment.rb', line 22 def initialize(api_resource) @id = api_resource.data["id"] @amount = api_resource.data["amount"] @amount_refunded = api_resource.data["amount_refunded"] @billing = api_resource.data["billing"] @currency = api_resource.data["currency"] @description = api_resource.data["description"] @fee = api_resource.data["fee"] @livemode = api_resource.data["livemode"] @metadata = api_resource.data["metadata"] @net_amount = api_resource.data["net_amount"] @payment_intent_id = api_resource.data["payment_intent_id"] @status = api_resource.data["status"] @customer = api_resource.data["customer"] @payment_method = api_resource.data["payment_method"] @refunded = api_resource.data["refunded"] @created_at = api_resource.data["created_at"] @updated_at = api_resource.data["updated_at"] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def amount @amount end |
#amount_refunded ⇒ Object (readonly)
Returns the value of attribute amount_refunded.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def amount_refunded @amount_refunded end |
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def billing @billing end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def currency @currency end |
#customer ⇒ Object (readonly)
Returns the value of attribute customer.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def customer @customer end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def description @description end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def fee @fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def @metadata end |
#net_amount ⇒ Object (readonly)
Returns the value of attribute net_amount.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def net_amount @net_amount end |
#payment_intent_id ⇒ Object (readonly)
Returns the value of attribute payment_intent_id.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def payment_intent_id @payment_intent_id end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def payment_method @payment_method end |
#refunded ⇒ Object (readonly)
Returns the value of attribute refunded.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def refunded @refunded end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def status @status end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/entities/payment.rb', line 4 def updated_at @updated_at end |