Skip to content

Commit

Permalink
Anchor Platform: Add Event documentation (#315)
Browse files Browse the repository at this point in the history
* Anchor Platform: Event docs

* yarn api

* PR comments
  • Loading branch information
philipliu authored Feb 28, 2024
1 parent bc93bf9 commit e42439d
Show file tree
Hide file tree
Showing 9 changed files with 256 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/anchor-platform/callbacks/get-rates.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Success.

An object describing the fees added on top of the rate provided via the `price` attribute.

</div><SchemaItem collapsible={false} name={"total"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The total fee to be applied."}}></SchemaItem><SchemaItem collapsible={false} name={"asset"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The asset the fee will be charged in. Must be represented in [Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format)."}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>details</strong><span style={{"opacity":"0.6"}}> object[]</span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the fee, for example `ACH fee`, `Brazilian conciliation fee`, `Service fee`, etc."}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"A text describing the fee."}}></SchemaItem><SchemaItem collapsible={false} name={"amount"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The amount of asset applied. If `fee.details` is provided, `sum(fee.details.amount)` should be equals `fee.total`."}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></div></details></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"rate\": {\n \"id\": \"string\",\n \"expires_at\": \"2024-01-29T19:37:08.998Z\",\n \"price\": \"string\",\n \"sell_amount\": \"string\",\n \"buy_amount\": \"string\",\n \"fee\": {\n \"total\": \"string\",\n \"asset\": \"string\",\n \"details\": [\n {\n \"name\": \"string\",\n \"description\": \"string\",\n \"amount\": \"string\"\n }\n ]\n }\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"422"} value={"422"}><div>
</div><SchemaItem collapsible={false} name={"total"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The total fee to be applied."}}></SchemaItem><SchemaItem collapsible={false} name={"asset"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The asset the fee will be charged in. Must be represented in [Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format)."}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>details</strong><span style={{"opacity":"0.6"}}> object[]</span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the fee, for example `ACH fee`, `Brazilian conciliation fee`, `Service fee`, etc."}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"A text describing the fee."}}></SchemaItem><SchemaItem collapsible={false} name={"amount"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The amount of asset applied. If `fee.details` is provided, `sum(fee.details.amount)` should be equals `fee.total`."}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></div></details></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"rate\": {\n \"id\": \"string\",\n \"expires_at\": \"2024-02-27T17:52:45.776Z\",\n \"price\": \"string\",\n \"sell_amount\": \"string\",\n \"buy_amount\": \"string\",\n \"fee\": {\n \"total\": \"string\",\n \"asset\": \"string\",\n \"details\": [\n {\n \"name\": \"string\",\n \"description\": \"string\",\n \"amount\": \"string\"\n }\n ]\n }\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"422"} value={"422"}><div>

Unprocessable Entity. This status should be returned when the anchor understood the request but cannot
return a success response.
Expand Down
2 changes: 1 addition & 1 deletion api/anchor-platform/callbacks/post-event.api.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/anchor-platform/callbacks/put-customer.api.mdx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion api/anchor-platform/resources/get-transaction.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ For a SEP-31 Sending Anchor, the `account` and `memo` fields should be used.
For a SEP-6 Anchor, the `account` and `memo` fields should be used.


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The `id` of the customer registered through SEP-12."}}></SchemaItem><SchemaItem collapsible={false} name={"account"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}}></SchemaItem><SchemaItem collapsible={false} name={"memo"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The memo value identifying a customer with a shared account, where the shared account is `account`."}}></SchemaItem></div></details></SchemaItem></TabItem></SchemaTabs></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"sep\": \"6\",\n \"kind\": \"deposit\",\n \"status\": \"incomplete\",\n \"type\": \"string\",\n \"amount_expected\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_in\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_out\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"quote_id\": \"string\",\n \"started_at\": \"2024-01-29T19:37:08.948Z\",\n \"updated_at\": \"2024-01-29T19:37:08.948Z\",\n \"completed_at\": \"2024-01-29T19:37:08.948Z\",\n \"transfer_received_at\": \"2024-01-29T19:37:08.948Z\",\n \"message\": \"string\",\n \"refunds\": {\n \"amount_refunded\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"payments\": [\n {\n \"id\": \"string\",\n \"id_type\": \"stellar\",\n \"amount\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"requested_at\": \"2024-01-29T19:37:08.948Z\",\n \"refunded_at\": \"2024-01-29T19:37:08.948Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"string\",\n \"memo\": \"string\",\n \"memo_type\": \"text\",\n \"created_at\": \"2024-01-29T19:37:08.948Z\",\n \"envelope\": \"string\",\n \"payments\": [\n {\n \"id\": \"string\",\n \"payment_type\": \"payment\",\n \"source_account\": \"string\",\n \"destination_account\": \"string\",\n \"amount\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n }\n }\n ]\n }\n ],\n \"source_account\": \"string\",\n \"destination_account\": \"string\",\n \"external_transaction_id\": \"string\",\n \"memo\": \"string\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"string\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"string\",\n \"client_name\": \"string\",\n \"customers\": {\n \"sender\": {\n \"id\": \"string\",\n \"account\": \"string\",\n \"memo\": \"string\"\n },\n \"receiver\": {\n \"id\": \"string\",\n \"account\": \"string\",\n \"memo\": \"string\"\n }\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The `id` of the customer registered through SEP-12."}}></SchemaItem><SchemaItem collapsible={false} name={"account"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}}></SchemaItem><SchemaItem collapsible={false} name={"memo"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The memo value identifying a customer with a shared account, where the shared account is `account`."}}></SchemaItem></div></details></SchemaItem></TabItem></SchemaTabs></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": \"string\",\n \"sep\": \"6\",\n \"kind\": \"deposit\",\n \"status\": \"incomplete\",\n \"type\": \"string\",\n \"amount_expected\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_in\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_out\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"quote_id\": \"string\",\n \"started_at\": \"2024-02-27T17:52:45.744Z\",\n \"updated_at\": \"2024-02-27T17:52:45.744Z\",\n \"completed_at\": \"2024-02-27T17:52:45.744Z\",\n \"transfer_received_at\": \"2024-02-27T17:52:45.744Z\",\n \"message\": \"string\",\n \"refunds\": {\n \"amount_refunded\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"payments\": [\n {\n \"id\": \"string\",\n \"id_type\": \"stellar\",\n \"amount\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"requested_at\": \"2024-02-27T17:52:45.744Z\",\n \"refunded_at\": \"2024-02-27T17:52:45.744Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"string\",\n \"memo\": \"string\",\n \"memo_type\": \"text\",\n \"created_at\": \"2024-02-27T17:52:45.744Z\",\n \"envelope\": \"string\",\n \"payments\": [\n {\n \"id\": \"string\",\n \"payment_type\": \"payment\",\n \"source_account\": \"string\",\n \"destination_account\": \"string\",\n \"amount\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n }\n }\n ]\n }\n ],\n \"source_account\": \"string\",\n \"destination_account\": \"string\",\n \"external_transaction_id\": \"string\",\n \"memo\": \"string\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"string\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"string\",\n \"client_name\": \"string\",\n \"customers\": {\n \"sender\": {\n \"id\": \"string\",\n \"account\": \"string\",\n \"memo\": \"string\"\n },\n \"receiver\": {\n \"id\": \"string\",\n \"account\": \"string\",\n \"memo\": \"string\"\n }\n }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

Bad Request

Expand Down
Loading

0 comments on commit e42439d

Please sign in to comment.