From 16d0c5ab0916db14ceb9a41d2aa332f7388d43f7 Mon Sep 17 00:00:00 2001 From: Doug Miller Date: Thu, 14 Jan 2021 15:23:21 -0600 Subject: [PATCH] Thu Jan 14 15:23:21 CST 2021 Upgrade API version v2019-10-10 --- lib/recurly.d.ts | 10 +++++++++- lib/recurly/Client.js | 2 +- lib/recurly/resources/CouponRedemption.js | 2 ++ openapi/api.yaml | 12 +++++++++--- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/lib/recurly.d.ts b/lib/recurly.d.ts index 99aa6f31..6ac7dea9 100644 --- a/lib/recurly.d.ts +++ b/lib/recurly.d.ts @@ -560,6 +560,10 @@ export declare class CouponRedemption { * The Account on which the coupon was applied. */ account?: AccountMini | null; + /** + * Subscription ID + */ + subscriptionId?: string | null; coupon?: Coupon | null; /** * Coupon Redemption state @@ -3025,6 +3029,10 @@ export interface CouponRedemptionCreate { * 3-letter ISO 4217 currency code. */ currency?: string | null; + /** + * Subscription ID + */ + subscriptionId?: string | null; } @@ -5256,7 +5264,7 @@ export declare class Client { */ getActiveCouponRedemption(accountId: string): Promise; /** - * Generate an active coupon redemption on an account + * Generate an active coupon redemption on an account or subscription * * API docs: https://developers.recurly.com/api/v2019-10-10#operation/create_coupon_redemption * diff --git a/lib/recurly/Client.js b/lib/recurly/Client.js index 02f6bfff..14e48672 100644 --- a/lib/recurly/Client.js +++ b/lib/recurly/Client.js @@ -699,7 +699,7 @@ class Client extends BaseClient { } /** - * Generate an active coupon redemption on an account + * Generate an active coupon redemption on an account or subscription * * API docs: {@link https://developers.recurly.com/api/v2019-10-10#operation/create_coupon_redemption} * diff --git a/lib/recurly/resources/CouponRedemption.js b/lib/recurly/resources/CouponRedemption.js index 03e12453..3021c295 100644 --- a/lib/recurly/resources/CouponRedemption.js +++ b/lib/recurly/resources/CouponRedemption.js @@ -21,6 +21,7 @@ const Resource = require('../Resource') * @prop {string} object - Will always be `coupon`. * @prop {Date} removedAt - The date and time the redemption was removed from the account (un-redeemed). * @prop {string} state - Coupon Redemption state + * @prop {string} subscriptionId - Subscription ID * @prop {Date} updatedAt - Last updated at */ class CouponRedemption extends Resource { @@ -35,6 +36,7 @@ class CouponRedemption extends Resource { object: String, removedAt: Date, state: String, + subscriptionId: String, updatedAt: Date } } diff --git a/openapi/api.yaml b/openapi/api.yaml index a50a4e34..fd87a2b8 100644 --- a/openapi/api.yaml +++ b/openapi/api.yaml @@ -275,8 +275,8 @@ tags: allow for individual delivery and tracking. - name: coupon_redemption x-displayName: Coupon Redemption - description: Coupon redemptions are created when a coupon is applied to an account. - This allows you to track your promotions. + description: Coupon redemptions are created when a coupon is applied to an account + or subscription. This allows you to track your promotions. - name: unique_coupon_code x-displayName: Unique Coupon Code description: Unique coupon codes are generated from bulk coupons. @@ -2672,7 +2672,7 @@ paths: - account - coupon_redemption operationId: create_coupon_redemption - summary: Generate an active coupon redemption on an account + summary: Generate an active coupon redemption on an account or subscription parameters: - "$ref": "#/components/parameters/site_id" - "$ref": "#/components/parameters/account_id" @@ -16711,6 +16711,9 @@ components: description: The Account on which the coupon was applied. readOnly: true "$ref": "#/components/schemas/AccountMini" + subscription_id: + type: string + title: Subscription ID coupon: "$ref": "#/components/schemas/Coupon" state: @@ -16758,6 +16761,9 @@ components: title: Currency description: 3-letter ISO 4217 currency code. maxLength: 3 + subscription_id: + type: string + title: Subscription ID required: - coupon_id CouponRedemptionMini: