Polar::Api::CustomerPortal::Customers
API client for customers operations in customer_portal context
Constants
Constructors
Creates a new Customers instance
@param client [Client] The Polar API client instance
Instance methods
Add Customer Payment Method
Add a payment method to the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: POST /v1/customer-portal/customers/me/payment-methods
Parameters:
body(required): Request body as Polar::Models::CustomerPaymentMethodCreate
Returns: Polar::Models::CustomerPaymentMethodCreateResponse
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Confirm Customer Payment Method
Confirm a payment method for the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: POST /v1/customer-portal/customers/me/payment-methods/confirm
Parameters:
body(required): Request body as Polar::Models::CustomerPaymentMethodConfirm
Returns: Polar::Models::CustomerPaymentMethodCreateResponse
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Delete Customer Payment Method
Delete a payment method from the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: DELETE /v1/customer-portal/customers/me/payment-methods/{id}
Parameters:
id(required): Path parameter
Returns: JSON response string
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Get Customer
Get authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/customers/me
Returns: Polar::Models::CustomerPortalCustomer
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
List Customer Payment Methods
Get saved payment methods of the authenticated customer.
Scopes: customer_portal:read customer_portal:write
Endpoint: GET /v1/customer-portal/customers/me/payment-methods
Parameters:
page(optional): Page number, defaults to 1.limit(optional): Size of a page, defaults to 10. Maximum is 100.
Returns: Polar::Models::ListResource(Polar::Models::CustomerPaymentMethod)
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors
Update Customer
Update authenticated customer.
Scopes: customer_portal:write
Endpoint: PATCH /v1/customer-portal/customers/me
Parameters:
body(required): Request body as Polar::Models::CustomerPortalCustomerUpdate
Returns: Polar::Models::CustomerPortalCustomer
Raises:
ResourceNotFoundErroron 404NotPermittedErroron 403HTTPValidationErroron 422PolarErroron other errors