Skip to content

Commit

Permalink
Merge pull request #340 from recurly/v3-v2021-02-25-13120667328
Browse files Browse the repository at this point in the history
Generated Latest Changes for v2021-02-25
  • Loading branch information
btruncali1 authored Feb 3, 2025
2 parents 8f718ce + 03ac3be commit ad73196
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 10 deletions.
37 changes: 35 additions & 2 deletions lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ export declare class BillingInfo {
* 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.
*/
backupPaymentMethod?: boolean | null;
/**
* Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
*/
paymentGatewayReferences?: PaymentGatewayReferences[] | null;
/**
* When the billing information was created.
*/
Expand Down Expand Up @@ -451,6 +455,18 @@ export declare class FraudInfo {

}

export declare class PaymentGatewayReferences {
/**
* 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.
*/
token?: string | null;
/**
* The type of reference token. Required if token is passed in for Stripe Gateway.
*/
referenceType?: string | null;

}

export declare class BillingInfoUpdatedBy {
/**
* Customer's IP address when updating their billing information.
Expand Down Expand Up @@ -4238,9 +4254,13 @@ export interface BillingInfoCreate {
*/
gatewayToken?: string | null;
/**
* An identifier for a specific payment gateway. Must be used in conjunction with `gateway_token`.
* An identifier for a specific payment gateway.
*/
gatewayCode?: string | null;
/**
* Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
*/
paymentGatewayReferences?: PaymentGatewayReferences[] | null;
/**
* Additional attributes to send to the gateway.
*/
Expand Down Expand Up @@ -4329,6 +4349,18 @@ export interface BillingInfoCreate {

}

export interface PaymentGatewayReferences {
/**
* 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.
*/
token?: string | null;
/**
* The type of reference token. Required if token is passed in for Stripe Gateway.
*/
referenceType?: string | null;

}

export interface GatewayAttributes {
/**
* Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. For Braintree the PayPal PayerID is populated in the response.
Expand Down Expand Up @@ -4794,7 +4826,7 @@ export interface CouponUpdate {

export interface CouponBulkCreate {
/**
* 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).
*/
numberOfUniqueCodes?: number | null;

Expand Down Expand Up @@ -8465,6 +8497,7 @@ endpoint to obtain only the newly generated `UniqueCouponCodes`.
* @param {Date} options.params.endTime - 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.
*
* @param {string} options.params.redeemed - Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.
* @return {Pager<UniqueCouponCode>} A list of unique coupon codes that were generated
*/
listUniqueCouponCodes(couponId: string, options?: object): Pager<UniqueCouponCode>;
Expand Down
1 change: 1 addition & 0 deletions lib/recurly/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,7 @@ endpoint to obtain only the newly generated `UniqueCouponCodes`.
* @param {Date} options.params.endTime - 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.
*
* @param {string} options.params.redeemed - Filter unique coupon codes by redemption status. `true` for redeemed, `false` for not redeemed.
* @return {Pager<UniqueCouponCode>} A list of unique coupon codes that were generated
*/
listUniqueCouponCodes (couponId, options = {}) {
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/BillingInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const Resource = require('../Resource')
* @prop {string} id
* @prop {string} lastName
* @prop {string} object - Object type
* @prop {Array.<PaymentGatewayReferences>} paymentGatewayReferences - Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.
* @prop {PaymentMethod} paymentMethod
* @prop {boolean} primaryPaymentMethod - 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
* @prop {Date} updatedAt - When the billing information was last changed.
Expand All @@ -42,6 +43,7 @@ class BillingInfo extends Resource {
id: String,
lastName: String,
object: String,
paymentGatewayReferences: ['PaymentGatewayReferences'],
paymentMethod: 'PaymentMethod',
primaryPaymentMethod: Boolean,
updatedAt: Date,
Expand Down
27 changes: 27 additions & 0 deletions lib/recurly/resources/PaymentGatewayReferences.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* istanbul ignore file */
/**
* 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.
*/
'use strict'

const Resource = require('../Resource')

/**
* PaymentGatewayReferences
* @typedef {Object} PaymentGatewayReferences
* @prop {string} referenceType - The type of reference token. Required if token is passed in for Stripe Gateway.
* @prop {string} token - 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.
*/
class PaymentGatewayReferences extends Resource {
static getSchema () {
return {
referenceType: String,
token: String
}
}
}

module.exports = PaymentGatewayReferences
1 change: 1 addition & 0 deletions lib/recurly/resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports.BillingInfo = require('./BillingInfo')
module.exports.PaymentMethod = require('./PaymentMethod')
module.exports.GatewayAttributes = require('./GatewayAttributes')
module.exports.FraudInfo = require('./FraudInfo')
module.exports.PaymentGatewayReferences = require('./PaymentGatewayReferences')
module.exports.BillingInfoUpdatedBy = require('./BillingInfoUpdatedBy')
module.exports.CustomField = require('./CustomField')
module.exports.ErrorMayHaveTransaction = require('./ErrorMayHaveTransaction')
Expand Down
66 changes: 60 additions & 6 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -26430,6 +26471,11 @@ components:
- credit
- legacy
- non-legacy
FilterRedeemedEnum:
type: string
enum:
- true
- false
ChannelEnum:
type: string
enum:
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad73196

Please sign in to comment.