Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DeleteReccurringPayment ¶
type DeleteReccurringPayment struct {
Status string `json:"status"`
}
DeleteReccurringPayment handle status when deleting recurring payment
type ListOption ¶
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
func New(ru *RecurringPaymentArgs) (*RecurringPayment, error)
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
Click to show internal directories.
Click to hide internal directories.