diff --git a/Recurly/Constants.cs b/Recurly/Constants.cs
index cfc666fa..96d8b7e2 100644
--- a/Recurly/Constants.cs
+++ b/Recurly/Constants.cs
@@ -284,6 +284,18 @@ public enum FilterInvoiceType
};
+ public enum FilterRedeemed
+ {
+ Undefined = 0,
+
+ [EnumMember(Value = "true")]
+ True,
+
+ [EnumMember(Value = "false")]
+ False,
+
+ };
+
public enum Channel
{
Undefined = 0,
@@ -455,6 +467,21 @@ public enum DeliveryMethod
};
+ public enum PaymentGatewayReferences
+ {
+ Undefined = 0,
+
+ [EnumMember(Value = "stripe_confirmation_token")]
+ StripeConfirmationToken,
+
+ [EnumMember(Value = "stripe_customer")]
+ StripeCustomer,
+
+ [EnumMember(Value = "stripe_payment_method")]
+ StripePaymentMethod,
+
+ };
+
public enum GatewayTransactionType
{
Undefined = 0,
diff --git a/Recurly/IClient.cs b/Recurly/IClient.cs
index 9111c566..36902f44 100644
--- a/Recurly/IClient.cs
+++ b/Recurly/IClient.cs
@@ -1117,6 +1117,7 @@ public interface IClient
/// Sort field. You *really* only want to sort by `updated_at` in ascending order. In descending order updated records will move behind the cursor and could prevent some records from being returned.
/// Inclusively filter by begin_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
/// Inclusively filter by end_time when `sort=created_at` or `sort=updated_at`. **Note:** this value is an ISO8601 timestamp. A partial timestamp that does not include a time zone will default to UTC.
+ /// Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.
///
/// A list of unique coupon codes that were generated
///
diff --git a/Recurly/Resources/BillingInfo.cs b/Recurly/Resources/BillingInfo.cs
index 8b48af58..8140c217 100644
--- a/Recurly/Resources/BillingInfo.cs
+++ b/Recurly/Resources/BillingInfo.cs
@@ -55,6 +55,10 @@ public class BillingInfo : Resource
[JsonProperty("object")]
public string Object { get; set; }
+ /// Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
+ [JsonProperty("payment_gateway_references")]
+ public List PaymentGatewayReferences { get; set; }
+
[JsonProperty("payment_method")]
public PaymentMethod PaymentMethod { get; set; }
diff --git a/Recurly/Resources/BillingInfoCreate.cs b/Recurly/Resources/BillingInfoCreate.cs
index 3b4f30c8..5139465c 100644
--- a/Recurly/Resources/BillingInfoCreate.cs
+++ b/Recurly/Resources/BillingInfoCreate.cs
@@ -75,7 +75,7 @@ public class BillingInfoCreate : Request
[JsonProperty("gateway_attributes")]
public GatewayAttributes GatewayAttributes { get; set; }
- /// An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`.
+ /// An identifier for a specific payment gateway.
[JsonProperty("gateway_code")]
public string GatewayCode { get; set; }
@@ -112,6 +112,10 @@ public class BillingInfoCreate : Request
[JsonConverter(typeof(RecurlyStringEnumConverter))]
public Constants.OnlineBankingPaymentType? OnlineBankingPaymentType { get; set; }
+ /// Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
+ [JsonProperty("payment_gateway_references")]
+ public List PaymentGatewayReferences { get; set; }
+
/// PayPal billing agreement ID
[JsonProperty("paypal_billing_agreement_id")]
public string PaypalBillingAgreementId { get; set; }
diff --git a/Recurly/Resources/CouponBulkCreate.cs b/Recurly/Resources/CouponBulkCreate.cs
index f0c90911..6948cf90 100644
--- a/Recurly/Resources/CouponBulkCreate.cs
+++ b/Recurly/Resources/CouponBulkCreate.cs
@@ -15,7 +15,7 @@ namespace Recurly.Resources
public class CouponBulkCreate : Request
{
- /// The quantity of unique coupon codes to generate
+ /// The quantity of unique coupon codes to generate. A bulk coupon can have up to 100,000 unique codes (or your site's configured limit).
[JsonProperty("number_of_unique_codes")]
public int? NumberOfUniqueCodes { get; set; }
diff --git a/Recurly/Resources/ListUniqueCouponCodesParams.cs b/Recurly/Resources/ListUniqueCouponCodesParams.cs
index d80c6cb7..c2648f66 100644
--- a/Recurly/Resources/ListUniqueCouponCodesParams.cs
+++ b/Recurly/Resources/ListUniqueCouponCodesParams.cs
@@ -40,6 +40,10 @@ public class ListUniqueCouponCodesParams : OptionalParams
[JsonProperty("end_time")]
public DateTime? EndTime { get; set; }
+ /// Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.
+ [JsonProperty("redeemed")]
+ public Constants.FilterRedeemed? Redeemed { get; set; }
+
}
}
diff --git a/Recurly/Resources/PaymentGatewayReferences.cs b/Recurly/Resources/PaymentGatewayReferences.cs
new file mode 100644
index 00000000..3fdfb181
--- /dev/null
+++ b/Recurly/Resources/PaymentGatewayReferences.cs
@@ -0,0 +1,28 @@
+/**
+ * This file is automatically created by Recurly's OpenAPI generation process
+ * and thus any edits you make by hand will be lost. If you wish to make a
+ * change to this file, please create a Github issue explaining the changes you
+ * need and we will usher them to the appropriate places.
+ */
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using Newtonsoft.Json;
+
+namespace Recurly.Resources
+{
+ [ExcludeFromCodeCoverage]
+ public class PaymentGatewayReferences : Request
+ {
+
+ /// The type of reference token. Required if token is passed in for Stripe Gateway.
+ [JsonProperty("reference_type")]
+ [JsonConverter(typeof(RecurlyStringEnumConverter))]
+ public Constants.PaymentGatewayReferences? ReferenceType { get; set; }
+
+ /// 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.
+ [JsonProperty("token")]
+ public string Token { get; set; }
+
+ }
+}
diff --git a/openapi/api.yaml b/openapi/api.yaml
index 460dd35f..ea3982f5 100644
--- a/openapi/api.yaml
+++ b/openapi/api.yaml
@@ -6265,8 +6265,7 @@ paths:
schema:
"$ref": "#/components/schemas/UniqueCouponCodeParams"
'400':
- description: Invalid or unpermitted parameter; perhaps you tried to generate
- more than 200 codes at a time?
+ description: Invalid or unpermitted parameter.
content:
application/json:
schema:
@@ -6348,6 +6347,7 @@ paths:
- "$ref": "#/components/parameters/sort_dates"
- "$ref": "#/components/parameters/filter_begin_time"
- "$ref": "#/components/parameters/filter_end_time"
+ - "$ref": "#/components/parameters/filter_redeemed"
responses:
'200':
description: A list of unique coupon codes that were generated
@@ -17184,6 +17184,13 @@ components:
- `type=legacy`, only legacy invoices will be returned.
schema:
"$ref": "#/components/schemas/FilterInvoiceTypeEnum"
+ filter_redeemed:
+ name: redeemed
+ in: query
+ description: Filter unique coupon codes by redemption status. `true` for redeemed,
+ `false` for not redeemed.
+ schema:
+ "$ref": "#/components/schemas/FilterRedeemedEnum"
export_date:
name: export_date
in: path
@@ -18733,6 +18740,12 @@ components:
description: The `backup_payment_method` field is used to indicate a billing
info as a backup on the account that will be tried if the initial billing
info used for an invoice is declined.
+ payment_gateway_references:
+ type: array
+ description: Array of Payment Gateway References, each a reference to a
+ third-party gateway object of varying types.
+ items:
+ "$ref": "#/components/schemas/PaymentGatewayReferences"
created_at:
type: string
format: date-time
@@ -18815,9 +18828,21 @@ components:
maxLength: 50
gateway_code:
type: string
- title: An identifier for a specific payment gateway. Must be used in conjunction
- with `gateway_token`.
+ title: An identifier for a specific payment gateway.
maxLength: 12
+ payment_gateway_references:
+ type: array
+ description: Array of Payment Gateway References, each a reference to a
+ third-party gateway object of varying types.
+ items:
+ "$ref": "#/components/schemas/PaymentGatewayReferences"
+ properties:
+ token:
+ type: strings
+ maxLength: 50
+ reference_type:
+ type: string
+ "$ref": "#/components/schemas/PaymentGatewayReferencesEnum"
gateway_attributes:
type: object
description: Additional attributes to send to the gateway.
@@ -19282,9 +19307,9 @@ components:
number_of_unique_codes:
type: integer
title: Number of unique codes
- description: The quantity of unique coupon codes to generate
+ description: The quantity of unique coupon codes to generate. A bulk coupon
+ can have up to 100,000 unique codes (or your site's configured limit).
minimum: 1
- maximum: 200
CouponMini:
type: object
properties:
@@ -21285,6 +21310,22 @@ components:
- currency
- unit_amount
- type
+ PaymentGatewayReferences:
+ type: object
+ title: Payment Gateway References Object
+ description: Array of Payment Gateway References, each a reference to a third-party
+ gateway object of varying types.
+ properties:
+ token:
+ type: string
+ title: Token
+ description: 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.
+ reference_type:
+ type: string
+ title: Reference Type
+ "$ref": "#/components/schemas/PaymentGatewayReferencesEnum"
PlanMini:
type: object
title: Plan mini details
@@ -26430,6 +26471,11 @@ components:
- credit
- legacy
- non-legacy
+ FilterRedeemedEnum:
+ type: string
+ enum:
+ - true
+ - false
ChannelEnum:
type: string
enum:
@@ -26491,6 +26537,14 @@ components:
enum:
- email
- post
+ PaymentGatewayReferencesEnum:
+ type: string
+ description: The type of reference token. Required if token is passed in for
+ Stripe Gateway.
+ enum:
+ - stripe_confirmation_token
+ - stripe_customer
+ - stripe_payment_method
GatewayTransactionTypeEnum:
type: string
enum: