recurring_payments

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(recurringPaymentID string) (*string, error)

Delete remove a recurring payment via it's ID JWT is required for this request

Types

type DeleteReccurringPayment

type DeleteReccurringPayment struct {
	Status string `json:"status"`
}

DeleteReccurringPayment handle status when deleting recurring payment

type ListOption

type ListOption struct {
	Limit              int
	Offset             int
	IsActive           *bool
	Status             *string
	SubscriptionPlanID *int64
}

type RecurringPayment

type RecurringPayment struct {
	ID                 string     `json:"id"`
	SubscriptionPlanID string     `json:"subscription_plan_id"`
	IsActive           bool       `json:"is_active"`
	Status             string     `json:"status"`
	ExpireDate         string     `json:"expire_date"`
	Subscriber         Subscriber `json:"subscriber"`
	CreatedAt          time.Time  `json:"created_at"`
	UpdatedAt          time.Time  `json:"updated_at"`
}

RecurringPayment handle status of a specific recurring payment

func Get

func Get(recurringPaymentID string) (*RecurringPayment, error)

Get return a single reccuring payment via it's ID

func List

func List(o *ListOption) ([]*RecurringPayment, error)

List returns a list of all recurring payments, depending on the supplied options (which can be nil)

func New added in v1.0.1

New will create new recurring payment from custody user account This require an existing user account (created using custody.Create method) JWT is required for this request

type RecurringPaymentArgs added in v1.0.1

type RecurringPaymentArgs struct {
	SubscriptionPlanID int64 `json:"subscription_plan_id"`
	SubPartnerID       int64 `json:"sub_partner_id"`
}

ReccuringPaymentArgs handle args to create a recurring payment for a specific custody user account

type Subscriber

type Subscriber struct {
	Email        string `json:"email,omitempty"`
	SubPartnerID string `json:"sub_partner_id,omitempty"`
}

Subscriber handle a subscriber to a specific plan

Jump to

Keyboard shortcuts

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