API Reference polar_express v#0.1.5

Copy Markdown View Source

Modules

Elixir SDK and client for the Polar API.

Polar API client. Holds configuration and executes HTTP requests.

Polar API error.

Known PolarExpress webhook event type constants.

Webhook event for benefit.created.

Webhook event for benefit_grant.created.

Webhook event for benefit_grant.cycled.

Webhook event for benefit_grant.revoked.

Webhook event for benefit_grant.updated.

Webhook event for benefit.updated.

Webhook event for checkout.created.

Webhook event for checkout.expired.

Webhook event for checkout.updated.

Webhook event for customer.created.

Webhook event for customer.deleted.

Webhook event for customer_seat.assigned.

Webhook event for customer_seat.claimed.

Webhook event for customer_seat.revoked.

Webhook event for customer.state_changed.

Webhook event for customer.updated.

Webhook event for member.created.

Webhook event for member.deleted.

Webhook event for member.updated.

Webhook event for order.created.

Webhook event for order.paid.

Webhook event for order.refunded.

Webhook event for order.updated.

Webhook event for organization.updated.

Webhook event for product.created.

Webhook event for product.updated.

Webhook event for refund.created.

Webhook event for refund.updated.

Webhook event for subscription.active.

Webhook event for subscription.canceled.

Webhook event for subscription.created.

Webhook event for subscription.past_due.

Webhook event for subscription.revoked.

Webhook event for subscription.uncanceled.

Webhook event for subscription.updated.

Fallback for unrecognized webhook events.

Represents a Polar paginated list response.

Polar OAuth2 convenience helpers.

Parameters for benefit grants list benefit grants.

Parameters for benefits create benefit.

Parameters for benefits list benefit grants.

Parameters for benefits list benefits.

Parameters for benefits update benefit.

Parameters for checkout links create checkout link.

Parameters for checkout links list checkout links.

Parameters for checkout links update checkout link.

Parameters for checkouts confirm checkout session from client.

Parameters for checkouts create checkout session.

Parameters for checkouts list checkout sessions.

Parameters for checkouts update checkout session from client.

Parameters for checkouts update checkout session.

Parameters for custom fields create custom field.

Parameters for custom fields list custom fields.

Parameters for custom fields update custom field.

Parameters for customer meters list customer meters.

Parameters for benefit grants list benefit grants.

Parameters for benefit grants update benefit grant.

Parameters for customers add customer payment method.

Parameters for customers confirm customer payment method.

Parameters for customers list customer payment methods.

Parameters for customers update customer.

Parameters for downloadables list downloadables.

Parameters for license keys activate license key.

Parameters for license keys deactivate license key.

Parameters for license keys list license keys.

Parameters for license keys validate license key.

Parameters for members update member.

Parameters for orders confirm retry payment.

Parameters for seats list claimed subscriptions.

Parameters for subscriptions list subscriptions.

Parameters for subscriptions update subscription.

Parameters for customer seats assign seat.

Parameters for customer seats claim seat.

Parameters for customer seats list seats.

Parameters for customer sessions create customer session.

Parameters for customers create customer.

Parameters for customers delete customer by external id.

Parameters for customers delete customer.

Parameters for customers export customers.

Parameters for customers list customers.

Parameters for customers update customer by external id.

Parameters for customers update customer.

Parameters for discounts create discount.

Parameters for discounts list discounts.

Parameters for discounts update discount.

Parameters for disputes list disputes.

Parameters for event types list event types.

Parameters for event types update event type.

Parameters for events ingest events.

Parameters for events list event names.

Parameters for events list events.

Parameters for files complete file upload.

Parameters for files create file.

Parameters for files list files.

Parameters for files update file.

Parameters for license keys activate license key.

Parameters for license keys deactivate license key.

Parameters for license keys list license keys.

Parameters for license keys update license key.

Parameters for license keys validate license key.

Parameters for member sessions create member session.

Parameters for members create member.

Parameters for members list members.

