Polarex.Wallets (Polarex v0.2.8)

View Source

Provides API endpoints related to wallets

Summary

Functions

customer_portal_wallets_get(id, opts \\ [])

@spec customer_portal_wallets_get(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.CustomerWallet.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get Wallet

Get a wallet by ID for the authenticated customer.

Scopes: customer_portal:read customer_portal:write

customer_portal_wallets_list(opts \\ [])

@spec customer_portal_wallets_list(keyword()) ::
  {:ok, Polarex.ListResourceCustomerWallet.t()}
  | {:error, Polarex.HTTPValidationError.t()}

List Wallets

List wallets of the authenticated customer.

Scopes: customer_portal:read customer_portal:write

Options

  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.
  • sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.

wallets_get(id, opts \\ [])

@spec wallets_get(
  String.t(),
  keyword()
) ::
  {:ok, Polarex.Wallet.t()}
  | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}

Get Wallet

Get a wallet by ID.

Scopes: wallets:read

wallets_list(opts \\ [])

@spec wallets_list(keyword()) ::
  {:ok, Polarex.ListResourceWallet.t()}
  | {:error, Polarex.HTTPValidationError.t()}

List Wallets

List wallets.

Scopes: wallets:read

Options

  • organization_id: Filter by organization ID.
  • customer_id: Filter by customer ID.
  • page: Page number, defaults to 1.
  • limit: Size of a page, defaults to 10. Maximum is 100.
  • sorting: Sorting criterion. Several criteria can be used simultaneously and will be applied in order. Add a minus sign - before the criteria name to sort by descending order.

wallets_top_up(id, body, opts \\ [])

Top-Up Wallet

Top-up a wallet by adding funds to its balance.

The customer should have a valid payment method on file.

Scopes: wallets:write