Skip to content

Latest commit

 

History

History
292 lines (216 loc) · 26.1 KB

File metadata and controls

292 lines (216 loc) · 26.1 KB

DigitalWallets

Overview

Available Operations

  • create - Register digital wallet
  • list - List digital wallets
  • get - Get digital wallet
  • delete - Delete digital wallet
  • update - Update digital wallet

create

Register a digital wallet like Apple Pay, Google Pay, or Click to Pay.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.digital_wallets.create(provider="click-to-pay", merchant_name="<value>", accept_terms_and_conditions=False)

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
provider models.DigitalWalletProvider ✔️ N/A
merchant_name str ✔️ N/A
accept_terms_and_conditions bool ✔️ N/A
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
merchant_display_name OptionalNullable[str] N/A
merchant_url OptionalNullable[str] N/A
merchant_country_code OptionalNullable[str] N/A Example 1: DE
Example 2: GB
Example 3: US
merchant_category_code OptionalNullable[str] N/A
address OptionalNullable[models.DigitalWalletAddress] N/A
extra_configuration Dict[str, Any] N/A
domain_names List[str] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DigitalWallet

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

list

List configured digital wallets.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.digital_wallets.list()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DigitalWallets

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

get

Fetch the details a digital wallet.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.digital_wallets.get(digital_wallet_id="1808f5e6-b49c-4db9-94fa-22371ea352f5")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
digital_wallet_id str ✔️ The ID of the digital wallet to read. 1808f5e6-b49c-4db9-94fa-22371ea352f5
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DigitalWallet

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

delete

Delete a configured digital wallet.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    g_client.digital_wallets.delete(digital_wallet_id="1808f5e6-b49c-4db9-94fa-22371ea352f5")

    # Use the SDK ...

Parameters

Parameter Type Required Description Example
digital_wallet_id str ✔️ The ID of the digital wallet to delete. 1808f5e6-b49c-4db9-94fa-22371ea352f5
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*

update

Update a digital wallet.

Example Usage

from gr4vy import Gr4vy
import os


with Gr4vy(
    merchant_account_id="default",
    bearer_auth=os.getenv("GR4VY_BEARER_AUTH", ""),
) as g_client:

    res = g_client.digital_wallets.update(digital_wallet_id="1808f5e6-b49c-4db9-94fa-22371ea352f5")

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
digital_wallet_id str ✔️ The ID of the digital wallet to edit. 1808f5e6-b49c-4db9-94fa-22371ea352f5
merchant_account_id Optional[str] The ID of the merchant account to use for this request. default
merchant_name OptionalNullable[str] N/A
domain_names List[str] N/A
merchant_display_name OptionalNullable[str] N/A
merchant_url OptionalNullable[str] N/A
merchant_country_code OptionalNullable[str] N/A Example 1: DE
Example 2: GB
Example 3: US
merchant_category_code OptionalNullable[str] N/A
address OptionalNullable[models.DigitalWalletAddress] N/A
extra_configuration Dict[str, Any] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DigitalWallet

Errors

Error Type Status Code Content Type
errors.Error400 400 application/json
errors.Error401 401 application/json
errors.Error403 403 application/json
errors.Error404 404 application/json
errors.Error405 405 application/json
errors.Error409 409 application/json
errors.HTTPValidationError 422 application/json
errors.Error425 425 application/json
errors.Error429 429 application/json
errors.Error500 500 application/json
errors.Error502 502 application/json
errors.Error504 504 application/json
errors.APIError 4XX, 5XX */*