public static class InvoicePayParams.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
InvoicePayParams.Builder |
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.
|
InvoicePayParams.Builder |
addExpand(java.lang.String element)
Add an element to `expand` list.
|
InvoicePayParams |
build()
Finalize and obtain parameter instance from this builder.
|
InvoicePayParams.Builder |
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.
|
InvoicePayParams.Builder |
putExtraParam(java.lang.String key,
java.lang.Object value)
Add a key/value pair to `extraParams` map.
|
InvoicePayParams.Builder |
setForgive(java.lang.Boolean forgive)
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.
|
InvoicePayParams.Builder |
setPaidOutOfBand(java.lang.Boolean paidOutOfBand)
Boolean representing whether an invoice is paid outside of Stripe.
|
InvoicePayParams.Builder |
setPaymentMethod(java.lang.String paymentMethod)
A PaymentMethod to be charged.
|
InvoicePayParams.Builder |
setSource(java.lang.String source)
A payment source to be charged.
|
public InvoicePayParams build()
public InvoicePayParams.Builder addExpand(java.lang.String element)
InvoicePayParams.expand
for the field documentation.public InvoicePayParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
InvoicePayParams.expand
for the field documentation.public InvoicePayParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
InvoicePayParams.extraParams
for the field documentation.public InvoicePayParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
InvoicePayParams.extraParams
for the field documentation.public InvoicePayParams.Builder setForgive(java.lang.Boolean forgive)
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.
public InvoicePayParams.Builder setPaidOutOfBand(java.lang.Boolean paidOutOfBand)
public InvoicePayParams.Builder setPaymentMethod(java.lang.String paymentMethod)
public InvoicePayParams.Builder setSource(java.lang.String source)