Documentation
¶
Index ¶
- type DefaultPlanService
- func (s *DefaultPlanService) Create(ctx context.Context, plan *Plan) (*Plan, error)
- func (s *DefaultPlanService) Get(ctx context.Context, id int) (*Plan, error)
- func (s *DefaultPlanService) List(ctx context.Context) (*List, error)
- func (s *DefaultPlanService) ListN(ctx context.Context, count, offset int) (*List, error)
- func (s *DefaultPlanService) Update(ctx context.Context, plan *Plan) (response.Response, error)
- type List
- type Plan
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultPlanService ¶
DefaultPlanService handles operations related to the plan For more details see https://developers.paystack.co/v1.0/reference#create-plan
func (*DefaultPlanService) Create ¶
Create creates a new plan For more details see https://developers.paystack.co/v1.0/reference#create-plan
func (*DefaultPlanService) Get ¶
Get returns the details of a plan. For more details see https://developers.paystack.co/v1.0/reference#fetch-plan
func (*DefaultPlanService) List ¶
func (s *DefaultPlanService) List(ctx context.Context) (*List, error)
List returns a list of plans. For more details see https://developers.paystack.co/v1.0/reference#list-plans
func (*DefaultPlanService) ListN ¶
ListN returns a list of plans For more details see https://developers.paystack.co/v1.0/reference#list-plans
func (*DefaultPlanService) Update ¶
Update updates a plan's properties. For more details see https://developers.paystack.co/v1.0/reference#update-plan
type Plan ¶
type Plan struct {
ID int `json:"id,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
Domain string `json:"domain,omitempty"`
Integration int `json:"integration,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
PlanCode string `json:"plan_code,omitempty"`
Amount float32 `json:"amount,omitempty"`
Interval string `json:"interval,omitempty"`
SendInvoices bool `json:"send_invoices,omitempty"`
SendSMS bool `json:"send_sms,omitempty"`
Currency string `json:"currency,omitempty"`
InvoiceLimit float32 `json:"invoice_limit,omitempty"`
HostedPage string `json:"hosted_page,omitempty"`
HostedPageURL string `json:"hosted_page_url,omitempty"`
HostedPageSummary string `json:"hosted_page_summary,omitempty"`
}
Plan represents a For more details see https://developers.paystack.co/v1.0/reference#create-plan