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

Update openapi schema to include missing fields in asset schema #94

Merged
merged 17 commits into from
Jul 31, 2023
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
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\": \"2023-06-30T17:21:24.088Z\",\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\": \"2023-07-31T22:10:29.936Z\",\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/put-customer.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "**The Anchor Platform does not persist any customer KYC data.**"
sidebar_label: "Create or Update Customer Info"
hide_title: true
hide_table_of_contents: true
api: {"tags":["Customers","SEP-12","SEP-24","SEP-31"],"description":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","operationId":"putCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"type":{"description":"The type of action the customer is being KYCd for. \nSee the [Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification) documented in SEP-12 for more info.\nFor SEP-31 you can define your own types in the assets configuration.\nFor SEP-24 pre-defined value `sep24-customer` is used.\n","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"additional_name":{"type":"string"},"address_country_code":{"type":"string"},"state_or_province":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"address":{"type":"string"},"mobile_number":{"type":"string"},"email_address":{"type":"string"},"birth_date":{"type":"string","format":"date"},"birth_place":{"type":"string"},"birth_country_code":{"type":"string"},"bank_account_number":{"type":"string"},"bank_account_type":{"type":"string"},"bank_number":{"type":"string"},"bank_phone_number":{"type":"string"},"bank_branch_number":{"type":"string"},"tax_id":{"type":"string"},"tax_id_name":{"type":"string"},"occupation":{"type":"string"},"employer_name":{"type":"string"},"employer_address":{"type":"string"},"language_code":{"type":"string"},"id_type":{"type":"string"},"id_country_code":{"type":"string"},"id_issue_date":{"type":"string","format":"date"},"id_expiration_date":{"type":"string","format":"date"},"id_number":{"type":"string"},"ip_address":{"type":"string"},"sex":{"type":"string"}},"title":"PutCustomerRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"title":"PutCustomerResponse"}}}},"400":{"description":"Invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","type":"string","first_name":"string","last_name":"string","additional_name":"string","address_country_code":"string","state_or_province":"string","city":"string","postal_code":"string","address":"string","mobile_number":"string","email_address":"string","birth_date":"2023-06-30","birth_place":"string","birth_country_code":"string","bank_account_number":"string","bank_account_type":"string","bank_number":"string","bank_phone_number":"string","bank_branch_number":"string","tax_id":"string","tax_id_name":"string","occupation":"string","employer_name":"string","employer_address":"string","language_code":"string","id_type":"string","id_country_code":"string","id_issue_date":"2023-06-30","id_expiration_date":"2023-06-30","id_number":"string","ip_address":"string","sex":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The\nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Customer Info","description":{"content":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
api: {"tags":["Customers","SEP-12","SEP-24","SEP-31"],"description":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","operationId":"putCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"type":{"description":"The type of action the customer is being KYCd for. \nSee the [Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification) documented in SEP-12 for more info.\nFor SEP-31 you can define your own types in the assets configuration.\nFor SEP-24 pre-defined value `sep24-customer` is used.\n","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"additional_name":{"type":"string"},"address_country_code":{"type":"string"},"state_or_province":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"address":{"type":"string"},"mobile_number":{"type":"string"},"email_address":{"type":"string"},"birth_date":{"type":"string","format":"date"},"birth_place":{"type":"string"},"birth_country_code":{"type":"string"},"bank_account_number":{"type":"string"},"bank_account_type":{"type":"string"},"bank_number":{"type":"string"},"bank_phone_number":{"type":"string"},"bank_branch_number":{"type":"string"},"tax_id":{"type":"string"},"tax_id_name":{"type":"string"},"occupation":{"type":"string"},"employer_name":{"type":"string"},"employer_address":{"type":"string"},"language_code":{"type":"string"},"id_type":{"type":"string"},"id_country_code":{"type":"string"},"id_issue_date":{"type":"string","format":"date"},"id_expiration_date":{"type":"string","format":"date"},"id_number":{"type":"string"},"ip_address":{"type":"string"},"sex":{"type":"string"}},"title":"PutCustomerRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"title":"PutCustomerResponse"}}}},"400":{"description":"Invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","type":"string","first_name":"string","last_name":"string","additional_name":"string","address_country_code":"string","state_or_province":"string","city":"string","postal_code":"string","address":"string","mobile_number":"string","email_address":"string","birth_date":"2023-07-31","birth_place":"string","birth_country_code":"string","bank_account_number":"string","bank_account_type":"string","bank_number":"string","bank_phone_number":"string","bank_branch_number":"string","tax_id":"string","tax_id_name":"string","occupation":"string","employer_name":"string","employer_address":"string","language_code":"string","id_type":"string","id_country_code":"string","id_issue_date":"2023-07-31","id_expiration_date":"2023-07-31","id_number":"string","ip_address":"string","sex":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The\nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Customer Info","description":{"content":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}}
sidebar_class_name: "put api-method"
info_path: api/anchor-platform/callbacks/synchronous-callbacks-api
custom_edit_url: null
Expand Down
Loading