Skip to content

Add support for political_exposure on Person #1062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/main/java/com/stripe/model/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ public class Person extends ApiResource implements HasId, MetadataStore<Person>
@SerializedName("phone")
String phone;

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*
* <p>One of {@code existing}, or {@code none}.
*/
@SerializedName("political_exposure")
String politicalExposure;

@SerializedName("relationship")
Relationship relationship;

Expand Down
38 changes: 38 additions & 0 deletions src/main/java/com/stripe/param/AccountCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,14 @@ public static class Individual {
@SerializedName("phone")
String phone;

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
@SerializedName("political_exposure")
PoliticalExposure politicalExposure;

/** The last four digits of the individual's Social Security Number (U.S. only). */
@SerializedName("ssn_last_4")
String ssnLast4;
Expand All @@ -1995,6 +2003,7 @@ private Individual(
String maidenName,
Object metadata,
String phone,
PoliticalExposure politicalExposure,
String ssnLast4,
Verification verification) {
this.address = address;
Expand All @@ -2014,6 +2023,7 @@ private Individual(
this.maidenName = maidenName;
this.metadata = metadata;
this.phone = phone;
this.politicalExposure = politicalExposure;
this.ssnLast4 = ssnLast4;
this.verification = verification;
}
Expand Down Expand Up @@ -2057,6 +2067,8 @@ public static class Builder {

private String phone;

private PoliticalExposure politicalExposure;

private String ssnLast4;

private Verification verification;
Expand All @@ -2081,6 +2093,7 @@ public Individual build() {
this.maidenName,
this.metadata,
this.phone,
this.politicalExposure,
this.ssnLast4,
this.verification);
}
Expand Down Expand Up @@ -2266,6 +2279,16 @@ public Builder setPhone(String phone) {
return this;
}

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function,
* in any jurisdiction.
*/
public Builder setPoliticalExposure(PoliticalExposure politicalExposure) {
this.politicalExposure = politicalExposure;
return this;
}

/** The last four digits of the individual's Social Security Number (U.S. only). */
public Builder setSsnLast4(String ssnLast4) {
this.ssnLast4 = ssnLast4;
Expand Down Expand Up @@ -3171,6 +3194,21 @@ public Builder setFront(String front) {
}
}
}

public enum PoliticalExposure implements ApiRequestParams.EnumParam {
@SerializedName("existing")
EXISTING("existing"),

@SerializedName("none")
NONE("none");

@Getter(onMethod_ = {@Override})
private final String value;

PoliticalExposure(String value) {
this.value = value;
}
}
}

