Polarex.Wallets (Polarex v0.2.8)
View SourceProvides API endpoints related to wallets
Summary
Functions
@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
@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.
@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
@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.
@spec wallets_top_up(String.t(), Polarex.WalletTopUpCreate.t(), keyword()) :: {:ok, Polarex.Wallet.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.MissingPaymentMethodError.t() | Polarex.PaymentIntentFailedError.t() | Polarex.ResourceNotFound.t()}
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