Class: Stripe::InvoiceService::PayParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::InvoiceService::PayParams
- Defined in:
- lib/stripe/services/invoice_service.rb
Instance Attribute Summary collapse
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#forgive ⇒ Object
In cases where the source used to pay the invoice has insufficient funds, passing ‘forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice.
-
#mandate ⇒ Object
ID of the mandate to be used for this invoice.
-
#off_session ⇒ Object
Indicates if a customer is on or off-session while an invoice payment is attempted.
-
#paid_out_of_band ⇒ Object
Boolean representing whether an invoice is paid outside of Stripe.
-
#payment_method ⇒ Object
A PaymentMethod to be charged.
-
#source ⇒ Object
A payment source to be charged.
Instance Method Summary collapse
-
#initialize(expand: nil, forgive: nil, mandate: nil, off_session: nil, paid_out_of_band: nil, payment_method: nil, source: nil) ⇒ PayParams
constructor
A new instance of PayParams.
Methods inherited from RequestParams
Constructor Details
#initialize(expand: nil, forgive: nil, mandate: nil, off_session: nil, paid_out_of_band: nil, payment_method: nil, source: nil) ⇒ PayParams
Returns a new instance of PayParams.
3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 |
# File 'lib/stripe/services/invoice_service.rb', line 3595 def initialize( expand: nil, forgive: nil, mandate: nil, off_session: nil, paid_out_of_band: nil, payment_method: nil, source: nil ) @expand = @forgive = forgive @mandate = mandate @off_session = off_session @paid_out_of_band = paid_out_of_band @payment_method = payment_method @source = source end |
Instance Attribute Details
#expand ⇒ Object
Specifies which fields in the response should be expanded.
3579 3580 3581 |
# File 'lib/stripe/services/invoice_service.rb', line 3579 def @expand end |
#forgive ⇒ Object
In cases where the source used to pay the invoice has insufficient funds, passing ‘forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
Passing ‘forgive=false` will fail the charge if the source hasn’t been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to ‘false`.
3583 3584 3585 |
# File 'lib/stripe/services/invoice_service.rb', line 3583 def forgive @forgive end |
#mandate ⇒ Object
ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice’s default_payment_method or default_source, if set.
3585 3586 3587 |
# File 'lib/stripe/services/invoice_service.rb', line 3585 def mandate @mandate end |
#off_session ⇒ Object
Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to ‘true` (off-session).
3587 3588 3589 |
# File 'lib/stripe/services/invoice_service.rb', line 3587 def off_session @off_session end |
#paid_out_of_band ⇒ Object
Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to ‘false`.
3589 3590 3591 |
# File 'lib/stripe/services/invoice_service.rb', line 3589 def paid_out_of_band @paid_out_of_band end |
#payment_method ⇒ Object
A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
3591 3592 3593 |
# File 'lib/stripe/services/invoice_service.rb', line 3591 def payment_method @payment_method end |
#source ⇒ Object
A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
3593 3594 3595 |
# File 'lib/stripe/services/invoice_service.rb', line 3593 def source @source end |