Package com.stripe.param
Class CustomerUpdateParams.Builder
- java.lang.Object
-
- com.stripe.param.CustomerUpdateParams.Builder
-
- Enclosing class:
- CustomerUpdateParams
public static class CustomerUpdateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomerUpdateParams.Builder
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.CustomerUpdateParams.Builder
addAllPreferredLocale(java.util.List<java.lang.String> elements)
Add all elements to `preferredLocales` list.CustomerUpdateParams.Builder
addExpand(java.lang.String element)
Add an element to `expand` list.CustomerUpdateParams.Builder
addPreferredLocale(java.lang.String element)
Add an element to `preferredLocales` list.CustomerUpdateParams
build()
Finalize and obtain parameter instance from this builder.CustomerUpdateParams.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.CustomerUpdateParams.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.CustomerUpdateParams.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.CustomerUpdateParams.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.CustomerUpdateParams.Builder
setAddress(EmptyParam address)
The customer's address.CustomerUpdateParams.Builder
setAddress(CustomerUpdateParams.Address address)
The customer's address.CustomerUpdateParams.Builder
setBalance(java.lang.Long balance)
An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices.CustomerUpdateParams.Builder
setCoupon(EmptyParam coupon)
CustomerUpdateParams.Builder
setCoupon(java.lang.String coupon)
CustomerUpdateParams.Builder
setDefaultSource(EmptyParam defaultSource)
If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method parameter.CustomerUpdateParams.Builder
setDefaultSource(java.lang.String defaultSource)
If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method parameter.CustomerUpdateParams.Builder
setDescription(EmptyParam description)
An arbitrary string that you can attach to a customer object.CustomerUpdateParams.Builder
setDescription(java.lang.String description)
An arbitrary string that you can attach to a customer object.CustomerUpdateParams.Builder
setEmail(EmptyParam email)
Customer's email address.CustomerUpdateParams.Builder
setEmail(java.lang.String email)
Customer's email address.CustomerUpdateParams.Builder
setInvoicePrefix(EmptyParam invoicePrefix)
The prefix for the customer used to generate unique invoice numbers.CustomerUpdateParams.Builder
setInvoicePrefix(java.lang.String invoicePrefix)
The prefix for the customer used to generate unique invoice numbers.CustomerUpdateParams.Builder
setInvoiceSettings(CustomerUpdateParams.InvoiceSettings invoiceSettings)
Default invoice settings for this customer.CustomerUpdateParams.Builder
setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object.CustomerUpdateParams.Builder
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.CustomerUpdateParams.Builder
setName(EmptyParam name)
The customer's full name or business name.CustomerUpdateParams.Builder
setName(java.lang.String name)
The customer's full name or business name.CustomerUpdateParams.Builder
setNextInvoiceSequence(java.lang.Long nextInvoiceSequence)
The sequence to be used on the customer's next invoice.CustomerUpdateParams.Builder
setPhone(EmptyParam phone)
The customer's phone number.CustomerUpdateParams.Builder
setPhone(java.lang.String phone)
The customer's phone number.CustomerUpdateParams.Builder
setPromotionCode(EmptyParam promotionCode)
The API ID of a promotion code to apply to the customer.CustomerUpdateParams.Builder
setPromotionCode(java.lang.String promotionCode)
The API ID of a promotion code to apply to the customer.CustomerUpdateParams.Builder
setShipping(EmptyParam shipping)
The customer's shipping information.CustomerUpdateParams.Builder
setShipping(CustomerUpdateParams.Shipping shipping)
The customer's shipping information.CustomerUpdateParams.Builder
setSource(EmptyParam source)
CustomerUpdateParams.Builder
setSource(java.lang.String source)
CustomerUpdateParams.Builder
setTax(CustomerUpdateParams.Tax tax)
Tax details about the customer.CustomerUpdateParams.Builder
setTaxExempt(EmptyParam taxExempt)
The customer's tax exemption.CustomerUpdateParams.Builder
setTaxExempt(CustomerUpdateParams.TaxExempt taxExempt)
The customer's tax exemption.CustomerUpdateParams.Builder
setTrialEnd(CustomerUpdateParams.TrialEnd trialEnd)
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time.CustomerUpdateParams.Builder
setTrialEnd(java.lang.Long trialEnd)
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time.
-
-
-
Method Detail
-
build
public CustomerUpdateParams build()
Finalize and obtain parameter instance from this builder.
-
setAddress
public CustomerUpdateParams.Builder setAddress(CustomerUpdateParams.Address address)
The customer's address.
-
setAddress
public CustomerUpdateParams.Builder setAddress(EmptyParam address)
The customer's address.
-
setBalance
public CustomerUpdateParams.Builder setBalance(java.lang.Long balance)
An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
-
setCoupon
public CustomerUpdateParams.Builder setCoupon(java.lang.String coupon)
-
setCoupon
public CustomerUpdateParams.Builder setCoupon(EmptyParam coupon)
-
setDefaultSource
public CustomerUpdateParams.Builder setDefaultSource(java.lang.String defaultSource)
If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method parameter.Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
If you want to add a new payment source and make it the default, see the source property.
-
setDefaultSource
public CustomerUpdateParams.Builder setDefaultSource(EmptyParam defaultSource)
If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method parameter.Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
If you want to add a new payment source and make it the default, see the source property.
-
setDescription
public CustomerUpdateParams.Builder setDescription(java.lang.String description)
An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
-
setDescription
public CustomerUpdateParams.Builder setDescription(EmptyParam description)
An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
-
setEmail
public CustomerUpdateParams.Builder setEmail(java.lang.String email)
Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to 512 characters.
-
setEmail
public CustomerUpdateParams.Builder setEmail(EmptyParam email)
Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to 512 characters.
-
addExpand
public CustomerUpdateParams.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. SeeCustomerUpdateParams.expand
for the field documentation.
-
addAllExpand
public CustomerUpdateParams.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. SeeCustomerUpdateParams.expand
for the field documentation.
-
putExtraParam
public CustomerUpdateParams.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. SeeCustomerUpdateParams.extraParams
for the field documentation.
-
putAllExtraParam
public CustomerUpdateParams.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. SeeCustomerUpdateParams.extraParams
for the field documentation.
-
setInvoicePrefix
public CustomerUpdateParams.Builder setInvoicePrefix(java.lang.String invoicePrefix)
The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
-
setInvoicePrefix
public CustomerUpdateParams.Builder setInvoicePrefix(EmptyParam invoicePrefix)
The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
-
setInvoiceSettings
public CustomerUpdateParams.Builder setInvoiceSettings(CustomerUpdateParams.InvoiceSettings invoiceSettings)
Default invoice settings for this customer.
-
putMetadata
public CustomerUpdateParams.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. SeeCustomerUpdateParams.metadata
for the field documentation.
-
putAllMetadata
public CustomerUpdateParams.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. SeeCustomerUpdateParams.metadata
for the field documentation.
-
setMetadata
public CustomerUpdateParams.Builder setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
.
-
setMetadata
public CustomerUpdateParams.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
.
-
setName
public CustomerUpdateParams.Builder setName(java.lang.String name)
The customer's full name or business name.
-
setName
public CustomerUpdateParams.Builder setName(EmptyParam name)
The customer's full name or business name.
-
setNextInvoiceSequence
public CustomerUpdateParams.Builder setNextInvoiceSequence(java.lang.Long nextInvoiceSequence)
The sequence to be used on the customer's next invoice. Defaults to 1.
-
setPhone
public CustomerUpdateParams.Builder setPhone(java.lang.String phone)
The customer's phone number.
-
setPhone
public CustomerUpdateParams.Builder setPhone(EmptyParam phone)
The customer's phone number.
-
addPreferredLocale
public CustomerUpdateParams.Builder addPreferredLocale(java.lang.String element)
Add an element to `preferredLocales` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeCustomerUpdateParams.preferredLocales
for the field documentation.
-
addAllPreferredLocale
public CustomerUpdateParams.Builder addAllPreferredLocale(java.util.List<java.lang.String> elements)
Add all elements to `preferredLocales` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeCustomerUpdateParams.preferredLocales
for the field documentation.
-
setPromotionCode
public CustomerUpdateParams.Builder setPromotionCode(java.lang.String promotionCode)
The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.
-
setPromotionCode
public CustomerUpdateParams.Builder setPromotionCode(EmptyParam promotionCode)
The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.
-
setShipping
public CustomerUpdateParams.Builder setShipping(CustomerUpdateParams.Shipping shipping)
The customer's shipping information. Appears on invoices emailed to this customer.
-
setShipping
public CustomerUpdateParams.Builder setShipping(EmptyParam shipping)
The customer's shipping information. Appears on invoices emailed to this customer.
-
setSource
public CustomerUpdateParams.Builder setSource(java.lang.String source)
-
setSource
public CustomerUpdateParams.Builder setSource(EmptyParam source)
-
setTax
public CustomerUpdateParams.Builder setTax(CustomerUpdateParams.Tax tax)
Tax details about the customer.
-
setTaxExempt
public CustomerUpdateParams.Builder setTaxExempt(CustomerUpdateParams.TaxExempt taxExempt)
The customer's tax exemption. One ofnone
,exempt
, orreverse
.
-
setTaxExempt
public CustomerUpdateParams.Builder setTaxExempt(EmptyParam taxExempt)
The customer's tax exemption. One ofnone
,exempt
, orreverse
.
-
setTrialEnd
public CustomerUpdateParams.Builder setTrialEnd(CustomerUpdateParams.TrialEnd trialEnd)
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special valuenow
can be provided to end the customer's trial immediately. Can be at most two years frombilling_cycle_anchor
.
-
setTrialEnd
public CustomerUpdateParams.Builder setTrialEnd(java.lang.Long trialEnd)
Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special valuenow
can be provided to end the customer's trial immediately. Can be at most two years frombilling_cycle_anchor
.
-
-