Skip to content

Commit 49edb2d

Browse files
authored
Merge pull request #709 from recurly/v3-v2021-02-25-13120667328
Generated Latest Changes for v2021-02-25
2 parents 3a13dcc + 90a6ccf commit 49edb2d

File tree

3 files changed

+81
-6
lines changed

3 files changed

+81
-6
lines changed

openapi/api.yaml

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6265,8 +6265,7 @@ paths:
62656265
schema:
62666266
"$ref": "#/components/schemas/UniqueCouponCodeParams"
62676267
'400':
6268-
description: Invalid or unpermitted parameter; perhaps you tried to generate
6269-
more than 200 codes at a time?
6268+
description: Invalid or unpermitted parameter.
62706269
content:
62716270
application/json:
62726271
schema:
@@ -6348,6 +6347,7 @@ paths:
63486347
- "$ref": "#/components/parameters/sort_dates"
63496348
- "$ref": "#/components/parameters/filter_begin_time"
63506349
- "$ref": "#/components/parameters/filter_end_time"
6350+
- "$ref": "#/components/parameters/filter_redeemed"
63516351
responses:
63526352
'200':
63536353
description: A list of unique coupon codes that were generated
@@ -17184,6 +17184,13 @@ components:
1718417184
- `type=legacy`, only legacy invoices will be returned.
1718517185
schema:
1718617186
"$ref": "#/components/schemas/FilterInvoiceTypeEnum"
17187+
filter_redeemed:
17188+
name: redeemed
17189+
in: query
17190+
description: Filter unique coupon codes by redemption status. `true` for redeemed,
17191+
`false` for not redeemed.
17192+
schema:
17193+
"$ref": "#/components/schemas/FilterRedeemedEnum"
1718717194
export_date:
1718817195
name: export_date
1718917196
in: path
@@ -18733,6 +18740,12 @@ components:
1873318740
description: The `backup_payment_method` field is used to indicate a billing
1873418741
info as a backup on the account that will be tried if the initial billing
1873518742
info used for an invoice is declined.
18743+
payment_gateway_references:
18744+
type: array
18745+
description: Array of Payment Gateway References, each a reference to a
18746+
third-party gateway object of varying types.
18747+
items:
18748+
"$ref": "#/components/schemas/PaymentGatewayReferences"
1873618749
created_at:
1873718750
type: string
1873818751
format: date-time
@@ -18815,9 +18828,21 @@ components:
1881518828
maxLength: 50
1881618829
gateway_code:
1881718830
type: string
18818-
title: An identifier for a specific payment gateway. Must be used in conjunction
18819-
with `gateway_token`.
18831+
title: An identifier for a specific payment gateway.
1882018832
maxLength: 12
18833+
payment_gateway_references:
18834+
type: array
18835+
description: Array of Payment Gateway References, each a reference to a
18836+
third-party gateway object of varying types.
18837+
items:
18838+
"$ref": "#/components/schemas/PaymentGatewayReferences"
18839+
properties:
18840+
token:
18841+
type: strings
18842+
maxLength: 50
18843+
reference_type:
18844+
type: string
18845+
"$ref": "#/components/schemas/PaymentGatewayReferencesEnum"
1882118846
gateway_attributes:
1882218847
type: object
1882318848
description: Additional attributes to send to the gateway.
@@ -19282,9 +19307,9 @@ components:
1928219307
number_of_unique_codes:
1928319308
type: integer
1928419309
title: Number of unique codes
19285-
description: The quantity of unique coupon codes to generate
19310+
description: The quantity of unique coupon codes to generate. A bulk coupon
19311+
can have up to 100,000 unique codes (or your site's configured limit).
1928619312
minimum: 1
19287-
maximum: 200
1928819313
CouponMini:
1928919314
type: object
1929019315
properties:
@@ -21285,6 +21310,22 @@ components:
2128521310
- currency
2128621311
- unit_amount
2128721312
- type
21313+
PaymentGatewayReferences:
21314+
type: object
21315+
title: Payment Gateway References Object
21316+
description: Array of Payment Gateway References, each a reference to a third-party
21317+
gateway object of varying types.
21318+
properties:
21319+
token:
21320+
type: string
21321+
title: Token
21322+
description: Reference value used when the external token was created. If
21323+
Stripe gateway is used, this value will need to be accompanied by its
21324+
reference_type.
21325+
reference_type:
21326+
type: string
21327+
title: Reference Type
21328+
"$ref": "#/components/schemas/PaymentGatewayReferencesEnum"
2128821329
PlanMini:
2128921330
type: object
2129021331
title: Plan mini details
@@ -26430,6 +26471,11 @@ components:
2643026471
- credit
2643126472
- legacy
2643226473
- non-legacy
26474+
FilterRedeemedEnum:
26475+
type: string
26476+
enum:
26477+
- true
26478+
- false
2643326479
ChannelEnum:
2643426480
type: string
2643526481
enum:
@@ -26491,6 +26537,14 @@ components:
2649126537
enum:
2649226538
- email
2649326539
- post
26540+
PaymentGatewayReferencesEnum:
26541+
type: string
26542+
description: The type of reference token. Required if token is passed in for
26543+
Stripe Gateway.
26544+
enum:
26545+
- stripe_confirmation_token
26546+
- stripe_customer
26547+
- stripe_payment_method
2649426548
GatewayTransactionTypeEnum:
2649526549
type: string
2649626550
enum:

recurly/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,6 +1881,8 @@ def list_unique_coupon_codes(self, coupon_id, **options):
18811881
params.end_time : datetime
18821882
Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
18831883
**Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1884+
params.redeemed : str
1885+
Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.
18841886
18851887
Returns
18861888
-------

recurly/resources.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ class BillingInfo(Resource):
335335
last_name : str
336336
object : str
337337
Object type
338+
payment_gateway_references : :obj:`list` of :obj:`PaymentGatewayReferences`
339+
Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
338340
payment_method : PaymentMethod
339341
primary_payment_method : bool
340342
The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used
@@ -357,6 +359,7 @@ class BillingInfo(Resource):
357359
"id": str,
358360
"last_name": str,
359361
"object": str,
362+
"payment_gateway_references": ["PaymentGatewayReferences"],
360363
"payment_method": "PaymentMethod",
361364
"primary_payment_method": bool,
362365
"updated_at": datetime,
@@ -461,6 +464,22 @@ class FraudInfo(Resource):
461464
}
462465

463466

467+
class PaymentGatewayReferences(Resource):
468+
"""
469+
Attributes
470+
----------
471+
reference_type : str
472+
The type of reference token. Required if token is passed in for Stripe Gateway.
473+
token : str
474+
Reference value used when the external token was created. If Stripe gateway is used, this value will need to be accompanied by its reference_type.
475+
"""
476+
477+
schema = {
478+
"reference_type": str,
479+
"token": str,
480+
}
481+
482+
464483
class BillingInfoUpdatedBy(Resource):
465484
"""
466485
Attributes

0 commit comments

Comments
 (0)