Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Changes for 2019-10-10 #178

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -3025,6 +3029,10 @@ export interface CouponRedemptionCreate {
* 3-letter ISO 4217 currency code.
*/
currency?: string | null;
/**
* Subscription ID
*/
subscriptionId?: string | null;

}

Expand Down Expand Up @@ -5256,7 +5264,7 @@ export declare class Client {
*/
getActiveCouponRedemption(accountId: string): Promise<CouponRedemption>;
/**
* 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
*
Expand Down
2 changes: 1 addition & 1 deletion lib/recurly/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*
Expand Down
2 changes: 2 additions & 0 deletions lib/recurly/resources/CouponRedemption.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -35,6 +36,7 @@ class CouponRedemption extends Resource {
object: String,
removedAt: Date,
state: String,
subscriptionId: String,
updatedAt: Date
}
}
Expand Down
12 changes: 9 additions & 3 deletions openapi/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down