Skip to content
Open
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
35 changes: 3 additions & 32 deletions src/main/java/com/gocardless/resources/BillingRequestTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private BillingRequestTemplate() {
private String mandateRequestDescription;
private Map<String, String> mandateRequestMetadata;
private String mandateRequestScheme;
private MandateRequestVerify mandateRequestVerify;
private String mandateRequestVerify;
private Map<String, String> metadata;
private String name;
private String paymentRequestAmount;
Expand Down Expand Up @@ -108,29 +108,9 @@ public String getMandateRequestScheme() {
}

/**
* Verification preference for the mandate. One of:
* <ul>
* <li>`minimum`: only verify if absolutely required, such as when part of scheme rules</li>
* <li>`recommended`: in addition to `minimum`, use the GoCardless payment intelligence solution
* to decide if a payer should be verified</li>
* <li>`when_available`: if verification mechanisms are available, use them</li>
* <li>`always`: as `when_available`, but fail to create the Billing Request if a mechanism
* isn't available</li>
* </ul>
*
* By default, all Billing Requests use the `recommended` verification preference. It uses
* GoCardless payment intelligence solution to determine if a payer is fraudulent or not. The
* verification mechanism is based on the response and the payer may be asked to verify
* themselves. If the feature is not available, `recommended` behaves like `minimum`.
*
* If you never wish to take advantage of our reduced risk products and Verified Mandates as
* they are released in new schemes, please use the `minimum` verification preference.
*
* See [Billing Requests: Creating Verified
* Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/)
* for more information.
* Verification preference for the mandate.
*/
public MandateRequestVerify getMandateRequestVerify() {
public String getMandateRequestVerify() {
return mandateRequestVerify;
}

Expand Down Expand Up @@ -210,15 +190,6 @@ public String getUpdatedAt() {
return updatedAt;
}

public enum MandateRequestVerify {
@SerializedName("minimum")
MINIMUM, @SerializedName("recommended")
RECOMMENDED, @SerializedName("when_available")
WHEN_AVAILABLE, @SerializedName("always")
ALWAYS, @SerializedName("unknown")
UNKNOWN
}

/**
* Represents a mandate request constraint resource returned from the API.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public static final class BillingRequestTemplateCreateRequest
private String mandateRequestDescription;
private Map<String, String> mandateRequestMetadata;
private String mandateRequestScheme;
private MandateRequestVerify mandateRequestVerify;
private String mandateRequestVerify;
private Map<String, String> metadata;
private String name;
private String paymentRequestAmount;
Expand Down Expand Up @@ -377,30 +377,10 @@ public BillingRequestTemplateCreateRequest withMandateRequestScheme(
}

/**
* Verification preference for the mandate. One of:
* <ul>
* <li>`minimum`: only verify if absolutely required, such as when part of scheme rules</li>
* <li>`recommended`: in addition to `minimum`, use the GoCardless payment intelligence
* solution to decide if a payer should be verified</li>
* <li>`when_available`: if verification mechanisms are available, use them</li>
* <li>`always`: as `when_available`, but fail to create the Billing Request if a mechanism
* isn't available</li>
* </ul>
*
* By default, all Billing Requests use the `recommended` verification preference. It uses
* GoCardless payment intelligence solution to determine if a payer is fraudulent or not.
* The verification mechanism is based on the response and the payer may be asked to verify
* themselves. If the feature is not available, `recommended` behaves like `minimum`.
*
* If you never wish to take advantage of our reduced risk products and Verified Mandates as
* they are released in new schemes, please use the `minimum` verification preference.
*
* See [Billing Requests: Creating Verified
* Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/)
* for more information.
* Verification preference for the mandate.
*/
public BillingRequestTemplateCreateRequest withMandateRequestVerify(
MandateRequestVerify mandateRequestVerify) {
String mandateRequestVerify) {
this.mandateRequestVerify = mandateRequestVerify;
return this;
}
Expand Down Expand Up @@ -558,20 +538,6 @@ protected boolean hasBody() {
return true;
}

public enum MandateRequestVerify {
@SerializedName("minimum")
MINIMUM, @SerializedName("recommended")
RECOMMENDED, @SerializedName("when_available")
WHEN_AVAILABLE, @SerializedName("always")
ALWAYS, @SerializedName("unknown")
UNKNOWN;

@Override
public String toString() {
return name().toLowerCase();
}
}

public static class Links {
private String creditor;

Expand Down Expand Up @@ -759,7 +725,7 @@ public static final class BillingRequestTemplateUpdateRequest
private String mandateRequestDescription;
private Map<String, String> mandateRequestMetadata;
private String mandateRequestScheme;
private MandateRequestVerify mandateRequestVerify;
private String mandateRequestVerify;
private Map<String, String> metadata;
private String name;
private String paymentRequestAmount;
Expand Down Expand Up @@ -908,30 +874,10 @@ public BillingRequestTemplateUpdateRequest withMandateRequestScheme(
}

/**
* Verification preference for the mandate. One of:
* <ul>
* <li>`minimum`: only verify if absolutely required, such as when part of scheme rules</li>
* <li>`recommended`: in addition to `minimum`, use the GoCardless payment intelligence
* solution to decide if a payer should be verified</li>
* <li>`when_available`: if verification mechanisms are available, use them</li>
* <li>`always`: as `when_available`, but fail to create the Billing Request if a mechanism
* isn't available</li>
* </ul>
*
* By default, all Billing Requests use the `recommended` verification preference. It uses
* GoCardless payment intelligence solution to determine if a payer is fraudulent or not.
* The verification mechanism is based on the response and the payer may be asked to verify
* themselves. If the feature is not available, `recommended` behaves like `minimum`.
*
* If you never wish to take advantage of our reduced risk products and Verified Mandates as
* they are released in new schemes, please use the `minimum` verification preference.
*
* See [Billing Requests: Creating Verified
* Mandates](https://developer.gocardless.com/getting-started/billing-requests/verified-mandates/)
* for more information.
* Verification preference for the mandate.
*/
public BillingRequestTemplateUpdateRequest withMandateRequestVerify(
MandateRequestVerify mandateRequestVerify) {
String mandateRequestVerify) {
this.mandateRequestVerify = mandateRequestVerify;
return this;
}
Expand Down Expand Up @@ -1081,20 +1027,6 @@ protected boolean hasBody() {
return true;
}

public enum MandateRequestVerify {
@SerializedName("minimum")
MINIMUM, @SerializedName("recommended")
RECOMMENDED, @SerializedName("when_available")
WHEN_AVAILABLE, @SerializedName("always")
ALWAYS, @SerializedName("unknown")
UNKNOWN;

@Override
public String toString() {
return name().toLowerCase();
}
}

public static class PeriodicLimits {
private Alignment alignment;
private Integer maxPayments;
Expand Down