Skip to content

Commit db3bd3b

Browse files
authored
Merge pull request #300 from recurly/v3-v2021-02-25-15594137202
Generated Latest Changes for v2021-02-25
2 parents 8700c73 + 01bd066 commit db3bd3b

8 files changed

Lines changed: 304 additions & 28 deletions

File tree

openapi/api.yaml

Lines changed: 120 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,6 +2793,97 @@ paths:
27932793
schema:
27942794
"$ref": "#/components/schemas/Error"
27952795
x-code-samples: []
2796+
"/accounts/{account_id}/billing_infos/{billing_info_id}/verify":
2797+
post:
2798+
tags:
2799+
- billing_infos
2800+
operationId: verify_billing_infos
2801+
summary: Verify a billing information's credit card
2802+
parameters:
2803+
- "$ref": "#/components/parameters/account_id"
2804+
- "$ref": "#/components/parameters/billing_info_id"
2805+
requestBody:
2806+
content:
2807+
application/json:
2808+
schema:
2809+
"$ref": "#/components/schemas/BillingInfoVerify"
2810+
required: false
2811+
responses:
2812+
'200':
2813+
description: Transaction information from verify.
2814+
content:
2815+
application/json:
2816+
schema:
2817+
"$ref": "#/components/schemas/Transaction"
2818+
'404':
2819+
description: Billing information not found, or incorrect site or account
2820+
ID.
2821+
content:
2822+
application/json:
2823+
schema:
2824+
"$ref": "#/components/schemas/Error"
2825+
default:
2826+
description: Unexpected error.
2827+
content:
2828+
application/json:
2829+
schema:
2830+
"$ref": "#/components/schemas/Error"
2831+
'422':
2832+
description: Invalid billing information, or error running the verification
2833+
transaction.
2834+
content:
2835+
application/json:
2836+
schema:
2837+
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
2838+
x-code-samples: []
2839+
"/accounts/{account_id}/billing_infos/{billing_info_id}/verify_cvv":
2840+
post:
2841+
tags:
2842+
- billing_infos
2843+
operationId: verify_billing_infos_cvv
2844+
summary: Verify a billing information's credit card cvv
2845+
parameters:
2846+
- "$ref": "#/components/parameters/account_id"
2847+
- "$ref": "#/components/parameters/billing_info_id"
2848+
requestBody:
2849+
content:
2850+
application/json:
2851+
schema:
2852+
"$ref": "#/components/schemas/BillingInfoVerifyCVV"
2853+
responses:
2854+
'200':
2855+
description: Transaction information from verify.
2856+
content:
2857+
application/json:
2858+
schema:
2859+
"$ref": "#/components/schemas/Transaction"
2860+
'404':
2861+
description: Billing information not found, or incorrect site or account
2862+
ID.
2863+
content:
2864+
application/json:
2865+
schema:
2866+
"$ref": "#/components/schemas/Error"
2867+
default:
2868+
description: Unexpected error.
2869+
content:
2870+
application/json:
2871+
schema:
2872+
"$ref": "#/components/schemas/Error"
2873+
'422':
2874+
description: Invalid billing information, or error running the verification
2875+
transaction.
2876+
content:
2877+
application/json:
2878+
schema:
2879+
"$ref": "#/components/schemas/ErrorMayHaveTransaction"
2880+
'429':
2881+
description: Too many CVV verification attempts.
2882+
content:
2883+
application/json:
2884+
schema:
2885+
"$ref": "#/components/schemas/Error"
2886+
x-code-samples: []
27962887
"/accounts/{account_id}/coupon_redemptions":
27972888
get:
27982889
tags:
@@ -18896,6 +18987,8 @@ components:
1889618987
amazon_billing_agreement_id:
1889718988
type: string
1889818989
title: Amazon billing agreement ID
18990+
description: Only supported on Amazon V1. For Amazon V2, use token_id with
18991+
Recurly.js.
1889918992
paypal_billing_agreement_id:
1890018993
type: string
1890118994
title: PayPal billing agreement ID
@@ -18999,12 +19092,27 @@ components:
1899919092
type: string
1900019093
description: An identifier for a specific payment gateway.
1900119094
maxLength: 13
19095+
three_d_secure_action_result_token_id:
19096+
type: string
19097+
description: A token generated by Recurly.js after completing a 3-D Secure
19098+
device fingerprinting or authentication challenge.
1900219099
BillingInfoVerifyCVV:
1900319100
type: object
1900419101
properties:
1900519102
verification_value:
1900619103
type: string
1900719104
description: Unique security code for a credit card.
19105+
gateway_code:
19106+
type: string
19107+
description: An identifier for a specific payment gateway.
19108+
maxLength: 13
19109+
three_d_secure_action_result_token_id:
19110+
type: string
19111+
description: A token generated by Recurly.js after completing a 3-D Secure
19112+
device fingerprinting or authentication challenge.
19113+
token_id:
19114+
type: string
19115+
description: A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
1900819116
Coupon:
1900919117
type: object
1901019118
properties:
@@ -20315,6 +20423,11 @@ components:
2031520423
title: Subtotal
2031620424
description: The summation of charges and credits, before discounts and
2031720425
taxes.
20426+
subtotal_after_discount:
20427+
type: number
20428+
format: float
20429+
title: Subtotal After Discount
20430+
description: The summation of charges and credits, after discounts applied.
2031820431
tax:
2031920432
type: number
2032020433
format: float
@@ -20958,7 +21071,7 @@ components:
2095821071
type: number
2095921072
format: float
2096021073
title: Total after discounts and taxes
20961-
description: "`(quantity * unit_amount) - (discount + tax)`"
21074+
description: "`(quantity * unit_amount) - discount + tax`"
2096221075
description:
2096321076
type: string
2096421077
title: Description
@@ -21327,12 +21440,12 @@ components:
2132721440
origin:
2132821441
title: Origin
2132921442
description: Origin `external_gift_card` is allowed if the Gift Cards feature
21330-
is enabled on your site and `type` is `credit`. Set this value in order
21331-
to track gift card credits from external gift cards (like InComm). It
21332-
also skips billing information requirements. Origin `prepayment` is only
21333-
allowed if `type` is `charge` and `tax_exempt` is left blank or set to
21334-
true. This origin creates a charge and opposite credit on the account
21335-
to be used for future invoices.
21443+
is enabled on your site, `type` is `credit` and `tax_exempt` is `true`
21444+
if you are using taxes. Set this value in order to track gift card credits
21445+
from external gift cards (like InComm). It also skips billing information
21446+
requirements. Origin `prepayment` is only allowed if `type` is `charge`
21447+
and `tax_exempt` is left blank or set to true. This origin creates a
21448+
charge and opposite credit on the account to be used for future invoices.
2133621449
"$ref": "#/components/schemas/LineItemCreateOriginEnum"
2133721450
custom_fields:
2133821451
"$ref": "#/components/schemas/CustomFields"

src/main/java/com/recurly/v3/Client.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,62 @@ public void removeABillingInfo(String accountId, String billingInfoId) {
406406
this.makeRequest("DELETE", path);
407407
}
408408

409+
/**
410+
* Verify a billing information's credit card
411+
*
412+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_infos">verify_billing_infos api documentation</a>
413+
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
414+
* @param billingInfoId Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
415+
* @return Transaction information from verify.
416+
*/
417+
public Transaction verifyBillingInfos(String accountId, String billingInfoId) {
418+
final String url = "/accounts/{account_id}/billing_infos/{billing_info_id}/verify";
419+
final HashMap<String, String> urlParams = new HashMap<String, String>();
420+
urlParams.put("account_id", accountId);
421+
urlParams.put("billing_info_id", billingInfoId);
422+
final String path = this.interpolatePath(url, urlParams);
423+
Type returnType = Transaction.class;
424+
return this.makeRequest("POST", path, returnType);
425+
}
426+
427+
/**
428+
* Verify a billing information's credit card
429+
*
430+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_infos">verify_billing_infos api documentation</a>
431+
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
432+
* @param billingInfoId Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
433+
* @param body The body of the request.
434+
* @return Transaction information from verify.
435+
*/
436+
public Transaction verifyBillingInfos(String accountId, String billingInfoId, BillingInfoVerify body) {
437+
final String url = "/accounts/{account_id}/billing_infos/{billing_info_id}/verify";
438+
final HashMap<String, String> urlParams = new HashMap<String, String>();
439+
urlParams.put("account_id", accountId);
440+
urlParams.put("billing_info_id", billingInfoId);
441+
final String path = this.interpolatePath(url, urlParams);
442+
Type returnType = Transaction.class;
443+
return this.makeRequest("POST", path, body, returnType);
444+
}
445+
446+
/**
447+
* Verify a billing information's credit card cvv
448+
*
449+
* @see <a href="https://developers.recurly.com/api/v2021-02-25#operation/verify_billing_infos_cvv">verify_billing_infos_cvv api documentation</a>
450+
* @param accountId Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.
451+
* @param billingInfoId Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.
452+
* @param body The body of the request.
453+
* @return Transaction information from verify.
454+
*/
455+
public Transaction verifyBillingInfosCvv(String accountId, String billingInfoId, BillingInfoVerifyCVV body) {
456+
final String url = "/accounts/{account_id}/billing_infos/{billing_info_id}/verify_cvv";
457+
final HashMap<String, String> urlParams = new HashMap<String, String>();
458+
urlParams.put("account_id", accountId);
459+
urlParams.put("billing_info_id", billingInfoId);
460+
final String path = this.interpolatePath(url, urlParams);
461+
Type returnType = Transaction.class;
462+
return this.makeRequest("POST", path, body, returnType);
463+
}
464+
409465
/**
410466
* List the coupon redemptions for an account
411467
*

src/main/java/com/recurly/v3/requests/BillingInfoCreate.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class BillingInfoCreate extends Request {
2828
@Expose
2929
private Address address;
3030

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

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

294-
/** @param amazonBillingAgreementId Amazon billing agreement ID */
294+
/**
295+
* @param amazonBillingAgreementId Only supported on Amazon V1. For Amazon V2, use token_id with
296+
* Recurly.js.
297+
*/
295298
public void setAmazonBillingAgreementId(final String amazonBillingAgreementId) {
296299
this.amazonBillingAgreementId = amazonBillingAgreementId;
297300
}

