Version: v0.0.3 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2020 License: BSD-2-Clause Imports: 5 Imported by: 0



Package user provides APIs related to users.



This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {

Client performs API operations.

func (Client) List

func (c Client) List() (Iter, error)

List lists all users.

func (Client) ListPlan

func (c Client) ListPlan(id uint64) (Iter, error)

ListPlan lists all users of the given subscription.

func (Client) ListSubscription

func (c Client) ListSubscription(id uint64) (Iter, error)

ListSubscription lists all users of the given subscription.

type Iter

type Iter struct {
	// contains filtered or unexported fields

Iter provides a mechanism for lazily decoding and iterating over a list.

func (Iter) Decode

func (c Iter) Decode() (*User, error)

Decode returns the next user.

func (Iter) Next

func (c Iter) Next() bool

Next returns true if there is more data to decode.

type Payment

type Payment struct {
	Amount   float64         `json:"amount"`
	Currency paddle.Currency `json:"currency"`
	Date     paddle.Time     `json:"date"`

Payment represents a past or future payment.

type User

type User struct {
	ID               uint64      `json:"user_id"`
	Subscription     uint64      `json:"subscription_id"`
	Plan             uint64      `json:"plan_id"`
	Email            string      `json:"user_email"`
	MarketingConsent bool        `json:"marketing_consent"`
	UpdateURL        string      `json:"update_url"`
	CancelURL        string      `json:"cancel_url"`
	State            string      `json:"active"`
	SignupDate       paddle.Time `json:"signup_date"`
	LastPayment      Payment     `json:"last_payment"`
	NextPayment      Payment     `json:"last_payment"`

User represents a single user on a subscription.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL