Class: Paymongo::Entities::PaymentIntent
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Paymongo::Entities::PaymentIntent
- Defined in:
- lib/paymongo/entities/payment_intent.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#capture_type ⇒ Object
readonly
Returns the value of attribute capture_type.
-
#client_key ⇒ Object
readonly
Returns the value of attribute client_key.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_payment_error ⇒ Object
readonly
Returns the value of attribute last_payment_error.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#next_action(data) ⇒ Object
readonly
Returns the value of attribute next_action.
-
#payment_method ⇒ Object
readonly
Returns the value of attribute payment_method.
-
#payment_method_allowed ⇒ Object
readonly
Returns the value of attribute payment_method_allowed.
-
#payment_method_options ⇒ Object
readonly
Returns the value of attribute payment_method_options.
-
#payments ⇒ Object
readonly
Returns the value of attribute payments.
-
#setup_future_usage ⇒ Object
readonly
Returns the value of attribute setup_future_usage.
-
#statement_descriptor ⇒ Object
readonly
Returns the value of attribute statement_descriptor.
-
#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) ⇒ PaymentIntent
constructor
A new instance of PaymentIntent.
Constructor Details
#initialize(api_resource) ⇒ PaymentIntent
Returns a new instance of PaymentIntent.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/paymongo/entities/payment_intent.rb', line 24 def initialize(api_resource) @id = api_resource.id @amount = api_resource.attributes['amount'] @capture_type = api_resource.attributes['capture_type'] @client_key = api_resource.attributes['client_key'] @currency = api_resource.attributes['currency'] @description = api_resource.attributes['description'] @livemode = api_resource.attributes['livemode'] @statement_descriptor = api_resource.attributes['statement_descriptor'] @status = api_resource.attributes['status'] @last_payment_error = api_resource.attributes['last_payment_error'] @payment_method_allowed = api_resource.attributes['payment_method_allowed'] @payments = api_resource.attributes['payments'] #TODO: ENG-21218 PayMongo-Ruby - Map payments attribute to array of payment entities @next_action = next_action(api_resource.attributes['next_action']) @payment_method = api_resource.attributes['payment_method'] @payment_method_options = api_resource.attributes['payment_method_options'] @metadata = api_resource.attributes['metadata'] @setup_future_usage = api_resource.attributes['setup_future_usage'] @created_at = api_resource.attributes['created_at'] @updated_at = api_resource.attributes['updated_at'] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def amount @amount end |
#capture_type ⇒ Object (readonly)
Returns the value of attribute capture_type.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def capture_type @capture_type end |
#client_key ⇒ Object (readonly)
Returns the value of attribute client_key.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def client_key @client_key end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def id @id end |
#last_payment_error ⇒ Object (readonly)
Returns the value of attribute last_payment_error.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def last_payment_error @last_payment_error end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def @metadata end |
#next_action(data) ⇒ Object (readonly)
Returns the value of attribute next_action.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def next_action @next_action end |
#payment_method ⇒ Object (readonly)
Returns the value of attribute payment_method.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def payment_method @payment_method end |
#payment_method_allowed ⇒ Object (readonly)
Returns the value of attribute payment_method_allowed.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def payment_method_allowed @payment_method_allowed end |
#payment_method_options ⇒ Object (readonly)
Returns the value of attribute payment_method_options.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def @payment_method_options end |
#payments ⇒ Object (readonly)
Returns the value of attribute payments.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def payments @payments end |
#setup_future_usage ⇒ Object (readonly)
Returns the value of attribute setup_future_usage.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def setup_future_usage @setup_future_usage end |
#statement_descriptor ⇒ Object (readonly)
Returns the value of attribute statement_descriptor.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.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_intent.rb', line 4 def status @status end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/paymongo/entities/payment_intent.rb', line 4 def updated_at @updated_at end |