Package com.stripe.param
Class SourceCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.SourceCreateParams.Builder
-
- Enclosing class:
- SourceCreateParams
public static class SourceCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourceCreateParams.Builder
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.SourceCreateParams.Builder
addExpand(java.lang.String element)
Add an element to `expand` list.SourceCreateParams
build()
Finalize and obtain parameter instance from this builder.SourceCreateParams.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.SourceCreateParams.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.SourceCreateParams.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.SourceCreateParams.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.SourceCreateParams.Builder
setAmount(java.lang.Long amount)
Amount associated with the source.SourceCreateParams.Builder
setCurrency(java.lang.String currency)
Three-letter ISO code for the currency associated with the source.SourceCreateParams.Builder
setCustomer(java.lang.String customer)
TheCustomer
to whom the original source is attached to.SourceCreateParams.Builder
setFlow(SourceCreateParams.Flow flow)
The authenticationflow
of the source to create.SourceCreateParams.Builder
setMandate(SourceCreateParams.Mandate mandate)
Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.SourceCreateParams.Builder
setOriginalSource(java.lang.String originalSource)
The source to share.SourceCreateParams.Builder
setOwner(SourceCreateParams.Owner owner)
Information about the owner of the payment instrument that may be used or required by particular source types.SourceCreateParams.Builder
setReceiver(SourceCreateParams.Receiver receiver)
Optional parameters for the receiver flow.SourceCreateParams.Builder
setRedirect(SourceCreateParams.Redirect redirect)
Parameters required for the redirect flow.SourceCreateParams.Builder
setSourceOrder(SourceCreateParams.SourceOrder sourceOrder)
Information about the items and shipping associated with the source.SourceCreateParams.Builder
setStatementDescriptor(java.lang.String statementDescriptor)
An arbitrary string to be displayed on your customer's statement.SourceCreateParams.Builder
setToken(java.lang.String token)
An optional token used to create the source.SourceCreateParams.Builder
setType(java.lang.String type)
Thetype
of the source to create.SourceCreateParams.Builder
setUsage(SourceCreateParams.Usage usage)
-
-
-
Method Detail
-
build
public SourceCreateParams build()
Finalize and obtain parameter instance from this builder.
-
setAmount
public SourceCreateParams.Builder setAmount(java.lang.Long amount)
Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required forsingle_use
sources. Not supported forreceiver
type sources, where charge amount may not be specified until funds land.
-
setCurrency
public SourceCreateParams.Builder setCurrency(java.lang.String currency)
Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready.
-
setCustomer
public SourceCreateParams.Builder setCustomer(java.lang.String customer)
TheCustomer
to whom the original source is attached to. Must be set when the original source is not aSource
(e.g.,Card
).
-
addExpand
public SourceCreateParams.Builder addExpand(java.lang.String element)
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSourceCreateParams.expand
for the field documentation.
-
addAllExpand
public SourceCreateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSourceCreateParams.expand
for the field documentation.
-
putExtraParam
public SourceCreateParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSourceCreateParams.extraParams
for the field documentation.
-
putAllExtraParam
public SourceCreateParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSourceCreateParams.extraParams
for the field documentation.
-
setFlow
public SourceCreateParams.Builder setFlow(SourceCreateParams.Flow flow)
The authenticationflow
of the source to create.flow
is one ofredirect
,receiver
,code_verification
,none
. It is generally inferred unless a type supports multiple flows.
-
setMandate
public SourceCreateParams.Builder setMandate(SourceCreateParams.Mandate mandate)
Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
-
putMetadata
public SourceCreateParams.Builder putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSourceCreateParams.metadata
for the field documentation.
-
putAllMetadata
public SourceCreateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSourceCreateParams.metadata
for the field documentation.
-
setOriginalSource
public SourceCreateParams.Builder setOriginalSource(java.lang.String originalSource)
The source to share.
-
setOwner
public SourceCreateParams.Builder setOwner(SourceCreateParams.Owner owner)
Information about the owner of the payment instrument that may be used or required by particular source types.
-
setReceiver
public SourceCreateParams.Builder setReceiver(SourceCreateParams.Receiver receiver)
Optional parameters for the receiver flow. Can be set only if the source is a receiver (flow
isreceiver
).
-
setRedirect
public SourceCreateParams.Builder setRedirect(SourceCreateParams.Redirect redirect)
Parameters required for the redirect flow. Required if the source is authenticated by a redirect (flow
isredirect
).
-
setSourceOrder
public SourceCreateParams.Builder setSourceOrder(SourceCreateParams.SourceOrder sourceOrder)
Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
-
setStatementDescriptor
public SourceCreateParams.Builder setStatementDescriptor(java.lang.String statementDescriptor)
An arbitrary string to be displayed on your customer's statement. As an example, if your website isRunClub
and the item you're charging for is a race ticket, you may want to specify astatement_descriptor
ofRunClub 5K race ticket.
While many payment types will display this information, some may not display it at all.
-
setToken
public SourceCreateParams.Builder setToken(java.lang.String token)
An optional token used to create the source. When passed, token properties will override source parameters.
-
setType
public SourceCreateParams.Builder setType(java.lang.String type)
Thetype
of the source to create. Required unlesscustomer
andoriginal_source
are specified (see the Cloning card Sources guide)
-
setUsage
public SourceCreateParams.Builder setUsage(SourceCreateParams.Usage usage)
-
-