Skip to content

Commit

Permalink
ANCHOR-603: Add fee_details documentation (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifropc authored Mar 28, 2024
1 parent 5dcd243 commit c0711fe
Show file tree
Hide file tree
Showing 21 changed files with 865 additions and 30 deletions.
31 changes: 30 additions & 1 deletion static/assets/rpc-methods/do_stellar_payment.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
},
"amount_fee": {
"type": "object",
"description": "The amount of fee expected to be charged by anchor",
"description": "DEPRECATED in favour of fee_details. The total amount charged in fees for processing all refund payments, in units of amount_in_asset",
"properties": {
"asset": {
"type": "string"
Expand All @@ -132,6 +132,35 @@
}
}
},
"fee_details": {
"type": "object",
"description": "Description of fee charged by the anchor.",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
}
},
"quote_id": {
"type": "string",
"description": "The id returned from a SEP-38 POST /quote response"
Expand Down
32 changes: 31 additions & 1 deletion static/assets/rpc-methods/do_stellar_refund.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
},
"amount_fee": {
"type": "object",
"description": "The amount of fee expected to be charged by anchor",
"description": "DEPRECATED in favour of fee_details. The total amount charged in fees for processing all refund payments, in units of amount_in_asset",
"properties": {
"asset": {
"type": "string"
Expand All @@ -185,6 +185,36 @@
}
}
},
"fee_details": {
"type": "object",
"description": "Description of fee charged by the anchor.",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
}
},

"quote_id": {
"type": "string",
"description": "The id returned from a SEP-38 POST /quote response"
Expand Down
70 changes: 67 additions & 3 deletions static/assets/rpc-methods/notify_amounts_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
},
{
"name": "amount_fee",
"description": "Amount of fee charged by anchor",
"required": true,
"description": "DEPRECATED in favor of fee_detailss. Amount of fee charged by anchor",
"required": false,
"schema": {
"type": "object",
"properties": {
Expand All @@ -57,6 +57,40 @@
},
"required": ["amount"]
}
},
{
"name": "fee_details",
"description": "Description of fees charged by the anchor",
"required": true,
"schema": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
},
"required": ["total", "asset"]
}
}
],
"result": {
Expand Down Expand Up @@ -148,7 +182,7 @@
},
"amount_fee": {
"type": "object",
"description": "The amount of fee expected to be charged by anchor",
"description": "DEPRECATED in favour of fee_details. The total amount charged in fees for processing all refund payments, in units of amount_in_asset",
"properties": {
"asset": {
"type": "string"
Expand All @@ -158,6 +192,36 @@
}
}
},
"fee_details": {
"type": "object",
"description": "Description of fee charged by the anchor.",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
}
},

"quote_id": {
"type": "string",
"description": "The id returned from a SEP-38 POST /quote response"
Expand Down
32 changes: 31 additions & 1 deletion static/assets/rpc-methods/notify_customer_info_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
},
"amount_fee": {
"type": "object",
"description": "The amount of fee expected to be charged by anchor",
"description": "DEPRECATED in favour of fee_details. The total amount charged in fees for processing all refund payments, in units of amount_in_asset",
"properties": {
"asset": {
"type": "string"
Expand All @@ -125,6 +125,36 @@
}
}
},
"fee_details": {
"type": "object",
"description": "Description of fee charged by the anchor.",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
}
},

"quote_id": {
"type": "string",
"description": "The id returned from a SEP-38 POST /quote response"
Expand Down
70 changes: 67 additions & 3 deletions static/assets/rpc-methods/notify_interactive_flow_completed.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
},
{
"name": "amount_fee",
"description": "The amount of fee expected to be charged by anchor",
"required": true,
"description": "DEPRECATED in favor of fee_details. The amount of fee expected to be charged by anchor",
"required": false,
"schema": {
"type": "object",
"properties": {
Expand All @@ -91,6 +91,40 @@
]
}
},
{
"name": "fee_details",
"description": "Description of fees charged by the anchor",
"required": true,
"schema": {
"type": "object",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
},
"required": ["total", "asset"]
}
},
{
"name": "amount_expected",
"description": "The amount expected in the payment",
Expand Down Expand Up @@ -199,7 +233,7 @@
},
"amount_fee": {
"type": "object",
"description": "The amount of fee expected to be charged by anchor",
"description": "DEPRECATED in favour of fee_details. The total amount charged in fees for processing all refund payments, in units of amount_in_asset",
"properties": {
"asset": {
"type": "string"
Expand All @@ -209,6 +243,36 @@
}
}
},
"fee_details": {
"type": "object",
"description": "Description of fee charged by the anchor.",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
}
},

"quote_id": {
"type": "string",
"description": "The id returned from a SEP-38 POST /quote response"
Expand Down
32 changes: 31 additions & 1 deletion static/assets/rpc-methods/notify_offchain_funds_available.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
},
"amount_fee": {
"type": "object",
"description": "The amount of fee expected to be charged by anchor",
"description": "DEPRECATED in favour of fee_details. The total amount charged in fees for processing all refund payments, in units of amount_in_asset",
"properties": {
"asset": {
"type": "string"
Expand All @@ -140,6 +140,36 @@
}
}
},
"fee_details": {
"type": "object",
"description": "Description of fee charged by the anchor.",
"properties": {
"total": {
"type": "number"
},
"asset": {
"type": "string"
},
"details": {
"type": "array",
"description": "Details about fee charged",
"items": {
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"amount": {
"type": "number"
}
}
}
}
}
},

"quote_id": {
"type": "string",
"description": "The id returned from a SEP-38 POST /quote response"
Expand Down
Loading

0 comments on commit c0711fe

Please sign in to comment.