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

[ANCHOR-603] Add fee_details documentation #349

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't name and amount be required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is response object

"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",
Ifropc marked this conversation as resolved.
Show resolved Hide resolved
"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
Loading