Skip to content

Commit

Permalink
Add detail to default instrument description (#1846)
Browse files Browse the repository at this point in the history
* Add detail to default instrument description

* Fix typo

* Fix description issue related to anyOf

* Update description

* Update related descriptions

* Update remaining descriptions
  • Loading branch information
noon-dawg authored Apr 3, 2024
1 parent 089ee5c commit 2d67c72
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 13 deletions.
7 changes: 6 additions & 1 deletion openapi/components/schemas/AlternativePaymentInstrument.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion openapi/components/schemas/CashInstrument.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 6 additions & 1 deletion openapi/components/schemas/CheckInstrument.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion openapi/components/schemas/Customer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions openapi/components/schemas/FlexiblePlan.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
5 changes: 4 additions & 1 deletion openapi/components/schemas/StorefrontAccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion openapi/components/schemas/Transaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ properties:
readOnly: true
paymentInstrument:
type: object
description: Payment instrument information.
anyOf:
- $ref: ./VaultedInstrument.yaml
- $ref: ./AlternativePaymentInstrument.yaml
Expand Down
9 changes: 7 additions & 2 deletions openapi/components/schemas/VaultedInstrument.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 2d67c72

Please sign in to comment.