Class: Stripe::InvoicePayment
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::InvoicePayment
- Defined in:
- lib/stripe/resources/invoice_payment.rb
Overview
The invoice payment object
Defined Under Namespace
Classes: Payment, StatusTransitions
Constant Summary collapse
- OBJECT_NAME =
"invoice_payment"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount_overpaid ⇒ Object
readonly
Excess payment that was received for this invoice and credited to the customer’s ‘invoice_credit_balance`.
-
#amount_paid ⇒ Object
readonly
Amount that was actually paid for this invoice, in cents (or local equivalent).
-
#amount_requested ⇒ Object
readonly
Amount intended to be paid toward this invoice, in cents (or local equivalent).
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#invoice ⇒ Object
readonly
The invoice that was paid.
-
#is_default ⇒ Object
readonly
Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s ‘amount_remaining`.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#payment ⇒ Object
readonly
Attribute for field payment.
-
#status ⇒ Object
readonly
The status of the payment, one of ‘open`, `paid`, or `canceled`.
-
#status_transitions ⇒ Object
readonly
Attribute for field status_transitions.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#amount_overpaid ⇒ Object (readonly)
Excess payment that was received for this invoice and credited to the customer’s ‘invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more.
20 21 22 |
# File 'lib/stripe/resources/invoice_payment.rb', line 20 def amount_overpaid @amount_overpaid end |
#amount_paid ⇒ Object (readonly)
Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is ‘paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.
22 23 24 |
# File 'lib/stripe/resources/invoice_payment.rb', line 22 def amount_paid @amount_paid end |
#amount_requested ⇒ Object (readonly)
Amount intended to be paid toward this invoice, in cents (or local equivalent)
24 25 26 |
# File 'lib/stripe/resources/invoice_payment.rb', line 24 def amount_requested @amount_requested end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
26 27 28 |
# File 'lib/stripe/resources/invoice_payment.rb', line 26 def created @created end |
#currency ⇒ Object (readonly)
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).
28 29 30 |
# File 'lib/stripe/resources/invoice_payment.rb', line 28 def currency @currency end |
#id ⇒ Object (readonly)
Unique identifier for the object.
30 31 32 |
# File 'lib/stripe/resources/invoice_payment.rb', line 30 def id @id end |
#invoice ⇒ Object (readonly)
The invoice that was paid.
32 33 34 |
# File 'lib/stripe/resources/invoice_payment.rb', line 32 def invoice @invoice end |
#is_default ⇒ Object (readonly)
Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s ‘amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.
34 35 36 |
# File 'lib/stripe/resources/invoice_payment.rb', line 34 def is_default @is_default end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
36 37 38 |
# File 'lib/stripe/resources/invoice_payment.rb', line 36 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
38 39 40 |
# File 'lib/stripe/resources/invoice_payment.rb', line 38 def object @object end |
#payment ⇒ Object (readonly)
Attribute for field payment
40 41 42 |
# File 'lib/stripe/resources/invoice_payment.rb', line 40 def payment @payment end |
#status ⇒ Object (readonly)
The status of the payment, one of ‘open`, `paid`, or `canceled`.
42 43 44 |
# File 'lib/stripe/resources/invoice_payment.rb', line 42 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
44 45 46 |
# File 'lib/stripe/resources/invoice_payment.rb', line 44 def status_transitions @status_transitions end |
Class Method Details
.object_name ⇒ Object
8 9 10 |
# File 'lib/stripe/resources/invoice_payment.rb', line 8 def self.object_name "invoice_payment" end |