Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 3.92 KB

File metadata and controls

72 lines (54 loc) · 3.92 KB

GiftCards.Balances

Overview

Available Operations

  • list - List gift card balances

list

Fetch the balances for one or more gift cards.

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.gift_cards.balances.list(items=[
        {
            "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
        },
        {
            "id": "356d56e5-fe16-42ae-97ee-8d55d846ae2e",
        },
        {
            "number": "4123455541234561234",
            "pin": "1234",
        },
    ])

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
items List[models.Item] ✔️ A list of gift cards to request a balance for.
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.GiftCardSummaries

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 */*