-
Notifications
You must be signed in to change notification settings - 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
Open
max-koro
wants to merge
6
commits into
main
Choose a base branch
from
DOC-1383/add-documentation-and-a-guide-about-updating-a-capital-deposit
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+87
−1
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
02e1de2
Update guide-generate-statement.mdx
max-koro 92c0f5c
Update guide-generate-statement.mdx
max-koro b9ce134
DOC-1383/add-documentation-and-a-guide-about-updating-a-capital-deposit
max-koro adf8ca1
Revert "Update guide-generate-statement.mdx"
max-koro 75b6c13
Revert "Update guide-generate-statement.mdx"
max-koro 59c566c
Apply suggestions from code review
max-koro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
docs/topics/capital-deposits/guide-update-shareholder-amount.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 (line 2). | ||
1. Add the shareholder ID (line 3). | ||
1. Add the updated amount in the `amount` field (line 3). | ||
1. Add the `UpdateCapitalDepositShareholderAmountSuccessPayload` and any information you'd like to receive. | ||
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( | ||
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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
docs/topics/capital-deposits/partials/_update-shareholder-prereqs.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See everything in red. Maybe something has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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!