Crate polar_rs

Crate polar_rs 

Source
Expand description

§Polar client library for Rust

crates.io docs.rs

[!WARNING] THIS LIBRARY IS IN A VERY EARLY STAGE, PLEASE BE CAREFUL.

§Features

§Checkouts

DescriptionStatus
Create checkout session
Get checkout session
List checkout sessions
Update checkout session
Get checkout session from client
Update checkout session from client
Confirm checkout session from client

§Subscriptions

DescriptionStatus
Get subscription
List subscriptions
Update subscription
Revoke subscription

§Products

DescriptionStatus
Get product
List products
Create product
Update product
Update product benefits

§Events

DescriptionStatus
Ingest events
Get event
List events

§Meters

DescriptionStatus
Create meter
Get meter
List meters
Update meter
Get meter quantities

§Getting started

  • Installation
cargo add polar-rs
  • Example usage
use polar_rs::Polar;

let polar = Polar::new("https://sandbox-api.polar.sh/v1/", "<YOUR ACCESS TOKEN>");

Structs§

AttachedCustomField
AttachedCustomFieldParams
Benefit
BillingAddressFields
CheckoutProduct
CheckoutSession
CheckoutSessionParams
CustomField
CustomFieldOption
CustomFieldProperties
Customer
CustomerBillingAddress
Discount
Event
EventParams
ListCheckoutSessionsParams
ListMetersParams
ListProductsParams
ListSubscriptionsParams
Media
Meter
MeterAggregation
MeterFilter
MeterFilterClause
MeterParams
MeterQuantities
MeterQuantitiesParams
MeterQuantity
Page
Pagination
Polar
Price
PriceMeter
PriceParams
Product
ProductParams
Subscription
SubscriptionMeter
SubscriptionParams
UpdateMeterParams
UpdatePriceParams
UpdateProductParams

Enums§

AmountType
BenefitType
BillingAddressField
CheckoutSessionStatus
CheckoutSessionsSorting
CustomFieldType
CustomerCancellationReason
DiscountDuration
DiscountType
Interval
MeterAggregationFunc
MeterFilterConjunction
MeterFilterOperator
MetersSorting
PaymentProcessor
PolarError
PriceType
ProductsSorting
ProrationBehavior
RecurringInterval
SubscriptionStatus
SubscriptionsSorting

Type Aliases§

CustomerBillingAddressParams
PolarResult