Skip to content
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
127 changes: 120 additions & 7 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2793,6 +2793,97 @@ paths:
schema:
"$ref": "#/components/schemas/Error"
x-code-samples: []
"/accounts/{account_id}/billing_infos/{billing_info_id}/verify":
post:
tags:
- billing_infos
operationId: verify_billing_infos
summary: Verify a billing information's credit card
parameters:
- "$ref": "#/components/parameters/account_id"
- "$ref": "#/components/parameters/billing_info_id"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/BillingInfoVerify"
required: false
responses:
'200':
description: Transaction information from verify.
content:
application/json:
schema:
"$ref": "#/components/schemas/Transaction"
'404':
description: Billing information not found, or incorrect site or account
ID.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
default:
description: Unexpected error.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
'422':
description: Invalid billing information, or error running the verification
transaction.
content:
application/json:
schema:
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
x-code-samples: []
"/accounts/{account_id}/billing_infos/{billing_info_id}/verify_cvv":
post:
tags:
- billing_infos
operationId: verify_billing_infos_cvv
summary: Verify a billing information's credit card cvv
parameters:
- "$ref": "#/components/parameters/account_id"
- "$ref": "#/components/parameters/billing_info_id"
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/BillingInfoVerifyCVV"
responses:
'200':
description: Transaction information from verify.
content:
application/json:
schema:
"$ref": "#/components/schemas/Transaction"
'404':
description: Billing information not found, or incorrect site or account
ID.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
default:
description: Unexpected error.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
'422':
description: Invalid billing information, or error running the verification
transaction.
content:
application/json:
schema:
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
'429':
description: Too many CVV verification attempts.
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
x-code-samples: []
"/accounts/{account_id}/coupon_redemptions":
get:
tags:
Expand Down Expand Up @@ -18896,6 +18987,8 @@ components:
amazon_billing_agreement_id:
type: string
title: Amazon billing agreement ID
description: Only supported on Amazon V1. For Amazon V2, use token_id with
Recurly.js.
paypal_billing_agreement_id:
type: string
title: PayPal billing agreement ID
Expand Down Expand Up @@ -18999,12 +19092,27 @@ components:
type: string
description: An identifier for a specific payment gateway.
maxLength: 13
three_d_secure_action_result_token_id:
type: string
description: A token generated by Recurly.js after completing a 3-D Secure
device fingerprinting or authentication challenge.
BillingInfoVerifyCVV:
type: object
properties:
verification_value:
type: string
description: Unique security code for a credit card.
gateway_code:
type: string
description: An identifier for a specific payment gateway.
maxLength: 13
three_d_secure_action_result_token_id:
type: string
description: A token generated by Recurly.js after completing a 3-D Secure
device fingerprinting or authentication challenge.
token_id:
type: string
description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
Coupon:
type: object
properties:
Expand Down Expand Up @@ -20315,6 +20423,11 @@ components:
title: Subtotal
description: The summation of charges and credits, before discounts and
taxes.
subtotal_after_discount:
type: number
format: float
title: Subtotal After Discount
description: The summation of charges and credits, after discounts applied.
tax:
type: number
format: float
Expand Down Expand Up @@ -20958,7 +21071,7 @@ components:
type: number
format: float
title: Total after discounts and taxes
description: "`(quantity * unit_amount) - (discount + tax)`"
description: "`(quantity * unit_amount) - discount + tax`"
description:
type: string
title: Description
Expand Down Expand Up @@ -21327,12 +21440,12 @@ components:
origin:
title: Origin
description: Origin `external_gift_card` is allowed if the Gift Cards feature
is enabled on your site and `type` is `credit`. Set this value in order
to track gift card credits from external gift cards (like InComm). It
also skips billing information requirements. Origin `prepayment` is only
allowed if `type` is `charge` and `tax_exempt` is left blank or set to
true. This origin creates a charge and opposite credit on the account
to be used for future invoices.
is enabled on your site, `type` is `credit` and `tax_exempt` is `true`
if you are using taxes. Set this value in order to track gift card credits
from external gift cards (like InComm). It also skips billing information
requirements. Origin `prepayment` is only allowed if `type` is `charge`
and `tax_exempt` is left blank or set to true. This origin creates a
charge and opposite credit on the account to be used for future invoices.
"$ref": "#/components/schemas/LineItemCreateOriginEnum"
custom_fields:
"$ref": "#/components/schemas/CustomFields"
Expand Down
56 changes: 56 additions & 0 deletions src/main/java/com/recurly/v3/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,62 @@ public void removeABillingInfo(String accountId, String billingInfoId) {
this.makeRequest("DELETE", path);
}

/**
* Verify a billing information's credit card
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_infos">verify_billing_infos api documentation</a>
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
* @param billingInfoId Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
* @return Transaction information from verify.
*/
public Transaction verifyBillingInfos(String accountId, String billingInfoId) {
final String url = "/accounts/{account_id}/billing_infos/{billing_info_id}/verify";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("account_id", accountId);
urlParams.put("billing_info_id", billingInfoId);
final String path = this.interpolatePath(url, urlParams);
Type returnType = Transaction.class;
return this.makeRequest("POST", path, returnType);
}

