Skip to content

Commit

Permalink
feat: add method to quote
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurapov committed Sep 27, 2023
1 parent c1b5398 commit e2b80bc
Showing 1 changed file with 33 additions and 6 deletions.
39 changes: 33 additions & 6 deletions openapi/resource-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ paths:
value: '2198'
assetCode: EUR
assetScale: 2
method: ilp
createdAt: '2022-03-12T23:20:50.52Z'
expiresAt: '2022-04-12T23:20:50.52Z'
'400':
Expand All @@ -532,16 +533,22 @@ paths:
content:
application/json:
examples:
Create fixed-send-amount quote for $25 to an ILP STREAM connection:
Create quote for an `receiver` that is an Incoming Payment with an `incomingAmount`:
value:
receiver: 'https://openpayments.guide/connections/45a0d0ee-26dc-4c66-89e0-01fbf93156f7'
receiver: 'https://openpayments.guide/incoming-payments/37a0d0ee-26dc-4c66-89e0-01fbf93156f7'
method: ilp
Create fixed-send amount quote for $25:
value:
receiver: 'https://openpayments.guide/incoming-payments/37a0d0ee-26dc-4c66-89e0-01fbf93156f7'
method: ilp
debitAmount:
value: '2500'
assetCode: USD
assetScale: 2
Create fixed-receive-amount quote for $25:
Create fixed-receive amount quote for $25:
value:
receiver: 'https://openpayments.guide/incoming-payments/37a0d0ee-26dc-4c66-89e0-01fbf93156f7'
method: 'ilp'
receiveAmount:
value: '2500'
assetCode: USD
Expand All @@ -552,29 +559,38 @@ paths:
properties:
receiver:
$ref: ./schemas.yaml#/components/schemas/receiver
method:
$ref: '#/components/schemas/payment-method'
required:
- receiver
- method
additionalProperties: false
- description: Create a quote with a fixed-receive amount
properties:
receiver:
$ref: ./schemas.yaml#/components/schemas/receiver
method:
$ref: '#/components/schemas/payment-method'
receiveAmount:
description: The fixed amount that would be paid into the receiving wallet address given a successful outgoing payment.
$ref: ./schemas.yaml#/components/schemas/amount
required:
- receiver
- method
- receiveAmount
additionalProperties: false
- description: Create a quote with a fixed send amount
- description: Create a quote with a fixed-send amount
properties:
receiver:
$ref: ./schemas.yaml#/components/schemas/receiver
method:
$ref: '#/components/schemas/payment-method'
debitAmount:
description: The fixed amount that would be sent from the sending wallet address given a successful outgoing payment.
$ref: ./schemas.yaml#/components/schemas/amount
required:
- receiver
- method
- debitAmount
additionalProperties: false
description: |-
Expand Down Expand Up @@ -763,6 +779,7 @@ paths:
value: '2198'
assetCode: EUR
assetScale: 2
method: 'ilp'
createdAt: '2022-03-12T23:20:50.52Z'
expiresAt: '2022-04-12T23:20:50.52Z'
'401':
Expand Down Expand Up @@ -924,7 +941,8 @@ components:
uniqueItems: true
minItems: 0
items:
$ref: '#/components/schemas/ilp-payment-method'
anyOf:
- $ref: '#/components/schemas/ilp-payment-method'
required:
- methods
public-incoming-payment:
Expand Down Expand Up @@ -1056,6 +1074,7 @@ components:
value: '2500'
assetCode: USD
assetScale: 2
method: ilp
createdAt: '2022-03-12T23:20:50.52Z'
expiresAt: '2022-04-12T23:20:50.52Z'
- id: 'https://openpayments.guide/quotes/8c68d3cc-0a0f-4216-98b4-4fa44a6c88cf'
Expand All @@ -1069,6 +1088,7 @@ components:
value: '7026'
assetCode: USD
assetScale: 2
method: ilp
createdAt: '2022-03-12T23:20:50.52Z'
expiresAt: '2022-04-12T23:20:50.52Z'
additionalProperties: false
Expand All @@ -1092,6 +1112,8 @@ components:
debitAmount:
$ref: ./schemas.yaml#/components/schemas/amount
description: "The total amount that should be deducted from the sender's account when the corresponding outgoing payment has been paid. "
method:
$ref: '#/components/schemas/payment-method'
expiresAt:
type: string
description: The date and time when the calculated `debitAmount` is no longer valid.
Expand All @@ -1107,6 +1129,7 @@ components:
- receiveAmount
- debitAmount
- createdAt
- method
page-info:
description: ''
type: object
Expand Down Expand Up @@ -1179,14 +1202,18 @@ components:
kty: OKP
crv: Ed25519
x: oy0L_vTygNE4IogRyn_F5GmHXdqYVjIXkWs2jky7zsI
payment-method:
type: string
enum:
- ilp
ilp-payment-method:
type: object
additionalProperties: false
properties:
type:
type: string
enum:
- 'ilp'
- ilp
ilpAddress:
type: string
maxLength: 1023
Expand Down

0 comments on commit e2b80bc

Please sign in to comment.