Skip to content

Commit 8c8970f

Browse files
authored
Merge pull request #831 from recurly/v3-v2021-02-25-13120667328
Generated Latest Changes for v2021-02-25
2 parents 440ae50 + 1a8f3a1 commit 8c8970f

File tree

4 files changed

+153
-6
lines changed

4 files changed

+153
-6
lines changed

lib/recurly/client.php

+1
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ public function restoreCoupon(string $coupon_id, array $body, array $options = [
12421242
* **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
12431243
* - $options['params']['end_time'] (string): Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`.
12441244
* **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
1245+
* - $options['params']['redeemed'] (string): Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.
12451246
*
12461247
* @return \Recurly\Pager A list of unique coupon codes that were generated
12471248
* @link https://developers.recurly.com/api/v2021-02-25#operation/list_unique_coupon_codes

lib/recurly/resources/billing_info.php

+25
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class BillingInfo extends RecurlyResource
2222
private $_id;
2323
private $_last_name;
2424
private $_object;
25+
private $_payment_gateway_references;
2526
private $_payment_method;
2627
private $_primary_payment_method;
2728
private $_updated_at;
@@ -30,6 +31,7 @@ class BillingInfo extends RecurlyResource
3031
private $_vat_number;
3132

3233
protected static $array_hints = [
34+
'setPaymentGatewayReferences' => '\Recurly\Resources\PaymentGatewayReferences',
3335
];
3436

3537

@@ -263,6 +265,29 @@ public function setObject(string $object): void
263265
$this->_object = $object;
264266
}
265267

268+
/**
269+
* Getter method for the payment_gateway_references attribute.
270+
* Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
271+
*
272+
* @return array
273+
*/
274+
public function getPaymentGatewayReferences(): array
275+
{
276+
return $this->_payment_gateway_references ?? [] ;
277+
}
278+
279+
/**
280+
* Setter method for the payment_gateway_references attribute.
281+
*
282+
* @param array $payment_gateway_references
283+
*
284+
* @return void
285+
*/
286+
public function setPaymentGatewayReferences(array $payment_gateway_references): void
287+
{
288+
$this->_payment_gateway_references = $payment_gateway_references;
289+
}
290+
266291
/**
267292
* Getter method for the payment_method attribute.
268293
*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/**
3+
* This file is automatically created by Recurly's OpenAPI generation process
4+
* and thus any edits you make by hand will be lost. If you wish to make a
5+
* change to this file, please create a Github issue explaining the changes you
6+
* need and we will usher them to the appropriate places.
7+
*/
8+
namespace Recurly\Resources;
9+
10+
use Recurly\RecurlyResource;
11+
12+
// phpcs:disable
13+
class PaymentGatewayReferences extends RecurlyResource
14+
{
15+
private $_reference_type;
16+
private $_token;
17+
18+
protected static $array_hints = [
19+
];
20+
21+
22+
/**
23+
* Getter method for the reference_type attribute.
24+
* The type of reference token. Required if token is passed in for Stripe Gateway.
25+
*
26+
* @return ?string
27+
*/
28+
public function getReferenceType(): ?string
29+
{
30+
return $this->_reference_type;
31+
}
32+
33+
/**
34+
* Setter method for the reference_type attribute.
35+
*
36+
* @param string $reference_type
37+
*
38+
* @return void
39+
*/
40+
public function setReferenceType(string $reference_type): void
41+
{
42+
$this->_reference_type = $reference_type;
43+
}
44+
45+
/**
46+
* Getter method for the token attribute.
47+
* 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.
48+
*
49+
* @return ?string
50+
*/
51+
public function getToken(): ?string
52+
{
53+
return $this->_token;
54+
}
55+
56+
/**
57+
* Setter method for the token attribute.
58+
*
59+
* @param string $token
60+
*
61+
* @return void
62+
*/
63+
public function setToken(string $token): void
64+
{
65+
$this->_token = $token;
66+
}
67+
}

openapi/api.yaml

+60-6
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:

0 commit comments

Comments
 (0)