public class Session extends ApiResource implements HasId
Modifier and Type | Class and Description |
---|---|
static class |
Session.DisplayItem |
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Session() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Session |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a Session object.
|
static Session |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a Session object.
|
static Session |
create(SessionCreateParams params)
Creates a Session object.
|
static Session |
create(SessionCreateParams params,
RequestOptions options)
Creates a Session object.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getBillingAddressCollection()
The value (
auto or required ) for whether Checkout collected the customer's
billing address. |
java.lang.String |
getCancelUrl()
The URL the customer will be directed to if they decide to cancel payment and return to your
website.
|
java.lang.String |
getClientReferenceId()
A unique string to reference the Checkout Session.
|
java.lang.String |
getCustomer()
Get ID of expandable
customer object. |
java.lang.String |
getCustomerEmail()
If provided, this value will be used when the Customer object is created.
|
Customer |
getCustomerObject()
Get expanded
customer . |
java.util.List<Session.DisplayItem> |
getDisplayItems()
The line items, plans, or SKUs purchased by the customer.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.Boolean |
getLivemode()
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
java.lang.String |
getLocale()
The IETF language tag of the locale Checkout is displayed in.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Set of key-value pairs that you can attach to an object.
|
java.lang.String |
getMode()
The mode of the Checkout Session, one of
payment , setup , or subscription . |
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getPaymentIntent()
Get ID of expandable
paymentIntent object. |
PaymentIntent |
getPaymentIntentObject()
Get expanded
paymentIntent . |
java.util.List<java.lang.String> |
getPaymentMethodTypes()
A list of the types of payment methods (e.g.
|
java.lang.String |
getSetupIntent()
Get ID of expandable
setupIntent object. |
SetupIntent |
getSetupIntentObject()
Get expanded
setupIntent . |
java.lang.String |
getSubmitType()
Describes the type of transaction being performed by Checkout in order to customize relevant
text on the page, such as the submit button.
|
java.lang.String |
getSubscription()
Get ID of expandable
subscription object. |
Subscription |
getSubscriptionObject()
Get expanded
subscription . |
java.lang.String |
getSuccessUrl()
The URL the customer will be directed to after the payment or subscription creation is
successful.
|
int |
hashCode() |
static SessionCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of Checkout Sessions.
|
static SessionCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of Checkout Sessions.
|
static SessionCollection |
list(SessionListParams params)
Returns a list of Checkout Sessions.
|
static SessionCollection |
list(SessionListParams params,
RequestOptions options)
Returns a list of Checkout Sessions.
|
static Session |
retrieve(java.lang.String session)
Retrieves a Session object.
|
static Session |
retrieve(java.lang.String session,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves a Session object.
|
static Session |
retrieve(java.lang.String session,
RequestOptions options)
Retrieves a Session object.
|
static Session |
retrieve(java.lang.String session,
SessionRetrieveParams params,
RequestOptions options)
Retrieves a Session object.
|
void |
setBillingAddressCollection(java.lang.String billingAddressCollection)
The value (
auto or required ) for whether Checkout collected the customer's
billing address. |
void |
setCancelUrl(java.lang.String cancelUrl)
The URL the customer will be directed to if they decide to cancel payment and return to your
website.
|
void |
setClientReferenceId(java.lang.String clientReferenceId)
A unique string to reference the Checkout Session.
|
void |
setCustomer(java.lang.String id) |
void |
setCustomerEmail(java.lang.String customerEmail)
If provided, this value will be used when the Customer object is created.
|
void |
setCustomerObject(Customer expandableObject) |
void |
setDisplayItems(java.util.List<Session.DisplayItem> displayItems)
The line items, plans, or SKUs purchased by the customer.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setLivemode(java.lang.Boolean livemode)
Has the value
true if the object exists in live mode or the value false if the
object exists in test mode. |
void |
setLocale(java.lang.String locale)
The IETF language tag of the locale Checkout is displayed in.
|
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.
|
void |
setMode(java.lang.String mode)
The mode of the Checkout Session, one of
payment , setup , or subscription . |
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPaymentIntent(java.lang.String id) |
void |
setPaymentIntentObject(PaymentIntent expandableObject) |
void |
setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
A list of the types of payment methods (e.g.
|
void |
setSetupIntent(java.lang.String id) |
void |
setSetupIntentObject(SetupIntent expandableObject) |
void |
setSubmitType(java.lang.String submitType)
Describes the type of transaction being performed by Checkout in order to customize relevant
text on the page, such as the submit button.
|
void |
setSubscription(java.lang.String id) |
void |
setSubscriptionObject(Subscription expandableObject) |
void |
setSuccessUrl(java.lang.String successUrl)
The URL the customer will be directed to after the payment or subscription creation is
successful.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public java.lang.String getCustomer()
customer
object.public void setCustomer(java.lang.String id)
public Customer getCustomerObject()
customer
.public void setCustomerObject(Customer expandableObject)
public java.lang.String getPaymentIntent()
paymentIntent
object.public void setPaymentIntent(java.lang.String id)
public PaymentIntent getPaymentIntentObject()
paymentIntent
.public void setPaymentIntentObject(PaymentIntent expandableObject)
public java.lang.String getSetupIntent()
setupIntent
object.public void setSetupIntent(java.lang.String id)
public SetupIntent getSetupIntentObject()
setupIntent
.public void setSetupIntentObject(SetupIntent expandableObject)
public java.lang.String getSubscription()
subscription
object.public void setSubscription(java.lang.String id)
public Subscription getSubscriptionObject()
subscription
.public void setSubscriptionObject(Subscription expandableObject)
public static SessionCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static SessionCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static SessionCollection list(SessionListParams params) throws StripeException
StripeException
public static SessionCollection list(SessionListParams params, RequestOptions options) throws StripeException
StripeException
public static Session retrieve(java.lang.String session) throws StripeException
StripeException
public static Session retrieve(java.lang.String session, RequestOptions options) throws StripeException
StripeException
public static Session retrieve(java.lang.String session, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Session retrieve(java.lang.String session, SessionRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public static Session create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Session create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Session create(SessionCreateParams params) throws StripeException
StripeException
public static Session create(SessionCreateParams params, RequestOptions options) throws StripeException
StripeException
public java.lang.String getBillingAddressCollection()
auto
or required
) for whether Checkout collected the customer's
billing address.public java.lang.String getCancelUrl()
public java.lang.String getClientReferenceId()
public java.lang.String getCustomerEmail()
customer
field.public java.util.List<Session.DisplayItem> getDisplayItems()
public java.lang.Boolean getLivemode()
true
if the object exists in live mode or the value false
if the
object exists in test mode.public java.lang.String getLocale()
auto
, the
browser's locale is used.
One of auto
, da
, de
, en
, es
, fi
, fr
,
it
, ja
, ms
, nb
, nl
, pl
, pt
, sv
,
or zh
.
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
public java.lang.String getMode()
payment
, setup
, or subscription
.public java.lang.String getObject()
Equal to checkout.session
.
public java.util.List<java.lang.String> getPaymentMethodTypes()
public java.lang.String getSubmitType()
submit_type
can only be specified on
Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or
setup
mode.
One of auto
, book
, donate
, or pay
.
public java.lang.String getSuccessUrl()
public void setBillingAddressCollection(java.lang.String billingAddressCollection)
auto
or required
) for whether Checkout collected the customer's
billing address.public void setCancelUrl(java.lang.String cancelUrl)
public void setClientReferenceId(java.lang.String clientReferenceId)
public void setCustomerEmail(java.lang.String customerEmail)
customer
field.public void setDisplayItems(java.util.List<Session.DisplayItem> displayItems)
public void setId(java.lang.String id)
redirectToCheckout
in Stripe.js.public void setLivemode(java.lang.Boolean livemode)
true
if the object exists in live mode or the value false
if the
object exists in test mode.public void setLocale(java.lang.String locale)
auto
, the
browser's locale is used.
One of auto
, da
, de
, en
, es
, fi
, fr
,
it
, ja
, ms
, nb
, nl
, pl
, pt
, sv
,
or zh
.
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setMode(java.lang.String mode)
payment
, setup
, or subscription
.public void setObject(java.lang.String object)
Equal to checkout.session
.
public void setPaymentMethodTypes(java.util.List<java.lang.String> paymentMethodTypes)
public void setSubmitType(java.lang.String submitType)
submit_type
can only be specified on
Checkout Sessions in payment
mode, but not Checkout Sessions in subscription
or
setup
mode.
One of auto
, book
, donate
, or pay
.
public void setSuccessUrl(java.lang.String successUrl)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object