Skip to content

Commit

Permalink
Merge pull request #285 from LedgerHQ/live-14117-update-docs
Browse files Browse the repository at this point in the history
chore: Remove successRates from documentation and add minMaxRestrictions to payment methods response
  • Loading branch information
ebarber-ledger authored Oct 22, 2024
2 parents 16a7614 + 889ae57 commit bf6f1d6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 24 deletions.
14 changes: 0 additions & 14 deletions public/exchange/openapi/buy-provider-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ paths:
- "fiatCurrencyCapabilities.[].maxAmount ": minimum amount in fiat the user can buy crypto,
- "countryCapabilities.[].country": available at the Alpha-2 standard (ISO3166),
- "countryCapabilities.[].paymentMethods.[].name": Available payment method, valid values : visa, mastercard, creditcard, pix, mobikwik, easypay, astropay, upibanktransfer, sofort, bancontact, giropay, maestro, googlepay, applepay, paypal, sepa, ach, fasterpayments, easybank, bank, gbpbank, eps, ideal, revolut
- "countryCapabilities.[].paymentMethods.[].successRate": percentage of success of the transaction.
content:
application/json:
schema:
Expand All @@ -35,27 +34,18 @@ paths:
- country: FR
paymentMethods:
- name: paypal
successRate: 50
- name: pix
successRate: 20
- name: visa
successRate: 50
- country: US
paymentMethods:
- name: paypal
successRate: 50
- name: pix
successRate: 20
- name: visa
successRate: 50
- country: GB
paymentMethods:
- name: paypal
successRate: 50
- name: pix
successRate: 20
- name: visa
successRate: 50
default:
description: Error sent by the provider
content:
Expand Down Expand Up @@ -272,14 +262,10 @@ components:
BuyPaymentMethod:
required:
- name
- successRate
type: object
properties:
name:
$ref: '#/components/schemas/PaymentMethod'
successRate:
type: integer
format: int32
BuyProviderCapabilities:
type: object
properties:
Expand Down
54 changes: 44 additions & 10 deletions public/exchange/openapi/sell-provider-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,39 @@ paths:
- country: FR
paymentMethods:
- name: sepa
minMaxRestrictions:
- fiat: EUR
minAmount: 30
maxAmount: 3000
- name: visa
minMaxRestrictions:
- fiat: EUR
minAmount: 10
maxAmount: 1000
- country: US
paymentMethods:
- name: sepa
minMaxRestrictions:
- fiat: USD
minAmount: 30
maxAmount: 3000
- name: visa
minMaxRestrictions:
- fiat: USD
minAmount: 10
maxAmount: 1000
- country: GB
paymentMethods:
- name: sepa
minMaxRestrictions:
- fiat: GBP
minAmount: 10
maxAmount: 3000
- name: visa
minMaxRestrictions:
- fiat: GBP
minAmount: 30
maxAmount: 1000
default:
description: Error sent by the provider
content:
Expand Down Expand Up @@ -333,20 +357,15 @@ components:
SellPaymentMethod:
required:
- name
- successRate
- minAmount
- maxAmount
- minMaxRestrictions
type: object
properties:
name:
$ref: '#/components/schemas/PaymentMethod'
successRate:
type: integer
format: int32
minAmount:
type: number
maxAmount:
type: number
minMaxRestrictions:
type: array
items:
$ref: '#/components/schemas/FiatCurrencyCapabilityPaymentMethods'
SellProviderCapabilities:
type: object
properties:
Expand Down Expand Up @@ -421,6 +440,14 @@ components:
- $ref: '#/components/schemas/Coin'
- $ref: '#/components/schemas/Token'
FiatCurrencyCapability:
required:
- fiat
type: object
properties:
fiat:
type: string
description: Currency code of the ISO-4217 standard.
FiatCurrencyCapabilityPaymentMethods:
required:
- fiat
- minAmount
Expand All @@ -429,6 +456,13 @@ components:
properties:
fiat:
type: string
description: Currency code of the ISO-4217 standard.
minAmount:
type: string
description: Miniumum supported amount of this currency
maxAmount:
type: string
description: Maximum supported amount of this currency
Mastercard:
type: object
Other:
Expand Down

0 comments on commit bf6f1d6

Please sign in to comment.