From 2d67c724932d932e6496f14bd7fdb13963a134cb Mon Sep 17 00:00:00 2001 From: Chris <85164331+noon-dawg@users.noreply.github.com> Date: Wed, 3 Apr 2024 18:20:26 +0100 Subject: [PATCH] Add detail to default instrument description (#1846) * Add detail to default instrument description * Fix typo * Fix description issue related to anyOf * Update description * Update related descriptions * Update remaining descriptions --- .../components/schemas/AlternativePaymentInstrument.yaml | 7 ++++++- openapi/components/schemas/CashInstrument.yaml | 7 ++++++- openapi/components/schemas/CheckInstrument.yaml | 7 ++++++- openapi/components/schemas/Customer.yaml | 1 - openapi/components/schemas/FlexiblePlan.yaml | 4 ---- openapi/components/schemas/StorefrontAccount.yaml | 5 ++++- .../schemas/SubscriptionOrOneTimeSaleItem.yaml | 1 - openapi/components/schemas/Transaction.yaml | 1 - openapi/components/schemas/VaultedInstrument.yaml | 9 +++++++-- 9 files changed, 29 insertions(+), 13 deletions(-) diff --git a/openapi/components/schemas/AlternativePaymentInstrument.yaml b/openapi/components/schemas/AlternativePaymentInstrument.yaml index 7bfe78766d..ff2628cb5b 100644 --- a/openapi/components/schemas/AlternativePaymentInstrument.yaml +++ b/openapi/components/schemas/AlternativePaymentInstrument.yaml @@ -1,5 +1,10 @@ -description: Alternative payment method instrument. title: Alternative instrument +description: |- + Alternative payment method instrument. + + To use this payment instrument for automatic subscription renewals, + and for transactions when no specific payment instrument is provided by the user, + set this as the default payment instrument. type: object required: - method diff --git a/openapi/components/schemas/CashInstrument.yaml b/openapi/components/schemas/CashInstrument.yaml index 8c30a73b3d..679bf1013a 100644 --- a/openapi/components/schemas/CashInstrument.yaml +++ b/openapi/components/schemas/CashInstrument.yaml @@ -1,5 +1,10 @@ -description: Cash payment instrument object. title: Cash +description: |- + Cash payment instrument object. + + To use this payment instrument for automatic subscription renewals, + and for transactions when no specific payment instrument is provided by the user, + set this as the default payment instrument. type: object required: - method diff --git a/openapi/components/schemas/CheckInstrument.yaml b/openapi/components/schemas/CheckInstrument.yaml index edbe4278da..4673427dcf 100644 --- a/openapi/components/schemas/CheckInstrument.yaml +++ b/openapi/components/schemas/CheckInstrument.yaml @@ -1,5 +1,10 @@ -description: Check payment instrument object. title: Check +description: |- + Check payment instrument object. + + To use this payment instrument for automatic subscription renewals, + and for transactions when no specific payment instrument is provided by the user, + set this as the default payment instrument. type: object required: - method diff --git a/openapi/components/schemas/Customer.yaml b/openapi/components/schemas/Customer.yaml index fea3d33955..d12b32af76 100644 --- a/openapi/components/schemas/Customer.yaml +++ b/openapi/components/schemas/Customer.yaml @@ -45,7 +45,6 @@ properties: The token expires after first use. # TODO Check if it's valid. Might require a oneOf instead. defaultPaymentInstrument: - description: Default payment instrument information. anyOf: - $ref: ./VaultedInstrument.yaml - $ref: ./AlternativePaymentInstrument.yaml diff --git a/openapi/components/schemas/FlexiblePlan.yaml b/openapi/components/schemas/FlexiblePlan.yaml index 55ed6feb8d..9bf567637e 100644 --- a/openapi/components/schemas/FlexiblePlan.yaml +++ b/openapi/components/schemas/FlexiblePlan.yaml @@ -1,9 +1,5 @@ allOf: - type: object - description: |- - Customize an existing plan for the current order. - - To create a new plan, see [Create a plan](https://www.rebilly.com/catalog/all/Plans/PostPlan). required: - id properties: diff --git a/openapi/components/schemas/StorefrontAccount.yaml b/openapi/components/schemas/StorefrontAccount.yaml index 466522cbc7..ff46172f65 100644 --- a/openapi/components/schemas/StorefrontAccount.yaml +++ b/openapi/components/schemas/StorefrontAccount.yaml @@ -24,7 +24,10 @@ properties: This token may only be used once before it expires. defaultPaymentInstrument: type: object - description: Default payment instrument information. + description: |- + Default payment instrument. + The default payment instrument is used to automatically pay subscription renewals, + and for transaction requests where a specific payment instrument is not provided. required: - method properties: diff --git a/openapi/components/schemas/SubscriptionOrOneTimeSaleItem.yaml b/openapi/components/schemas/SubscriptionOrOneTimeSaleItem.yaml index 6ebb6f9220..232c07752d 100644 --- a/openapi/components/schemas/SubscriptionOrOneTimeSaleItem.yaml +++ b/openapi/components/schemas/SubscriptionOrOneTimeSaleItem.yaml @@ -22,7 +22,6 @@ properties: description: Number of filled product units. type: integer plan: - description: Details of the plan. anyOf: - $ref: ./OriginalPlan.yaml - $ref: ./FlexiblePlan.yaml diff --git a/openapi/components/schemas/Transaction.yaml b/openapi/components/schemas/Transaction.yaml index c1e2db5f52..4a7170be54 100644 --- a/openapi/components/schemas/Transaction.yaml +++ b/openapi/components/schemas/Transaction.yaml @@ -394,7 +394,6 @@ properties: readOnly: true paymentInstrument: type: object - description: Payment instrument information. anyOf: - $ref: ./VaultedInstrument.yaml - $ref: ./AlternativePaymentInstrument.yaml diff --git a/openapi/components/schemas/VaultedInstrument.yaml b/openapi/components/schemas/VaultedInstrument.yaml index 2033751e18..3b3d525412 100644 --- a/openapi/components/schemas/VaultedInstrument.yaml +++ b/openapi/components/schemas/VaultedInstrument.yaml @@ -1,5 +1,10 @@ -description: Vaulted payment instrument. -title: Vaulted instrument +title: Vaulted payment instrument +description: |- + Vaulted payment instrument. + + To use this payment instrument for automatic subscription renewals, + and for transactions when no specific payment instrument is provided by the user, + set this as the default payment instrument. required: - method - paymentInstrumentId