@Getter
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/com/stripe/param/AccountUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -2262,6 +2262,14 @@ public static class Individual {
@SerializedName("phone")
Object phone;

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
@SerializedName("political_exposure")
PoliticalExposure politicalExposure;

/** The last four digits of the individual's Social Security Number (U.S. only). */
@SerializedName("ssn_last_4")
Object ssnLast4;
Expand All @@ -2288,6 +2296,7 @@ private Individual(
Object maidenName,
Object metadata,
Object phone,
PoliticalExposure politicalExposure,
Object ssnLast4,
Verification verification) {
this.address = address;
Expand All @@ -2307,6 +2316,7 @@ private Individual(
this.maidenName = maidenName;
this.metadata = metadata;
this.phone = phone;
this.politicalExposure = politicalExposure;
this.ssnLast4 = ssnLast4;
this.verification = verification;
}
Expand Down Expand Up @@ -2350,6 +2360,8 @@ public static class Builder {

private Object phone;

private PoliticalExposure politicalExposure;

private Object ssnLast4;

private Verification verification;
Expand All @@ -2374,6 +2386,7 @@ public Individual build() {
this.maidenName,
this.metadata,
this.phone,
this.politicalExposure,
this.ssnLast4,
this.verification);
}
Expand Down Expand Up @@ -2634,6 +2647,16 @@ public Builder setPhone(EmptyParam phone) {
return this;
}

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function,
* in any jurisdiction.
*/
public Builder setPoliticalExposure(PoliticalExposure politicalExposure) {
this.politicalExposure = politicalExposure;
return this;
}

/** The last four digits of the individual's Social Security Number (U.S. only). */
public Builder setSsnLast4(String ssnLast4) {
this.ssnLast4 = ssnLast4;
Expand Down Expand Up @@ -3718,6 +3741,21 @@ public Builder setFront(EmptyParam front) {
}
}
}

public enum PoliticalExposure implements ApiRequestParams.EnumParam {
@SerializedName("existing")
EXISTING("existing"),

@SerializedName("none")
NONE("none");

@Getter(onMethod_ = {@Override})
private final String value;

PoliticalExposure(String value) {
this.value = value;
}
}
}

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ public class PersonCollectionCreateParams extends ApiRequestParams {
@SerializedName("phone")
String phone;

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
@SerializedName("political_exposure")
String politicalExposure;

/** The relationship that this person has with the account's legal entity. */
@SerializedName("relationship")
Relationship relationship;
Expand Down Expand Up @@ -141,6 +149,7 @@ private PersonCollectionCreateParams(
Object metadata,
String personToken,
String phone,
String politicalExposure,
Relationship relationship,
String ssnLast4,
Verification verification) {
Expand All @@ -163,6 +172,7 @@ private PersonCollectionCreateParams(
this.metadata = metadata;
this.personToken = personToken;
this.phone = phone;
this.politicalExposure = politicalExposure;
this.relationship = relationship;
this.ssnLast4 = ssnLast4;
this.verification = verification;
Expand Down Expand Up @@ -211,6 +221,8 @@ public static class Builder {

private String phone;

private String politicalExposure;

private Relationship relationship;

private String ssnLast4;
Expand Down Expand Up @@ -239,6 +251,7 @@ public PersonCollectionCreateParams build() {
this.metadata,
this.personToken,
this.phone,
this.politicalExposure,
this.relationship,
this.ssnLast4,
this.verification);
Expand Down Expand Up @@ -459,6 +472,16 @@ public Builder setPhone(String phone) {
return this;
}

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
public Builder setPoliticalExposure(String politicalExposure) {
this.politicalExposure = politicalExposure;
return this;
}

/** The relationship that this person has with the account's legal entity. */
public Builder setRelationship(Relationship relationship) {
this.relationship = relationship;
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/com/stripe/param/PersonUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ public class PersonUpdateParams extends ApiRequestParams {
@SerializedName("phone")
Object phone;

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
@SerializedName("political_exposure")
Object politicalExposure;

/** The relationship that this person has with the account's legal entity. */
@SerializedName("relationship")
Relationship relationship;
Expand Down Expand Up @@ -141,6 +149,7 @@ private PersonUpdateParams(
Object metadata,
Object personToken,
Object phone,
Object politicalExposure,
Relationship relationship,
Object ssnLast4,
Verification verification) {
Expand All @@ -163,6 +172,7 @@ private PersonUpdateParams(
this.metadata = metadata;
this.personToken = personToken;
this.phone = phone;
this.politicalExposure = politicalExposure;
this.relationship = relationship;
this.ssnLast4 = ssnLast4;
this.verification = verification;
Expand Down Expand Up @@ -211,6 +221,8 @@ public static class Builder {

private Object phone;

private Object politicalExposure;

private Relationship relationship;

private Object ssnLast4;
Expand Down Expand Up @@ -239,6 +251,7 @@ public PersonUpdateParams build() {
this.metadata,
this.personToken,
this.phone,
this.politicalExposure,
this.relationship,
this.ssnLast4,
this.verification);
Expand Down Expand Up @@ -542,6 +555,26 @@ public Builder setPhone(EmptyParam phone) {
return this;
}

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
public Builder setPoliticalExposure(String politicalExposure) {
this.politicalExposure = politicalExposure;
return this;
}

/**
* Indicates if the person or any of their representatives, family members, or other closely
* related persons, declares that they hold or have held an important public job or function, in
* any jurisdiction.
*/
public Builder setPoliticalExposure(EmptyParam politicalExposure) {
this.politicalExposure = politicalExposure;
return this;
}

/** The relationship that this person has with the account's legal entity. */
public Builder setRelationship(Relationship relationship) {
this.relationship = relationship;
Expand Down
Loading