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

refactor: Flatten schema directory tree #1655

Merged
merged 29 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3937693
Promote bank accounts to top level
ashkarpetin Oct 30, 2023
1341c05
Promote shipping options to top level
ashkarpetin Oct 30, 2023
34ce36d
Move invoice schemas to top level
ashkarpetin Oct 30, 2023
7a41036
Remove empty schema file
ashkarpetin Oct 30, 2023
cc15175
Remove empty schema file
ashkarpetin Oct 30, 2023
dbbd07e
Move shipping to top level
ashkarpetin Oct 30, 2023
78b202e
Move Risk score rules
ashkarpetin Oct 30, 2023
5e65ef3
Move payment methods
ashkarpetin Oct 30, 2023
bc249c7
Move gateway accounts
ashkarpetin Oct 30, 2023
aea0c05
Move gateways
ashkarpetin Oct 30, 2023
d2daffb
Move fees
ashkarpetin Oct 30, 2023
a2d7b90
Move payment instructions
ashkarpetin Oct 30, 2023
3eaab7d
Move payment cards
ashkarpetin Oct 30, 2023
e8337b2
Move payment instruments
ashkarpetin Oct 30, 2023
65c3b22
Fix paths
ashkarpetin Oct 30, 2023
77cc790
Move ContactObject
ashkarpetin Oct 30, 2023
e8fe3bf
Rename schemas
ashkarpetin Oct 30, 2023
8cce3ff
Move taxes
ashkarpetin Oct 30, 2023
8812867
Rename schema
ashkarpetin Oct 30, 2023
d400ca3
Rename schemas
ashkarpetin Oct 30, 2023
2740a91
Move read to pay schemas
ashkarpetin Oct 30, 2023
133f618
Fix path
ashkarpetin Oct 30, 2023
315aa3e
Fix path
ashkarpetin Oct 30, 2023
ac16a5e
Move KYC documents
ashkarpetin Oct 30, 2023
f268787
Move tokens
ashkarpetin Oct 30, 2023
b501b3e
Fix path
ashkarpetin Oct 30, 2023
fcbc695
Move data exports
ashkarpetin Oct 30, 2023
f730f27
Fix path
ashkarpetin Oct 30, 2023
b4a7bd6
Merge branch 'main' into simplify-schema-directory-tree
ashkarpetin Oct 31, 2023
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
2 changes: 1 addition & 1 deletion openapi/components/requestBodies/BankAccount.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
content:
application/json:
schema:
$ref: ../schemas/BankAccounts/BankAccount.yaml
$ref: ../schemas/BankAccount.yaml
description: BankAccount resource.
required: true
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ content:
nullable: true
type: object
allOf:
- $ref: ../schemas/Contact/ContactObject.yaml
- $ref: ../schemas/ContactObject.yaml
requestId:
description: |-
Use this field to prevent duplicate transaction requests that may occur within a short period of time.
Expand Down
2 changes: 1 addition & 1 deletion openapi/components/requestBodies/PatchCreditMemo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ properties:
description: Credit memo item tax.
nullable: true
allOf:
- $ref: ../schemas/Taxes/CreditMemoTaxItem.yaml
- $ref: ../schemas/CreditMemoTaxItem.yaml
reason:
description: Reason for the credit memo.
type: string
Expand Down
4 changes: 2 additions & 2 deletions openapi/components/requestBodies/PatchFee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ properties:
type: string
nullable: true
formula:
$ref: ../schemas/Fees/FeeFormula.yaml
$ref: ../schemas/FeeFormula.yaml
settlementSettings:
description: |-
Fee settlement settings.
This value overrides the gateway account financial settings of the transaction.
type: object
nullable: true
allOf:
- $ref: ../schemas/GatewayAccounts/SettlementSettings.yaml
- $ref: ../schemas/SettlementSettings.yaml

6 changes: 3 additions & 3 deletions openapi/components/requestBodies/PatchPaymentInstrument.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ content:
application/json:
schema:
oneOf:
- $ref: ../schemas/PaymentInstruments/PaymentInstrumentUpdateToken.yaml
- $ref: ../schemas/PaymentCards/PaymentCardUpdatePlain.yaml
- $ref: ../schemas/BankAccounts/BankAccountUpdatePlain.yaml
- $ref: ../schemas/PaymentInstrumentUpdateToken.yaml
- $ref: ../schemas/PaymentCardUpdatePlain.yaml
- $ref: ../schemas/BankAccountUpdatePlain.yaml
description: PaymentInstrument resource.
required: true

