
com.stripe.param.PersonCollectionCreateParams Maven / Gradle / Ivy
// Generated by com.stripe.generator.entity.SdkBuilder
package com.stripe.param;
import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import com.stripe.param.common.EmptyParam;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PersonCollectionCreateParams extends ApiRequestParams {
/** The person's address. */
@SerializedName("address")
Address address;
/** The Kana variation of the person's address (Japan only). */
@SerializedName("address_kana")
AddressKana addressKana;
/** The Kanji variation of the person's address (Japan only). */
@SerializedName("address_kanji")
AddressKanji addressKanji;
/** The person's date of birth. */
@SerializedName("dob")
Dob dob;
/** The person's email address. */
@SerializedName("email")
String email;
/** Specifies which fields in the response should be expanded. */
@SerializedName("expand")
List expand;
/** The person's first name. */
@SerializedName("first_name")
String firstName;
/** The Kana variation of the person's first name (Japan only). */
@SerializedName("first_name_kana")
String firstNameKana;
/** The Kanji variation of the person's first name (Japan only). */
@SerializedName("first_name_kanji")
String firstNameKanji;
/** The person's gender (International regulations require either "male" or "female"). */
@SerializedName("gender")
String gender;
/**
* The person's ID number, as appropriate for their country. For example, a social security number
* in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also
* provide a [PII token provided by
* Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
*/
@SerializedName("id_number")
String idNumber;
/** The person's last name. */
@SerializedName("last_name")
String lastName;
/** The Kana variation of the person's last name (Japan only). */
@SerializedName("last_name_kana")
String lastNameKana;
/** The Kanji variation of the person's last name (Japan only). */
@SerializedName("last_name_kanji")
String lastNameKanji;
/** The person's maiden name. */
@SerializedName("maiden_name")
String maidenName;
/**
* 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 to `metadata`.
*/
@SerializedName("metadata")
Map metadata;
/**
* A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide
* details to the person.
*/
@SerializedName("person_token")
String personToken;
/** The person's phone number. */
@SerializedName("phone")
String phone;
/** The relationship that this person has with the account's legal entity. */
@SerializedName("relationship")
Relationship relationship;
/** The last 4 digits of the person's social security number. */
@SerializedName("ssn_last_4")
String ssnLast4;
/** The person's verification status. */
@SerializedName("verification")
Verification verification;
private PersonCollectionCreateParams(
Address address,
AddressKana addressKana,
AddressKanji addressKanji,
Dob dob,
String email,
List expand,
String firstName,
String firstNameKana,
String firstNameKanji,
String gender,
String idNumber,
String lastName,
String lastNameKana,
String lastNameKanji,
String maidenName,
Map metadata,
String personToken,
String phone,
Relationship relationship,
String ssnLast4,
Verification verification) {
this.address = address;
this.addressKana = addressKana;
this.addressKanji = addressKanji;
this.dob = dob;
this.email = email;
this.expand = expand;
this.firstName = firstName;
this.firstNameKana = firstNameKana;
this.firstNameKanji = firstNameKanji;
this.gender = gender;
this.idNumber = idNumber;
this.lastName = lastName;
this.lastNameKana = lastNameKana;
this.lastNameKanji = lastNameKanji;
this.maidenName = maidenName;
this.metadata = metadata;
this.personToken = personToken;
this.phone = phone;
this.relationship = relationship;
this.ssnLast4 = ssnLast4;
this.verification = verification;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.Builder();
}
public static class Builder {
private Address address;
private AddressKana addressKana;
private AddressKanji addressKanji;
private Dob dob;
private String email;
private List expand;
private String firstName;
private String firstNameKana;
private String firstNameKanji;
private String gender;
private String idNumber;
private String lastName;
private String lastNameKana;
private String lastNameKanji;
private String maidenName;
private Map metadata;
private String personToken;
private String phone;
private Relationship relationship;
private String ssnLast4;
private Verification verification;
/** Finalize and obtain parameter instance from this builder. */
public PersonCollectionCreateParams build() {
return new PersonCollectionCreateParams(
this.address,
this.addressKana,
this.addressKanji,
this.dob,
this.email,
this.expand,
this.firstName,
this.firstNameKana,
this.firstNameKanji,
this.gender,
this.idNumber,
this.lastName,
this.lastNameKana,
this.lastNameKanji,
this.maidenName,
this.metadata,
this.personToken,
this.phone,
this.relationship,
this.ssnLast4,
this.verification);
}
/** The person's address. */
public Builder setAddress(Address address) {
this.address = address;
return this;
}
/** The Kana variation of the person's address (Japan only). */
public Builder setAddressKana(AddressKana addressKana) {
this.addressKana = addressKana;
return this;
}
/** The Kanji variation of the person's address (Japan only). */
public Builder setAddressKanji(AddressKanji addressKanji) {
this.addressKanji = addressKanji;
return this;
}
/** The person's date of birth. */
public Builder setDob(Dob dob) {
this.dob = dob;
return this;
}
/** The person's email address. */
public Builder setEmail(String email) {
this.email = email;
return this;
}
/**
* 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. See {@link
* PersonCollectionCreateParams#expand} for the field documentation.
*/
public Builder addExpand(String element) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.add(element);
return this;
}
/**
* 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. See {@link
* PersonCollectionCreateParams#expand} for the field documentation.
*/
public Builder addAllExpand(List elements) {
if (this.expand == null) {
this.expand = new ArrayList<>();
}
this.expand.addAll(elements);
return this;
}
/** The person's first name. */
public Builder setFirstName(String firstName) {
this.firstName = firstName;
return this;
}
/** The Kana variation of the person's first name (Japan only). */
public Builder setFirstNameKana(String firstNameKana) {
this.firstNameKana = firstNameKana;
return this;
}
/** The Kanji variation of the person's first name (Japan only). */
public Builder setFirstNameKanji(String firstNameKanji) {
this.firstNameKanji = firstNameKanji;
return this;
}
/** The person's gender (International regulations require either "male" or "female"). */
public Builder setGender(String gender) {
this.gender = gender;
return this;
}
/**
* The person's ID number, as appropriate for their country. For example, a social security
* number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you
* can also provide a [PII token provided by
* Stripe.js](https://stripe.com/docs/stripe.js#collecting-pii-data).
*/
public Builder setIdNumber(String idNumber) {
this.idNumber = idNumber;
return this;
}
/** The person's last name. */
public Builder setLastName(String lastName) {
this.lastName = lastName;
return this;
}
/** The Kana variation of the person's last name (Japan only). */
public Builder setLastNameKana(String lastNameKana) {
this.lastNameKana = lastNameKana;
return this;
}
/** The Kanji variation of the person's last name (Japan only). */
public Builder setLastNameKanji(String lastNameKanji) {
this.lastNameKanji = lastNameKanji;
return this;
}
/** The person's maiden name. */
public Builder setMaidenName(String maidenName) {
this.maidenName = maidenName;
return this;
}
/**
* 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. See {@link
* PersonCollectionCreateParams#metadata} for the field documentation.
*/
public Builder putMetadata(String key, String value) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.put(key, value);
return this;
}
/**
* 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.
* See {@link PersonCollectionCreateParams#metadata} for the field documentation.
*/
public Builder putAllMetadata(Map map) {
if (this.metadata == null) {
this.metadata = new HashMap<>();
}
this.metadata.putAll(map);
return this;
}
/**
* A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide
* details to the person.
*/
public Builder setPersonToken(String personToken) {
this.personToken = personToken;
return this;
}
/** The person's phone number. */
public Builder setPhone(String phone) {
this.phone = phone;
return this;
}
/** The relationship that this person has with the account's legal entity. */
public Builder setRelationship(Relationship relationship) {
this.relationship = relationship;
return this;
}
/** The last 4 digits of the person's social security number. */
public Builder setSsnLast4(String ssnLast4) {
this.ssnLast4 = ssnLast4;
return this;
}
/** The person's verification status. */
public Builder setVerification(Verification verification) {
this.verification = verification;
return this;
}
}
public static class Address {
/** City, district, suburb, town, or village. */
@SerializedName("city")
String city;
/**
* Two-letter country code ([ISO 3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
@SerializedName("country")
String country;
/** Address line 1 (e.g., street, PO Box, or company name). */
@SerializedName("line1")
String line1;
/** Address line 2 (e.g., apartment, suite, unit, or building). */
@SerializedName("line2")
String line2;
/** ZIP or postal code. */
@SerializedName("postal_code")
String postalCode;
/** State, county, province, or region. */
@SerializedName("state")
String state;
private Address(
String city, String country, String line1, String line2, String postalCode, String state) {
this.city = city;
this.country = country;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.Address.Builder();
}
public static class Builder {
private String city;
private String country;
private String line1;
private String line2;
private String postalCode;
private String state;
/** Finalize and obtain parameter instance from this builder. */
public Address build() {
return new Address(
this.city, this.country, this.line1, this.line2, this.postalCode, this.state);
}
/** City, district, suburb, town, or village. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code ([ISO 3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/** Address line 1 (e.g., street, PO Box, or company name). */
public Builder setLine1(String line1) {
this.line1 = line1;
return this;
}
/** Address line 2 (e.g., apartment, suite, unit, or building). */
public Builder setLine2(String line2) {
this.line2 = line2;
return this;
}
/** ZIP or postal code. */
public Builder setPostalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/** State, county, province, or region. */
public Builder setState(String state) {
this.state = state;
return this;
}
}
}
public static class AddressKana {
/** City or ward. */
@SerializedName("city")
String city;
/**
* Two-letter country code ([ISO 3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
@SerializedName("country")
String country;
/** Block or building number. */
@SerializedName("line1")
String line1;
/** Building details. */
@SerializedName("line2")
String line2;
/** Postal code. */
@SerializedName("postal_code")
String postalCode;
/** Prefecture. */
@SerializedName("state")
String state;
/** Town or cho-me. */
@SerializedName("town")
String town;
private AddressKana(
String city,
String country,
String line1,
String line2,
String postalCode,
String state,
String town) {
this.city = city;
this.country = country;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
this.town = town;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.AddressKana.Builder();
}
public static class Builder {
private String city;
private String country;
private String line1;
private String line2;
private String postalCode;
private String state;
private String town;
/** Finalize and obtain parameter instance from this builder. */
public AddressKana build() {
return new AddressKana(
this.city,
this.country,
this.line1,
this.line2,
this.postalCode,
this.state,
this.town);
}
/** City or ward. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code ([ISO 3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/** Block or building number. */
public Builder setLine1(String line1) {
this.line1 = line1;
return this;
}
/** Building details. */
public Builder setLine2(String line2) {
this.line2 = line2;
return this;
}
/** Postal code. */
public Builder setPostalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/** Prefecture. */
public Builder setState(String state) {
this.state = state;
return this;
}
/** Town or cho-me. */
public Builder setTown(String town) {
this.town = town;
return this;
}
}
}
public static class AddressKanji {
/** City or ward. */
@SerializedName("city")
String city;
/**
* Two-letter country code ([ISO 3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
@SerializedName("country")
String country;
/** Block or building number. */
@SerializedName("line1")
String line1;
/** Building details. */
@SerializedName("line2")
String line2;
/** Postal code. */
@SerializedName("postal_code")
String postalCode;
/** Prefecture. */
@SerializedName("state")
String state;
/** Town or cho-me. */
@SerializedName("town")
String town;
private AddressKanji(
String city,
String country,
String line1,
String line2,
String postalCode,
String state,
String town) {
this.city = city;
this.country = country;
this.line1 = line1;
this.line2 = line2;
this.postalCode = postalCode;
this.state = state;
this.town = town;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.AddressKanji.Builder();
}
public static class Builder {
private String city;
private String country;
private String line1;
private String line2;
private String postalCode;
private String state;
private String town;
/** Finalize and obtain parameter instance from this builder. */
public AddressKanji build() {
return new AddressKanji(
this.city,
this.country,
this.line1,
this.line2,
this.postalCode,
this.state,
this.town);
}
/** City or ward. */
public Builder setCity(String city) {
this.city = city;
return this;
}
/**
* Two-letter country code ([ISO 3166-1
* alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
*/
public Builder setCountry(String country) {
this.country = country;
return this;
}
/** Block or building number. */
public Builder setLine1(String line1) {
this.line1 = line1;
return this;
}
/** Building details. */
public Builder setLine2(String line2) {
this.line2 = line2;
return this;
}
/** Postal code. */
public Builder setPostalCode(String postalCode) {
this.postalCode = postalCode;
return this;
}
/** Prefecture. */
public Builder setState(String state) {
this.state = state;
return this;
}
/** Town or cho-me. */
public Builder setTown(String town) {
this.town = town;
return this;
}
}
}
public static class Dob {
/** The day of birth, between 1 and 31. */
@SerializedName("day")
Long day;
/** The month of birth, between 1 and 12. */
@SerializedName("month")
Long month;
/** The four-digit year of birth. */
@SerializedName("year")
Long year;
private Dob(Long day, Long month, Long year) {
this.day = day;
this.month = month;
this.year = year;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.Dob.Builder();
}
public static class Builder {
private Long day;
private Long month;
private Long year;
/** Finalize and obtain parameter instance from this builder. */
public Dob build() {
return new Dob(this.day, this.month, this.year);
}
/** The day of birth, between 1 and 31. */
public Builder setDay(Long day) {
this.day = day;
return this;
}
/** The month of birth, between 1 and 12. */
public Builder setMonth(Long month) {
this.month = month;
return this;
}
/** The four-digit year of birth. */
public Builder setYear(Long year) {
this.year = year;
return this;
}
}
}
public static class Relationship {
/**
* Whether the person opened the account. This person provides information about themselves, and
* general information about the account.
*/
@SerializedName("account_opener")
Boolean accountOpener;
/**
* Whether the person is a director of the account's legal entity. Currently only required for
* accounts in the EU. Directors are typically members of the governing board of the company, or
* responsible for ensuring the company meets its regulatory obligations.
*/
@SerializedName("director")
Boolean director;
/** Whether the person is an owner of the account’s legal entity. */
@SerializedName("owner")
Boolean owner;
/** The percent owned by the person of the account's legal entity. */
@SerializedName("percent_ownership")
Object percentOwnership;
/** The person's title (e.g., CEO, Support Engineer). */
@SerializedName("title")
String title;
private Relationship(
Boolean accountOpener,
Boolean director,
Boolean owner,
Object percentOwnership,
String title) {
this.accountOpener = accountOpener;
this.director = director;
this.owner = owner;
this.percentOwnership = percentOwnership;
this.title = title;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.Relationship.Builder();
}
public static class Builder {
private Boolean accountOpener;
private Boolean director;
private Boolean owner;
private Object percentOwnership;
private String title;
/** Finalize and obtain parameter instance from this builder. */
public Relationship build() {
return new Relationship(
this.accountOpener, this.director, this.owner, this.percentOwnership, this.title);
}
/**
* Whether the person opened the account. This person provides information about themselves,
* and general information about the account.
*/
public Builder setAccountOpener(Boolean accountOpener) {
this.accountOpener = accountOpener;
return this;
}
/**
* Whether the person is a director of the account's legal entity. Currently only required for
* accounts in the EU. Directors are typically members of the governing board of the company,
* or responsible for ensuring the company meets its regulatory obligations.
*/
public Builder setDirector(Boolean director) {
this.director = director;
return this;
}
/** Whether the person is an owner of the account’s legal entity. */
public Builder setOwner(Boolean owner) {
this.owner = owner;
return this;
}
/** The percent owned by the person of the account's legal entity. */
public Builder setPercentOwnership(EmptyParam percentOwnership) {
this.percentOwnership = percentOwnership;
return this;
}
/** The percent owned by the person of the account's legal entity. */
public Builder setPercentOwnership(BigDecimal percentOwnership) {
this.percentOwnership = percentOwnership;
return this;
}
/** The person's title (e.g., CEO, Support Engineer). */
public Builder setTitle(String title) {
this.title = title;
return this;
}
}
}
public static class Verification {
/** An identifying document, either a passport or local ID card. */
@SerializedName("document")
Document document;
private Verification(Document document) {
this.document = document;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.Verification.Builder();
}
public static class Builder {
private Document document;
/** Finalize and obtain parameter instance from this builder. */
public Verification build() {
return new Verification(this.document);
}
/** An identifying document, either a passport or local ID card. */
public Builder setDocument(Document document) {
this.document = document;
return this;
}
}
public static class Document {
/**
* The back of an ID returned by a [file upload](#create_file) with a `purpose` value of
* `identity_document`.
*/
@SerializedName("back")
String back;
/**
* The front of an ID returned by a [file upload](#create_file) with a `purpose` value of
* `identity_document`.
*/
@SerializedName("front")
String front;
private Document(String back, String front) {
this.back = back;
this.front = front;
}
public static Builder builder() {
return new com.stripe.param.PersonCollectionCreateParams.Verification.Document.Builder();
}
public static class Builder {
private String back;
private String front;
/** Finalize and obtain parameter instance from this builder. */
public Document build() {
return new Document(this.back, this.front);
}
/**
* The back of an ID returned by a [file upload](#create_file) with a `purpose` value of
* `identity_document`.
*/
public Builder setBack(String back) {
this.back = back;
return this;
}
/**
* The front of an ID returned by a [file upload](#create_file) with a `purpose` value of
* `identity_document`.
*/
public Builder setFront(String front) {
this.front = front;
return this;
}
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy