Skip to content

Commit 1f0e8f1

Browse files
Merge pull request #490 from recurly/v3-v2021-02-25-1618003929
Generated Latest Changes for v2021-02-25 (Backup Payment Method)
2 parents 3f93afb + 6afacec commit 1f0e8f1

2 files changed

Lines changed: 30 additions & 6 deletions

File tree

openapi/api.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ paths:
20332033
description: |
20342034
If you're using Recurly.js to securely submit data from webforms without sending it through your server,
20352035
you can associate the billing information with an account by passing in the `token_id`. The only other
2036-
field permitted with `token_id` is `primary_payment_method`.
2036+
fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
20372037

20382038
For credit card payments you'll need the following required fields:
20392039

@@ -2350,7 +2350,7 @@ paths:
23502350
description: |
23512351
If you're using Recurly.js to securely submit data from webforms without sending it through your server,
23522352
you can associate the billing information with an account by passing in the `token_id`. The only other
2353-
field permitted with `token_id` is `primary_payment_method`.
2353+
fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
23542354

23552355
For credit card payments you'll need the following required fields:
23562356

@@ -2434,7 +2434,7 @@ paths:
24342434
description: |
24352435
If you're using Recurly.js to securely submit data from webforms without sending it through your server,
24362436
you can associate the billing information with an account by passing in the `token_id`. The only other
2437-
field permitted with `token_id` is `primary_payment_method`.
2437+
fields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.
24382438

24392439
For credit card payments you'll need the following required fields:
24402440

@@ -16037,6 +16037,11 @@ components:
1603716037
the `primary_payment_method` indicator. When adding billing infos via
1603816038
the billing_info and /accounts endpoints, this value is not permitted,
1603916039
and will return an error if provided.
16040+
backup_payment_method:
16041+
type: boolean
16042+
description: The `backup_payment_method` indicator is used to designate
16043+
a billing info as a backup on the account that will be tried if the billing
16044+
info marked `primary_payment_method` fails.
1604016045
created_at:
1604116046
type: string
1604216047
format: date-time
@@ -16151,9 +16156,9 @@ components:
1615116156
a consumer card in Brazil. This would be the customer's CPF, CPF is a
1615216157
Brazilian tax identifier for all tax paying residents.
1615316158
tax_identifier_type:
16154-
"$ref": "#/components/schemas/TaxIdentifierTypeEnum"
1615516159
description: this field and a value of 'cpf' are required if adding a billing
1615616160
info that is an elo or hipercard type in Brazil.
16161+
"$ref": "#/components/schemas/TaxIdentifierTypeEnum"
1615716162
primary_payment_method:
1615816163
type: boolean
1615916164
title: Primary Payment Method
@@ -16165,6 +16170,15 @@ components:
1616516170
the `primary_payment_method` indicator. When adding billing infos via
1616616171
the billing_info and /accounts endpoints, this value is not permitted,
1616716172
and will return an error if provided.
16173+
backup_payment_method:
16174+
type: boolean
16175+
description: The `backup_payment_method` indicator is used to designate
16176+
a billing info as a backup on the account that will be tried if the billing
16177+
info marked `primary_payment_method` fails. All payment methods, including
16178+
the billing info marked `primary_payment_method` can be set as a backup.
16179+
An account can have a maximum of 1 backup, if a user sets a different
16180+
payment method as a backup, the existing backup will no longer be marked
16181+
as such.
1616816182
Coupon:
1616916183
type: object
1617016184
properties:
@@ -19863,8 +19877,8 @@ components:
1986319877
format: float
1986419878
title: Custom subscription pricing
1986519879
description: Override the unit amount of the subscription plan by setting
19866-
this value in cents. If not provided, the subscription will inherit the
19867-
price from the subscription plan for the provided currency.
19880+
this value. If not provided, the subscription will inherit the price from
19881+
the subscription plan for the provided currency.
1986819882
minimum: 0
1986919883
maximum: 1000000
1987019884
quantity:
@@ -20188,6 +20202,10 @@ components:
2018820202
type: boolean
2018920203
title: Success?
2019020204
description: Did this transaction complete successfully?
20205+
backup_payment_method_used:
20206+
type: boolean
20207+
title: Backup Payment Method Used?
20208+
description: Indicates if the transaction was completed using a backup payment
2019120209
refunded:
2019220210
type: boolean
2019320211
title: Refunded?

recurly/resources.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ class BillingInfo(Resource):
268268
----------
269269
account_id : str
270270
address : Address
271+
backup_payment_method : bool
272+
The `backup_payment_method` indicator is used to designate a billing info as a backup on the account that will be tried if the billing info marked `primary_payment_method` fails.
271273
company : str
272274
created_at : datetime
273275
When the billing information was created.
@@ -292,6 +294,7 @@ class BillingInfo(Resource):
292294
schema = {
293295
"account_id": str,
294296
"address": "Address",
297+
"backup_payment_method": bool,
295298
"company": str,
296299
"created_at": datetime,
297300
"first_name": str,
@@ -881,6 +884,8 @@ class Transaction(Resource):
881884
Total transaction amount sent to the payment gateway.
882885
avs_check : str
883886
When processed, result from checking the overall AVS on the transaction.
887+
backup_payment_method_used : bool
888+
Indicates if the transaction was completed using a backup payment
884889
billing_address : AddressWithName
885890
collected_at : datetime
886891
Collected at, or if not collected yet, the time the transaction was created.
@@ -960,6 +965,7 @@ class Transaction(Resource):
960965
"account": "AccountMini",
961966
"amount": float,
962967
"avs_check": str,
968+
"backup_payment_method_used": bool,
963969
"billing_address": "AddressWithName",
964970
"collected_at": datetime,
965971
"collection_method": str,

0 commit comments

Comments
 (0)