/**
* Verify a billing information's credit card
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_infos">verify_billing_infos api documentation</a>
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
* @param billingInfoId Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
* @param body The body of the request.
* @return Transaction information from verify.
*/
public Transaction verifyBillingInfos(String accountId, String billingInfoId, BillingInfoVerify body) {
final String url = "/accounts/{account_id}/billing_infos/{billing_info_id}/verify";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("account_id", accountId);
urlParams.put("billing_info_id", billingInfoId);
final String path = this.interpolatePath(url, urlParams);
Type returnType = Transaction.class;
return this.makeRequest("POST", path, body, returnType);
}

/**
* Verify a billing information's credit card cvv
*
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_infos_cvv">verify_billing_infos_cvv api documentation</a>
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
* @param billingInfoId Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
* @param body The body of the request.
* @return Transaction information from verify.
*/
public Transaction verifyBillingInfosCvv(String accountId, String billingInfoId, BillingInfoVerifyCVV body) {
final String url = "/accounts/{account_id}/billing_infos/{billing_info_id}/verify_cvv";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("account_id", accountId);
urlParams.put("billing_info_id", billingInfoId);
final String path = this.interpolatePath(url, urlParams);
Type returnType = Transaction.class;
return this.makeRequest("POST", path, body, returnType);
}

/**
* List the coupon redemptions for an account
*
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/com/recurly/v3/requests/BillingInfoCreate.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class BillingInfoCreate extends Request {
@Expose
private Address address;

/** Amazon billing agreement ID */
/** Only supported on Amazon V1. For Amazon V2, use token_id with Recurly.js. */
@SerializedName("amazon_billing_agreement_id")
@Expose
private String amazonBillingAgreementId;
Expand Down Expand Up @@ -286,12 +286,15 @@ public void setAddress(final Address address) {
this.address = address;
}

/** Amazon billing agreement ID */
/** Only supported on Amazon V1. For Amazon V2, use token_id with Recurly.js. */
public String getAmazonBillingAgreementId() {
return this.amazonBillingAgreementId;
}

/** @param amazonBillingAgreementId Amazon billing agreement ID */
/**
* @param amazonBillingAgreementId Only supported on Amazon V1. For Amazon V2, use token_id with
* Recurly.js.
*/
public void setAmazonBillingAgreementId(final String amazonBillingAgreementId) {
this.amazonBillingAgreementId = amazonBillingAgreementId;
}
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/recurly/v3/requests/BillingInfoVerify.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ public class BillingInfoVerify extends Request {
@Expose
private String gatewayCode;

/**
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
* authentication challenge.
*/
@SerializedName("three_d_secure_action_result_token_id")
@Expose
private String threeDSecureActionResultTokenId;

/** An identifier for a specific payment gateway. */
public String getGatewayCode() {
return this.gatewayCode;
Expand All @@ -26,4 +34,20 @@ public String getGatewayCode() {
public void setGatewayCode(final String gatewayCode) {
this.gatewayCode = gatewayCode;
}

/**
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
* authentication challenge.
*/
public String getThreeDSecureActionResultTokenId() {
return this.threeDSecureActionResultTokenId;
}

/**
* @param threeDSecureActionResultTokenId A token generated by Recurly.js after completing a 3-D
* Secure device fingerprinting or authentication challenge.
*/
public void setThreeDSecureActionResultTokenId(final String threeDSecureActionResultTokenId) {
this.threeDSecureActionResultTokenId = threeDSecureActionResultTokenId;
}
}
63 changes: 63 additions & 0 deletions src/main/java/com/recurly/v3/requests/BillingInfoVerifyCVV.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,74 @@

public class BillingInfoVerifyCVV extends Request {

/** An identifier for a specific payment gateway. */
@SerializedName("gateway_code")
@Expose
private String gatewayCode;

/**
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
* authentication challenge.
*/
@SerializedName("three_d_secure_action_result_token_id")
@Expose
private String threeDSecureActionResultTokenId;

/**
* A token [generated by
* Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
*/
@SerializedName("token_id")
@Expose
private String tokenId;

/** Unique security code for a credit card. */
@SerializedName("verification_value")
@Expose
private String verificationValue;

/** An identifier for a specific payment gateway. */
public String getGatewayCode() {
return this.gatewayCode;
}

/** @param gatewayCode An identifier for a specific payment gateway. */
public void setGatewayCode(final String gatewayCode) {
this.gatewayCode = gatewayCode;
}

/**
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
* authentication challenge.
*/
public String getThreeDSecureActionResultTokenId() {
return this.threeDSecureActionResultTokenId;
}

/**
* @param threeDSecureActionResultTokenId A token generated by Recurly.js after completing a 3-D
* Secure device fingerprinting or authentication challenge.
*/
public void setThreeDSecureActionResultTokenId(final String threeDSecureActionResultTokenId) {
this.threeDSecureActionResultTokenId = threeDSecureActionResultTokenId;
}

/**
* A token [generated by
* Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
*/
public String getTokenId() {
return this.tokenId;
}

/**
* @param tokenId A token [generated by
* Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
*/
public void setTokenId(final String tokenId) {
this.tokenId = tokenId;
}

/** Unique security code for a credit card. */
public String getVerificationValue() {
return this.verificationValue;
Expand Down
Loading
Loading