public class Session extends ApiResource implements HasId
| Modifier and Type | Class and Description |
|---|---|
static class |
Session.DisplayItem |
static class |
Session.ShippingAddressCollection
The name of the line item.
|
static class |
Session.TotalDetails |
ApiResource.RequestMethodCHARSET, GSONPRETTY_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.Boolean |
getAllowPromotionCodes()
Enables user redeemable promotion codes.
|
java.lang.Long |
getAmountSubtotal()
Total of all items before discounts or taxes are applied.
|
java.lang.Long |
getAmountTotal()
Total of all items after discounts and taxes are applied.
|
java.lang.String |
getBillingAddressCollection()
Describes whether Checkout should collect 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 |
getCurrency()
Three-letter ISO currency code,
in lowercase.
|
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.
|
LineItemCollection |
getLineItems()
The line items purchased by the customer.
|
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. |
ShippingDetails |
getShipping()
Shipping information for this Checkout Session.
|
Session.ShippingAddressCollection |
getShippingAddressCollection()
When set, provides configuration for Checkout to collect a shipping address from a customer.
|
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.
|
Session.TotalDetails |
getTotalDetails()
Tax and discount details for the computed total amount.
|
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.
|
LineItemCollection |
listLineItems(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of Line Items
|
LineItemCollection |
listLineItems(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of Line Items
|
LineItemCollection |
listLineItems(SessionListLineItemsParams params)
Returns a list of Line Items
|
LineItemCollection |
listLineItems(SessionListLineItemsParams params,
RequestOptions options)
Returns a list of Line Items
|
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 |
setAllowPromotionCodes(java.lang.Boolean allowPromotionCodes)
Enables user redeemable promotion codes.
|
void |
setAmountSubtotal(java.lang.Long amountSubtotal)
Total of all items before discounts or taxes are applied.
|
void |
setAmountTotal(java.lang.Long amountTotal)
Total of all items after discounts and taxes are applied.
|
void |
setBillingAddressCollection(java.lang.String billingAddressCollection)
Describes whether Checkout should collect 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 |
setCurrency(java.lang.String currency)
Three-letter ISO currency code,
in lowercase.
|
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 |
setLineItems(LineItemCollection lineItems)
The line items purchased by the customer.
|
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 |
setShipping(ShippingDetails shipping)
Shipping information for this Checkout Session.
|
void |
setShippingAddressCollection(Session.ShippingAddressCollection shippingAddressCollection)
When set, provides configuration for Checkout to collect a shipping address from a customer.
|
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.
|
void |
setTotalDetails(Session.TotalDetails totalDetails)
Tax and discount details for the computed total amount.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdequals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringpublic 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
StripeExceptionpublic static SessionCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static SessionCollection list(SessionListParams params) throws StripeException
StripeExceptionpublic static SessionCollection list(SessionListParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static Session retrieve(java.lang.String session) throws StripeException
StripeExceptionpublic static Session retrieve(java.lang.String session, RequestOptions options) throws StripeException
StripeExceptionpublic static Session retrieve(java.lang.String session, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static Session retrieve(java.lang.String session, SessionRetrieveParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static Session create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static Session create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static Session create(SessionCreateParams params) throws StripeException
StripeExceptionpublic static Session create(SessionCreateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic LineItemCollection listLineItems(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic LineItemCollection listLineItems(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic LineItemCollection listLineItems(SessionListLineItemsParams params) throws StripeException
StripeExceptionpublic LineItemCollection listLineItems(SessionListLineItemsParams params, RequestOptions options) throws StripeException
StripeExceptionpublic java.lang.Boolean getAllowPromotionCodes()
public java.lang.Long getAmountSubtotal()
public java.lang.Long getAmountTotal()
public java.lang.String getBillingAddressCollection()
One of auto, or required.
public java.lang.String getCancelUrl()
public java.lang.String getClientReferenceId()
public java.lang.String getCurrency()
public java.lang.String getCustomerEmail()
customer attribute.public java.util.List<Session.DisplayItem> getDisplayItems()
line_items.public LineItemCollection getLineItems()
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, bg, cs, da, de, el, en,
en-GB, es, es-419, et, fi, fr, fr-CA,
hu, id, it, ja, lt, lv, ms, mt,
nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sv, tr, zh, zh-HK, or zh-TW.
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 ShippingDetails getShipping()
public Session.ShippingAddressCollection getShippingAddressCollection()
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 Session.TotalDetails getTotalDetails()
public void setAllowPromotionCodes(java.lang.Boolean allowPromotionCodes)
public void setAmountSubtotal(java.lang.Long amountSubtotal)
public void setAmountTotal(java.lang.Long amountTotal)
public void setBillingAddressCollection(java.lang.String billingAddressCollection)
One of auto, or required.
public void setCancelUrl(java.lang.String cancelUrl)
public void setClientReferenceId(java.lang.String clientReferenceId)
public void setCurrency(java.lang.String currency)
public void setCustomerEmail(java.lang.String customerEmail)
customer attribute.public void setDisplayItems(java.util.List<Session.DisplayItem> displayItems)
line_items.public void setId(java.lang.String id)
redirectToCheckout in Stripe.js.public void setLineItems(LineItemCollection lineItems)
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, bg, cs, da, de, el, en,
en-GB, es, es-419, et, fi, fr, fr-CA,
hu, id, it, ja, lt, lv, ms, mt,
nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sv, tr, zh, zh-HK, or zh-TW.
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 setShipping(ShippingDetails shipping)
public void setShippingAddressCollection(Session.ShippingAddressCollection shippingAddressCollection)
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 void setTotalDetails(Session.TotalDetails totalDetails)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Object