src/main/java/com/recurly/v3/requests/BillingInfoVerify.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ public class BillingInfoVerify extends Request {
1717
@Expose
1818
private String gatewayCode;
1919

20+
/**
21+
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
22+
* authentication challenge.
23+
*/
24+
@SerializedName("three_d_secure_action_result_token_id")
25+
@Expose
26+
private String threeDSecureActionResultTokenId;
27+
2028
/** An identifier for a specific payment gateway. */
2129
public String getGatewayCode() {
2230
return this.gatewayCode;
@@ -26,4 +34,20 @@ public String getGatewayCode() {
2634
public void setGatewayCode(final String gatewayCode) {
2735
this.gatewayCode = gatewayCode;
2836
}
37+
38+
/**
39+
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
40+
* authentication challenge.
41+
*/
42+
public String getThreeDSecureActionResultTokenId() {
43+
return this.threeDSecureActionResultTokenId;
44+
}
45+
46+
/**
47+
* @param threeDSecureActionResultTokenId A token generated by Recurly.js after completing a 3-D
48+
* Secure device fingerprinting or authentication challenge.
49+
*/
50+
public void setThreeDSecureActionResultTokenId(final String threeDSecureActionResultTokenId) {
51+
this.threeDSecureActionResultTokenId = threeDSecureActionResultTokenId;
52+
}
2953
}

src/main/java/com/recurly/v3/requests/BillingInfoVerifyCVV.java

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,74 @@
1212

1313
public class BillingInfoVerifyCVV extends Request {
1414

15+
/** An identifier for a specific payment gateway. */
16+
@SerializedName("gateway_code")
17+
@Expose
18+
private String gatewayCode;
19+
20+
/**
21+
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
22+
* authentication challenge.
23+
*/
24+
@SerializedName("three_d_secure_action_result_token_id")
25+
@Expose
26+
private String threeDSecureActionResultTokenId;
27+
28+
/**
29+
* A token [generated by
30+
* Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
31+
*/
32+
@SerializedName("token_id")
33+
@Expose
34+
private String tokenId;
35+
1536
/** Unique security code for a credit card. */
1637
@SerializedName("verification_value")
1738
@Expose
1839
private String verificationValue;
1940

41+
/** An identifier for a specific payment gateway. */
42+
public String getGatewayCode() {
43+
return this.gatewayCode;
44+
}
45+
46+
/** @param gatewayCode An identifier for a specific payment gateway. */
47+
public void setGatewayCode(final String gatewayCode) {
48+
this.gatewayCode = gatewayCode;
49+
}
50+
51+
/**
52+
* A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or
53+
* authentication challenge.
54+
*/
55+
public String getThreeDSecureActionResultTokenId() {
56+
return this.threeDSecureActionResultTokenId;
57+
}
58+
59+
/**
60+
* @param threeDSecureActionResultTokenId A token generated by Recurly.js after completing a 3-D
61+
* Secure device fingerprinting or authentication challenge.
62+
*/
63+
public void setThreeDSecureActionResultTokenId(final String threeDSecureActionResultTokenId) {
64+
this.threeDSecureActionResultTokenId = threeDSecureActionResultTokenId;
65+
}
66+
67+
/**
68+
* A token [generated by
69+
* Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
70+
*/
71+
public String getTokenId() {
72+
return this.tokenId;
73+
}
74+
75+
/**
76+
* @param tokenId A token [generated by
77+
* Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).
78+
*/
79+
public void setTokenId(final String tokenId) {
80+
this.tokenId = tokenId;
81+
}
82+
2083
/** Unique security code for a credit card. */
2184
public String getVerificationValue() {
2285
return this.verificationValue;

0 commit comments

Comments
 (0)