Parameters for members update member.

Parameters for meters create meter.

Parameters for meters get meter quantities.

Parameters for meters list meters.

Parameters for meters update meter.

Parameters for metrics get metrics.

Parameters for oauth2 create client.

Parameters for oauth2 introspect token.

Parameters for oauth2 request token.

Parameters for oauth2 revoke token.

Parameters for oauth2 update client.

Parameters for orders export orders.

Parameters for orders list orders.

Parameters for orders update order.

Parameters for organization access tokens create.

Parameters for organization access tokens list.

Parameters for organization access tokens update.

Parameters for organizations create organization.

Parameters for organizations list organizations.

Parameters for organizations update organization.

Parameters for payments list payments.

Parameters for products create product.

Parameters for products list products.

Parameters for products update product benefits.

Parameters for products update product.

Parameters for refunds create refund.

Parameters for refunds list refunds.

Parameters for subscriptions create subscription.

Parameters for subscriptions export subscriptions.

Parameters for subscriptions list subscriptions.

Parameters for subscriptions update subscription.

Parameters for webhooks create webhook endpoint.

Parameters for webhooks list webhook deliveries.

Parameters for webhooks list webhook endpoints.

Parameters for webhooks update webhook endpoint.

Represents a Polar webhook event.

AggregationFunction enum. Possible values: count, sum, max, min, avg, unique.

AvailableScope enum. Possible values: openid, profile, email, user:read, user:write, organizations:read, organizations:write, custom_fields:read, custom_fields:write, discounts:read, discounts:write, checkout_links:read, checkout_links:write, checkouts:read, checkouts:write, transactions:read, transactions:write, payouts:read, payouts:write, products:read, products:write, benefits:read, benefits:write, events:read, events:write, meters:read, meters:write, files:read, files:write, subscriptions:read, subscriptions:write, customers:read, customers:write, members:read, members:write, wallets:read, wallets:write, disputes:read, customer_meters:read, customer_sessions:write, member_sessions:write, customer_seats:read, customer_seats:write, orders:read, orders:write, refunds:read, refunds:write, payments:read, metrics:read, webhooks:read, webhooks:write, license_keys:read, license_keys:write, customer_portal:read, customer_portal:write, notifications:read, notifications:write, notification_recipients:read, notification_recipients:write, organization_access_tokens:read, organization_access_tokens:write.

Benefit union type.

BenefitCreate union type.

BenefitCustomSubscriberProperties

BenefitDiscordSubscriberProperties

BenefitDownloadablesCreateProperties

BenefitDownloadablesSubscriberProperties

BenefitGitHubRepositoryCreateProperties

BenefitGitHubRepositoryProperties

BenefitGitHubRepositorySubscriber

BenefitGitHubRepositorySubscriberProperties

BenefitGrantCustomProperties - a map type with dynamic keys.

BenefitGrantDownloadablesProperties

BenefitGrantGitHubRepositoryProperties

BenefitGrantGitHubRepositoryWebhook

BenefitGrantLicenseKeysProperties

BenefitGrantMeterCreditProperties

BenefitGrantSortProperty enum. Possible values: created_at, -created_at, granted_at, -granted_at, revoked_at, -revoked_at.

BenefitGrantWebhook union type.

BenefitLicenseKeyActivationCreateProperties

BenefitLicenseKeyActivationProperties

BenefitLicenseKeyExpirationProperties

BenefitLicenseKeysCreateProperties

BenefitLicenseKeysSubscriberProperties

BenefitMeterCreditCreateProperties

BenefitMeterCreditSubscriberProperties

BenefitSortProperty enum. Possible values: created_at, -created_at, description, -description, type, -type, user_order, -user_order.

BenefitType enum. Possible values: custom, discord, github_repository, downloadables, license_keys, meter_credit.

BillingAddressFieldMode enum. Possible values: required, optional, disabled.

CheckoutCustomerBillingAddressFields

CheckoutDiscountFixedOnceForeverDuration

