Documentation
¶
Index ¶
- Constants
- Variables
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func Pointer[T any](v T) *T
- func String(s string) *string
- type BenefitGrants
- type Benefits
- func (s *Benefits) Create(ctx context.Context, request components.BenefitCreate, ...) (*operations.BenefitsCreateResponse, error)
- func (s *Benefits) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.BenefitsDeleteResponse, error)
- func (s *Benefits) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.BenefitsGetResponse, error)
- func (s *Benefits) Grants(ctx context.Context, request operations.BenefitsGrantsRequest, ...) (*operations.BenefitsGrantsResponse, error)
- func (s *Benefits) List(ctx context.Context, request operations.BenefitsListRequest, ...) (*operations.BenefitsListResponse, error)
- func (s *Benefits) Update(ctx context.Context, id string, ...) (*operations.BenefitsUpdateResponse, error)
- type CheckoutLinks
- func (s *CheckoutLinks) Create(ctx context.Context, request components.CheckoutLinkCreate, ...) (*operations.CheckoutLinksCreateResponse, error)
- func (s *CheckoutLinks) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.CheckoutLinksDeleteResponse, error)
- func (s *CheckoutLinks) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CheckoutLinksGetResponse, error)
- func (s *CheckoutLinks) List(ctx context.Context, request operations.CheckoutLinksListRequest, ...) (*operations.CheckoutLinksListResponse, error)
- func (s *CheckoutLinks) Update(ctx context.Context, id string, ...) (*operations.CheckoutLinksUpdateResponse, error)
- type Checkouts
- func (s *Checkouts) ClientConfirm(ctx context.Context, clientSecret string, ...) (*operations.CheckoutsClientConfirmResponse, error)
- func (s *Checkouts) ClientGet(ctx context.Context, clientSecret string, opts ...operations.Option) (*operations.CheckoutsClientGetResponse, error)
- func (s *Checkouts) ClientUpdate(ctx context.Context, clientSecret string, ...) (*operations.CheckoutsClientUpdateResponse, error)
- func (s *Checkouts) Create(ctx context.Context, request components.CheckoutCreate, ...) (*operations.CheckoutsCreateResponse, error)
- func (s *Checkouts) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CheckoutsGetResponse, error)
- func (s *Checkouts) List(ctx context.Context, request operations.CheckoutsListRequest, ...) (*operations.CheckoutsListResponse, error)
- func (s *Checkouts) Update(ctx context.Context, id string, checkoutUpdate components.CheckoutUpdate, ...) (*operations.CheckoutsUpdateResponse, error)
- type Clients
- func (s *Clients) Create(ctx context.Context, request components.OAuth2ClientConfiguration, ...) (*operations.Oauth2ClientsOauth2CreateClientResponse, error)
- func (s *Clients) Delete(ctx context.Context, clientID string, opts ...operations.Option) (*operations.Oauth2ClientsOauth2DeleteClientResponse, error)
- func (s *Clients) Get(ctx context.Context, clientID string, opts ...operations.Option) (*operations.Oauth2ClientsOauth2GetClientResponse, error)
- func (s *Clients) Update(ctx context.Context, clientID string, ...) (*operations.Oauth2ClientsOauth2UpdateClientResponse, error)
- type CustomFields
- func (s *CustomFields) Create(ctx context.Context, request components.CustomFieldCreate, ...) (*operations.CustomFieldsCreateResponse, error)
- func (s *CustomFields) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomFieldsDeleteResponse, error)
- func (s *CustomFields) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomFieldsGetResponse, error)
- func (s *CustomFields) List(ctx context.Context, request operations.CustomFieldsListRequest, ...) (*operations.CustomFieldsListResponse, error)
- func (s *CustomFields) Update(ctx context.Context, id string, customFieldUpdate components.CustomFieldUpdate, ...) (*operations.CustomFieldsUpdateResponse, error)
- type CustomerMeters
- type CustomerPortal
- type CustomerSession
- type CustomerSessions
- type Customers
- func (s *Customers) Create(ctx context.Context, request components.CustomerCreate, ...) (*operations.CustomersCreateResponse, error)
- func (s *Customers) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersDeleteResponse, error)
- func (s *Customers) DeleteExternal(ctx context.Context, externalID string, opts ...operations.Option) (*operations.CustomersDeleteExternalResponse, error)
- func (s *Customers) Export(ctx context.Context, ...) (*operations.CustomersExportResponse, error)
- func (s *Customers) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersGetResponse, error)
- func (s *Customers) GetBalance(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersGetBalanceResponse, error)
- func (s *Customers) GetExternal(ctx context.Context, externalID string, opts ...operations.Option) (*operations.CustomersGetExternalResponse, error)
- func (s *Customers) GetState(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersGetStateResponse, error)
- func (s *Customers) GetStateExternal(ctx context.Context, externalID string, opts ...operations.Option) (*operations.CustomersGetStateExternalResponse, error)
- func (s *Customers) List(ctx context.Context, request operations.CustomersListRequest, ...) (*operations.CustomersListResponse, error)
- func (s *Customers) Update(ctx context.Context, id string, customerUpdate components.CustomerUpdate, ...) (*operations.CustomersUpdateResponse, error)
- func (s *Customers) UpdateExternal(ctx context.Context, externalID string, ...) (*operations.CustomersUpdateExternalResponse, error)
- type Discounts
- func (s *Discounts) Create(ctx context.Context, request components.DiscountCreate, ...) (*operations.DiscountsCreateResponse, error)
- func (s *Discounts) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.DiscountsDeleteResponse, error)
- func (s *Discounts) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.DiscountsGetResponse, error)
- func (s *Discounts) List(ctx context.Context, request operations.DiscountsListRequest, ...) (*operations.DiscountsListResponse, error)
- func (s *Discounts) Update(ctx context.Context, id string, discountUpdate components.DiscountUpdate, ...) (*operations.DiscountsUpdateResponse, error)
- type Downloadables
- type Events
- func (s *Events) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.EventsGetResponse, error)
- func (s *Events) Ingest(ctx context.Context, request components.EventsIngest, ...) (*operations.EventsIngestResponse, error)
- func (s *Events) List(ctx context.Context, request operations.EventsListRequest, ...) (*operations.EventsListResponse, error)
- func (s *Events) ListNames(ctx context.Context, request operations.EventsListNamesRequest, ...) (*operations.EventsListNamesResponse, error)
- type Files
- func (s *Files) Create(ctx context.Context, request components.FileCreate, opts ...operations.Option) (*operations.FilesCreateResponse, error)
- func (s *Files) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.FilesDeleteResponse, error)
- func (s *Files) List(ctx context.Context, ...) (*operations.FilesListResponse, error)
- func (s *Files) Update(ctx context.Context, id string, filePatch components.FilePatch, ...) (*operations.FilesUpdateResponse, error)
- func (s *Files) Uploaded(ctx context.Context, id string, ...) (*operations.FilesUploadedResponse, error)
- type HTTPClient
- type LicenseKeys
- func (s *LicenseKeys) Activate(ctx context.Context, request components.LicenseKeyActivate, ...) (*operations.LicenseKeysActivateResponse, error)
- func (s *LicenseKeys) Deactivate(ctx context.Context, request components.LicenseKeyDeactivate, ...) (*operations.LicenseKeysDeactivateResponse, error)
- func (s *LicenseKeys) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.LicenseKeysGetResponse, error)
- func (s *LicenseKeys) GetActivation(ctx context.Context, id string, activationID string, opts ...operations.Option) (*operations.LicenseKeysGetActivationResponse, error)
- func (s *LicenseKeys) List(ctx context.Context, ...) (*operations.LicenseKeysListResponse, error)
- func (s *LicenseKeys) Update(ctx context.Context, id string, licenseKeyUpdate components.LicenseKeyUpdate, ...) (*operations.LicenseKeysUpdateResponse, error)
- func (s *LicenseKeys) Validate(ctx context.Context, request components.LicenseKeyValidate, ...) (*operations.LicenseKeysValidateResponse, error)
- type Meters
- func (s *Meters) Create(ctx context.Context, request components.MeterCreate, opts ...operations.Option) (*operations.MetersCreateResponse, error)
- func (s *Meters) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.MetersGetResponse, error)
- func (s *Meters) List(ctx context.Context, request operations.MetersListRequest, ...) (*operations.MetersListResponse, error)
- func (s *Meters) Quantities(ctx context.Context, request operations.MetersQuantitiesRequest, ...) (*operations.MetersQuantitiesResponse, error)
- func (s *Meters) Update(ctx context.Context, id string, meterUpdate components.MeterUpdate, ...) (*operations.MetersUpdateResponse, error)
- type Metrics
- type Oauth2
- func (s *Oauth2) Authorize(ctx context.Context, opts ...operations.Option) (*operations.Oauth2AuthorizeResponse, error)
- func (s *Oauth2) Introspect(ctx context.Context, request components.IntrospectTokenRequest, ...) (*operations.Oauth2IntrospectTokenResponse, error)
- func (s *Oauth2) Revoke(ctx context.Context, request components.RevokeTokenRequest, ...) (*operations.Oauth2RevokeTokenResponse, error)
- func (s *Oauth2) Token(ctx context.Context, request operations.Oauth2RequestTokenRequestBody, ...) (*operations.Oauth2RequestTokenResponse, error)
- func (s *Oauth2) Userinfo(ctx context.Context, opts ...operations.Option) (*operations.Oauth2UserinfoResponse, error)
- type Orders
- func (s *Orders) GenerateInvoice(ctx context.Context, id string, opts ...operations.Option) (*operations.OrdersGenerateInvoiceResponse, error)
- func (s *Orders) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.OrdersGetResponse, error)
- func (s *Orders) Invoice(ctx context.Context, id string, opts ...operations.Option) (*operations.OrdersInvoiceResponse, error)
- func (s *Orders) List(ctx context.Context, request operations.OrdersListRequest, ...) (*operations.OrdersListResponse, error)
- func (s *Orders) Update(ctx context.Context, id string, orderUpdate components.OrderUpdate, ...) (*operations.OrdersUpdateResponse, error)
- type Organizations
- func (s *Organizations) Create(ctx context.Context, request components.OrganizationCreate, ...) (*operations.OrganizationsCreateResponse, error)
- func (s *Organizations) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.OrganizationsGetResponse, error)
- func (s *Organizations) List(ctx context.Context, slug *string, page *int64, limit *int64, ...) (*operations.OrganizationsListResponse, error)
- func (s *Organizations) Update(ctx context.Context, id string, ...) (*operations.OrganizationsUpdateResponse, error)
- type Payments
- type Polar
- type PolarBenefitGrants
- func (s *PolarBenefitGrants) Get(ctx context.Context, ...) (*operations.CustomerPortalBenefitGrantsGetResponse, error)
- func (s *PolarBenefitGrants) List(ctx context.Context, request operations.CustomerPortalBenefitGrantsListRequest, ...) (*operations.CustomerPortalBenefitGrantsListResponse, error)
- func (s *PolarBenefitGrants) Update(ctx context.Context, ...) (*operations.CustomerPortalBenefitGrantsUpdateResponse, error)
- type PolarCustomerMeters
- type PolarCustomers
- func (s *PolarCustomers) AddPaymentMethod(ctx context.Context, request components.CustomerPaymentMethodCreate, ...) (*operations.CustomerPortalCustomersAddPaymentMethodResponse, error)
- func (s *PolarCustomers) ConfirmPaymentMethod(ctx context.Context, request components.CustomerPaymentMethodConfirm, ...) (*operations.CustomerPortalCustomersConfirmPaymentMethodResponse, error)
- func (s *PolarCustomers) DeletePaymentMethod(ctx context.Context, ...) (*operations.CustomerPortalCustomersDeletePaymentMethodResponse, error)
- func (s *PolarCustomers) Get(ctx context.Context, security operations.CustomerPortalCustomersGetSecurity, ...) (*operations.CustomerPortalCustomersGetResponse, error)
- func (s *PolarCustomers) ListPaymentMethods(ctx context.Context, ...) (*operations.CustomerPortalCustomersListPaymentMethodsResponse, error)
- func (s *PolarCustomers) Update(ctx context.Context, request components.CustomerPortalCustomerUpdate, ...) (*operations.CustomerPortalCustomersUpdateResponse, error)
- type PolarLicenseKeys
- func (s *PolarLicenseKeys) Activate(ctx context.Context, request components.LicenseKeyActivate, ...) (*operations.CustomerPortalLicenseKeysActivateResponse, error)
- func (s *PolarLicenseKeys) Deactivate(ctx context.Context, request components.LicenseKeyDeactivate, ...) (*operations.CustomerPortalLicenseKeysDeactivateResponse, error)
- func (s *PolarLicenseKeys) Get(ctx context.Context, security operations.CustomerPortalLicenseKeysGetSecurity, ...) (*operations.CustomerPortalLicenseKeysGetResponse, error)
- func (s *PolarLicenseKeys) List(ctx context.Context, security operations.CustomerPortalLicenseKeysListSecurity, ...) (*operations.CustomerPortalLicenseKeysListResponse, error)
- func (s *PolarLicenseKeys) Validate(ctx context.Context, request components.LicenseKeyValidate, ...) (*operations.CustomerPortalLicenseKeysValidateResponse, error)
- type PolarOrders
- func (s *PolarOrders) ConfirmRetryPayment(ctx context.Context, ...) (*operations.CustomerPortalOrdersConfirmRetryPaymentResponse, error)
- func (s *PolarOrders) GenerateInvoice(ctx context.Context, ...) (*operations.CustomerPortalOrdersGenerateInvoiceResponse, error)
- func (s *PolarOrders) Get(ctx context.Context, security operations.CustomerPortalOrdersGetSecurity, ...) (*operations.CustomerPortalOrdersGetResponse, error)
- func (s *PolarOrders) GetPaymentStatus(ctx context.Context, ...) (*operations.CustomerPortalOrdersGetPaymentStatusResponse, error)
- func (s *PolarOrders) Invoice(ctx context.Context, security operations.CustomerPortalOrdersInvoiceSecurity, ...) (*operations.CustomerPortalOrdersInvoiceResponse, error)
- func (s *PolarOrders) List(ctx context.Context, request operations.CustomerPortalOrdersListRequest, ...) (*operations.CustomerPortalOrdersListResponse, error)
- func (s *PolarOrders) Update(ctx context.Context, security operations.CustomerPortalOrdersUpdateSecurity, ...) (*operations.CustomerPortalOrdersUpdateResponse, error)
- type PolarOrganizations
- type PolarSubscriptions
- func (s *PolarSubscriptions) Cancel(ctx context.Context, ...) (*operations.CustomerPortalSubscriptionsCancelResponse, error)
- func (s *PolarSubscriptions) Get(ctx context.Context, ...) (*operations.CustomerPortalSubscriptionsGetResponse, error)
- func (s *PolarSubscriptions) List(ctx context.Context, request operations.CustomerPortalSubscriptionsListRequest, ...) (*operations.CustomerPortalSubscriptionsListResponse, error)
- func (s *PolarSubscriptions) Update(ctx context.Context, ...) (*operations.CustomerPortalSubscriptionsUpdateResponse, error)
- type Products
- func (s *Products) Create(ctx context.Context, request components.ProductCreate, ...) (*operations.ProductsCreateResponse, error)
- func (s *Products) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.ProductsGetResponse, error)
- func (s *Products) List(ctx context.Context, request operations.ProductsListRequest, ...) (*operations.ProductsListResponse, error)
- func (s *Products) Update(ctx context.Context, id string, productUpdate components.ProductUpdate, ...) (*operations.ProductsUpdateResponse, error)
- func (s *Products) UpdateBenefits(ctx context.Context, id string, ...) (*operations.ProductsUpdateBenefitsResponse, error)
- type Refunds
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig retry.Config) SDKOption
- func WithSecurity(accessToken string) SDKOption
- func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption
- func WithServer(server string) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
- func WithTimeout(timeout time.Duration) SDKOption
- type Seats
- func (s *Seats) AssignSeat(ctx context.Context, request components.SeatAssign, ...) (*operations.CustomerPortalSeatsAssignSeatResponse, error)
- func (s *Seats) ListClaimedSubscriptions(ctx context.Context, ...) (*operations.CustomerPortalSeatsListClaimedSubscriptionsResponse, error)
- func (s *Seats) ListSeats(ctx context.Context, security operations.CustomerPortalSeatsListSeatsSecurity, ...) (*operations.CustomerPortalSeatsListSeatsResponse, error)
- func (s *Seats) ResendInvitation(ctx context.Context, ...) (*operations.CustomerPortalSeatsResendInvitationResponse, error)
- func (s *Seats) RevokeSeat(ctx context.Context, security operations.CustomerPortalSeatsRevokeSeatSecurity, ...) (*operations.CustomerPortalSeatsRevokeSeatResponse, error)
- type Subscriptions
- func (s *Subscriptions) Export(ctx context.Context, organizationID *operations.OrganizationID, ...) (*operations.SubscriptionsExportResponse, error)
- func (s *Subscriptions) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.SubscriptionsGetResponse, error)
- func (s *Subscriptions) List(ctx context.Context, request operations.SubscriptionsListRequest, ...) (*operations.SubscriptionsListResponse, error)
- func (s *Subscriptions) Revoke(ctx context.Context, id string, opts ...operations.Option) (*operations.SubscriptionsRevokeResponse, error)
- func (s *Subscriptions) Update(ctx context.Context, id string, ...) (*operations.SubscriptionsUpdateResponse, error)
- type Webhooks
- func (s *Webhooks) CreateWebhookEndpoint(ctx context.Context, request components.WebhookEndpointCreate, ...) (*operations.WebhooksCreateWebhookEndpointResponse, error)
- func (s *Webhooks) DeleteWebhookEndpoint(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksDeleteWebhookEndpointResponse, error)
- func (s *Webhooks) GetWebhookEndpoint(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksGetWebhookEndpointResponse, error)
- func (s *Webhooks) ListWebhookDeliveries(ctx context.Context, request operations.WebhooksListWebhookDeliveriesRequest, ...) (*operations.WebhooksListWebhookDeliveriesResponse, error)
- func (s *Webhooks) ListWebhookEndpoints(ctx context.Context, organizationID *operations.QueryParamOrganizationID, ...) (*operations.WebhooksListWebhookEndpointsResponse, error)
- func (s *Webhooks) RedeliverWebhookEvent(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksRedeliverWebhookEventResponse, error)
- func (s *Webhooks) ResetWebhookEndpointSecret(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksResetWebhookEndpointSecretResponse, error)
- func (s *Webhooks) UpdateWebhookEndpoint(ctx context.Context, id string, ...) (*operations.WebhooksUpdateWebhookEndpointResponse, error)
Constants ¶
const ( // Production environment ServerProduction string = "production" // Sandbox environment ServerSandbox string = "sandbox" )
Variables ¶
var ServerList = map[string]string{ ServerProduction: "https://api.polar.sh", ServerSandbox: "https://sandbox-api.polar.sh", }
ServerList contains the list of servers available to the SDK
Functions ¶
Types ¶
type BenefitGrants ¶
type BenefitGrants struct {
// contains filtered or unexported fields
}
func (*BenefitGrants) List ¶
func (s *BenefitGrants) List(ctx context.Context, request operations.BenefitGrantsListRequest, opts ...operations.Option) (*operations.BenefitGrantsListResponse, error)
List Benefit Grants List benefit grants across all benefits for the authenticated organization.
**Scopes**: `benefits:read` `benefits:write`
type Benefits ¶
type Benefits struct {
// contains filtered or unexported fields
}
func (*Benefits) Create ¶
func (s *Benefits) Create(ctx context.Context, request components.BenefitCreate, opts ...operations.Option) (*operations.BenefitsCreateResponse, error)
Create Benefit Create a benefit.
**Scopes**: `benefits:write`
func (*Benefits) Delete ¶
func (s *Benefits) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.BenefitsDeleteResponse, error)
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`
func (*Benefits) Get ¶
func (s *Benefits) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.BenefitsGetResponse, error)
Get Benefit Get a benefit by ID.
**Scopes**: `benefits:read` `benefits:write`
func (*Benefits) Grants ¶
func (s *Benefits) Grants(ctx context.Context, request operations.BenefitsGrantsRequest, opts ...operations.Option) (*operations.BenefitsGrantsResponse, error)
Grants - 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`
func (*Benefits) List ¶
func (s *Benefits) List(ctx context.Context, request operations.BenefitsListRequest, opts ...operations.Option) (*operations.BenefitsListResponse, error)
List Benefits List benefits.
**Scopes**: `benefits:read` `benefits:write`
func (*Benefits) Update ¶
func (s *Benefits) Update(ctx context.Context, id string, requestBody operations.BenefitsUpdateBenefitUpdate, opts ...operations.Option) (*operations.BenefitsUpdateResponse, error)
Update Benefit Update a benefit.
**Scopes**: `benefits:write`
type CheckoutLinks ¶
type CheckoutLinks struct {
// contains filtered or unexported fields
}
func (*CheckoutLinks) Create ¶
func (s *CheckoutLinks) Create(ctx context.Context, request components.CheckoutLinkCreate, opts ...operations.Option) (*operations.CheckoutLinksCreateResponse, error)
Create Checkout Link Create a checkout link.
**Scopes**: `checkout_links:write`
func (*CheckoutLinks) Delete ¶
func (s *CheckoutLinks) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.CheckoutLinksDeleteResponse, error)
Delete Checkout Link Delete a checkout link.
**Scopes**: `checkout_links:write`
func (*CheckoutLinks) Get ¶
func (s *CheckoutLinks) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CheckoutLinksGetResponse, error)
Get Checkout Link Get a checkout link by ID.
**Scopes**: `checkout_links:read` `checkout_links:write`
func (*CheckoutLinks) List ¶
func (s *CheckoutLinks) List(ctx context.Context, request operations.CheckoutLinksListRequest, opts ...operations.Option) (*operations.CheckoutLinksListResponse, error)
List Checkout Links List checkout links.
**Scopes**: `checkout_links:read` `checkout_links:write`
func (*CheckoutLinks) Update ¶
func (s *CheckoutLinks) Update(ctx context.Context, id string, checkoutLinkUpdate components.CheckoutLinkUpdate, opts ...operations.Option) (*operations.CheckoutLinksUpdateResponse, error)
Update Checkout Link Update a checkout link.
**Scopes**: `checkout_links:write`
type Checkouts ¶
type Checkouts struct {
// contains filtered or unexported fields
}
func (*Checkouts) ClientConfirm ¶ added in v0.2.0
func (s *Checkouts) ClientConfirm(ctx context.Context, clientSecret string, checkoutConfirmStripe components.CheckoutConfirmStripe, opts ...operations.Option) (*operations.CheckoutsClientConfirmResponse, error)
ClientConfirm - Confirm Checkout Session from Client Confirm a checkout session by client secret.
Orders and subscriptions will be processed.
func (*Checkouts) ClientGet ¶ added in v0.2.0
func (s *Checkouts) ClientGet(ctx context.Context, clientSecret string, opts ...operations.Option) (*operations.CheckoutsClientGetResponse, error)
ClientGet - Get Checkout Session from Client Get a checkout session by client secret.
func (*Checkouts) ClientUpdate ¶ added in v0.2.0
func (s *Checkouts) ClientUpdate(ctx context.Context, clientSecret string, checkoutUpdatePublic components.CheckoutUpdatePublic, opts ...operations.Option) (*operations.CheckoutsClientUpdateResponse, error)
ClientUpdate - Update Checkout Session from Client Update a checkout session by client secret.
func (*Checkouts) Create ¶
func (s *Checkouts) Create(ctx context.Context, request components.CheckoutCreate, opts ...operations.Option) (*operations.CheckoutsCreateResponse, error)
Create Checkout Session Create a checkout session.
**Scopes**: `checkouts:write`
func (*Checkouts) Get ¶
func (s *Checkouts) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CheckoutsGetResponse, error)
Get Checkout Session Get a checkout session by ID.
**Scopes**: `checkouts:read` `checkouts:write`
func (*Checkouts) List ¶ added in v0.2.0
func (s *Checkouts) List(ctx context.Context, request operations.CheckoutsListRequest, opts ...operations.Option) (*operations.CheckoutsListResponse, error)
List Checkout Sessions List checkout sessions.
**Scopes**: `checkouts:read` `checkouts:write`
func (*Checkouts) Update ¶ added in v0.2.0
func (s *Checkouts) Update(ctx context.Context, id string, checkoutUpdate components.CheckoutUpdate, opts ...operations.Option) (*operations.CheckoutsUpdateResponse, error)
Update Checkout Session Update a checkout session.
**Scopes**: `checkouts:write`
type Clients ¶
type Clients struct {
// contains filtered or unexported fields
}
func (*Clients) Create ¶
func (s *Clients) Create(ctx context.Context, request components.OAuth2ClientConfiguration, opts ...operations.Option) (*operations.Oauth2ClientsOauth2CreateClientResponse, error)
Create Client Create an OAuth2 client.
func (*Clients) Delete ¶
func (s *Clients) Delete(ctx context.Context, clientID string, opts ...operations.Option) (*operations.Oauth2ClientsOauth2DeleteClientResponse, error)
Delete Client Delete an OAuth2 client.
func (*Clients) Get ¶
func (s *Clients) Get(ctx context.Context, clientID string, opts ...operations.Option) (*operations.Oauth2ClientsOauth2GetClientResponse, error)
Get Client Get an OAuth2 client by Client ID.
func (*Clients) Update ¶
func (s *Clients) Update(ctx context.Context, clientID string, oAuth2ClientConfigurationUpdate components.OAuth2ClientConfigurationUpdate, opts ...operations.Option) (*operations.Oauth2ClientsOauth2UpdateClientResponse, error)
Update Client Update an OAuth2 client.
type CustomFields ¶
type CustomFields struct {
// contains filtered or unexported fields
}
func (*CustomFields) Create ¶
func (s *CustomFields) Create(ctx context.Context, request components.CustomFieldCreate, opts ...operations.Option) (*operations.CustomFieldsCreateResponse, error)
Create Custom Field Create a custom field.
**Scopes**: `custom_fields:write`
func (*CustomFields) Delete ¶
func (s *CustomFields) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomFieldsDeleteResponse, error)
Delete Custom Field Delete a custom field.
**Scopes**: `custom_fields:write`
func (*CustomFields) Get ¶
func (s *CustomFields) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomFieldsGetResponse, error)
Get Custom Field Get a custom field by ID.
**Scopes**: `custom_fields:read` `custom_fields:write`
func (*CustomFields) List ¶
func (s *CustomFields) List(ctx context.Context, request operations.CustomFieldsListRequest, opts ...operations.Option) (*operations.CustomFieldsListResponse, error)
List Custom Fields List custom fields.
**Scopes**: `custom_fields:read` `custom_fields:write`
func (*CustomFields) Update ¶
func (s *CustomFields) Update(ctx context.Context, id string, customFieldUpdate components.CustomFieldUpdate, opts ...operations.Option) (*operations.CustomFieldsUpdateResponse, error)
Update Custom Field Update a custom field.
**Scopes**: `custom_fields:write`
type CustomerMeters ¶ added in v0.4.10
type CustomerMeters struct {
// contains filtered or unexported fields
}
func (*CustomerMeters) Get ¶ added in v0.4.10
func (s *CustomerMeters) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomerMetersGetResponse, error)
Get Customer Meter Get a customer meter by ID.
**Scopes**: `customer_meters:read`
func (*CustomerMeters) List ¶ added in v0.4.10
func (s *CustomerMeters) List(ctx context.Context, request operations.CustomerMetersListRequest, opts ...operations.Option) (*operations.CustomerMetersListResponse, error)
List Customer Meters List customer meters.
**Scopes**: `customer_meters:read`
type CustomerPortal ¶
type CustomerPortal struct {
BenefitGrants *PolarBenefitGrants
Customers *PolarCustomers
CustomerMeters *PolarCustomerMeters
Seats *Seats
CustomerSession *CustomerSession
Downloadables *Downloadables
LicenseKeys *PolarLicenseKeys
Orders *PolarOrders
Organizations *PolarOrganizations
Subscriptions *PolarSubscriptions
// contains filtered or unexported fields
}
type CustomerSession ¶ added in v0.10.1
type CustomerSession struct {
// contains filtered or unexported fields
}
func (*CustomerSession) Introspect ¶ added in v0.10.1
func (s *CustomerSession) Introspect(ctx context.Context, security operations.CustomerPortalCustomerSessionIntrospectSecurity, opts ...operations.Option) (*operations.CustomerPortalCustomerSessionIntrospectResponse, error)
Introspect Customer Session Introspect the current session and return its information.
**Scopes**: `customer_portal:read` `customer_portal:write`
type CustomerSessions ¶
type CustomerSessions struct {
// contains filtered or unexported fields
}
func (*CustomerSessions) Create ¶
func (s *CustomerSessions) Create(ctx context.Context, request operations.CustomerSessionsCreateCustomerSessionCreate, opts ...operations.Option) (*operations.CustomerSessionsCreateResponse, error)
Create Customer Session Create a customer session.
**Scopes**: `customer_sessions:write`
type Customers ¶
type Customers struct {
// contains filtered or unexported fields
}
func (*Customers) Create ¶
func (s *Customers) Create(ctx context.Context, request components.CustomerCreate, opts ...operations.Option) (*operations.CustomersCreateResponse, error)
Create Customer Create a customer.
**Scopes**: `customers:write`
func (*Customers) Delete ¶
func (s *Customers) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersDeleteResponse, error)
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`
func (*Customers) DeleteExternal ¶ added in v0.4.1
func (s *Customers) DeleteExternal(ctx context.Context, externalID string, opts ...operations.Option) (*operations.CustomersDeleteExternalResponse, error)
DeleteExternal - Delete Customer by External ID Delete a customer by external ID.
Immediately cancels any active subscriptions and revokes any active benefits.
**Scopes**: `customers:write`
func (*Customers) Export ¶ added in v0.9.0
func (s *Customers) Export(ctx context.Context, organizationID *operations.CustomersExportQueryParamOrganizationID, opts ...operations.Option) (*operations.CustomersExportResponse, error)
Export Customers Export customers as a CSV file.
**Scopes**: `customers:read` `customers:write`
func (*Customers) Get ¶
func (s *Customers) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersGetResponse, error)
Get Customer Get a customer by ID.
**Scopes**: `customers:read` `customers:write`
func (*Customers) GetBalance ¶ added in v0.9.2
func (s *Customers) GetBalance(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersGetBalanceResponse, error)
GetBalance - Get Customer Balance Get customer balance information.
**Scopes**: `customers:read` `customers:write`
func (*Customers) GetExternal ¶ added in v0.4.1
func (s *Customers) GetExternal(ctx context.Context, externalID string, opts ...operations.Option) (*operations.CustomersGetExternalResponse, error)
GetExternal - Get Customer by External ID Get a customer by external ID.
**Scopes**: `customers:read` `customers:write`
func (*Customers) GetState ¶ added in v0.4.3
func (s *Customers) GetState(ctx context.Context, id string, opts ...operations.Option) (*operations.CustomersGetStateResponse, error)
GetState - 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`
func (*Customers) GetStateExternal ¶ added in v0.4.3
func (s *Customers) GetStateExternal(ctx context.Context, externalID string, opts ...operations.Option) (*operations.CustomersGetStateExternalResponse, error)
GetStateExternal - 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`
func (*Customers) List ¶
func (s *Customers) List(ctx context.Context, request operations.CustomersListRequest, opts ...operations.Option) (*operations.CustomersListResponse, error)
List Customers List customers.
**Scopes**: `customers:read` `customers:write`
func (*Customers) Update ¶
func (s *Customers) Update(ctx context.Context, id string, customerUpdate components.CustomerUpdate, opts ...operations.Option) (*operations.CustomersUpdateResponse, error)
Update Customer Update a customer.
**Scopes**: `customers:write`
func (*Customers) UpdateExternal ¶ added in v0.4.1
func (s *Customers) UpdateExternal(ctx context.Context, externalID string, customerUpdateExternalID components.CustomerUpdateExternalID, opts ...operations.Option) (*operations.CustomersUpdateExternalResponse, error)
UpdateExternal - Update Customer by External ID Update a customer by external ID.
**Scopes**: `customers:write`
type Discounts ¶
type Discounts struct {
// contains filtered or unexported fields
}
func (*Discounts) Create ¶
func (s *Discounts) Create(ctx context.Context, request components.DiscountCreate, opts ...operations.Option) (*operations.DiscountsCreateResponse, error)
Create Discount Create a discount.
**Scopes**: `discounts:write`
func (*Discounts) Delete ¶
func (s *Discounts) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.DiscountsDeleteResponse, error)
Delete Discount Delete a discount.
**Scopes**: `discounts:write`
func (*Discounts) Get ¶
func (s *Discounts) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.DiscountsGetResponse, error)
Get Discount Get a discount by ID.
**Scopes**: `discounts:read` `discounts:write`
func (*Discounts) List ¶
func (s *Discounts) List(ctx context.Context, request operations.DiscountsListRequest, opts ...operations.Option) (*operations.DiscountsListResponse, error)
List Discounts List discounts.
**Scopes**: `discounts:read` `discounts:write`
func (*Discounts) Update ¶
func (s *Discounts) Update(ctx context.Context, id string, discountUpdate components.DiscountUpdate, opts ...operations.Option) (*operations.DiscountsUpdateResponse, error)
Update Discount Update a discount.
**Scopes**: `discounts:write`
type Downloadables ¶
type Downloadables struct {
// contains filtered or unexported fields
}
func (*Downloadables) List ¶
func (s *Downloadables) List(ctx context.Context, security operations.CustomerPortalDownloadablesListSecurity, organizationID *operations.CustomerPortalDownloadablesListQueryParamOrganizationIDFilter, benefitID *operations.CustomerPortalDownloadablesListQueryParamBenefitIDFilter, page *int64, limit *int64, opts ...operations.Option) (*operations.CustomerPortalDownloadablesListResponse, error)
List Downloadables **Scopes**: `customer_portal:read` `customer_portal:write`
type Events ¶ added in v0.1.8
type Events struct {
// contains filtered or unexported fields
}
func (*Events) Get ¶ added in v0.1.8
func (s *Events) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.EventsGetResponse, error)
Get Event Get an event by ID.
**Scopes**: `events:read` `events:write`
func (*Events) Ingest ¶ added in v0.1.8
func (s *Events) Ingest(ctx context.Context, request components.EventsIngest, opts ...operations.Option) (*operations.EventsIngestResponse, error)
Ingest Events Ingest batch of events.
**Scopes**: `events:write`
func (*Events) List ¶ added in v0.1.8
func (s *Events) List(ctx context.Context, request operations.EventsListRequest, opts ...operations.Option) (*operations.EventsListResponse, error)
List Events List events.
**Scopes**: `events:read` `events:write`
func (*Events) ListNames ¶ added in v0.4.10
func (s *Events) ListNames(ctx context.Context, request operations.EventsListNamesRequest, opts ...operations.Option) (*operations.EventsListNamesResponse, error)
ListNames - List Event Names List event names.
**Scopes**: `events:read` `events:write`
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
func (*Files) Create ¶
func (s *Files) Create(ctx context.Context, request components.FileCreate, opts ...operations.Option) (*operations.FilesCreateResponse, error)
Create File Create a file.
**Scopes**: `files:write`
func (*Files) Delete ¶
func (s *Files) Delete(ctx context.Context, id string, opts ...operations.Option) (*operations.FilesDeleteResponse, error)
Delete File Delete a file.
**Scopes**: `files:write`
func (*Files) List ¶
func (s *Files) List(ctx context.Context, organizationID *operations.FilesListQueryParamOrganizationIDFilter, ids *operations.FileIDFilter, page *int64, limit *int64, opts ...operations.Option) (*operations.FilesListResponse, error)
List Files List files.
**Scopes**: `files:read` `files:write`
func (*Files) Update ¶
func (s *Files) Update(ctx context.Context, id string, filePatch components.FilePatch, opts ...operations.Option) (*operations.FilesUpdateResponse, error)
Update File Update a file.
**Scopes**: `files:write`
func (*Files) Uploaded ¶
func (s *Files) Uploaded(ctx context.Context, id string, fileUploadCompleted components.FileUploadCompleted, opts ...operations.Option) (*operations.FilesUploadedResponse, error)
Uploaded - Complete File Upload Complete a file upload.
**Scopes**: `files:write`
type HTTPClient ¶
HTTPClient provides an interface for supplying the SDK with a custom HTTP client
type LicenseKeys ¶
type LicenseKeys struct {
// contains filtered or unexported fields
}
func (*LicenseKeys) Activate ¶ added in v0.8.2
func (s *LicenseKeys) Activate(ctx context.Context, request components.LicenseKeyActivate, opts ...operations.Option) (*operations.LicenseKeysActivateResponse, error)
Activate License Key Activate a license key instance.
**Scopes**: `license_keys:write`
func (*LicenseKeys) Deactivate ¶ added in v0.8.2
func (s *LicenseKeys) Deactivate(ctx context.Context, request components.LicenseKeyDeactivate, opts ...operations.Option) (*operations.LicenseKeysDeactivateResponse, error)
Deactivate License Key Deactivate a license key instance.
**Scopes**: `license_keys:write`
func (*LicenseKeys) Get ¶
func (s *LicenseKeys) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.LicenseKeysGetResponse, error)
Get License Key Get a license key.
**Scopes**: `license_keys:read` `license_keys:write`
func (*LicenseKeys) GetActivation ¶
func (s *LicenseKeys) GetActivation(ctx context.Context, id string, activationID string, opts ...operations.Option) (*operations.LicenseKeysGetActivationResponse, error)
GetActivation - Get Activation Get a license key activation.
**Scopes**: `license_keys:read` `license_keys:write`
func (*LicenseKeys) List ¶
func (s *LicenseKeys) List(ctx context.Context, organizationID *operations.LicenseKeysListQueryParamOrganizationIDFilter, benefitID *operations.QueryParamBenefitIDFilter, page *int64, limit *int64, opts ...operations.Option) (*operations.LicenseKeysListResponse, error)
List License Keys Get license keys connected to the given organization & filters.
**Scopes**: `license_keys:read` `license_keys:write`
func (*LicenseKeys) Update ¶
func (s *LicenseKeys) Update(ctx context.Context, id string, licenseKeyUpdate components.LicenseKeyUpdate, opts ...operations.Option) (*operations.LicenseKeysUpdateResponse, error)
Update License Key Update a license key.
**Scopes**: `license_keys:write`
func (*LicenseKeys) Validate ¶ added in v0.8.2
func (s *LicenseKeys) Validate(ctx context.Context, request components.LicenseKeyValidate, opts ...operations.Option) (*operations.LicenseKeysValidateResponse, error)
Validate License Key Validate a license key.
**Scopes**: `license_keys:write`
type Meters ¶ added in v0.1.8
type Meters struct {
// contains filtered or unexported fields
}
func (*Meters) Create ¶ added in v0.1.8
func (s *Meters) Create(ctx context.Context, request components.MeterCreate, opts ...operations.Option) (*operations.MetersCreateResponse, error)
Create Meter Create a meter.
**Scopes**: `meters:write`
func (*Meters) Get ¶ added in v0.1.8
func (s *Meters) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.MetersGetResponse, error)
Get Meter Get a meter by ID.
**Scopes**: `meters:read` `meters:write`
func (*Meters) List ¶ added in v0.1.8
func (s *Meters) List(ctx context.Context, request operations.MetersListRequest, opts ...operations.Option) (*operations.MetersListResponse, error)
List Meters List meters.
**Scopes**: `meters:read` `meters:write`
func (*Meters) Quantities ¶ added in v0.1.8
func (s *Meters) Quantities(ctx context.Context, request operations.MetersQuantitiesRequest, opts ...operations.Option) (*operations.MetersQuantitiesResponse, error)
Quantities - Get Meter Quantities Get quantities of a meter over a time period.
**Scopes**: `meters:read` `meters:write`
func (*Meters) Update ¶ added in v0.1.8
func (s *Meters) Update(ctx context.Context, id string, meterUpdate components.MeterUpdate, opts ...operations.Option) (*operations.MetersUpdateResponse, error)
Update Meter Update a meter.
**Scopes**: `meters:write`
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) Get ¶
func (s *Metrics) Get(ctx context.Context, request operations.MetricsGetRequest, opts ...operations.Option) (*operations.MetricsGetResponse, error)
Get Metrics Get metrics about your orders and subscriptions.
Currency values are output in cents.
**Scopes**: `metrics:read`
func (*Metrics) Limits ¶
func (s *Metrics) Limits(ctx context.Context, opts ...operations.Option) (*operations.MetricsLimitsResponse, error)
Limits - Get Metrics Limits Get the interval limits for the metrics endpoint.
**Scopes**: `metrics:read`
type Oauth2 ¶
type Oauth2 struct {
Clients *Clients
// contains filtered or unexported fields
}
func (*Oauth2) Authorize ¶
func (s *Oauth2) Authorize(ctx context.Context, opts ...operations.Option) (*operations.Oauth2AuthorizeResponse, error)
Authorize
func (*Oauth2) Introspect ¶
func (s *Oauth2) Introspect(ctx context.Context, request components.IntrospectTokenRequest, opts ...operations.Option) (*operations.Oauth2IntrospectTokenResponse, error)
Introspect Token Get information about an access token.
func (*Oauth2) Revoke ¶
func (s *Oauth2) Revoke(ctx context.Context, request components.RevokeTokenRequest, opts ...operations.Option) (*operations.Oauth2RevokeTokenResponse, error)
Revoke Token Revoke an access token or a refresh token.
func (*Oauth2) Token ¶
func (s *Oauth2) Token(ctx context.Context, request operations.Oauth2RequestTokenRequestBody, opts ...operations.Option) (*operations.Oauth2RequestTokenResponse, error)
Request Token Request an access token using a valid grant.
func (*Oauth2) Userinfo ¶
func (s *Oauth2) Userinfo(ctx context.Context, opts ...operations.Option) (*operations.Oauth2UserinfoResponse, error)
Userinfo - Get User Info Get information about the authenticated user.
type Orders ¶
type Orders struct {
// contains filtered or unexported fields
}
func (*Orders) GenerateInvoice ¶ added in v0.5.0
func (s *Orders) GenerateInvoice(ctx context.Context, id string, opts ...operations.Option) (*operations.OrdersGenerateInvoiceResponse, error)
GenerateInvoice - Generate Order Invoice Trigger generation of an order's invoice.
**Scopes**: `orders:read`
func (*Orders) Get ¶
func (s *Orders) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.OrdersGetResponse, error)
Get Order Get an order by ID.
**Scopes**: `orders:read`
func (*Orders) Invoice ¶
func (s *Orders) Invoice(ctx context.Context, id string, opts ...operations.Option) (*operations.OrdersInvoiceResponse, error)
Invoice - Get Order Invoice Get an order's invoice data.
**Scopes**: `orders:read`
func (*Orders) List ¶
func (s *Orders) List(ctx context.Context, request operations.OrdersListRequest, opts ...operations.Option) (*operations.OrdersListResponse, error)
List Orders List orders.
**Scopes**: `orders:read`
func (*Orders) Update ¶ added in v0.5.0
func (s *Orders) Update(ctx context.Context, id string, orderUpdate components.OrderUpdate, opts ...operations.Option) (*operations.OrdersUpdateResponse, error)
Update Order Update an order.
**Scopes**: `orders:write`
type Organizations ¶
type Organizations struct {
// contains filtered or unexported fields
}
func (*Organizations) Create ¶
func (s *Organizations) Create(ctx context.Context, request components.OrganizationCreate, opts ...operations.Option) (*operations.OrganizationsCreateResponse, error)
Create Organization Create an organization.
**Scopes**: `organizations:write`
func (*Organizations) Get ¶
func (s *Organizations) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.OrganizationsGetResponse, error)
Get Organization Get an organization by ID.
**Scopes**: `organizations:read` `organizations:write`
func (*Organizations) List ¶
func (s *Organizations) List(ctx context.Context, slug *string, page *int64, limit *int64, sorting []components.OrganizationSortProperty, opts ...operations.Option) (*operations.OrganizationsListResponse, error)
List Organizations List organizations.
**Scopes**: `organizations:read` `organizations:write`
func (*Organizations) Update ¶
func (s *Organizations) Update(ctx context.Context, id string, organizationUpdate components.OrganizationUpdate, opts ...operations.Option) (*operations.OrganizationsUpdateResponse, error)
Update Organization Update an organization.
**Scopes**: `organizations:write`
type Payments ¶ added in v0.4.17
type Payments struct {
// contains filtered or unexported fields
}
func (*Payments) Get ¶ added in v0.4.17
func (s *Payments) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.PaymentsGetResponse, error)
Get Payment Get a payment by ID.
**Scopes**: `payments:read`
func (*Payments) List ¶ added in v0.4.17
func (s *Payments) List(ctx context.Context, request operations.PaymentsListRequest, opts ...operations.Option) (*operations.PaymentsListResponse, error)
List Payments List payments.
**Scopes**: `payments:read`
type Polar ¶
type Polar struct {
SDKVersion string
Organizations *Organizations
Subscriptions *Subscriptions
Oauth2 *Oauth2
Benefits *Benefits
BenefitGrants *BenefitGrants
Webhooks *Webhooks
Products *Products
Orders *Orders
Refunds *Refunds
Checkouts *Checkouts
Files *Files
Metrics *Metrics
LicenseKeys *LicenseKeys
CheckoutLinks *CheckoutLinks
CustomFields *CustomFields
Discounts *Discounts
Customers *Customers
CustomerPortal *CustomerPortal
CustomerSessions *CustomerSessions
Events *Events
Meters *Meters
CustomerMeters *CustomerMeters
Payments *Payments
// contains filtered or unexported fields
}
Polar API: Polar HTTP and Webhooks API Read the docs at https://polar.sh/docs/api-reference
type PolarBenefitGrants ¶ added in v0.9.0
type PolarBenefitGrants struct {
// contains filtered or unexported fields
}
func (*PolarBenefitGrants) Get ¶ added in v0.9.0
func (s *PolarBenefitGrants) Get(ctx context.Context, security operations.CustomerPortalBenefitGrantsGetSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalBenefitGrantsGetResponse, error)
Get Benefit Grant Get a benefit grant by ID for the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarBenefitGrants) List ¶ added in v0.9.0
func (s *PolarBenefitGrants) List(ctx context.Context, request operations.CustomerPortalBenefitGrantsListRequest, security operations.CustomerPortalBenefitGrantsListSecurity, opts ...operations.Option) (*operations.CustomerPortalBenefitGrantsListResponse, error)
List Benefit Grants List benefits grants of the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarBenefitGrants) Update ¶ added in v0.9.0
func (s *PolarBenefitGrants) Update(ctx context.Context, security operations.CustomerPortalBenefitGrantsUpdateSecurity, id string, customerBenefitGrantUpdate components.CustomerBenefitGrantUpdate, opts ...operations.Option) (*operations.CustomerPortalBenefitGrantsUpdateResponse, error)
Update Benefit Grant Update a benefit grant for the authenticated customer.
**Scopes**: `customer_portal:write`
type PolarCustomerMeters ¶ added in v0.4.10
type PolarCustomerMeters struct {
// contains filtered or unexported fields
}
func (*PolarCustomerMeters) Get ¶ added in v0.4.10
func (s *PolarCustomerMeters) Get(ctx context.Context, security operations.CustomerPortalCustomerMetersGetSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalCustomerMetersGetResponse, error)
Get Customer Meter Get a meter by ID for the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarCustomerMeters) List ¶ added in v0.4.10
func (s *PolarCustomerMeters) List(ctx context.Context, request operations.CustomerPortalCustomerMetersListRequest, security operations.CustomerPortalCustomerMetersListSecurity, opts ...operations.Option) (*operations.CustomerPortalCustomerMetersListResponse, error)
List Meters List meters of the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
type PolarCustomers ¶
type PolarCustomers struct {
// contains filtered or unexported fields
}
func (*PolarCustomers) AddPaymentMethod ¶ added in v0.4.0
func (s *PolarCustomers) AddPaymentMethod(ctx context.Context, request components.CustomerPaymentMethodCreate, security operations.CustomerPortalCustomersAddPaymentMethodSecurity, opts ...operations.Option) (*operations.CustomerPortalCustomersAddPaymentMethodResponse, error)
AddPaymentMethod - Add Customer Payment Method Add a payment method to the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarCustomers) ConfirmPaymentMethod ¶ added in v0.9.2
func (s *PolarCustomers) ConfirmPaymentMethod(ctx context.Context, request components.CustomerPaymentMethodConfirm, security operations.CustomerPortalCustomersConfirmPaymentMethodSecurity, opts ...operations.Option) (*operations.CustomerPortalCustomersConfirmPaymentMethodResponse, error)
ConfirmPaymentMethod - Confirm Customer Payment Method Confirm a payment method for the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarCustomers) DeletePaymentMethod ¶ added in v0.4.0
func (s *PolarCustomers) DeletePaymentMethod(ctx context.Context, security operations.CustomerPortalCustomersDeletePaymentMethodSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalCustomersDeletePaymentMethodResponse, error)
DeletePaymentMethod - Delete Customer Payment Method Delete a payment method from the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarCustomers) Get ¶
func (s *PolarCustomers) Get(ctx context.Context, security operations.CustomerPortalCustomersGetSecurity, opts ...operations.Option) (*operations.CustomerPortalCustomersGetResponse, error)
Get Customer Get authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarCustomers) ListPaymentMethods ¶ added in v0.7.2
func (s *PolarCustomers) ListPaymentMethods(ctx context.Context, security operations.CustomerPortalCustomersListPaymentMethodsSecurity, page *int64, limit *int64, opts ...operations.Option) (*operations.CustomerPortalCustomersListPaymentMethodsResponse, error)
ListPaymentMethods - List Customer Payment Methods Get saved payment methods of the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarCustomers) Update ¶ added in v0.4.0
func (s *PolarCustomers) Update(ctx context.Context, request components.CustomerPortalCustomerUpdate, security operations.CustomerPortalCustomersUpdateSecurity, opts ...operations.Option) (*operations.CustomerPortalCustomersUpdateResponse, error)
Update Customer Update authenticated customer.
**Scopes**: `customer_portal:write`
type PolarLicenseKeys ¶
type PolarLicenseKeys struct {
// contains filtered or unexported fields
}
func (*PolarLicenseKeys) Activate ¶
func (s *PolarLicenseKeys) Activate(ctx context.Context, request components.LicenseKeyActivate, opts ...operations.Option) (*operations.CustomerPortalLicenseKeysActivateResponse, error)
Activate License Key Activate a license key instance.
> This endpoint doesn't require authentication and can be safely used on a public > client, like a desktop application or a mobile app. > If you plan to validate a license key on a server, use the `/v1/license-keys/activate` > endpoint instead.
func (*PolarLicenseKeys) Deactivate ¶
func (s *PolarLicenseKeys) Deactivate(ctx context.Context, request components.LicenseKeyDeactivate, opts ...operations.Option) (*operations.CustomerPortalLicenseKeysDeactivateResponse, error)
Deactivate License Key Deactivate a license key instance.
> This endpoint doesn't require authentication and can be safely used on a public > client, like a desktop application or a mobile app. > If you plan to validate a license key on a server, use the `/v1/license-keys/deactivate` > endpoint instead.
func (*PolarLicenseKeys) Get ¶
func (s *PolarLicenseKeys) Get(ctx context.Context, security operations.CustomerPortalLicenseKeysGetSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalLicenseKeysGetResponse, error)
Get License Key Get a license key.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarLicenseKeys) List ¶
func (s *PolarLicenseKeys) List(ctx context.Context, security operations.CustomerPortalLicenseKeysListSecurity, organizationID *operations.CustomerPortalLicenseKeysListQueryParamOrganizationIDFilter, benefitID *string, page *int64, limit *int64, opts ...operations.Option) (*operations.CustomerPortalLicenseKeysListResponse, error)
List License Keys **Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarLicenseKeys) Validate ¶
func (s *PolarLicenseKeys) Validate(ctx context.Context, request components.LicenseKeyValidate, opts ...operations.Option) (*operations.CustomerPortalLicenseKeysValidateResponse, error)
Validate License Key Validate a license key.
> This endpoint doesn't require authentication and can be safely used on a public > client, like a desktop application or a mobile app. > If you plan to validate a license key on a server, use the `/v1/license-keys/validate` > endpoint instead.
type PolarOrders ¶
type PolarOrders struct {
// contains filtered or unexported fields
}
func (*PolarOrders) ConfirmRetryPayment ¶ added in v0.8.2
func (s *PolarOrders) ConfirmRetryPayment(ctx context.Context, security operations.CustomerPortalOrdersConfirmRetryPaymentSecurity, id string, customerOrderConfirmPayment components.CustomerOrderConfirmPayment, opts ...operations.Option) (*operations.CustomerPortalOrdersConfirmRetryPaymentResponse, error)
ConfirmRetryPayment - Confirm Retry Payment Confirm a retry payment using a Stripe confirmation token.
**Scopes**: `customer_portal:write`
func (*PolarOrders) GenerateInvoice ¶ added in v0.5.0
func (s *PolarOrders) GenerateInvoice(ctx context.Context, security operations.CustomerPortalOrdersGenerateInvoiceSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalOrdersGenerateInvoiceResponse, error)
GenerateInvoice - Generate Order Invoice Trigger generation of an order's invoice.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarOrders) Get ¶
func (s *PolarOrders) Get(ctx context.Context, security operations.CustomerPortalOrdersGetSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalOrdersGetResponse, error)
Get Order Get an order by ID for the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarOrders) GetPaymentStatus ¶ added in v0.8.2
func (s *PolarOrders) GetPaymentStatus(ctx context.Context, security operations.CustomerPortalOrdersGetPaymentStatusSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalOrdersGetPaymentStatusResponse, error)
GetPaymentStatus - Get Order Payment Status Get the current payment status for an order.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarOrders) Invoice ¶
func (s *PolarOrders) Invoice(ctx context.Context, security operations.CustomerPortalOrdersInvoiceSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalOrdersInvoiceResponse, error)
Invoice - Get Order Invoice Get an order's invoice data.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarOrders) List ¶
func (s *PolarOrders) List(ctx context.Context, request operations.CustomerPortalOrdersListRequest, security operations.CustomerPortalOrdersListSecurity, opts ...operations.Option) (*operations.CustomerPortalOrdersListResponse, error)
List Orders List orders of the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarOrders) Update ¶ added in v0.5.0
func (s *PolarOrders) Update(ctx context.Context, security operations.CustomerPortalOrdersUpdateSecurity, id string, customerOrderUpdate components.CustomerOrderUpdate, opts ...operations.Option) (*operations.CustomerPortalOrdersUpdateResponse, error)
Update Order Update an order for the authenticated customer.
**Scopes**: `customer_portal:write`
type PolarOrganizations ¶
type PolarOrganizations struct {
// contains filtered or unexported fields
}
func (*PolarOrganizations) Get ¶
func (s *PolarOrganizations) Get(ctx context.Context, slug string, opts ...operations.Option) (*operations.CustomerPortalOrganizationsGetResponse, error)
Get Organization Get a customer portal's organization by slug.
type PolarSubscriptions ¶
type PolarSubscriptions struct {
// contains filtered or unexported fields
}
func (*PolarSubscriptions) Cancel ¶
func (s *PolarSubscriptions) Cancel(ctx context.Context, security operations.CustomerPortalSubscriptionsCancelSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalSubscriptionsCancelResponse, error)
Cancel Subscription Cancel a subscription of the authenticated customer.
**Scopes**: `customer_portal:write`
func (*PolarSubscriptions) Get ¶
func (s *PolarSubscriptions) Get(ctx context.Context, security operations.CustomerPortalSubscriptionsGetSecurity, id string, opts ...operations.Option) (*operations.CustomerPortalSubscriptionsGetResponse, error)
Get Subscription Get a subscription for the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarSubscriptions) List ¶
func (s *PolarSubscriptions) List(ctx context.Context, request operations.CustomerPortalSubscriptionsListRequest, security operations.CustomerPortalSubscriptionsListSecurity, opts ...operations.Option) (*operations.CustomerPortalSubscriptionsListResponse, error)
List Subscriptions List subscriptions of the authenticated customer.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*PolarSubscriptions) Update ¶
func (s *PolarSubscriptions) Update(ctx context.Context, security operations.CustomerPortalSubscriptionsUpdateSecurity, id string, customerSubscriptionUpdate components.CustomerSubscriptionUpdate, opts ...operations.Option) (*operations.CustomerPortalSubscriptionsUpdateResponse, error)
Update Subscription Update a subscription of the authenticated customer.
**Scopes**: `customer_portal:write`
type Products ¶
type Products struct {
// contains filtered or unexported fields
}
func (*Products) Create ¶
func (s *Products) Create(ctx context.Context, request components.ProductCreate, opts ...operations.Option) (*operations.ProductsCreateResponse, error)
Create Product Create a product.
**Scopes**: `products:write`
func (*Products) Get ¶
func (s *Products) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.ProductsGetResponse, error)
Get Product Get a product by ID.
**Scopes**: `products:read` `products:write`
func (*Products) List ¶
func (s *Products) List(ctx context.Context, request operations.ProductsListRequest, opts ...operations.Option) (*operations.ProductsListResponse, error)
List Products List products.
**Scopes**: `products:read` `products:write`
func (*Products) Update ¶
func (s *Products) Update(ctx context.Context, id string, productUpdate components.ProductUpdate, opts ...operations.Option) (*operations.ProductsUpdateResponse, error)
Update Product Update a product.
**Scopes**: `products:write`
func (*Products) UpdateBenefits ¶
func (s *Products) UpdateBenefits(ctx context.Context, id string, productBenefitsUpdate components.ProductBenefitsUpdate, opts ...operations.Option) (*operations.ProductsUpdateBenefitsResponse, error)
UpdateBenefits - Update Product Benefits Update benefits granted by a product.
**Scopes**: `products:write`
type Refunds ¶ added in v0.1.5
type Refunds struct {
// contains filtered or unexported fields
}
func (*Refunds) Create ¶ added in v0.1.5
func (s *Refunds) Create(ctx context.Context, request components.RefundCreate, opts ...operations.Option) (*operations.RefundsCreateResponse, error)
Create Refund Create a refund.
**Scopes**: `refunds:write`
func (*Refunds) List ¶ added in v0.1.5
func (s *Refunds) List(ctx context.Context, request operations.RefundsListRequest, opts ...operations.Option) (*operations.RefundsListResponse, error)
List Refunds List products.
**Scopes**: `refunds:read` `refunds:write`
type SDKOption ¶
type SDKOption func(*Polar)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶
func WithSecurity ¶
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServer ¶
WithServer allows the overriding of the default server by name
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
func WithTemplatedServerURL ¶
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters
func WithTimeout ¶
WithTimeout Optional request timeout applied to each operation
type Seats ¶ added in v0.10.1
type Seats struct {
// contains filtered or unexported fields
}
func (*Seats) AssignSeat ¶ added in v0.10.1
func (s *Seats) AssignSeat(ctx context.Context, request components.SeatAssign, security operations.CustomerPortalSeatsAssignSeatSecurity, opts ...operations.Option) (*operations.CustomerPortalSeatsAssignSeatResponse, error)
AssignSeat - Assign Seat **Scopes**: `customer_portal:write`
func (*Seats) ListClaimedSubscriptions ¶ added in v0.10.1
func (s *Seats) ListClaimedSubscriptions(ctx context.Context, security operations.CustomerPortalSeatsListClaimedSubscriptionsSecurity, opts ...operations.Option) (*operations.CustomerPortalSeatsListClaimedSubscriptionsResponse, error)
ListClaimedSubscriptions - List Claimed Subscriptions List all subscriptions where the authenticated customer has claimed a seat.
**Scopes**: `customer_portal:read` `customer_portal:write`
func (*Seats) ListSeats ¶ added in v0.10.1
func (s *Seats) ListSeats(ctx context.Context, security operations.CustomerPortalSeatsListSeatsSecurity, subscriptionID string, opts ...operations.Option) (*operations.CustomerPortalSeatsListSeatsResponse, error)
ListSeats - List Seats **Scopes**: `customer_portal:read` `customer_portal:write`
func (*Seats) ResendInvitation ¶ added in v0.10.1
func (s *Seats) ResendInvitation(ctx context.Context, security operations.CustomerPortalSeatsResendInvitationSecurity, seatID string, opts ...operations.Option) (*operations.CustomerPortalSeatsResendInvitationResponse, error)
ResendInvitation - Resend Invitation **Scopes**: `customer_portal:write`
func (*Seats) RevokeSeat ¶ added in v0.10.1
func (s *Seats) RevokeSeat(ctx context.Context, security operations.CustomerPortalSeatsRevokeSeatSecurity, seatID string, opts ...operations.Option) (*operations.CustomerPortalSeatsRevokeSeatResponse, error)
RevokeSeat - Revoke Seat **Scopes**: `customer_portal:write`
type Subscriptions ¶
type Subscriptions struct {
// contains filtered or unexported fields
}
func (*Subscriptions) Export ¶
func (s *Subscriptions) Export(ctx context.Context, organizationID *operations.OrganizationID, opts ...operations.Option) (*operations.SubscriptionsExportResponse, error)
Export Subscriptions Export subscriptions as a CSV file.
**Scopes**: `subscriptions:read` `subscriptions:write`
func (*Subscriptions) Get ¶ added in v0.1.7
func (s *Subscriptions) Get(ctx context.Context, id string, opts ...operations.Option) (*operations.SubscriptionsGetResponse, error)
Get Subscription Get a subscription by ID.
**Scopes**: `subscriptions:read` `subscriptions:write`
func (*Subscriptions) List ¶
func (s *Subscriptions) List(ctx context.Context, request operations.SubscriptionsListRequest, opts ...operations.Option) (*operations.SubscriptionsListResponse, error)
List Subscriptions List subscriptions.
**Scopes**: `subscriptions:read` `subscriptions:write`
func (*Subscriptions) Revoke ¶ added in v0.1.1
func (s *Subscriptions) Revoke(ctx context.Context, id string, opts ...operations.Option) (*operations.SubscriptionsRevokeResponse, error)
Revoke Subscription Revoke a subscription, i.e cancel immediately.
**Scopes**: `subscriptions:write`
func (*Subscriptions) Update ¶ added in v0.1.1
func (s *Subscriptions) Update(ctx context.Context, id string, subscriptionUpdate components.SubscriptionUpdate, opts ...operations.Option) (*operations.SubscriptionsUpdateResponse, error)
Update Subscription Update a subscription.
**Scopes**: `subscriptions:write`
type Webhooks ¶ added in v0.6.1
type Webhooks struct {
// contains filtered or unexported fields
}
func (*Webhooks) CreateWebhookEndpoint ¶ added in v0.6.1
func (s *Webhooks) CreateWebhookEndpoint(ctx context.Context, request components.WebhookEndpointCreate, opts ...operations.Option) (*operations.WebhooksCreateWebhookEndpointResponse, error)
CreateWebhookEndpoint - Create Webhook Endpoint Create a webhook endpoint.
**Scopes**: `webhooks:write`
func (*Webhooks) DeleteWebhookEndpoint ¶ added in v0.6.1
func (s *Webhooks) DeleteWebhookEndpoint(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksDeleteWebhookEndpointResponse, error)
DeleteWebhookEndpoint - Delete Webhook Endpoint Delete a webhook endpoint.
**Scopes**: `webhooks:write`
func (*Webhooks) GetWebhookEndpoint ¶ added in v0.6.1
func (s *Webhooks) GetWebhookEndpoint(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksGetWebhookEndpointResponse, error)
GetWebhookEndpoint - Get Webhook Endpoint Get a webhook endpoint by ID.
**Scopes**: `webhooks:read` `webhooks:write`
func (*Webhooks) ListWebhookDeliveries ¶ added in v0.6.1
func (s *Webhooks) ListWebhookDeliveries(ctx context.Context, request operations.WebhooksListWebhookDeliveriesRequest, opts ...operations.Option) (*operations.WebhooksListWebhookDeliveriesResponse, error)
ListWebhookDeliveries - List Webhook Deliveries List webhook deliveries.
Deliveries are all the attempts to deliver a webhook event to an endpoint.
**Scopes**: `webhooks:read` `webhooks:write`
func (*Webhooks) ListWebhookEndpoints ¶ added in v0.6.1
func (s *Webhooks) ListWebhookEndpoints(ctx context.Context, organizationID *operations.QueryParamOrganizationID, page *int64, limit *int64, opts ...operations.Option) (*operations.WebhooksListWebhookEndpointsResponse, error)
ListWebhookEndpoints - List Webhook Endpoints List webhook endpoints.
**Scopes**: `webhooks:read` `webhooks:write`
func (*Webhooks) RedeliverWebhookEvent ¶ added in v0.6.1
func (s *Webhooks) RedeliverWebhookEvent(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksRedeliverWebhookEventResponse, error)
RedeliverWebhookEvent - Redeliver Webhook Event Schedule the re-delivery of a webhook event.
**Scopes**: `webhooks:write`
func (*Webhooks) ResetWebhookEndpointSecret ¶ added in v0.7.3
func (s *Webhooks) ResetWebhookEndpointSecret(ctx context.Context, id string, opts ...operations.Option) (*operations.WebhooksResetWebhookEndpointSecretResponse, error)
ResetWebhookEndpointSecret - Reset Webhook Endpoint Secret Regenerate a webhook endpoint secret.
**Scopes**: `webhooks:write`
func (*Webhooks) UpdateWebhookEndpoint ¶ added in v0.6.1
func (s *Webhooks) UpdateWebhookEndpoint(ctx context.Context, id string, webhookEndpointUpdate components.WebhookEndpointUpdate, opts ...operations.Option) (*operations.WebhooksUpdateWebhookEndpointResponse, error)
UpdateWebhookEndpoint - Update Webhook Endpoint Update a webhook endpoint.
**Scopes**: `webhooks:write`
Source Files
¶
- benefitgrants.go
- benefits.go
- checkoutlinks.go
- checkouts.go
- clients.go
- customermeters.go
- customerportal.go
- customers.go
- customersession.go
- customersessions.go
- customfields.go
- discounts.go
- downloadables.go
- events.go
- files.go
- licensekeys.go
- meters.go
- metrics.go
- oauth2.go
- orders.go
- organizations.go
- payments.go
- polar.go
- polarbenefitgrants.go
- polarcustomermeters.go
- polarcustomers.go
- polarlicensekeys.go
- polarorders.go
- polarorganizations.go
- polarsubscriptions.go
- products.go
- refunds.go
- seats.go
- subscriptions.go
- webhooks.go