public static final class CustomerService.CustomerCreateRequest extends IdempotentPostRequest<Customer>
Request class for CustomerService.create()
.
Creates a new customer object.
Modifier and Type | Method and Description |
---|---|
CustomerService.CustomerCreateRequest |
withAddressLine1(java.lang.String addressLine1)
The first line of the customer’s address.
|
CustomerService.CustomerCreateRequest |
withAddressLine2(java.lang.String addressLine2)
The second line of the customer’s address.
|
CustomerService.CustomerCreateRequest |
withAddressLine3(java.lang.String addressLine3)
The third line of the customer’s address.
|
CustomerService.CustomerCreateRequest |
withCity(java.lang.String city)
The city of the customer’s address.
|
CustomerService.CustomerCreateRequest |
withCompanyName(java.lang.String companyName)
Customer’s company name.
|
CustomerService.CustomerCreateRequest |
withCountryCode(java.lang.String countryCode)
ISO 3166-1 alpha-2 code.
|
CustomerService.CustomerCreateRequest |
withDanishIdentityNumber(java.lang.String danishIdentityNumber)
For Danish customers only.
|
CustomerService.CustomerCreateRequest |
withEmail(java.lang.String email)
Customer’s email address.
|
CustomerService.CustomerCreateRequest |
withFamilyName(java.lang.String familyName)
Customer’s surname.
|
CustomerService.CustomerCreateRequest |
withGivenName(java.lang.String givenName)
Customer’s first name.
|
CustomerService.CustomerCreateRequest |
withHeader(java.lang.String headerName,
java.lang.String headerValue) |
CustomerService.CustomerCreateRequest |
withIdempotencyKey(java.lang.String idempotencyKey) |
CustomerService.CustomerCreateRequest |
withLanguage(java.lang.String language)
ISO 639-1 code.
|
CustomerService.CustomerCreateRequest |
withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data.
|
CustomerService.CustomerCreateRequest |
withMetadata(java.lang.String key,
java.lang.String value)
Key-value store of custom data.
|
CustomerService.CustomerCreateRequest |
withPostalCode(java.lang.String postalCode)
The customer’s postal code.
|
CustomerService.CustomerCreateRequest |
withRegion(java.lang.String region)
The customer’s address region, county or department.
|
CustomerService.CustomerCreateRequest |
withSwedishIdentityNumber(java.lang.String swedishIdentityNumber)
For Swedish customers only.
|
execute
executeWrapped
public CustomerService.CustomerCreateRequest withAddressLine1(java.lang.String addressLine1)
The first line of the customer’s address.
public CustomerService.CustomerCreateRequest withAddressLine2(java.lang.String addressLine2)
The second line of the customer’s address.
public CustomerService.CustomerCreateRequest withAddressLine3(java.lang.String addressLine3)
The third line of the customer’s address.
public CustomerService.CustomerCreateRequest withCity(java.lang.String city)
The city of the customer’s address.
public CustomerService.CustomerCreateRequest withCompanyName(java.lang.String companyName)
Customer’s company name. Required unless a given_name
and family_name
are provided.
public CustomerService.CustomerCreateRequest withCountryCode(java.lang.String countryCode)
ISO 3166-1 alpha-2 code.
public CustomerService.CustomerCreateRequest withDanishIdentityNumber(java.lang.String danishIdentityNumber)
For Danish customers only. The civic/company number (CPR or CVR) of the customer. Must be supplied if the customer’s bank account is denominated in Danish krone (DKK).
public CustomerService.CustomerCreateRequest withEmail(java.lang.String email)
Customer’s email address. Required in most cases, as this allows GoCardless to send notifications to this customer.
public CustomerService.CustomerCreateRequest withFamilyName(java.lang.String familyName)
Customer’s surname. Required unless a company_name
is provided.
public CustomerService.CustomerCreateRequest withGivenName(java.lang.String givenName)
Customer’s first name. Required unless a company_name
is provided.
public CustomerService.CustomerCreateRequest withLanguage(java.lang.String language)
ISO 639-1 code. Used as the language for notification emails sent by GoCardless if your organisation does not send its own (see compliance requirements). Currently only “en”, “fr”, “de”, “pt”, “es”, “it”, “nl”, “da”, “nb”, “sl”, “sv” are supported. If this is not provided, the language will be chosen based on the country_code
(if supplied) or default to “en”.
public CustomerService.CustomerCreateRequest withMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public CustomerService.CustomerCreateRequest withMetadata(java.lang.String key, java.lang.String value)
Key-value store of custom data. Up to 3 keys are permitted, with key names up to 50 characters and values up to 500 characters.
public CustomerService.CustomerCreateRequest withPostalCode(java.lang.String postalCode)
The customer’s postal code.
public CustomerService.CustomerCreateRequest withRegion(java.lang.String region)
The customer’s address region, county or department.
public CustomerService.CustomerCreateRequest withSwedishIdentityNumber(java.lang.String swedishIdentityNumber)
For Swedish customers only. The civic/company number (personnummer, samordningsnummer, or organisationsnummer) of the customer. Must be supplied if the customer’s bank account is denominated in Swedish krona (SEK). This field cannot be changed once it has been set.
public CustomerService.CustomerCreateRequest withIdempotencyKey(java.lang.String idempotencyKey)
public CustomerService.CustomerCreateRequest withHeader(java.lang.String headerName, java.lang.String headerValue)