From 41477c77e3e1cef65c63d050e13990f90c5b47ba Mon Sep 17 00:00:00 2001 From: Edmandie Samonte Date: Wed, 15 Jan 2020 21:22:59 +0800 Subject: [PATCH 1/2] Add write-only `Invoice.couponIds` --- spec/components/schemas/Invoices/Invoice.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spec/components/schemas/Invoices/Invoice.yaml b/spec/components/schemas/Invoices/Invoice.yaml index 036a1a6f2..a168dfee8 100644 --- a/spec/components/schemas/Invoices/Invoice.yaml +++ b/spec/components/schemas/Invoices/Invoice.yaml @@ -93,6 +93,25 @@ properties: items: allOf: - $ref: "#/components/schemas/InvoiceTax" + couponIds: + type: array + nullable: true + description: | + A list of coupons to redeem on the customer and restrict to this invoice. + Read more about [coupons here](https://help.rebilly.com/invoices-and-subscriptions/coupons-discounts). + + This parameter respects the following logic: + + - When not passed then applied coupons will not be changed. + + - When empty array passed then all applied coupon redemptions will be canceled. + + - When list of coupons is passed then not applied yet coupons will be applied, already applied coupons + will not change their state, applied coupons that are not presented in passed list will be canceled. + writeOnly: true + items: + type: string + description: Coupon ID discounts: type: array description: Discounts applied From 22ada882b70193595fc4c2ebd9b4c78ea61912a0 Mon Sep 17 00:00:00 2001 From: Edmandie Samonte Date: Thu, 16 Jan 2020 01:11:17 +0800 Subject: [PATCH 2/2] Removed unncessary whitespace per PR feedback --- spec/components/schemas/Invoices/Invoice.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/spec/components/schemas/Invoices/Invoice.yaml b/spec/components/schemas/Invoices/Invoice.yaml index a168dfee8..e57ff1dff 100644 --- a/spec/components/schemas/Invoices/Invoice.yaml +++ b/spec/components/schemas/Invoices/Invoice.yaml @@ -101,11 +101,8 @@ properties: Read more about [coupons here](https://help.rebilly.com/invoices-and-subscriptions/coupons-discounts). This parameter respects the following logic: - - When not passed then applied coupons will not be changed. - - When empty array passed then all applied coupon redemptions will be canceled. - - When list of coupons is passed then not applied yet coupons will be applied, already applied coupons will not change their state, applied coupons that are not presented in passed list will be canceled. writeOnly: true