-
Couldn't load subscription status.
- Fork 10
Doc 1383/add documentation and a guide about updating a capital deposit #458
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
Changes from 5 commits
02e1de2
92c0f5c
b9ce134
adf8ca1
75b6c13
59c566c
5ea4711
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| title: Update a deposit amount | ||
| --- | ||
|
|
||
| # Update a shareholder's capital deposit amount | ||
|
|
||
| Use the API to update the deposit amount associated with a shareholder in a capital deposit case. | ||
|
|
||
| import UpdateShareholderPrereqs from './partials/_update-shareholder-prereqs.mdx'; | ||
|
|
||
| :::tip Prerequisites | ||
| <UpdateShareholderPrereqs /> | ||
| ::: | ||
|
|
||
| ## Guide {#steps} | ||
|
|
||
| 1. Call the `updateCapitalDepositShareholderAmount` mutation. | ||
| 1. Add the shareholder ID. | ||
max-koro marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 1. Add the updated amount in the `amount` field. | ||
max-koro marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 1. Add the success payload and any information you'd like to receive. | ||
max-koro marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 1. Add rejections (not shown). | ||
|
|
||
| :::info Automatic recalculation | ||
| Updating a shareholder's deposit amount automatically triggers a recalculation of the total capital deposit amount for the case. | ||
| ::: | ||
|
|
||
| ## Mutation {#mutation} | ||
|
|
||
| <a href="https://explorer.swan.io?query=bXV0YXRpb24gVXBkYXRlU2hhcmVob2xkZXJBbW91bnQgewogIHVwZGF0ZUNhcGl0YWxEZXBvc2l0U2hhcmVob2xkZXJBbW91bnQoCiAgICBpbnB1dDogeyBpZDogIiRTSEFSRUhPTERFUl9JRCIsIGFtb3VudDogeyBjdXJyZW5jeTogIkVVUiIsIHZhbHVlOiAiMTAwMCIgfSB9CiAgKSB7CiAgICAuLi4gb24gVXBkYXRlQ2FwaXRhbERlcG9zaXRTaGFyZWhvbGRlckFtb3VudFN1Y2Nlc3NQYXlsb2FkIHsKICAgICAgX190eXBlbmFtZQogICAgICBzaGFyZWhvbGRlciB7CiAgICAgICAgaWQKICAgICAgICBjYXBpdGFsRGVwb3NpdEFtb3VudCB7CiAgICAgICAgICBjdXJyZW5jeQogICAgICAgICAgdmFsdWUKICAgICAgICB9CiAgICAgIH0KICAgIH0KICAgIC4uLiBvbiBGb3JiaWRkZW5SZWplY3Rpb24gewogICAgICBfX3R5cGVuYW1lCiAgICAgIG1lc3NhZ2UKICAgIH0KICAgIC4uLiBvbiBJbnRlcm5hbEVycm9yUmVqZWN0aW9uIHsKICAgICAgX190eXBlbmFtZQogICAgICBtZXNzYWdlCiAgICB9CiAgICAuLi4gb24gQ2FwaXRhbERlcG9zaXRTaGFyZWhvbGRlck5vdEZvdW5kUmVqZWN0aW9uIHsKICAgICAgaWQKICAgICAgbWVzc2FnZQogICAgfQogICAgLi4uIG9uIENhcGl0YWxEZXBvc2l0U2hhcmVob2xkZXJDYW5Ob3RCZVVwZGF0ZWRSZWplY3Rpb24gewogICAgICBpZAogICAgICBtZXNzYWdlCiAgICB9CiAgfQp9Cg%3D%3D&tab=api" className="explorer-badge">Open in API Explorer</a> | ||
|
|
||
| ```graphql {2-3} showLineNumbers | ||
| mutation UpdateShareholderAmount { | ||
| updateCapitalDepositShareholderAmount( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field can't be queried, so I guess it's not live yet? Maybe wait before publishing or double-check the name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll check that it is on the live date of Oct 23 :) Thanks! |
||
| input: { id: "$SHAREHOLDER_ID", amount: { currency: "EUR", value: "1000" } } | ||
| ) { | ||
| ... on UpdateCapitalDepositShareholderAmountSuccessPayload { | ||
| __typename | ||
| shareholder { | ||
| id | ||
| capitalDepositAmount { | ||
| currency | ||
| value | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Payload {#payload} | ||
|
|
||
| ```graphql {6,8-10} showLineNumbers | ||
| { | ||
| "data": { | ||
| "updateCapitalDepositShareholderAmount": { | ||
| "__typename": "UpdateCapitalDepositShareholderAmountSuccessPayload", | ||
| "shareholder": { | ||
| "id": "$SHAREHOLDER_ID", | ||
| "capitalDepositAmount": { | ||
| "currency": "EUR", | ||
| "value": "1000" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <p>All of the following conditions must be met:</p> | ||
|
|
||
| <ol> | ||
| <li>The capital deposit [case status](../index.mdx#case-statuses) is `WaitingForInitialRequirements`, `PendingInternalReview`, or `WaitingForAdditionalInformation`.</li> | ||
| <li>The [shareholder status](../index.mdx#shareholders-statuses) is `PendingOnboarding`, `WaitingForVerification`, or `WaitingForTransfer`.</li> | ||
| </ol> |

Uh oh!
There was an error while loading. Please reload this page.