package
6.5.1+incompatible
Repository: https://github.com/ftchinese/subscription-api.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
NewAccount concatenates data retrieve from multiple source into a single Account.
No description provided by the author
No description provided by the author
NewCheckoutIntentFtc determines what a user can do when trying to pay via ali/wx, depending on the current membership.
NewCheckoutIntentStripe deduces what kind of action when user is trying is subscribed via Stripe.
NewMembership attaches membership directly to a user, without any means of payment.
No description provided by the author
NewMockMemberBuilder creates a new membership builder.
No description provided by the author
Deprecated.
NewPaywallDoc creates a new banner for paywall.
NewPaywallProducts zips price body with its prices.
NewPaywallProducts zips price body with its prices.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
When a stripe subscription already exists.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Same as new, with valid remaining membership period.
No description provided by the author
Switching subscription billing cycle, e.g., from month to year.
Switching subscription tier, e.g., from standard to premium.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StmtDeactivateSiblingProducts deactivate sibling products of the specified product.
StmtDeleteMember old membership when linking to IAP.
StmtDropMemberFtcID keeps membership to wechat.
StmtDropMemberUnionID keeps membership to ftc account.
No description provided by the author
StmtListActivePrices finds all prices set to active on paywall.
StmtListPaywallPrice retrieves all active recurring prices under products, which are put on paywall.
StmtListProductPrices retrieves all prices under a product, whether they are active or not, as long as not archived.
No description provided by the author
No description provided by the author
StmtLockMember builds SQL to retrieve membership in a transaction.
No description provided by the author
StmtPaywallProducts retrieves products put on paywall.
No description provided by the author
StmtPutProductOnPaywallLegacy could only put live mode product on paywall.
No description provided by the author
StmtRetrieveProduct refer to paywall_product table.
No description provided by the author
StmtSelectPaywallPrice retrieves a row from plan table, regardless of archived or not.
StmtSetPriceOffers updates price's discount list column.
StmtSetProductIntro sets the introductory column of product.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
The following lists errors contained in CheckoutIntent for stripe.
The following lists errors contained in CheckoutIntent for stripe.
The following lists errors contained in CheckoutIntent for stripe.
Errors in CheckoutIntent for one-time purchase.
Errors in CheckoutIntent for one-time purchase.
Errors in CheckoutIntent for one-time purchase.
The following lists errors contained in CheckoutIntent for stripe.
The following lists errors contained in CheckoutIntent for stripe.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
AddOnClaimed contains the data that should be used to perform add-on transfer.
AddOnInvoiceCreated is the result of manually adding an invoice.
No description provided by the author
No description provided by the author
CartItemFtc contains a price user is trying to purchase and optional discount of this price applicable to this user.
CartItemStripe contains the items to be purchased using stripe.
No description provided by the author
Membership contains a user's membership details This is actually called subscription by Stripe.
MembershipColumn is used to save Membership as a JSON column in MySQL.
MembershipVersioned stores a specific version of membership.
No description provided by the author
No description provided by the author
PaywallDoc contains the banner for both daily user promotion.
PaywallPrice contains a price's original price and promotion.
PaywallProduct describes the data used to present to user on paywall.
Product defines a price without plans.
No description provided by the author
ProductParams defines the request data to create a new product.
ShoppingCart contains the essential information of a purchase attempt: - who want to purchase? - what item it is purchasing? - what is its current subscription status? FtcItem and StripeItem should be mutually exclusive.
StripePaywallItem combines stripe price and a list of applicable coupons.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author