Skip to content

Latest commit

 

History

History
244 lines (165 loc) · 24.1 KB

README.md

File metadata and controls

244 lines (165 loc) · 24.1 KB

Wallets

Overview

Available Operations

  • create - Create a new wallet for an account. You can specify optional attributes such as a display name and description to specify the intended use of the wallet. This will generate a new moov-wallet payment method.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

  • list - List the wallets associated with a Moov account.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • get - Get information on a specific wallet (e.g., the available balance).

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

  • update - Update properties of an existing wallet such as name, description, status, or metadata.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

create

Create a new wallet for an account. You can specify optional attributes such as a display name and description to specify the intended use of the wallet. This will generate a new moov-wallet payment method.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.wallets.create(account_id="b4b3f37c-b73e-4271-b8ec-108a8593c9b9", name="My wallet", description="A general wallet used for my payments", metadata={
        "optional": "metadata",
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
account_id str ✔️ The Moov account ID the wallet belongs to.
name str ✔️ Name of the wallet.
description Optional[str] ➖ Description of the wallet.
metadata Dict[str, str] ➖ Free-form key-value pair list. Useful for storing information that is not captured elsewhere. {
"optional": "metadata"
}
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

operations.CreateWalletResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.CreateWalletValidationError 422 application/json
errors.APIError 4XX, 5XX */*

list

List the wallets associated with a Moov account.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.wallets.list(account_id="25221c3c-8e3f-40db-8570-66d17b51014d", skip=60, count=20)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
account_id str ✔️ N/A
status Optional[components.WalletStatus] ➖ Optional parameter for filtering wallets by status.
wallet_type Optional[components.WalletType] ➖ Optional parameter for filtering wallets by type.
skip Optional[int] ➖ N/A 60
count Optional[int] ➖ Page size. When omitted, the server defaults to 200. 20
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

operations.ListWalletsResponse

Errors

Error Type Status Code Content Type
errors.ListWalletsValidationError 422 application/json
errors.APIError 4XX, 5XX */*

get

Get information on a specific wallet (e.g., the available balance).

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.read scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.wallets.get(account_id="d04dfd44-8194-422f-a666-08d30c183f9a", wallet_id="10a6bc37-8eeb-41c8-bf5f-77b40955542a")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
account_id str ✔️ N/A
wallet_id str ✔️ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

operations.GetWalletResponse

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

update

Update properties of an existing wallet such as name, description, status, or metadata.

Read our Moov wallets guide to learn more.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

Example Usage

from moovio_sdk import Moov
from moovio_sdk.models import components


with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

    res = moov.wallets.update(wallet_id="9f1c6e07-aae8-40e6-b290-502bb1bc486e", account_id="e4aad2fb-201d-4390-b4d3-6de7716152e1", name="My second wallet", description="My new description", metadata={
        "optional": "metadata",
    })

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
wallet_id str ✔️ Identifier for the wallet.
account_id str ✔️ The Moov account ID the wallet belongs to.
name Optional[str] ➖ N/A
status Optional[components.WalletStatus] ➖ Status of a wallet.
- active: The wallet is available for use and has an enabled payment method.
- closed: The wallet is no longer active and the corresponding payment method has been disabled.
description OptionalNullable[str] ➖ N/A
metadata Dict[str, str] ➖ N/A {
"optional": "metadata"
}
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

operations.UpdateWalletResponse

Errors

Error Type Status Code Content Type
errors.GenericError 400, 409 application/json
errors.PatchWalletValidationError 422 application/json
errors.APIError 4XX, 5XX */*