withdraw

package
v1.1.71 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHashedPin = errors.New("error hashing pin")
View Source
var ErrSaldoKosong = errors.New("saldo kosong")

Functions

func RunWithdraw

func RunWithdraw(payload []*tokopedia_lib.DriverAccount) (chan *WithdrawReport, error)

Types

type WDStatus

type WDStatus string
const (
	SUCCESS WDStatus = "SUKSES"
	FAILDED WDStatus = "GAGAL"
)

type Withdraw

type Withdraw struct {
	Api *api.TokopediaApi
}

func NewWithdraw

func NewWithdraw(api *api.TokopediaApi) *Withdraw

func (*Withdraw) GetGenerateKey

func (w *Withdraw) GetGenerateKey(phone string) (*api.WindrawnGenerateKeyResp, error)

func (*Withdraw) GetHashedPIN added in v1.1.69

func (w *Withdraw) GetHashedPIN(ctx context.Context, pin string, key string) (string, error)

func (*Withdraw) Run

func (w *Withdraw) Run(dCtx *tokopedia_lib.DriverContext, pin string, report *WithdrawReport) error

func (*Withdraw) SetupWindowProperty

func (wd *Withdraw) SetupWindowProperty(ctx context.Context)

func (*Withdraw) StartWithdraw

func (w *Withdraw) StartWithdraw(phone, pinHashed, h, amount string) error

type WithdrawReport

type WithdrawReport struct {
	Email      string `csv:"email"`
	ShopName   string `csv:"shop_name"`
	Keterangan string `csv:"keterangan"`
	Invoice    string `csv:"invoice"`
	Jumlah     string `csv:"jumlah"`
	SisaSaldo  string `csv:"sisa_saldo"`
}

func GetUnwithdrawTransaction

func GetUnwithdrawTransaction(tApi *api.TokopediaApi) ([]*WithdrawReport, error)

Jump to

Keyboard shortcuts

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