Polarex.Documented (Polarex v0.2.0)
View SourceProvides API endpoints related to documented
Summary
Functions
Create Benefit
Delete Benefit
Get Benefit
List Benefit Grants
List Benefits
Update Benefit
Create Checkout Link
Delete Checkout Link
Get Checkout Link
List Checkout Links
Update Checkout Link
Confirm Checkout Session from Client
Get Checkout Session from Client
Update Checkout Session from Client
Create Checkout Session
Get Checkout Session
List Checkout Sessions
Update Checkout Session
Create Custom Field
Delete Custom Field
Get Custom Field
List Custom Fields
Update Custom Field
Get Customer Meter
List Customer Meters
Get Benefit Grant
List Benefit Grants
Update Benefit Grant
Get Customer Meter
List Meters
Add Customer Payment Method
Delete Customer Payment Method
Get Customer
Get Customer Payment Methods
Update Customer
List Downloadables
Activate License Key
Deactivate License Key
Get License Key
List License Keys
Validate License Key
Get Order Invoice
List Orders
Get Organization
Cancel Subscription
Get Subscription
List Subscriptions
Update Subscription
Create Customer Session
Create Customer
Delete Customer
Delete Customer by External ID
Get Customer
Get Customer by External ID
Get Customer State
Get Customer State by External ID
List Customers
Update Customer
Update Customer by External ID
Create Discount
Delete Discount
Get Discount
List Discounts
Update Discount
Get Event
Ingest Events
List Events
List Event Names
Create File
Delete File
List Files
Update File
Complete File Upload
Get License Key
Get Activation
List License Keys
Update License Key
Create Meter
Get Meter
List Meters
Get Meter Quantities
Update Meter
Get Metrics
Get Metrics Limits
Authorize
List Clients
Create Client
Introspect Token
Request Token
Revoke Token
Get User Info
Get Order
Get Order Invoice
List Orders
Create Organization
Get Organization
List Organizations
Update Organization
Get Payment
List Payments
Create Product
Get Product
List Products
Update Product
Update Product Benefits
Create Refund
List Refunds
Export Subscriptions
Get Subscription
List Subscriptions
Revoke Subscription
Update Subscription
Functions
@spec benefits_create( Polarex.BenefitCustomCreate.t() | Polarex.BenefitDiscordCreate.t() | Polarex.BenefitDownloadablesCreate.t() | Polarex.BenefitGitHubRepositoryCreate.t() | Polarex.BenefitLicenseKeysCreate.t() | Polarex.BenefitMeterCreditCreate.t(), keyword() ) :: {:ok, Polarex.BenefitCustom.t() | Polarex.BenefitDiscord.t() | Polarex.BenefitDownloadables.t() | Polarex.BenefitGitHubRepository.t() | Polarex.BenefitLicenseKeys.t() | Polarex.BenefitMeterCredit.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Benefit
Create a benefit.
Scopes: benefits:write
@spec benefits_delete( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Delete Benefit
Delete a benefit.
[!WARNING] Every grants associated with the benefit will be revoked. Users will lose access to the benefit.
Scopes: benefits:write
@spec benefits_get( String.t(), keyword() ) :: {:ok, Polarex.BenefitCustom.t() | Polarex.BenefitDiscord.t() | Polarex.BenefitDownloadables.t() | Polarex.BenefitGitHubRepository.t() | Polarex.BenefitLicenseKeys.t() | Polarex.BenefitMeterCredit.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Benefit
Get a benefit by ID.
Scopes: benefits:read
benefits:write
@spec benefits_grants( String.t(), keyword() ) :: {:ok, Polarex.ListResourceBenefitGrant.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
List Benefit Grants
List the individual grants for a benefit.
It's especially useful to check if a user has been granted a benefit.
Scopes: benefits:read
benefits:write
Options
is_granted
: Filter by granted status. Iftrue
, only granted benefits will be returned. Iffalse
, only revoked benefits will be returned.customer_id
: Filter by customer.page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.
@spec benefits_list(keyword()) :: {:ok, Polarex.ListResourceBenefit.t()} | {:error, Polarex.HTTPValidationError.t()}
List Benefits
List benefits.
Scopes: benefits:read
benefits:write
Options
organization_id
: Filter by organization ID.type
: Filter by benefit type.query
: Filter by description.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 benefits_update( String.t(), Polarex.BenefitCustomUpdate.t() | Polarex.BenefitDiscordUpdate.t() | Polarex.BenefitDownloadablesUpdate.t() | Polarex.BenefitGitHubRepositoryUpdate.t() | Polarex.BenefitLicenseKeysUpdate.t() | Polarex.BenefitMeterCreditUpdate.t(), keyword() ) :: {:ok, Polarex.BenefitCustom.t() | Polarex.BenefitDiscord.t() | Polarex.BenefitDownloadables.t() | Polarex.BenefitGitHubRepository.t() | Polarex.BenefitLicenseKeys.t() | Polarex.BenefitMeterCredit.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Benefit
Update a benefit.
Scopes: benefits:write
@spec checkout_links_create( Polarex.CheckoutLinkCreateProduct.t() | Polarex.CheckoutLinkCreateProductPrice.t() | Polarex.CheckoutLinkCreateProducts.t(), keyword() ) :: {:ok, Polarex.CheckoutLink.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Checkout Link
Create a checkout link.
Scopes: checkout_links:write
@spec checkout_links_delete( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Delete Checkout Link
Delete a checkout link.
Scopes: checkout_links:write
@spec checkout_links_get( String.t(), keyword() ) :: {:ok, Polarex.CheckoutLink.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Checkout Link
Get a checkout link by ID.
Scopes: checkout_links:read
checkout_links:write
@spec checkout_links_list(keyword()) :: {:ok, Polarex.ListResourceCheckoutLink.t()} | {:error, Polarex.HTTPValidationError.t()}
List Checkout Links
List checkout links.
Scopes: checkout_links:read
checkout_links:write
Options
organization_id
: Filter by organization ID.product_id
: Filter by product 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 checkout_links_update(String.t(), Polarex.CheckoutLinkUpdate.t(), keyword()) :: {:ok, Polarex.CheckoutLink.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Checkout Link
Update a checkout link.
Scopes: checkout_links:write
@spec checkouts_client_confirm( String.t(), Polarex.CheckoutConfirmStripe.t(), keyword() ) :: {:ok, Polarex.CheckoutPublicConfirmed.t()} | {:error, Polarex.AlreadyActiveSubscriptionError.t() | Polarex.ExpiredCheckoutError.t() | Polarex.HTTPValidationError.t() | Polarex.NotOpenCheckout.t() | Polarex.PaymentError.t() | Polarex.ResourceNotFound.t()}
Confirm Checkout Session from Client
Confirm a checkout session by client secret.
Orders and subscriptions will be processed.
@spec checkouts_client_get( String.t(), keyword() ) :: {:ok, Polarex.CheckoutPublic.t()} | {:error, Polarex.ExpiredCheckoutError.t() | Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Checkout Session from Client
Get a checkout session by client secret.
@spec checkouts_client_update(String.t(), Polarex.CheckoutUpdatePublic.t(), keyword()) :: {:ok, Polarex.CheckoutPublic.t()} | {:error, Polarex.AlreadyActiveSubscriptionError.t() | Polarex.ExpiredCheckoutError.t() | Polarex.HTTPValidationError.t() | Polarex.NotOpenCheckout.t() | Polarex.ResourceNotFound.t()}
Update Checkout Session from Client
Update a checkout session by client secret.
@spec checkouts_create( Polarex.CheckoutProductsCreate.t(), keyword() ) :: {:ok, Polarex.Checkout.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Checkout Session
Create a checkout session.
Scopes: checkouts:write
@spec checkouts_get( String.t(), keyword() ) :: {:ok, Polarex.Checkout.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Checkout Session
Get a checkout session by ID.
Scopes: checkouts:read
checkouts:write
@spec checkouts_list(keyword()) :: {:ok, Polarex.ListResourceCheckout.t()} | {:error, Polarex.HTTPValidationError.t()}
List Checkout Sessions
List checkout sessions.
Scopes: checkouts:read
checkouts:write
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.customer_id
: Filter by customer ID.status
: Filter by checkout session status.query
: Filter by customer email.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 checkouts_update(String.t(), Polarex.CheckoutUpdate.t(), keyword()) :: {:ok, Polarex.Checkout.t()} | {:error, Polarex.AlreadyActiveSubscriptionError.t() | Polarex.HTTPValidationError.t() | Polarex.NotOpenCheckout.t() | Polarex.ResourceNotFound.t()}
Update Checkout Session
Update a checkout session.
Scopes: checkouts:write
@spec custom_fields_create( Polarex.CustomFieldCreateCheckbox.t() | Polarex.CustomFieldCreateDate.t() | Polarex.CustomFieldCreateNumber.t() | Polarex.CustomFieldCreateSelect.t() | Polarex.CustomFieldCreateText.t(), keyword() ) :: {:ok, Polarex.CustomFieldCheckbox.t() | Polarex.CustomFieldDate.t() | Polarex.CustomFieldNumber.t() | Polarex.CustomFieldSelect.t() | Polarex.CustomFieldText.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Custom Field
Create a custom field.
Scopes: custom_fields:write
@spec custom_fields_delete( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Delete Custom Field
Delete a custom field.
Scopes: custom_fields:write
@spec custom_fields_get( String.t(), keyword() ) :: {:ok, Polarex.CustomFieldCheckbox.t() | Polarex.CustomFieldDate.t() | Polarex.CustomFieldNumber.t() | Polarex.CustomFieldSelect.t() | Polarex.CustomFieldText.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Custom Field
Get a custom field by ID.
Scopes: custom_fields:read
custom_fields:write
@spec custom_fields_list(keyword()) :: {:ok, Polarex.ListResourceCustomField.t()} | {:error, Polarex.HTTPValidationError.t()}
List Custom Fields
List custom fields.
Scopes: custom_fields:read
custom_fields:write
Options
organization_id
: Filter by organization ID.query
: Filter by custom field name or slug.type
: Filter by custom field type.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 custom_fields_update( String.t(), Polarex.CustomFieldUpdateCheckbox.t() | Polarex.CustomFieldUpdateDate.t() | Polarex.CustomFieldUpdateNumber.t() | Polarex.CustomFieldUpdateSelect.t() | Polarex.CustomFieldUpdateText.t(), keyword() ) :: {:ok, Polarex.CustomFieldCheckbox.t() | Polarex.CustomFieldDate.t() | Polarex.CustomFieldNumber.t() | Polarex.CustomFieldSelect.t() | Polarex.CustomFieldText.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Custom Field
Update a custom field.
Scopes: custom_fields:write
@spec customer_meters_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerMeter.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Customer Meter
Get a customer meter by ID.
Scopes: customer_meters:read
@spec customer_meters_list(keyword()) :: {:ok, Polarex.ListResourceCustomerMeter.t()} | {:error, Polarex.HTTPValidationError.t()}
List Customer Meters
List customer meters.
Scopes: customer_meters:read
Options
organization_id
: Filter by organization ID.customer_id
: Filter by customer ID.external_customer_id
: Filter by external customer ID.meter_id
: Filter by meter 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 customer_portal_benefit_grants_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerBenefitGrantCustom.t() | Polarex.CustomerBenefitGrantDiscord.t() | Polarex.CustomerBenefitGrantDownloadables.t() | Polarex.CustomerBenefitGrantGitHubRepository.t() | Polarex.CustomerBenefitGrantLicenseKeys.t() | Polarex.CustomerBenefitGrantMeterCredit.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Benefit Grant
Get a benefit grant by ID for the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_benefit_grants_list(keyword()) :: {:ok, Polarex.ListResourceCustomerBenefitGrant.t()} | {:error, Polarex.HTTPValidationError.t()}
List Benefit Grants
List benefits grants of the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
Options
type
: Filter by benefit type.benefit_id
: Filter by benefit ID.organization_id
: Filter by organization ID.checkout_id
: Filter by checkout ID.order_id
: Filter by order ID.subscription_id
: Filter by subscription 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 customer_portal_benefit_grants_update( String.t(), Polarex.CustomerBenefitGrantCustomUpdate.t() | Polarex.CustomerBenefitGrantDiscordUpdate.t() | Polarex.CustomerBenefitGrantDownloadablesUpdate.t() | Polarex.CustomerBenefitGrantGitHubRepositoryUpdate.t() | Polarex.CustomerBenefitGrantLicenseKeysUpdate.t() | Polarex.CustomerBenefitGrantMeterCreditUpdate.t(), keyword() ) :: {:ok, Polarex.CustomerBenefitGrantCustom.t() | Polarex.CustomerBenefitGrantDiscord.t() | Polarex.CustomerBenefitGrantDownloadables.t() | Polarex.CustomerBenefitGrantGitHubRepository.t() | Polarex.CustomerBenefitGrantLicenseKeys.t() | Polarex.CustomerBenefitGrantMeterCredit.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Update Benefit Grant
Update a benefit grant for the authenticated customer.
Scopes: customer_portal:write
@spec customer_portal_customer_meters_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerCustomerMeter.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Customer Meter
Get a meter by ID for the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_customer_meters_list(keyword()) :: {:ok, Polarex.ListResourceCustomerCustomerMeter.t()} | {:error, Polarex.HTTPValidationError.t()}
List Meters
List meters of the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
Options
meter_id
: Filter by meter ID.query
: Filter by meter name.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 customer_portal_customers_add_payment_method( Polarex.CustomerPaymentMethodCreate.t(), keyword() ) :: {:ok, Polarex.PaymentMethodCard.t() | Polarex.PaymentMethodGeneric.t()} | {:error, Polarex.HTTPValidationError.t()}
Add Customer Payment Method
Add a payment method to the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_customers_delete_payment_method( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Delete Customer Payment Method
Delete a payment method from the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_customers_get(keyword()) :: {:ok, Polarex.CustomerPortalCustomer.t()} | :error
Get Customer
Get authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_customers_get_payment_methods(keyword()) :: {:ok, Polarex.ListResourceUnionPaymentMethodCardPaymentMethodGeneric.t()} | {:error, Polarex.HTTPValidationError.t()}
Get Customer Payment Methods
Get saved payment methods 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.
@spec customer_portal_customers_update( Polarex.CustomerPortalCustomerUpdate.t(), keyword() ) :: {:ok, Polarex.CustomerPortalCustomer.t()} | {:error, Polarex.HTTPValidationError.t()}
Update Customer
Update authenticated customer.
Scopes: customer_portal:write
@spec customer_portal_downloadables_customer_portal_downloadables_get( String.t(), keyword() ) :: {:ok, map()} | {:error, Polarex.HTTPValidationError.t()}
Get Downloadable
@spec customer_portal_downloadables_list(keyword()) :: {:ok, Polarex.ListResourceDownloadableRead.t()} | {:error, Polarex.HTTPValidationError.t()}
List Downloadables
Scopes: customer_portal:read
customer_portal:write
Options
organization_id
: Filter by organization ID.benefit_id
: Filter by benefit ID.page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.
@spec customer_portal_license_keys_activate( Polarex.LicenseKeyActivate.t(), keyword() ) :: {:ok, Polarex.LicenseKeyActivationRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Activate License Key
Activate a license key instance.
@spec customer_portal_license_keys_deactivate( Polarex.LicenseKeyDeactivate.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Deactivate License Key
Deactivate a license key instance.
@spec customer_portal_license_keys_get( String.t(), keyword() ) :: {:ok, Polarex.LicenseKeyWithActivations.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get License Key
Get a license key.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_license_keys_list(keyword()) :: {:ok, Polarex.ListResourceLicenseKeyRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t() | Polarex.Unauthorized.t()}
List License Keys
Scopes: customer_portal:read
customer_portal:write
Options
organization_id
: Filter by organization ID.benefit_id
: Filter by a specific benefitpage
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.
@spec customer_portal_license_keys_validate( Polarex.LicenseKeyValidate.t(), keyword() ) :: {:ok, Polarex.ValidatedLicenseKey.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Validate License Key
Validate a license key.
@spec customer_portal_orders_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerOrder.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order
Get an order by ID for the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_orders_invoice( String.t(), keyword() ) :: {:ok, Polarex.CustomerOrderInvoice.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order Invoice
Get an order's invoice data.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_orders_list(keyword()) :: {:ok, Polarex.ListResourceCustomerOrder.t()} | {:error, Polarex.HTTPValidationError.t()}
List Orders
List orders of the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.product_billing_type
: Filter by product billing type.recurring
will filter data corresponding to subscriptions creations or renewals.one_time
will filter data corresponding to one-time purchases.subscription_id
: Filter by subscription ID.query
: Search by product or organization name.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 customer_portal_organizations_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerOrganization.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Organization
Get a customer portal's organization by slug.
@spec customer_portal_subscriptions_cancel( String.t(), keyword() ) :: {:ok, Polarex.CustomerSubscription.t()} | {:error, Polarex.AlreadyCanceledSubscription.t() | Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Cancel Subscription
Cancel a subscription of the authenticated customer.
Scopes: customer_portal:write
@spec customer_portal_subscriptions_get( String.t(), keyword() ) :: {:ok, Polarex.CustomerSubscription.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Subscription
Get a subscription for the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
@spec customer_portal_subscriptions_list(keyword()) :: {:ok, Polarex.ListResourceCustomerSubscription.t()} | {:error, Polarex.HTTPValidationError.t()}
List Subscriptions
List subscriptions of the authenticated customer.
Scopes: customer_portal:read
customer_portal:write
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.active
: Filter by active or cancelled subscription.query
: Search by product or organization name.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 customer_portal_subscriptions_update( String.t(), Polarex.CustomerSubscriptionCancel.t() | Polarex.CustomerSubscriptionUpdateProduct.t(), keyword() ) :: {:ok, Polarex.CustomerSubscription.t()} | {:error, Polarex.AlreadyCanceledSubscription.t() | Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Subscription
Update a subscription of the authenticated customer.
Scopes: customer_portal:write
@spec customer_sessions_create( Polarex.CustomerSessionCustomerExternalIDCreate.t() | Polarex.CustomerSessionCustomerIDCreate.t(), keyword() ) :: {:ok, Polarex.CustomerSession.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Customer Session
Create a customer session.
Scopes: customer_sessions:write
@spec customers_create( Polarex.CustomerCreate.t(), keyword() ) :: {:ok, Polarex.Customer.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Customer
Create a customer.
Scopes: customers:write
@spec customers_delete( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Delete Customer
Delete a customer.
This action cannot be undone and will immediately:
- Cancel any active subscriptions for the customer
- Revoke all their benefits
- Clear any
external_id
Use it only in the context of deleting a user within your own service. Otherwise, use more granular API endpoints to cancel a specific subscription or revoke certain benefits.
Note: The customers information will nonetheless be retained for historic orders and subscriptions.
Scopes: customers:write
@spec customers_delete_external( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Delete Customer by External ID
Delete a customer by external ID.
Immediately cancels any active subscriptions and revokes any active benefits.
Scopes: customers:write
@spec customers_get( String.t(), keyword() ) :: {:ok, Polarex.Customer.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Customer
Get a customer by ID.
Scopes: customers:read
customers:write
@spec customers_get_external( String.t(), keyword() ) :: {:ok, Polarex.Customer.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Customer by External ID
Get a customer by external ID.
Scopes: customers:read
customers:write
@spec customers_get_state( String.t(), keyword() ) :: {:ok, Polarex.CustomerState.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Customer State
Get a customer state by ID.
The customer state includes information about the customer's active subscriptions and benefits.
It's the ideal endpoint to use when you need to get a full overview of a customer's status.
Scopes: customers:read
customers:write
@spec customers_get_state_external( String.t(), keyword() ) :: {:ok, Polarex.CustomerState.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Customer State by External ID
Get a customer state by external ID.
The customer state includes information about the customer's active subscriptions and benefits.
It's the ideal endpoint to use when you need to get a full overview of a customer's status.
Scopes: customers:read
customers:write
@spec customers_list(keyword()) :: {:ok, Polarex.ListResourceCustomer.t()} | {:error, Polarex.HTTPValidationError.t()}
List Customers
List customers.
Scopes: customers:read
customers:write
Options
organization_id
: Filter by organization ID.email
: Filter by exact email.query
: Filter by name or email.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.metadata
: Filter by metadata key-value pairs. It uses thedeepObject
style, e.g.?metadata[key]=value
.
@spec customers_update(String.t(), Polarex.CustomerUpdate.t(), keyword()) :: {:ok, Polarex.Customer.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Customer
Update a customer.
Scopes: customers:write
@spec customers_update_external( String.t(), Polarex.CustomerUpdateExternalID.t(), keyword() ) :: {:ok, Polarex.Customer.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Customer by External ID
Update a customer by external ID.
Scopes: customers:write
@spec discounts_create( Polarex.DiscountFixedOnceForeverDurationCreate.t() | Polarex.DiscountFixedRepeatDurationCreate.t() | Polarex.DiscountPercentageOnceForeverDurationCreate.t() | Polarex.DiscountPercentageRepeatDurationCreate.t(), keyword() ) :: {:ok, Polarex.DiscountFixedOnceForeverDuration.t() | Polarex.DiscountFixedRepeatDuration.t() | Polarex.DiscountPercentageOnceForeverDuration.t() | Polarex.DiscountPercentageRepeatDuration.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Discount
Create a discount.
Scopes: discounts:write
@spec discounts_delete( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Delete Discount
Delete a discount.
Scopes: discounts:write
@spec discounts_get( String.t(), keyword() ) :: {:ok, Polarex.DiscountFixedOnceForeverDuration.t() | Polarex.DiscountFixedRepeatDuration.t() | Polarex.DiscountPercentageOnceForeverDuration.t() | Polarex.DiscountPercentageRepeatDuration.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Discount
Get a discount by ID.
Scopes: discounts:read
discounts:write
@spec discounts_list(keyword()) :: {:ok, Polarex.ListResourceDiscount.t()} | {:error, Polarex.HTTPValidationError.t()}
List Discounts
List discounts.
Scopes: discounts:read
discounts:write
Options
organization_id
: Filter by organization ID.query
: Filter by name.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 discounts_update(String.t(), Polarex.DiscountUpdate.t(), keyword()) :: {:ok, Polarex.DiscountFixedOnceForeverDuration.t() | Polarex.DiscountFixedRepeatDuration.t() | Polarex.DiscountPercentageOnceForeverDuration.t() | Polarex.DiscountPercentageRepeatDuration.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Discount
Update a discount.
Scopes: discounts:write
@spec events_get( String.t(), keyword() ) :: {:ok, map() | Polarex.UserEvent.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Event
Get an event by ID.
Scopes: events:read
events:write
@spec events_ingest( Polarex.EventsIngest.t(), keyword() ) :: {:ok, Polarex.EventsIngestResponse.t()} | {:error, Polarex.HTTPValidationError.t()}
Ingest Events
Ingest batch of events.
Scopes: events:write
@spec events_list(keyword()) :: {:ok, Polarex.ListResourceEvent.t()} | {:error, Polarex.HTTPValidationError.t()}
List Events
List events.
Scopes: events:read
events:write
Options
filter
: Filter events following filter clauses. JSON string following the same schema a meter filter clause.start_timestamp
: Filter events after this timestamp.end_timestamp
: Filter events before this timestamp.organization_id
: Filter by organization ID.customer_id
: Filter by customer ID.external_customer_id
: Filter by external customer ID.meter_id
: Filter by a meter filter clause.name
: Filter by event name.source
: Filter by event source.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.metadata
: Filter by metadata key-value pairs. It uses thedeepObject
style, e.g.?metadata[key]=value
.
@spec events_list_names(keyword()) :: {:ok, Polarex.ListResourceEventName.t()} | {:error, Polarex.HTTPValidationError.t()}
List Event Names
List event names.
Scopes: events:read
events:write
Options
organization_id
: Filter by organization ID.customer_id
: Filter by customer ID.external_customer_id
: Filter by external customer ID.source
: Filter by event source.query
: Query to filter event names.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 files_create( Polarex.DownloadableFileCreate.t() | Polarex.OrganizationAvatarFileCreate.t() | Polarex.ProductMediaFileCreate.t(), keyword() ) :: {:ok, Polarex.FileUpload.t()} | {:error, Polarex.HTTPValidationError.t()}
Create File
Create a file.
Scopes: files:write
@spec files_delete( String.t(), keyword() ) :: :ok | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Delete File
Delete a file.
Scopes: files:write
@spec files_list(keyword()) :: {:ok, Polarex.ListResourceFileRead.t()} | {:error, Polarex.HTTPValidationError.t()}
List Files
List files.
Scopes: files:read
files:write
Options
organization_id
: Filter by organization ID.ids
: Filter by file ID.page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.
@spec files_update(String.t(), Polarex.FilePatch.t(), keyword()) :: {:ok, Polarex.DownloadableFileRead.t() | Polarex.OrganizationAvatarFileRead.t() | Polarex.ProductMediaFileRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Update File
Update a file.
Scopes: files:write
@spec files_uploaded(String.t(), Polarex.FileUploadCompleted.t(), keyword()) :: {:ok, Polarex.DownloadableFileRead.t() | Polarex.OrganizationAvatarFileRead.t() | Polarex.ProductMediaFileRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Complete File Upload
Complete a file upload.
Scopes: files:write
@spec license_keys_get( String.t(), keyword() ) :: {:ok, Polarex.LicenseKeyWithActivations.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t() | Polarex.Unauthorized.t()}
Get License Key
Get a license key.
Scopes: license_keys:read
license_keys:write
@spec license_keys_get_activation(String.t(), String.t(), keyword()) :: {:ok, Polarex.LicenseKeyActivationRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t() | Polarex.Unauthorized.t()}
Get Activation
Get a license key activation.
Scopes: license_keys:read
license_keys:write
@spec license_keys_list(keyword()) :: {:ok, Polarex.ListResourceLicenseKeyRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t() | Polarex.Unauthorized.t()}
List License Keys
Get license keys connected to the given organization & filters.
Scopes: license_keys:read
license_keys:write
Options
organization_id
: Filter by organization ID.benefit_id
: Filter by benefit ID.page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.
@spec license_keys_update(String.t(), Polarex.LicenseKeyUpdate.t(), keyword()) :: {:ok, Polarex.LicenseKeyRead.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t() | Polarex.Unauthorized.t()}
Update License Key
Update a license key.
Scopes: license_keys:write
@spec meters_create( Polarex.MeterCreate.t(), keyword() ) :: {:ok, Polarex.Meter.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Meter
Create a meter.
Scopes: meters:write
@spec meters_get( String.t(), keyword() ) :: {:ok, Polarex.Meter.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Meter
Get a meter by ID.
Scopes: meters:read
meters:write
@spec meters_list(keyword()) :: {:ok, Polarex.ListResourceMeter.t()} | {:error, Polarex.HTTPValidationError.t()}
List Meters
List meters.
Scopes: meters:read
meters:write
Options
organization_id
: Filter by organization ID.query
: Filter by name.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.metadata
: Filter by metadata key-value pairs. It uses thedeepObject
style, e.g.?metadata[key]=value
.
@spec meters_quantities( String.t(), keyword() ) :: {:ok, Polarex.MeterQuantities.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Meter Quantities
Get quantities of a meter over a time period.
Scopes: meters:read
meters:write
Options
start_timestamp
: Start timestamp.end_timestamp
: End timestamp.interval
: Interval between two timestamps.customer_id
: Filter by customer ID.external_customer_id
: Filter by external customer ID.
@spec meters_update(String.t(), Polarex.MeterUpdate.t(), keyword()) :: {:ok, Polarex.Meter.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Meter
Update a meter.
Scopes: meters:write
@spec metrics_get(keyword()) :: {:ok, Polarex.MetricsResponse.t()} | {:error, Polarex.HTTPValidationError.t()}
Get Metrics
Get metrics about your orders and subscriptions.
Currency values are output in cents.
Scopes: metrics:read
Options
start_date
: Start date.end_date
: End date.interval
: Interval between two timestamps.organization_id
: Filter by organization ID.product_id
: Filter by product ID.billing_type
: Filter by billing type.recurring
will filter data corresponding to subscriptions creations or renewals.one_time
will filter data corresponding to one-time purchases.customer_id
: Filter by customer ID.
@spec metrics_limits(keyword()) :: {:ok, Polarex.MetricsLimits.t()} | :error
Get Metrics Limits
Get the interval limits for the metrics endpoint.
Scopes: metrics:read
@spec oauth2_authorize(keyword()) :: {:ok, Polarex.AuthorizeResponseOrganization.t() | Polarex.AuthorizeResponseUser.t()} | :error
Authorize
@spec oauth2_clients_list(keyword()) :: {:ok, Polarex.ListResourceOAuth2Client.t()} | {:error, Polarex.HTTPValidationError.t()}
List Clients
List OAuth2 clients.
Options
page
: Page number, defaults to 1.limit
: Size of a page, defaults to 10. Maximum is 100.
@spec oauth2_clients_oauth2_create_client( Polarex.OAuth2ClientConfiguration.t(), keyword() ) :: {:ok, map()} | {:error, Polarex.HTTPValidationError.t()}
Create Client
Create an OAuth2 client.
@spec oauth2_clients_oauth2_delete_client( String.t(), keyword() ) :: {:ok, map()} | {:error, Polarex.HTTPValidationError.t()}
Delete Client
Delete an OAuth2 client.
@spec oauth2_clients_oauth2_get_client( String.t(), keyword() ) :: {:ok, map()} | {:error, Polarex.HTTPValidationError.t()}
Get Client
Get an OAuth2 client by Client ID.
@spec oauth2_clients_oauth2_update_client( String.t(), Polarex.OAuth2ClientConfigurationUpdate.t(), keyword() ) :: {:ok, map()} | {:error, Polarex.HTTPValidationError.t()}
Update Client
Update an OAuth2 client.
@spec oauth2_introspect_token( Polarex.IntrospectTokenRequest.t(), keyword() ) :: {:ok, Polarex.IntrospectTokenResponse.t()} | :error
Introspect Token
Get information about an access token.
@spec oauth2_request_token( Polarex.AuthorizationCodeTokenRequest.t() | Polarex.RefreshTokenRequest.t(), keyword() ) :: {:ok, Polarex.TokenResponse.t()} | :error
Request Token
Request an access token using a valid grant.
@spec oauth2_revoke_token( Polarex.RevokeTokenRequest.t(), keyword() ) :: {:ok, map()} | :error
Revoke Token
Revoke an access token or a refresh token.
@spec oauth2_userinfo(keyword()) :: {:ok, Polarex.UserInfoOrganization.t() | Polarex.UserInfoUser.t()} | :error
Get User Info
Get information about the authenticated user.
@spec orders_get( String.t(), keyword() ) :: {:ok, Polarex.Order.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order
Get an order by ID.
Scopes: orders:read
@spec orders_invoice( String.t(), keyword() ) :: {:ok, Polarex.OrderInvoice.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Order Invoice
Get an order's invoice data.
Scopes: orders:read
@spec orders_list(keyword()) :: {:ok, Polarex.ListResourceOrder.t()} | {:error, Polarex.HTTPValidationError.t()}
List Orders
List orders.
Scopes: orders:read
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.product_billing_type
: Filter by product billing type.recurring
will filter data corresponding to subscriptions creations or renewals.one_time
will filter data corresponding to one-time purchases.discount_id
: Filter by discount ID.customer_id
: Filter by customer ID.checkout_id
: Filter by checkout 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.metadata
: Filter by metadata key-value pairs. It uses thedeepObject
style, e.g.?metadata[key]=value
.
@spec organizations_create( Polarex.OrganizationCreate.t(), keyword() ) :: {:ok, Polarex.Organization.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Organization
Create an organization.
Scopes: organizations:write
@spec organizations_get( String.t(), keyword() ) :: {:ok, Polarex.Organization.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Organization
Get an organization by ID.
Scopes: organizations:read
organizations:write
@spec organizations_list(keyword()) :: {:ok, Polarex.ListResourceOrganization.t()} | {:error, Polarex.HTTPValidationError.t()}
List Organizations
List organizations.
Scopes: organizations:read
organizations:write
Options
slug
: Filter by slug.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 organizations_update(String.t(), Polarex.OrganizationUpdate.t(), keyword()) :: {:ok, Polarex.Organization.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Update Organization
Update an organization.
Scopes: organizations:write
@spec payments_get( String.t(), keyword() ) :: {:ok, Polarex.CardPayment.t() | Polarex.GenericPayment.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Payment
Get a payment by ID.
Scopes: payments:read
@spec payments_list(keyword()) :: {:ok, Polarex.ListResource.t()} | {:error, Polarex.HTTPValidationError.t()}
List Payments
List payments.
Scopes: payments:read
Options
organization_id
: Filter by organization ID.checkout_id
: Filter by checkout ID.order_id
: Filter by order ID.status
: Filter by payment status.method
: Filter by payment method.customer_email
: Filter by customer email.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 products_create( Polarex.ProductCreate.t(), keyword() ) :: {:ok, Polarex.Product.t()} | {:error, Polarex.HTTPValidationError.t()}
Create Product
Create a product.
Scopes: products:write
@spec products_get( String.t(), keyword() ) :: {:ok, Polarex.Product.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Product
Get a product by ID.
Scopes: products:read
products:write
@spec products_list(keyword()) :: {:ok, Polarex.ListResourceProduct.t()} | {:error, Polarex.HTTPValidationError.t()}
List Products
List products.
Scopes: products:read
products:write
Options
id
: Filter by product ID.organization_id
: Filter by organization ID.query
: Filter by product name.is_archived
: Filter on archived products.is_recurring
: Filter on recurring products. Iftrue
, only subscriptions tiers are returned. Iffalse
, only one-time purchase products are returned.benefit_id
: Filter products granting specific benefit.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 products_update(String.t(), Polarex.ProductUpdate.t(), keyword()) :: {:ok, Polarex.Product.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Update Product
Update a product.
Scopes: products:write
@spec products_update_benefits( String.t(), Polarex.ProductBenefitsUpdate.t(), keyword() ) :: {:ok, Polarex.Product.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.NotPermitted.t() | Polarex.ResourceNotFound.t()}
Update Product Benefits
Update benefits granted by a product.
Scopes: products:write
@spec refunds_create( Polarex.RefundCreate.t(), keyword() ) :: {:ok, Polarex.Refund.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.RefundAmountTooHigh.t() | Polarex.RefundedAlready.t()}
Create Refund
Create a refund.
Scopes: refunds:write
@spec refunds_list(keyword()) :: {:ok, Polarex.ListResourceRefund.t()} | {:error, Polarex.HTTPValidationError.t()}
List Refunds
List products.
Scopes: refunds:read
refunds:write
Options
id
: Filter by refund ID.organization_id
: Filter by organization ID.order_id
: Filter by order ID.subscription_id
: Filter by subscription ID.customer_id
: Filter by customer ID.succeeded
: Filter bysucceeded
.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 subscriptions_export(keyword()) :: {:ok, map()} | {:error, Polarex.HTTPValidationError.t()}
Export Subscriptions
Export subscriptions as a CSV file.
Scopes: subscriptions:read
subscriptions:write
Options
organization_id
: Filter by organization ID.
@spec subscriptions_get( String.t(), keyword() ) :: {:ok, Polarex.Subscription.t()} | {:error, Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Get Subscription
Get a subscription by ID.
Scopes: subscriptions:write
@spec subscriptions_list(keyword()) :: {:ok, Polarex.ListResourceSubscription.t()} | {:error, Polarex.HTTPValidationError.t()}
List Subscriptions
List subscriptions.
Scopes: subscriptions:read
subscriptions:write
Options
organization_id
: Filter by organization ID.product_id
: Filter by product ID.customer_id
: Filter by customer ID.discount_id
: Filter by discount ID.active
: Filter by active or inactive subscription.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.metadata
: Filter by metadata key-value pairs. It uses thedeepObject
style, e.g.?metadata[key]=value
.
@spec subscriptions_revoke( String.t(), keyword() ) :: {:ok, Polarex.Subscription.t()} | {:error, Polarex.AlreadyCanceledSubscription.t() | Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Revoke Subscription
Revoke a subscription, i.e cancel immediately.
Scopes: subscriptions:write
@spec subscriptions_update( String.t(), Polarex.SubscriptionCancel.t() | Polarex.SubscriptionRevoke.t() | Polarex.SubscriptionUpdateProduct.t(), keyword() ) :: {:ok, Polarex.Subscription.t()} | {:error, Polarex.AlreadyCanceledSubscription.t() | Polarex.HTTPValidationError.t() | Polarex.ResourceNotFound.t()}
Update Subscription
Update a subscription.
Scopes: subscriptions:write