page

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultPageService

type DefaultPageService struct {
	*client.Client
}

DefaultPageService handles operations related to the page For more details see https://developers.paystack.co/v1.0/reference#create-page

func (*DefaultPageService) Create

func (s *DefaultPageService) Create(page *Page) (*Page, error)

Create creates a new page For more details see https://developers.paystack.co/v1.0/reference#create-page

func (*DefaultPageService) Get

func (s *DefaultPageService) Get(id int) (*Page, error)

Get returns the details of a page. For more details see https://developers.paystack.co/v1.0/reference#fetch-page

func (*DefaultPageService) List

func (s *DefaultPageService) List() (*List, error)

List returns a list of pages. For more details see https://developers.paystack.co/v1.0/reference#list-pages

func (*DefaultPageService) ListN

func (s *DefaultPageService) ListN(count, offset int) (*List, error)

ListN returns a list of pages For more details see https://developers.paystack.co/v1.0/reference#list-pages

func (*DefaultPageService) Update

func (s *DefaultPageService) Update(page *Page) (*Page, error)

Update updates a page's properties. For more details see https://developers.paystack.co/v1.0/reference#update-page

type List

type List struct {
	Meta   response.ListMeta
	Values []Page `json:"data,omitempty"`
}

List is a list object for pages.

type Page

type Page 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"`
	Slug         string              `json:"slug,omitempty"`
	Description  string              `json:"description,omitempty"`
	Amount       float32             `json:"amount,omitempty"`
	Currency     string              `json:"currency,omitempty"`
	Active       bool                `json:"active,omitempty"`
	RedirectURL  string              `json:"redirect_url,omitempty"`
	CustomFields []map[string]string `json:"custom_fields,omitempty"`
}

Page represents a Paystack page For more details see https://developers.paystack.co/v1.0/reference#create-page

type Service

type Service interface {
	Create(page *Page) (*Page, error)
	Update(page *Page) (*Page, error)
	Get(id int) (*Page, error)
	List() (*List, error)
	ListN(count, offset int) (*List, error)
}

Jump to

Keyboard shortcuts

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