mitrareptir

package
v0.0.0-...-7b6bee0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package mitrareptir provides request API to mitra reptir.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuyData

type BuyData struct {
	Type string `json:"type"`
	Code string `json:"code"`
	Dest string `json:"dest"`
	Ref  string `json:"ref"`
}

BuyData to buy.

type Config

type Config struct {
	BaseURL string
	APIKey  string
}

Config mitra reptir.

func New

func New(apiKey string) *Config

New create config for mitra reptir.

func (*Config) BuyProduct

func (c *Config) BuyProduct(d *BuyData) (*response.BuyProduct, error)

BuyProduct detail of single product.

func (*Config) GetAccount

func (c *Config) GetAccount() (*response.Account, error)

GetAccount of current logged in user.

func (*Config) GetProduct

func (c *Config) GetProduct(code string) (*response.Product, error)

GetProduct detail of single product.

func (*Config) GetProducts

func (c *Config) GetProducts() (*response.Products, error)

GetProducts of list products

Jump to

Keyboard shortcuts

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