Class: Paymongo::Entities::Payment
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Paymongo::Entities::Payment
- Defined in:
- lib/paymongo/entities/payment.rb
Instance Attribute Summary collapse
-
#access_url ⇒ Object
readonly
Returns the value of attribute access_url.
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#available_at ⇒ Object
readonly
Returns the value of attribute available_at.
-
#balance_transaction_id ⇒ Object
readonly
Returns the value of attribute balance_transaction_id.
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#credited_at ⇒ Object
readonly
Returns the value of attribute credited_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#disputed ⇒ Object
readonly
Returns the value of attribute disputed.
-
#external_reference_number ⇒ Object
readonly
Returns the value of attribute external_reference_number.
-
#fee ⇒ Object
readonly
Returns the value of attribute fee.
-
#foreign_fee ⇒ Object
readonly
Returns the value of attribute foreign_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.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#paid_at ⇒ Object
readonly
Returns the value of attribute paid_at.
-
#payment_intent_id ⇒ Object
readonly
Returns the value of attribute payment_intent_id.
-
#payout ⇒ Object
readonly
Returns the value of attribute payout.
-
#refunds ⇒ Object
readonly
Returns the value of attribute refunds.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#statement_descriptor ⇒ Object
readonly
Returns the value of attribute statement_descriptor.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#tax_amount ⇒ Object
readonly
Returns the value of attribute tax_amount.
-
#taxes ⇒ Object
readonly
Returns the value of attribute taxes.
-
#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.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/paymongo/entities/payment.rb', line 33 def initialize(api_resource) @id = api_resource.id @access_url = api_resource.attributes['access_url'] @amount = api_resource.attributes['amount'] @balance_transaction_id = api_resource.attributes['balance_transaction_id'] @billing = BillingEntity.new(api_resource.attributes['billing']) @currency = api_resource.attributes['currency'] @description = api_resource.attributes['description'] @disputed = api_resource.attributes['disputed'] @external_reference_number = api_resource.attributes['external_reference_number'] @fee = api_resource.attributes['fee'] @foreign_fee = api_resource.attributes['foreign_fee'] @livemode = api_resource.attributes['livemode'] @metadata = api_resource.attributes['metadata'] @net_amount = api_resource.attributes['net_amount'] @origin = api_resource.attributes['origin'] @payment_intent_id = api_resource.attributes['payment_intent_id'] @payout = api_resource.attributes['payout'] @refunds = api_resource.attributes['refunds'] @source = api_resource.attributes['source'] @statement_descriptor = api_resource.attributes['statement_descriptor'] @status = api_resource.attributes['status'] @tax_amount = api_resource.attributes['tax_amount'] @taxes = api_resource.attributes['taxes'] @available_at = api_resource.attributes['available_at'] @created_at = api_resource.attributes['created_at'] @credited_at = api_resource.attributes['credited_at'] @paid_at = api_resource.attributes['paid_at'] @updated_at = api_resource.attributes['updated_at'] end |
Instance Attribute Details
#access_url ⇒ Object (readonly)
Returns the value of attribute access_url.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def access_url @access_url end |
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def amount @amount end |
#available_at ⇒ Object (readonly)
Returns the value of attribute available_at.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def available_at @available_at end |
#balance_transaction_id ⇒ Object (readonly)
Returns the value of attribute balance_transaction_id.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def balance_transaction_id @balance_transaction_id end |
#billing ⇒ Object (readonly)
Returns the value of attribute billing.
4 5 6 |
# File 'lib/paymongo/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/paymongo/entities/payment.rb', line 4 def created_at @created_at end |
#credited_at ⇒ Object (readonly)
Returns the value of attribute credited_at.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def credited_at @credited_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def description @description end |
#disputed ⇒ Object (readonly)
Returns the value of attribute disputed.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def disputed @disputed end |
#external_reference_number ⇒ Object (readonly)
Returns the value of attribute external_reference_number.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def external_reference_number @external_reference_number end |
#fee ⇒ Object (readonly)
Returns the value of attribute fee.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def fee @fee end |
#foreign_fee ⇒ Object (readonly)
Returns the value of attribute foreign_fee.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def foreign_fee @foreign_fee end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def id @id end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def @metadata end |
#net_amount ⇒ Object (readonly)
Returns the value of attribute net_amount.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def net_amount @net_amount end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def origin @origin end |
#paid_at ⇒ Object (readonly)
Returns the value of attribute paid_at.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def paid_at @paid_at end |
#payment_intent_id ⇒ Object (readonly)
Returns the value of attribute payment_intent_id.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def payment_intent_id @payment_intent_id end |
#payout ⇒ Object (readonly)
Returns the value of attribute payout.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def payout @payout end |
#refunds ⇒ Object (readonly)
Returns the value of attribute refunds.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def refunds @refunds end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def source @source end |
#statement_descriptor ⇒ Object (readonly)
Returns the value of attribute statement_descriptor.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def statement_descriptor @statement_descriptor end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def status @status end |
#tax_amount ⇒ Object (readonly)
Returns the value of attribute tax_amount.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def tax_amount @tax_amount end |
#taxes ⇒ Object (readonly)
Returns the value of attribute taxes.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def taxes @taxes end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/paymongo/entities/payment.rb', line 4 def updated_at @updated_at end |