Class: Payrex::Entities::PaymentIntent
- Inherits:
-
Object
- Object
- Payrex::Entities::PaymentIntent
- Defined in:
- lib/entities/payment_intent.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#amount_capturable ⇒ Object
readonly
Returns the value of attribute amount_capturable.
-
#amount_received ⇒ Object
readonly
Returns the value of attribute amount_received.
-
#capture_before_at ⇒ Object
readonly
Returns the value of attribute capture_before_at.
-
#client_secret ⇒ Object
readonly
Returns the value of attribute client_secret.
-
#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.
-
#latest_payment ⇒ Object
readonly
Returns the value of attribute latest_payment.
-
#livemode ⇒ Object
readonly
Returns the value of attribute livemode.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#next_action ⇒ Object
readonly
Returns the value of attribute next_action.
-
#payment_method_id ⇒ Object
readonly
Returns the value of attribute payment_method_id.
-
#payment_method_options ⇒ Object
readonly
Returns the value of attribute payment_method_options.
-
#payment_methods ⇒ Object
readonly
Returns the value of attribute payment_methods.
-
#return_url ⇒ Object
readonly
Returns the value of attribute return_url.
-
#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/entities/payment_intent.rb', line 24 def initialize(api_resource) @id = api_resource.data["id"] @amount = api_resource.data["amount"] @amount_received = api_resource.data["amount_received"] @amount_capturable = api_resource.data["amount_capturable"] @client_secret = api_resource.data["client_secret"] @currency = api_resource.data["currency"] @description = api_resource.data["description"] @livemode = api_resource.data["livemode"] @metadata = api_resource.data["metadata"] @latest_payment = api_resource.data["latest_payment"] @payment_method_id = api_resource.data["payment_method_id"] @payment_methods = api_resource.data["payment_methods"] @payment_method_options = api_resource.data["payment_method_options"] @status = api_resource.data["status"] @next_action = api_resource.data["next_action"] @return_url = api_resource.data["return_url"] @capture_before_at = api_resource.data["capture_before_at"] @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_intent.rb', line 4 def amount @amount end |
#amount_capturable ⇒ Object (readonly)
Returns the value of attribute amount_capturable.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def amount_capturable @amount_capturable end |
#amount_received ⇒ Object (readonly)
Returns the value of attribute amount_received.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def amount_received @amount_received end |
#capture_before_at ⇒ Object (readonly)
Returns the value of attribute capture_before_at.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def capture_before_at @capture_before_at end |
#client_secret ⇒ Object (readonly)
Returns the value of attribute client_secret.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def client_secret @client_secret end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/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/entities/payment_intent.rb', line 4 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def id @id end |
#latest_payment ⇒ Object (readonly)
Returns the value of attribute latest_payment.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def latest_payment @latest_payment end |
#livemode ⇒ Object (readonly)
Returns the value of attribute livemode.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def @metadata end |
#next_action ⇒ Object (readonly)
Returns the value of attribute next_action.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def next_action @next_action end |
#payment_method_id ⇒ Object (readonly)
Returns the value of attribute payment_method_id.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def payment_method_id @payment_method_id end |
#payment_method_options ⇒ Object (readonly)
Returns the value of attribute payment_method_options.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def @payment_method_options end |
#payment_methods ⇒ Object (readonly)
Returns the value of attribute payment_methods.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def payment_methods @payment_methods end |
#return_url ⇒ Object (readonly)
Returns the value of attribute return_url.
4 5 6 |
# File 'lib/entities/payment_intent.rb', line 4 def return_url @return_url end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/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/entities/payment_intent.rb', line 4 def updated_at @updated_at end |