CheckoutDiscountFixedRepeatDuration

CheckoutDiscountPercentageOnceForeverDuration

CheckoutDiscountPercentageRepeatDuration

CheckoutForbiddenError union type.

CheckoutLinkCreate union type.

CheckoutLinkSortProperty enum. Possible values: created_at, -created_at, label, -label, success_url, -success_url, allow_discount_codes, -allow_discount_codes.

CheckoutSortProperty enum. Possible values: created_at, -created_at, expires_at, -expires_at, status, -status.

CheckoutStatus enum. Possible values: open, expired, confirmed, succeeded, failed.

CountryAlpha2 enum. Possible values: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW.

CountryAlpha2Input enum. Possible values: AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW.

CustomField union type.

CustomFieldCreate union type.

CustomFieldSortProperty enum. Possible values: created_at, -created_at, slug, -slug, name, -name, type, -type.

CustomFieldType enum. Possible values: text, number, date, checkbox, select.

CustomFieldUpdate union type.

CustomerBenefitGrant union type.

CustomerBenefitGrantDiscordPropertiesUpdate

CustomerBenefitGrantDiscordUpdate

CustomerBenefitGrantDownloadables

CustomerBenefitGrantDownloadablesUpdate

CustomerBenefitGrantGitHubRepository

CustomerBenefitGrantGitHubRepositoryPropertiesUpdate

CustomerBenefitGrantGitHubRepositoryUpdate

CustomerBenefitGrantLicenseKeysUpdate

CustomerBenefitGrantMeterCreditUpdate

CustomerBenefitGrantSortProperty enum. Possible values: granted_at, -granted_at, type, -type, organization, -organization, product_benefit, -product_benefit.

CustomerBenefitGrantUpdate union type.

CustomerCancellationReason enum. Possible values: customer_service, low_quality, missing_features, switched_service, too_complex, too_expensive, unused, other.

CustomerCustomerMeterSortProperty enum. Possible values: created_at, -created_at, modified_at, -modified_at, meter_id, -meter_id, meter_name, -meter_name, consumed_units, -consumed_units, credited_units, -credited_units, balance, -balance.

CustomerMeterSortProperty enum. Possible values: created_at, -created_at, modified_at, -modified_at, customer_id, -customer_id, customer_name, -customer_name, meter_id, -meter_id, meter_name, -meter_name, consumed_units, -consumed_units, credited_units, -credited_units, balance, -balance.

CustomerOrderSortProperty enum. Possible values: created_at, -created_at, amount, -amount, net_amount, -net_amount, product, -product, subscription, -subscription.

CustomerOrganizationFeatureSettings

CustomerPaymentMethod union type.

CustomerPaymentMethodCreateRequiresActionResponse

CustomerPaymentMethodCreateResponse union type.

CustomerPaymentMethodCreateSucceededResponse

CustomerPortalSubscriptionSettings

CustomerSessionCustomerExternalIDCreate

CustomerSortProperty enum. Possible values: created_at, -created_at, email, -email, name, -name.

CustomerSubscriptionSortProperty enum. Possible values: started_at, -started_at, amount, -amount, status, -status, organization, -organization, product, -product.

CustomerSubscriptionUpdate union type.

CustomerSubscriptionUpdateProduct

CustomerType enum. Possible values: individual, team.

CustomerWalletSortProperty enum. Possible values: created_at, -created_at, balance, -balance.

Discount union type.

DiscountCreate union type.

DiscountDuration enum. Possible values: once, forever, repeating.

DiscountFixedOnceForeverDurationBase

DiscountFixedOnceForeverDurationCreate

DiscountFixedRepeatDurationCreate

DiscountPercentageOnceForeverDuration

DiscountPercentageOnceForeverDurationBase

DiscountPercentageOnceForeverDurationCreate

DiscountPercentageRepeatDurationBase

DiscountPercentageRepeatDurationCreate

DiscountSortProperty enum. Possible values: created_at, -created_at, name, -name, code, -code, redemptions_count, -redemptions_count.