2 changes: 1 addition & 1 deletion openapi/components/requestBodies/PatchQuote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ type: object
description: Patch quote object.
properties:
tax:
$ref: ../schemas/Taxes/Taxes.yaml
$ref: ../schemas/Taxes.yaml
8 changes: 4 additions & 4 deletions openapi/components/requestBodies/PostPaymentInstrument.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ content:
application/json:
schema:
anyOf:
- $ref: ../schemas/PaymentInstruments/PaymentInstrumentCreateToken.yaml
- $ref: ../schemas/PaymentCards/PaymentCardCreatePlain.yaml
- $ref: ../schemas/BankAccounts/BankAccountCreatePlain.yaml
- $ref: ../schemas/PaymentInstrumentCreateToken.yaml
- $ref: ../schemas/PaymentCardCreatePlain.yaml
- $ref: ../schemas/BankAccountCreatePlain.yaml
- $ref: ../schemas/PayPalAccount.yaml
- $ref: ../schemas/PaymentInstruments/AlternativeInstrument.yaml
- $ref: ../schemas/AlternativeInstrument.yaml
description: PaymentInstrument resource.
required: true
2 changes: 1 addition & 1 deletion openapi/components/requestBodies/PostReadyToPay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ allOf:
properties:
customerId:
$ref: ../schemas/CustomerId.yaml
- $ref: ../schemas/ReadyToPay/ReadyToPay.yaml
- $ref: ../schemas/ReadyToPay.yaml
2 changes: 1 addition & 1 deletion openapi/components/requestBodies/TransactionRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ content:
nullable: true
type: object
allOf:
- $ref: ../schemas/Contact/ContactObject.yaml
- $ref: ../schemas/ContactObject.yaml
requestId:
description: |-
Use this field to prevent duplicate transaction requests that may occur within a short period of time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ content:
description: Embedded objects.
properties:
paymentCard:
$ref: ../../schemas/PaymentCards/PaymentCard.yaml
$ref: ../../schemas/PaymentCard.yaml
_links:
type: array
description: Related links.
Expand Down
4 changes: 2 additions & 2 deletions openapi/components/requestBodies/storefront/PatchOrder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ content:
type: object
nullable: true
allOf:
- $ref: ../../schemas/Contact/ContactObject.yaml
- $ref: ../../schemas/ContactObject.yaml
billingAddress:
description: Order billing address.
type: object
nullable: true
allOf:
- $ref: ../../schemas/Contact/ContactObject.yaml
- $ref: ../../schemas/ContactObject.yaml
description: Order resource.
required: true
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ content:
format: password
description: Password.
primaryAddress:
$ref: ../../schemas/Contact/ContactObject.yaml
$ref: ../../schemas/ContactObject.yaml
paymentToken:
type: string
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ content:
nullable: true
type: object
allOf:
- $ref: ../../schemas/Contact/ContactObject.yaml
- $ref: ../../schemas/ContactObject.yaml
redirectUrl:
nullable: true
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ content:
If this field is supplied,
it overrides the billing address obtained from the token.
allOf:
- $ref: ../../schemas/Contact/ContactObject.yaml
- $ref: ../../schemas/ContactObject.yaml
customFields:
$ref: ../../schemas/ResourceCustomFields.yaml
description: Payment instrument.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ properties:
paymentMethod:
description: Payment method of the payment instrument.
allOf:
- $ref: ../../PaymentMethods/AlternativePaymentMethods.yaml
- $ref: ./AlternativePaymentMethods.yaml
- not:
enum:
- paypal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ properties:
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: ../CustomerId.yaml
$ref: ./CustomerId.yaml
method:
description: Payment method of the payment instrument.
allOf:
- $ref: ../PaymentMethods/AlternativePaymentMethods.yaml
- $ref: ./AlternativePaymentMethods.yaml
- not:
enum:
- payment-card
Expand All @@ -27,7 +27,7 @@ properties:
billingAddress:
description: Billing address of the user that is associated with the payment instrument.
allOf:
- $ref: ../Contact/ContactObject.yaml
- $ref: ./ContactObject.yaml
status:
description: Payment instrument status.
type: string
Expand All @@ -36,13 +36,13 @@ properties:
- active
- deactivated
useAsBackup:
$ref: ../UseAsBackup.yaml
$ref: ./UseAsBackup.yaml
createdTime:
$ref: ../CreatedTime.yaml
$ref: ./CreatedTime.yaml
updatedTime:
$ref: ../UpdatedTime.yaml
$ref: ./UpdatedTime.yaml
customFields:
$ref: ../ResourceCustomFields.yaml
$ref: ./ResourceCustomFields.yaml
stickyGatewayAccountId:
description: |-
ID of the sticky gateway account.
Expand All @@ -64,7 +64,7 @@ properties:
type: object
nullable: true
allOf:
- $ref: ../RiskMetadata.yaml
- $ref: ./RiskMetadata.yaml
revision:
description: |-
Number of times the payment instrument data has been modified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ required:
- method
properties:
method:
$ref: ../../PaymentMethods/PaymentMethod.yaml
$ref: ./PaymentMethod.yaml
paymentInstrumentId:
type: string
description: ID of the payment instrument.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ properties:
description: Payment method of the token.
type: string
allOf:
- $ref: ../PaymentMethods/AlternativePaymentMethods.yaml
- $ref: ./AlternativePaymentMethods.yaml
- not:
enum:
- payment-card
Expand All @@ -22,12 +22,12 @@ properties:
billingAddress:
description: Billing address object.
allOf:
- $ref: ../Contact/ContactObject.yaml
- $ref: ./ContactObject.yaml
id:
description: ID of the token.
readOnly: true
allOf:
- $ref: ../ResourceId.yaml
- $ref: ./ResourceId.yaml
isUsed:
description: Specifies if the token is already used.
type: boolean
Expand All @@ -37,15 +37,15 @@ properties:
type: object
nullable: true
allOf:
- $ref: ../RiskMetadata.yaml
- $ref: ./RiskMetadata.yaml
leadSource:
allOf:
- $ref: ../LeadSource.yaml
- $ref: ./LeadSource.yaml
writeOnly: true
createdTime:
$ref: ../CreatedTime.yaml
$ref: ./CreatedTime.yaml
updatedTime:
$ref: ../UpdatedTime.yaml
$ref: ./UpdatedTime.yaml
usageTime:
description: Date and time when the token is used.
type: string
Expand All @@ -59,4 +59,4 @@ properties:
format: date-time
readOnly: true
_links:
$ref: ../SelfLink.yaml
$ref: ./SelfLink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ properties:
type: string
example: "Test Merchant"
country:
$ref: ../../../DigitalWalletCountry.yaml
$ref: ./DigitalWalletCountry.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
description: Apple Pay session validation.
allOf:
- $ref: ../../DigitalWalletValidation.yaml
- $ref: ./DigitalWalletValidation.yaml
- type: object
required:
- validationRequest
Expand All @@ -19,7 +19,7 @@ allOf:
description: |-
Domain where the client code, such as [FramePay](https://docs.rebilly.com/docs/developer-docs/framepay/), is executed.
The domain name must be registered in the Apple Pay console.
For more information, see [Register a domain for Apple Pay](../../PostDigitalWalletOnboardingApplePay).
For more information, see [Register a domain for Apple Pay](./PostDigitalWalletOnboardingApplePay).
example: www.example.com
displayName:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ required:
- accountType
- billingAddress
allOf:
- $ref: ../BankAccountCreatePlain.yaml
- $ref: ./BankAccountCreatePlain.yaml
- properties:
method:
description: Payment method of the payment instrument.
type: string
enum:
- ach
customerId:
$ref: ../../CustomerId.yaml
$ref: ./CustomerId.yaml
accountNumberType:
description: |-
Bank account number type.
Expand Down Expand Up @@ -53,10 +53,10 @@ allOf:
billingAddress:
description: Customer's billing address.
allOf:
- $ref: ../../Contact/ContactObject.yaml
- $ref: ./ContactObject.yaml
customFields:
$ref: ../../ResourceCustomFields.yaml
$ref: ./ResourceCustomFields.yaml
riskMetadata:
$ref: ../../RiskMetadata.yaml
$ref: ./RiskMetadata.yaml
useAsBackup:
$ref: ../../UseAsBackup.yaml
$ref: ./UseAsBackup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ properties:
maxLength: 50
example: inst_0YVB8KPKNXCBR9EDX7JHSED75N
customerId:
$ref: ../CustomerId.yaml
$ref: ./CustomerId.yaml
method:
description: Method of payment instrument.
type: string
Expand Down Expand Up @@ -46,7 +46,7 @@ properties:
billingAddress:
description: Customer's billing address.
allOf:
- $ref: ../Contact/ContactObject.yaml
- $ref: ./ContactObject.yaml
fingerprint:
description: |-
Unique value which identifies the bank account.
Expand Down Expand Up @@ -81,15 +81,15 @@ properties:
type: object
nullable: true
allOf:
- $ref: ../RiskMetadata.yaml
- $ref: ./RiskMetadata.yaml
useAsBackup:
$ref: ../UseAsBackup.yaml
$ref: ./UseAsBackup.yaml
createdTime:
$ref: ../CreatedTime.yaml
$ref: ./CreatedTime.yaml
updatedTime:
$ref: ../UpdatedTime.yaml
$ref: ./UpdatedTime.yaml
customFields:
$ref: ../ResourceCustomFields.yaml
$ref: ./ResourceCustomFields.yaml
revision:
description: |-
Number of times the payment instrument data has been modified.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ required:
discriminator:
propertyName: accountNumberType
mapping:
BBAN: ./AccountNumberTypes/BBANType.yaml
IBAN: ./AccountNumberTypes/IBANType.yaml
BBAN: ./BBANType.yaml
IBAN: ./IBANType.yaml
properties:
accountNumberType:
nullable: false
Expand Down
Loading