DiscountType enum. Possible values: fixed, percentage.

DisputeSortProperty enum. Possible values: created_at, -created_at, amount, -amount.

DisputeStatus enum. Possible values: prevented, early_warning, needs_response, under_review, lost, won.

Event union type.

EventNamesSortProperty enum. Possible values: name, -name, occurrences, -occurrences, first_seen, -first_seen, last_seen, -last_seen.

EventSortProperty enum. Possible values: timestamp, -timestamp.

EventSource enum. Possible values: system, user.

EventTypesSortProperty enum. Possible values: name, -name, label, -label, occurrences, -occurrences, first_seen, -first_seen, last_seen, -last_seen.

FileCreate union type.

FileServiceTypes enum. Possible values: downloadable, product_media, organization_avatar.

FilterConjunction enum. Possible values: and, or.

FilterOperator enum. Possible values: eq, ne, gt, gte, lt, lte, like, not_like.

Legacy organization status values kept for backward compatibility in schemas using OrganizationPublicBase.

LegacyRecurringProductPrice union type.

LegacyRecurringProductPriceCustom

LicenseKeyStatus enum. Possible values: granted, revoked, disabled.

ListResourceWithCursorPagination[Event]

ListResource[CustomerBenefitGrant]

ListResource[CustomerCustomerMeter]

ListResource[CustomerPaymentMethod]

ListResource[CustomerPortalMember]

ListResource[CustomerSubscription]

ListResource[CustomerWithMembers]

ListResource[OrganizationAccessToken]

MemberRole enum. Possible values: owner, billing_manager, member.

MemberSortProperty enum. Possible values: created_at, -created_at.

MetadataOutputType - a map type with dynamic keys.

MetadataQuery union type.

MeterSortProperty enum. Possible values: created_at, -created_at, name, -name.

MetricType enum. Possible values: scalar, currency, currency_sub_cent, percentage.

OrderBillingReason enum. Possible values: purchase, subscription_create, subscription_cycle, subscription_update.

Internal billing reasons with additional granularity.

OrderSortProperty enum. Possible values: created_at, -created_at, status, -status, invoice_number, -invoice_number, amount, -amount, net_amount, -net_amount, customer, -customer, product, -product, discount, -discount, subscription, -subscription.

OrderStatus enum. Possible values: pending, paid, refunded, partially_refunded.

OrganizationAccessTokenCreateResponse

OrganizationAccessTokenSortProperty enum. Possible values: created_at, -created_at, comment, -comment, last_used_at, -last_used_at, organization_id, -organization_id.

OrganizationCustomerEmailSettings

OrganizationCustomerPortalSettings

OrganizationSocialPlatforms enum. Possible values: x, github, facebook, instagram, youtube, tiktok, linkedin, other.

OrganizationSortProperty enum. Possible values: created_at, -created_at, slug, -slug, name, -name, next_review_threshold, -next_review_threshold, days_in_status, -days_in_status.

OrganizationStatus enum. Possible values: created, onboarding_started, initial_review, ongoing_review, denied, active.

Payment union type.

PaymentMethodInUseByActiveSubscription

PaymentProcessor enum. Possible values: stripe.

PaymentSortProperty enum. Possible values: created_at, -created_at, status, -status, amount, -amount, method, -method.

PaymentStatus enum. Possible values: pending, succeeded, failed.

PresentmentCurrency enum. Possible values: aud, brl, cad, chf, eur, inr, gbp, jpy, sek, usd.

ProductBillingType enum. Possible values: one_time, recurring.

ProductCreate union type.

ProductPrice union type.

ProductPriceSource enum. Possible values: catalog, ad_hoc.

ProductPriceType enum. Possible values: one_time, recurring.

ProductSortProperty enum. Possible values: created_at, -created_at, name, -name, price_amount_type, -price_amount_type, price_amount, -price_amount.

ProductVisibility enum. Possible values: draft, private, public.

RefundReason enum. Possible values: duplicate, fraudulent, customer_request, service_disruption, satisfaction_guarantee, dispute_prevention, other.

RefundSortProperty enum. Possible values: created_at, -created_at, amount, -amount.

RefundStatus enum. Possible values: pending, succeeded, failed, canceled.

RevokeTokenResponse - a map type with dynamic keys.

Scope enum. Possible values: openid, profile, email, user:read, user:write, web:read, web:write, organizations:read, organizations:write, custom_fields:read, custom_fields:write, discounts:read, discounts:write, checkout_links:read, checkout_links:write, checkouts:read, checkouts:write, transactions:read, transactions:write, payouts:read, payouts:write, products:read, products:write, benefits:read, benefits:write, events:read, events:write, meters:read, meters:write, files:read, files:write, subscriptions:read, subscriptions:write, customers:read, customers:write, members:read, members:write, wallets:read, wallets:write, disputes:read, customer_meters:read, customer_sessions:write, member_sessions:write, customer_seats:read, customer_seats:write, orders:read, orders:write, refunds:read, refunds:write, payments:read, metrics:read, webhooks:read, webhooks:write, license_keys:read, license_keys:write, customer_portal:read, customer_portal:write, notifications:read, notifications:write, notification_recipients:read, notification_recipients:write, organization_access_tokens:read, organization_access_tokens:write.

SeatStatus enum. Possible values: pending, claimed, revoked.

SubType enum. Possible values: user, organization.

SubscriptionBillingPeriodUpdatedEvent

SubscriptionBillingPeriodUpdatedMetadata

SubscriptionCreateExternalCustomer

SubscriptionProductUpdatedMetadata

SubscriptionProrationBehavior enum. Possible values: invoice, prorate.

SubscriptionRecurringInterval enum. Possible values: day, week, month, year.

SubscriptionSortProperty enum. Possible values: customer, -customer, status, -status, started_at, -started_at, current_period_end, -current_period_end, ended_at, -ended_at, ends_at, -ends_at, amount, -amount, product, -product, discount, -discount.

SubscriptionStatus enum. Possible values: incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid.

SubscriptionUpdate union type.

SystemEvent union type.

List of supported tax ID formats.

TimeInterval enum. Possible values: year, month, week, day, hour.

TrialInterval enum. Possible values: day, week, month, year.

WebhookBenefitGrantCreatedPayload

WebhookBenefitGrantRevokedPayload

WebhookBenefitGrantUpdatedPayload

WebhookCustomerSeatAssignedPayload

WebhookCustomerSeatClaimedPayload

WebhookCustomerSeatRevokedPayload

WebhookCustomerStateChangedPayload

WebhookEventType enum. Possible values: checkout.created, checkout.updated, checkout.expired, customer.created, customer.updated, customer.deleted, customer.state_changed, customer_seat.assigned, customer_seat.claimed, customer_seat.revoked, member.created, member.updated, member.deleted, order.created, order.updated, order.paid, order.refunded, subscription.created, subscription.updated, subscription.active, subscription.canceled, subscription.uncanceled, subscription.revoked, subscription.past_due, refund.created, refund.updated, product.created, product.updated, benefit.created, benefit.updated, benefit_grant.created, benefit_grant.cycled, benefit_grant.updated, benefit_grant.revoked, organization.updated.

WebhookFormat enum. Possible values: raw, discord, slack.

WebhookOrganizationUpdatedPayload

WebhookSubscriptionCanceledPayload

WebhookSubscriptionCreatedPayload

WebhookSubscriptionPastDuePayload

WebhookSubscriptionRevokedPayload

WebhookSubscriptionUncanceledPayload

WebhookSubscriptionUpdatedPayload

Aggregate namespace for V1 API services.

Test helpers for stubbing PolarExpress HTTP requests.

Webhook signature verification and event construction.

Mix Tasks

Generate Polar API modules from the OpenAPI spec.

Installs and configures polar_express in a Phoenix application.