api

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: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientApi *http.Client = &http.Client{
	Transport: &http.Transport{
		MaxIdleConnsPerHost: 5,
	},
	Timeout: 30 * time.Second,
}
View Source
var ErrIsNotAuthorized = errors.New("shop is not authorized")
View Source
var ErrKycInfoNotFound = errors.New("kyc info not found")
View Source
var ErrNoShopid = errors.New("no shopid")
View Source
var KycRx = regexp.MustCompile(`{"__typename":"KycProjectInfoResult",(.*)}]}`)
View Source
var YYYYMMDD = "2006-01-02"

Functions

func CreateFormFile

func CreateFormFile(w *multipart.Writer, name string, filename string) (io.Writer, error)

func EncryptPIN added in v1.1.67

func EncryptPIN(msg string, key string) (string, error)

TODO: This is still wrong.

The result if used in OTPValidate is wrong.

func GetPublicKey added in v1.1.67

func GetPublicKey(pub string) (*rsa.PublicKey, error)

func RandomAccountsAuthorization added in v1.1.67

func RandomAccountsAuthorization(len int) string

Types

type AccountBalance added in v1.0.2

type AccountBalance struct {
	BalanceStr string `json:"balanceStr"`
	Typename   string `json:"__typename"`
}

type AccountCta added in v1.0.2

type AccountCta struct {
	Text     string `json:"text"`
	URL      string `json:"url"`
	Typename string `json:"__typename"`
}

type AccountData added in v1.0.2

type AccountData struct {
	User                   *AccountUser                   `json:"user"`
	UserShopInfo           *AccountUserShopInfo           `json:"userShopInfo"`
	Wallet                 *AccountWallet                 `json:"wallet"`
	WalletPending          *AccountWalletPending          `json:"walletPending"`
	Balance                *AccountBalance                `json:"balance"`
	Tokopoints             *AccountTokopoints             `json:"tokopoints"`
	TokopointsShortcutList *AccountTokopointsShortcutList `json:"tokopointsShortcutList"`
	TokopointsSumCoupon    *AccountTokopointsSumCoupon    `json:"tokopointsSumCoupon"`
}

type AccountInfo added in v1.0.2

type AccountInfo struct {
	ShopID     string `json:"shopId"`
	ShopName   string `json:"shopName"`
	ShopDomain string `json:"shopDomain"`
	ShopAvatar string `json:"shopAvatar"`
	IsOfficial string `json:"isOfficial"`
	Typename   string `json:"__typename"`
}

type AccountOwner added in v1.0.2

type AccountOwner struct {
	IsPowerMerchant bool   `json:"isPowerMerchant"`
	PmStatus        string `json:"pmStatus"`
	Typename        string `json:"__typename"`
}

type AccountRes added in v1.0.2

type AccountRes struct {
	Data *AccountData `json:"data"`
}

type AccountShortcutGroupList added in v1.0.2

type AccountShortcutGroupList struct {
	ShortcutList []*AccountShortcutList `json:"shortcutList"`
	Typename     string                 `json:"__typename"`
}

type AccountShortcutList added in v1.0.2

type AccountShortcutList struct {
	ID          int         `json:"id"`
	Cta         *AccountCta `json:"cta"`
	Description string      `json:"description"`
	Typename    string      `json:"__typename"`
}

type AccountTier added in v1.0.2

type AccountTier struct {
	NameDesc    string `json:"nameDesc"`
	EggImageURL string `json:"eggImageURL"`
	Typename    string `json:"__typename"`
}

type AccountTokopoints added in v1.0.2

type AccountTokopoints struct {
	Status   *Status `json:"status"`
	Typename string  `json:"__typename"`
}

type AccountTokopointsShortcutList added in v1.0.2

type AccountTokopointsShortcutList struct {
	ShortcutGroupList []*AccountShortcutGroupList `json:"shortcutGroupList"`
	Typename          string                      `json:"__typename"`
}

type AccountTokopointsSumCoupon added in v1.0.2

type AccountTokopointsSumCoupon struct {
	SumCouponStr string `json:"sumCouponStr"`
	Typename     string `json:"__typename"`
}

type AccountUser added in v1.0.2

type AccountUser struct {
	ID             string `json:"id"`
	IsLoggedIn     bool   `json:"isLoggedIn"`
	Name           string `json:"name"`
	ProfilePicture string `json:"profilePicture"`
	Completion     int    `json:"completion"`
	PhoneVerified  bool   `json:"phoneVerified"`
	Typename       string `json:"__typename"`
}

type AccountUserShopInfo added in v1.0.2

type AccountUserShopInfo struct {
	Info     *AccountInfo  `json:"info"`
	Owner    *AccountOwner `json:"owner"`
	Typename string        `json:"__typename"`
}

type AccountWallet added in v1.0.2

type AccountWallet struct {
	OvoCash   string `json:"ovoCash"`
	OvoPoints string `json:"ovoPoints"`
	Linked    bool   `json:"linked"`
	Typename  string `json:"__typename"`
}

type AccountWalletPending added in v1.0.2

type AccountWalletPending struct {
	PendingBalance string `json:"pendingBalance"`
	Typename       string `json:"__typename"`
}

type AddShopShowcase added in v1.0.1

type AddShopShowcase struct {
	Success   bool   `json:"success"`
	Message   string `json:"message"`
	CreatedID string `json:"createdId"`
	Typename  string `json:"__typename"`
}

type AddShopShowcaseData added in v1.0.1

type AddShopShowcaseData struct {
	AddShopShowcase AddShopShowcase `json:"addShopShowcase"`
}

type AddShopShowcaseInput added in v1.0.1

type AddShopShowcaseInput struct {
	Name string `json:"name"`
}

type AddShopShowcaseRes added in v1.0.1

type AddShopShowcaseRes struct {
	Data *AddShopShowcaseData `json:"data"`
}

type AddShopShowcaseVar added in v1.0.1

type AddShopShowcaseVar struct {
	Input *AddShopShowcaseInput `json:"input"`
}

type AuthenticatorSelection added in v1.1.67

type AuthenticatorSelection struct {
	AuthenticatorAttachment string `json:"authenticatorAttachment"`
	RequireResidentKey      bool   `json:"requireResidentKey"`
	UserVerification        string `json:"userVerification"`
	Typename                string `json:"__typename"`
}

type Balance added in v1.1.67

type Balance struct {
	SellerAll    int    `json:"seller_all"`
	SellerUsable int    `json:"seller_usable"`
	BuyerUsable  int    `json:"buyer_usable"`
	Typename     string `json:"__typename"`
}

type BankAccount added in v1.1.65

type BankAccount struct {
	AccID        int    `json:"accID"`
	AccName      string `json:"accName"`
	AccNumber    string `json:"accNumber"`
	BankID       int    `json:"bankID"`
	BankName     string `json:"bankName"`
	BankImageURL string `json:"bankImageUrl"`
	Fsp          int    `json:"fsp"`
	StatusFraud  int    `json:"statusFraud"`
	CopyWriting  string `json:"copyWriting"`
	Typename     string `json:"__typename"`
}

type BankAccountUserInfo added in v1.1.65

type BankAccountUserInfo struct {
	Message    string `json:"message"`
	IsVerified bool   `json:"isVerified"`
	Typename   string `json:"__typename"`
}

type BankListQueryResp added in v1.1.67

type BankListQueryResp struct {
	Data struct {
		GetBankListWDV2 *GetBankListWDV2 `json:"GetBankListWDV2"`
	} `json:"data"`
}

type BankListQueryVariable added in v1.1.67

type BankListQueryVariable struct {
	IsAdmin bool `json:"isAdmin"`
}

type BiometricBeginRegister added in v1.1.67

type BiometricBeginRegister struct {
	OTPBiometricBeginRegister *OTPBiometricBeginRegister `json:"OTPBiometricBeginRegister"`
}

type BiometricBeginRegisterResp added in v1.1.67

type BiometricBeginRegisterResp struct {
	Data *BiometricBeginRegister `json:"data"`
}

type BiometricPublicKey added in v1.1.67

type BiometricPublicKey struct {
	Challenge              string                  `json:"challenge"`
	Rp                     *PublicKeyRp            `json:"rp"`
	User                   *PublicKeyUser          `json:"user"`
	PubKeyCredParams       []*PublicKeyParam       `json:"pubKeyCredParams"`
	AuthenticatorSelection *AuthenticatorSelection `json:"authenticatorSelection"`
	Timeout                int                     `json:"timeout"`
	Typename               string                  `json:"__typename"`
}

type Category added in v1.0.1

type Category struct {
	ID       int         `json:"id"`
	Name     string      `json:"name"`
	URL      string      `json:"url"`
	Children []*Category `json:"children"`
	Typename string      `json:"__typename"`
}

type CategoryAllListLite added in v1.0.1

type CategoryAllListLite struct {
	Categories []*Category `json:"categories"`
	Typename   string      `json:"__typename"`
}

type CategoryAllListLiteData added in v1.0.1

type CategoryAllListLiteData struct {
	CategoryAllListLite *CategoryAllListLite `json:"categoryAllListLite"`
}

type CategoryAllListLiteRes added in v1.0.1

type CategoryAllListLiteRes struct {
	Data CategoryAllListLiteData `json:"data"`
}

type CloseShopSchedule added in v1.1.70

type CloseShopSchedule struct {
	Success  bool   `json:"success"`
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

type CloseShopScheduleData added in v1.1.70

type CloseShopScheduleData struct {
	CloseShopSchedule *CloseShopSchedule `json:"closeShopSchedule"`
}

type CloseShopScheduleInput added in v1.1.70

type CloseShopScheduleInput struct {
	Action     int    `json:"action"`
	CloseNote  string `json:"closeNote"`
	CloseStart int    `json:"closeStart,string,omitempty"`
	CloseEnd   int    `json:"closeEnd,string,omitempty"`
}

type CloseShopScheduleRes added in v1.1.70

type CloseShopScheduleRes struct {
	Data *CloseShopScheduleData `json:"data"`
}

type CloseShopScheduleVar added in v1.1.70

type CloseShopScheduleVar struct {
	Input *CloseShopScheduleInput `json:"input"`
}

type CustomParse added in v1.1.66

type CustomParse func(body []byte) error

type Data added in v1.0.1

type Data struct {
	DeleteShopShowcase *DeleteShopShowcase `json:"deleteShopShowcase"`
}

type DeleteShopShowcase added in v1.0.1

type DeleteShopShowcase struct {
	Success  bool   `json:"success"`
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

type DeleteShopShowcaseInput added in v1.0.1

type DeleteShopShowcaseInput struct {
	ID string `json:"id"`
}

type DeleteShopShowcaseRes added in v1.0.1

type DeleteShopShowcaseRes struct {
	Data *Data `json:"data"`
}

type DeleteShopShowcaseVar added in v1.0.1

type DeleteShopShowcaseVar struct {
	Input *DeleteShopShowcaseInput `json:"input"`
}

type DepositContent added in v1.1.67

type DepositContent struct {
	DepositID              int64  `json:"deposit_id"`
	TypeDescription        string `json:"type_description"`
	Type                   int    `json:"type"`
	Class                  string `json:"class"`
	Amount                 int    `json:"amount"`
	AmountFmt              string `json:"amount_fmt"`
	Note                   string `json:"note"`
	CreateTime             string `json:"create_time"`
	WithdrawalDate         string `json:"withdrawal_date"`
	WithdrawalStatus       int    `json:"withdrawal_status"`
	Saldo                  int    `json:"saldo"`
	SaldoFmt               string `json:"saldo_fmt"`
	Image                  string `json:"image"`
	WithdrawalStatusString string `json:"withdrawal_status_string"`
	WithdrawalStatusColor  int    `json:"withdrawal_status_color"`
	WithdrawalID           int    `json:"withdrawal_id"`
	HaveDetail             bool   `json:"have_detail"`
	DetailType             int    `json:"detail_type"`
	Typename               string `json:"__typename"`
}

type DepositHistoryVariable added in v1.1.67

type DepositHistoryVariable struct {
	Page      int    `json:"page"`
	MaxRows   int    `json:"maxRows"`
	DateTo    string `json:"dateTo"`
	DateFrom  string `json:"dateFrom"`
	SaldoType int    `json:"saldoType"`
	IsAdmin   bool   `json:"isAdmin"`
}

func NewDepositHistoryVariable added in v1.1.67

func NewDepositHistoryVariable() *DepositHistoryVariable

type Error added in v1.0.1

type Error struct {
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

type GenerateKey added in v1.1.67

type GenerateKey struct {
	Key             string `json:"key"`
	ServerTimestamp int    `json:"server_timestamp"`
	H               string `json:"h"`
	Typename        string `json:"__typename"`
}

func (*GenerateKey) GetRsaPublicKey added in v1.1.67

func (g *GenerateKey) GetRsaPublicKey() (string, error)

type GetBankAccount added in v1.1.65

type GetBankAccount struct {
	Status   string                  `json:"status"`
	Header   *model.Header           `json:"header"`
	Data     *GetBankAccountDataInfo `json:"data"`
	Typename string                  `json:"__typename"`
}

type GetBankAccountData added in v1.1.65

type GetBankAccountData struct {
	GetBankAccount *GetBankAccount `json:"GetBankAccount"`
}

type GetBankAccountDataInfo added in v1.1.65

type GetBankAccountDataInfo struct {
	BankAccounts []*BankAccount      `json:"bankAccounts"`
	UserInfo     BankAccountUserInfo `json:"userInfo"`
	Typename     string              `json:"__typename"`
}

type GetBankAccountRes added in v1.1.65

type GetBankAccountRes struct {
	Data *GetBankAccountData `json:"data"`
}

type GetBankListWDV2 added in v1.1.67

type GetBankListWDV2 struct {
	Status    int                 `json:"status"`
	Message   string              `json:"message"`
	Data      GetBankListWDV2Data `json:"data"`
	GopayData *GopayData          `json:"gopay_data"`
	Typename  string              `json:"__typename"`
}

type GetBankListWDV2Data added in v1.1.67

type GetBankListWDV2Data []*GetBankWDV2

func (GetBankListWDV2Data) GetDefaultBank added in v1.1.67

func (b GetBankListWDV2Data) GetDefaultBank() *GetBankWDV2

type GetBankWDV2 added in v1.1.67

type GetBankWDV2 struct {
	AccountNo          string         `json:"accountNo"`
	AccountName        string         `json:"accountName"`
	BankID             int            `json:"bankID"`
	BankName           string         `json:"bankName"`
	BankBranch         int            `json:"bankBranch"`
	BankAccountID      int            `json:"bankAccountID"`
	BankImageURL       string         `json:"bankImageUrl"`
	IsDefaultBank      int            `json:"isDefaultBank"`
	IsVerifiedAccount  int            `json:"isVerifiedAccount"`
	IsFraud            bool           `json:"is_fraud"`
	MinAmount          int            `json:"minAmount"`
	MaxAmount          int            `json:"maxAmount"`
	AdminFee           int            `json:"adminFee"`
	Status             int            `json:"status"`
	HaveRpProgram      bool           `json:"have_rp_program"`
	HaveSpecialOffer   bool           `json:"have_special_offer"`
	DefaultBankAccount bool           `json:"default_bank_account"`
	WarningMessage     string         `json:"warning_message"`
	WarningColor       int            `json:"warning_color"`
	Notes              string         `json:"notes"`
	WalletAppData      *WalletAppData `json:"wallet_app_data"`
	Typename           string         `json:"__typename"`
}

type GetShopScoreLevelRes

type GetShopScoreLevelRes struct {
	Data *model.ShopScoreData `json:"data"`
}

type GetShopScoreLevelVar

type GetShopScoreLevelVar struct {
	ShopIDStr       string `json:"shopIDStr"`
	Source          string `json:"source"`
	CalculateScore  bool   `json:"calculateScore"`
	GetNextMinValue bool   `json:"getNextMinValue"`
	IncludeRawData  bool   `json:"includeRawData"`
}

type GoldGetPMOSStatusRes

type GoldGetPMOSStatusRes struct {
	Data *model.GoldGetPMOSStatusData `json:"data"`
}

type GoldGetPMOSStatusVar

type GoldGetPMOSStatusVar struct {
	ShopID int64 `json:"shopId"`
}

type GopayData added in v1.1.67

type GopayData struct {
	Limit            string `json:"limit"`
	LimitCopyWriting string `json:"limit_copy_writing"`
	ImageURL         string `json:"image_url"`
	WidgetNote       string `json:"widget_note"`
	BottomsheetData  struct {
		Title       string `json:"title"`
		Description string `json:"description"`
		Balance     string `json:"balance"`
		Typename    string `json:"__typename"`
	} `json:"bottomsheet_data"`
	Typename string `json:"__typename"`
}

type GraphqlPayload

type GraphqlPayload struct {
	OperationName string      `json:"operationName"`
	Variables     interface{} `json:"variables"`
	Query         string      `json:"query"`
}
type Header struct {
	ProcessTime float64  `json:"processTime,omitempty"`
	Messages    []string `json:"messages"`
	Reason      string   `json:"reason"`
	ErrorCode   string   `json:"errorCode"`
	Typename    string   `json:"__typename"`
}

func (*Header) Error

func (head *Header) Error() string

type ImageChatRes

type ImageChatRes struct {
	Data struct {
		URLImage string `json:"url_image"`
	} `json:"data"`
	ServerProcessTime float64 `json:"server_process_time"`
	Server            string  `json:"server"`
	Status            string  `json:"status"`
	Success           int     `json:"success"`
}

type Info added in v1.1.46

type Info struct {
	ShopID         int64  `json:"shop_id,string"`
	ShopDomain     string `json:"shop_domain"`
	ShopName       string `json:"shop_name"`
	ShopAvatar     string `json:"shop_avatar"`
	ShopIsOfficial string `json:"shop_is_official"`
	ShopScore      int    `json:"shop_score"`
	ShopLocation   string `json:"shop_location"`
	Typename       string `json:"__typename"`
}

func (*Info) UnmarshalJSON added in v1.1.46

func (info *Info) UnmarshalJSON(data []byte) (err error)

type InfoKycRes added in v1.1.66

type InfoKycRes struct {
	Typename   string         `json:"__typename"`
	Status     int            `json:"Status"`
	StatusName string         `json:"StatusName"`
	Message    string         `json:"Message"`
	Reason     []string       `json:"Reason"`
	TypeList   []*InfoKycType `json:"TypeList"`
}

type InfoKycType added in v1.1.66

type InfoKycType struct {
	Typename   string `json:"__typename"`
	TypeID     int    `json:"TypeID"`
	Status     int    `json:"Status"`
	StatusName string `json:"StatusName"`
}

type IsAtuheticatedData

type IsAtuheticatedData struct {
	IsAuthenticated int           `json:"isAuthenticated"`
	UserShopInfo    *UserShopInfo `json:"userShopInfo"`
	User            struct {
		Email          string `json:"email"`
		ID             string `json:"id"`
		Name           string `json:"name"`
		FullName       string `json:"full_name"`
		ProfilePicture string `json:"profilePicture"`
		Typename       string `json:"__typename"`
	} `json:"user"`
}

type IsAuthenticatedRes

type IsAuthenticatedRes struct {
	Data IsAtuheticatedData `json:"data"`
}

type JoinPromptMessageResponse added in v1.1.67

type JoinPromptMessageResponse struct {
	Title      string `json:"title"`
	Desc       string `json:"desc"`
	ActionText string `json:"actionText"`
	ActionLink string `json:"actionLink"`
	IsSuccess  bool   `json:"isSuccess"`
	StatusCode int    `json:"statusCode"`
	Typename   string `json:"__typename"`
}

type MetaAccess added in v1.1.61

type MetaAccess struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Value    string `json:"value"`
	Typename string `json:"__typename"`
}

type MetaFilter added in v1.1.61

type MetaFilter struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Value    []any  `json:"value"`
	Typename string `json:"__typename"`
}

type MetaShopCategories added in v1.1.61

type MetaShopCategories struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Typename string `json:"__typename"`
}

type MetaSort added in v1.1.61

type MetaSort struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Value    string `json:"value"`
	Typename string `json:"__typename"`
}

type MetaTab added in v1.1.61

type MetaTab struct {
	ID       model.ProductStatus `json:"id"`
	Name     string              `json:"name"`
	Value    int                 `json:"value"`
	Typename string              `json:"__typename"`
}

type MetaTabs added in v1.1.61

type MetaTabs []MetaTab

func (MetaTabs) GetTab added in v1.1.61

func (tabs MetaTabs) GetTab(id model.ProductStatus) *MetaTab

type MidasGetAllDepositAmount added in v1.1.67

type MidasGetAllDepositAmount struct {
	HaveError       bool   `json:"have_error"`
	Message         string `json:"message"`
	BuyerAll        int    `json:"buyer_all"`
	BuyerAllFmt     string `json:"buyer_all_fmt"`
	BuyerHold       int    `json:"buyer_hold"`
	BuyerHoldFmt    string `json:"buyer_hold_fmt"`
	BuyerUsable     int    `json:"buyer_usable"`
	BuyerUsableFmt  string `json:"buyer_usable_fmt"`
	SellerAll       int    `json:"seller_all"`
	SellerAllFmt    string `json:"seller_all_fmt"`
	SellerHold      int    `json:"seller_hold"`
	SellerHoldFmt   string `json:"seller_hold_fmt"`
	SellerUsable    int    `json:"seller_usable"`
	SellerUsableFmt string `json:"seller_usable_fmt"`
	Typename        string `json:"__typename"`
}

type MidasGetDepositHistory added in v1.1.67

type MidasGetDepositHistory struct {
	HaveError     bool              `json:"have_error"`
	Status        int               `json:"status"`
	MessageStatus string            `json:"message_status"`
	HaveNextPage  bool              `json:"have_next_page"`
	Content       []*DepositContent `json:"content"`
	Typename      string            `json:"__typename"`
}

type MidasGetDepositHistoryData added in v1.1.67

type MidasGetDepositHistoryData struct {
	MidasGetDepositHistory *MidasGetDepositHistory `json:"MidasGetDepositHistory"`
}

type MidasGetDepositHistoryResp added in v1.1.67

type MidasGetDepositHistoryResp struct {
	Data *MidasGetDepositHistoryData `json:"data"`
}

func (*MidasGetDepositHistoryResp) GetContent added in v1.1.67

func (m *MidasGetDepositHistoryResp) GetContent() []*DepositContent

type ModelList added in v1.1.67

type ModelList struct {
	OtpListText          string `json:"otpListText"`
	ModeText             string `json:"modeText"`
	AfterOtpListText     string `json:"afterOtpListText"`
	AfterOtpListTextHTML string `json:"afterOtpListTextHtml"`
	OtpListImgURL        string `json:"otpListImgUrl"`
	Typename             string `json:"__typename"`
}

type NotificationCounterRes

type NotificationCounterRes struct {
	Data struct {
		Notifications struct {
			Resolution   int `json:"resolution"`
			ResolutionAs struct {
				Seller   int    `json:"seller"`
				Typename string `json:"__typename"`
			} `json:"resolutionAs"`
			NotifcenterTrxUnread struct {
				NotifUnreadSellerInt int    `json:"notif_unread_seller_int"`
				Typename             string `json:"__typename"`
			} `json:"notifcenter_trx_unread"`
			NotifcenterUnread struct {
				NotifUnreadSellerInt int    `json:"notif_unread_seller_int"`
				Typename             string `json:"__typename"`
			} `json:"notifcenter_unread"`
			SellerOrderStatus struct {
				NewOrder            int    `json:"newOrder"`
				ReadyToShip         int    `json:"readyToShip"`
				Shipped             int    `json:"shipped"`
				ArriveAtDestination int    `json:"arriveAtDestination"`
				Typename            string `json:"__typename"`
			} `json:"sellerOrderStatus"`
			Inbox struct {
				TalkSeller int    `json:"talk_seller"`
				Ticket     int    `json:"ticket"`
				Review     int    `json:"review"`
				Reputation int    `json:"reputation"`
				Typename   string `json:"__typename"`
			} `json:"inbox"`
			Chat struct {
				UnreadsSeller int    `json:"unreadsSeller"`
				Typename      string `json:"__typename"`
			} `json:"chat"`
			Typename string `json:"__typename"`
		} `json:"notifications"`
	} `json:"data"`
}

type NotificationCounterVar

type NotificationCounterVar struct {
	ShopID string `json:"shopId"`
}

type OTPBiometricBeginRegister added in v1.1.67

type OTPBiometricBeginRegister struct {
	IsSuccess    bool                `json:"isSuccess"`
	ErrorMessage string              `json:"errorMessage"`
	PublicKey    *BiometricPublicKey `json:"publicKey"`
	Typename     string              `json:"__typename"`
}

type OTPModeListQueryResp added in v1.1.67

type OTPModeListQueryResp struct {
	Data struct {
		OTPModeList *OtpModelList `json:"OTPModeList"`
	} `json:"data"`
}

type OTPModeListQueryVariable added in v1.1.67

type OTPModeListQueryVariable struct {
	OtpType   string `json:"otpType"`
	Msisdn    string `json:"msisdn"`
	Email     string `json:"email"`
	BankAccID string `json:"BankAccID"`
}

func NewOTPModelListQueryVariable added in v1.1.67

func NewOTPModelListQueryVariable(msisdn, bankAccId string) *OTPModeListQueryVariable

type OtpModelList added in v1.1.67

type OtpModelList struct {
	Success             bool         `json:"success"`
	Message             string       `json:"message"`
	AutoReadLite        bool         `json:"autoReadLite"`
	TickerTrouble       string       `json:"tickerTrouble"`
	EnableTicker        bool         `json:"enableTicker"`
	DefaultBehaviorMode int          `json:"defaultBehaviorMode"`
	ModeLists           []*ModelList `json:"modeLists"`
	OtpDigit            int          `json:"otpDigit"`
	Typename            string       `json:"__typename"`
}

type OtpRequest added in v1.1.67

type OtpRequest struct {
	Success            bool          `json:"success"`
	Message            string        `json:"message"`
	ErrorMessage       string        `json:"errorMessage"`
	SseSessionID       string        `json:"sse_session_id"`
	ListDeviceReceiver []interface{} `json:"list_device_receiver"`
	ErrorCode          string        `json:"error_code"`
	MessageTitle       string        `json:"message_title"`
	MessageSubTitle    string        `json:"message_sub_title"`
	MessageImgLink     string        `json:"message_img_link"`
	Typename           string        `json:"__typename"`
}

type OtpRequestResp added in v1.1.67

type OtpRequestResp struct {
	Data struct {
		OTPRequest *OtpRequest `json:"OTPRequest"`
	} `json:"data"`
}

type OtpRequestVariable added in v1.1.67

type OtpRequestVariable struct {
	Msisdn   string `json:"msisdn"`
	OtpType  string `json:"otpType"`
	Mode     string `json:"mode"`
	OtpDigit int    `json:"otpDigit"`
}

func NewOtpRequestPINVariable added in v1.1.67

func NewOtpRequestPINVariable(msisdn string) *OtpRequestVariable

type OtpValidate added in v1.1.67

type OtpValidate struct {
	Success       bool          `json:"success"`
	Message       string        `json:"message"`
	ErrorMessage  string        `json:"errorMessage"`
	ValidateToken string        `json:"validateToken"`
	CookieList    []interface{} `json:"cookieList"`
	Typename      string        `json:"__typename"`
}

type OtpValidateResp added in v1.1.67

type OtpValidateResp struct {
	Data struct {
		OTPValidate *OtpValidate `json:"OTPValidate"`
	} `json:"data"`
}

type OtpValidateVariable added in v1.1.67

type OtpValidateVariable struct {
	Msisdn     string `json:"msisdn"`
	BankAccID  string `json:"BankAccID"`
	UsePINHash bool   `json:"UsePINHash"`
	PIN        string `json:"PIN"`
	PINHash    string `json:"PINHash"`
	Code       string `json:"code"`
	OtpType    string `json:"otpType"`
	Mode       string `json:"mode"`
}

func NewOtpValidateVariable added in v1.1.67

func NewOtpValidateVariable(msisdn, bankAccountId, pin string, h string) *OtpValidateVariable

type PinV2CheckResp added in v1.1.67

type PinV2CheckResp struct {
	Data struct {
		PinV2Check struct {
			Uh           bool   `json:"uh"`
			ErrorMessage string `json:"error_message"`
			Typename     string `json:"__typename"`
		} `json:"pinV2Check"`
	} `json:"data"`
}

type PinV2CheckVariable added in v1.1.67

type PinV2CheckVariable struct {
	ID   string `json:"id"`
	Type string `json:"type"`
}

type Points added in v1.0.2

type Points struct {
	Reward   int    `json:"reward"`
	Typename string `json:"__typename"`
}

type ProductAddRuleData added in v1.1.36

type ProductAddRuleData struct {
	ProductAddRule struct {
		Header struct {
			Reason    string `json:"reason"`
			Messages  []any  `json:"messages"`
			ErrorCode string `json:"errorCode"`
			Typename  string `json:"__typename"`
		} `json:"header"`
		Data struct {
			Eligible struct {
				Value        bool     `json:"value"`
				TotalProduct int      `json:"totalProduct"`
				Limit        int      `json:"limit"`
				ActionItems  []string `json:"actionItems"`
				Typename     string   `json:"__typename"`
			} `json:"eligible"`
			Typename string `json:"__typename"`
		} `json:"data"`
		Typename string `json:"__typename"`
	} `json:"ProductAddRule"`
}

type ProductAddRuleRes added in v1.1.36

type ProductAddRuleRes struct {
	Data ProductAddRuleData `json:"data"`
}

type ProductDetail added in v1.0.1

type ProductDetail struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Typename string `json:"__typename"`
}

type ProductListMeta added in v1.1.61

type ProductListMeta struct {
	Header   Header              `json:"header"`
	Data     ProductListMetaData `json:"data"`
	Typename string              `json:"__typename"`
}

type ProductListMetaData added in v1.1.61

type ProductListMetaData struct {
	Tab            MetaTabs             `json:"tab"`
	Filter         []MetaFilter         `json:"filter"`
	Sort           []MetaSort           `json:"sort"`
	ShopCategories []MetaShopCategories `json:"shopCategories"`
	Access         []MetaAccess         `json:"access"`
	Typename       string               `json:"__typename"`
}

type ProductListMetaRes

type ProductListMetaRes struct {
	Data struct {
		ProductListMeta ProductListMeta `json:"ProductListMeta"`
	} `json:"data"`
}

type ProductListMetaVar

type ProductListMetaVar struct {
	ShopID      string   `json:"shopID"`
	ExtraInfo   []string `json:"extraInfo"`
	WareHouseID string   `json:"warehouseID"`
}

type PublicKeyParam added in v1.1.67

type PublicKeyParam struct {
	Type     string `json:"type"`
	Alg      int    `json:"alg"`
	Typename string `json:"__typename"`
}

type PublicKeyRp added in v1.1.67

type PublicKeyRp struct {
	Name     string `json:"name"`
	Icon     string `json:"icon"`
	ID       string `json:"id"`
	Typename string `json:"__typename"`
}

type PublicKeyUser added in v1.1.67

type PublicKeyUser struct {
	Name        string `json:"name"`
	Icon        string `json:"icon"`
	DisplayName string `json:"displayName"`
	ID          string `json:"id"`
	Typename    string `json:"__typename"`
}

type RichieBalanceWD added in v1.1.67

type RichieBalanceWD struct {
	BuyerAll        int    `json:"buyer_all"`
	BuyerHold       int    `json:"buyer_hold"`
	BuyerUsable     int    `json:"buyer_usable"`
	BuyerAllFmt     string `json:"buyer_all_fmt"`
	BuyerHoldFmt    string `json:"buyer_hold_fmt"`
	BuyerUsableFmt  string `json:"buyer_usable_fmt"`
	SellerAll       int    `json:"seller_all"`
	SellerHold      int    `json:"seller_hold"`
	SellerUsable    int    `json:"seller_usable"`
	SellerAllFmt    string `json:"seller_all_fmt"`
	SellerHoldFmt   string `json:"seller_hold_fmt"`
	SellerUsableFmt string `json:"seller_usable_fmt"`
	HaveError       bool   `json:"have_error"`
	Typename        string `json:"__typename"`
}

type RichieSubmitWithdrawal added in v1.1.67

type RichieSubmitWithdrawal struct {
	ProcessTime               int                        `json:"process_time"`
	Message                   []interface{}              `json:"message"`
	Status                    string                     `json:"status"`
	MessageError              string                     `json:"message_error"`
	AccountName               string                     `json:"accountName"`
	AccountNumber             string                     `json:"accountNumber"`
	BankName                  string                     `json:"bankName"`
	Amount                    int                        `json:"amount"`
	AdminFee                  int                        `json:"adminFee"`
	WithdrawalNote            string                     `json:"withdrawalNote"`
	ErrorCode                 string                     `json:"errorCode"`
	JoinPromptMessageResponse *JoinPromptMessageResponse `json:"joinPromptMessageResponse"`
	Title                     string                     `json:"title"`
	Description               string                     `json:"description"`
	Header                    string                     `json:"header"`
	CtaLink                   string                     `json:"ctaLink"`
	CtaWording                string                     `json:"ctaWording"`
	Image                     string                     `json:"image"`
	Typename                  string                     `json:"__typename"`
}

type SaldoQueryResp added in v1.1.67

type SaldoQueryResp struct {
	Data struct {
		RichieBalanceWD *RichieBalanceWD `json:"RichieBalanceWD"`
	} `json:"data"`
}

type SaldoQueryVariable added in v1.1.67

type SaldoQueryVariable struct {
	IsAdmin bool `json:"isAdmin"`
}

type SellerBalanceResp added in v1.1.67

type SellerBalanceResp struct {
	Data struct {
		Balance *Balance `json:"balance"`
	} `json:"data"`
}

type Session

type Session interface {
	Sync() error
	Update(cookies []*http.Cookie) error
	AddToHttpRequest(req *http.Request)
	UserAgent() string
	GetCookies() []*http.Cookie
}

type SetShopActiveData added in v1.1.66

type SetShopActiveData struct {
	UpdateShopActive *UpdateShopActive `json:"updateShopActive"`
}

type SetShopActiveRes added in v1.1.66

type SetShopActiveRes struct {
	Data *SetShopActiveData `json:"data"`
}

type SetShopActiveVariable added in v1.1.66

type SetShopActiveVariable struct {
	Device string `json:"device"`
}

type ShopInfoByIDVar

type ShopInfoByIDVar struct {
	ShopIDs []int64  `json:"shopIDs"`
	Fields  []string `json:"fields"`
}

func NewShopInfoByIDVar added in v1.1.62

func NewShopInfoByIDVar(shopid int64) *ShopInfoByIDVar

type ShopScorePenaltyDetail added in v1.0.1

type ShopScorePenaltyDetail struct {
	Result   []*ShopScorePenaltyDetailResult `json:"result"`
	HasNext  bool                            `json:"hasNext"`
	HasPrev  bool                            `json:"hasPrev"`
	Error    *Error                          `json:"error"`
	Typename string                          `json:"__typename"`
}

type ShopScorePenaltyDetailData added in v1.0.1

type ShopScorePenaltyDetailData struct {
	ShopScorePenaltyDetail *ShopScorePenaltyDetail `json:"shopScorePenaltyDetail"`
}

type ShopScorePenaltyDetailRes added in v1.0.1

type ShopScorePenaltyDetailRes struct {
	Data *ShopScorePenaltyDetailData `json:"data"`
}

type ShopScorePenaltyDetailResult added in v1.0.1

type ShopScorePenaltyDetailResult struct {
	ShopPenaltyID         string        `json:"shopPenaltyID"`
	InvoiceNumber         string        `json:"invoiceNumber"`
	Reason                string        `json:"reason"`
	Score                 int           `json:"score"`
	CreateTime            string        `json:"createTime"`
	TypeID                int           `json:"typeID"`
	TypeName              string        `json:"typeName"`
	PenaltyStartDate      string        `json:"penaltyStartDate"`
	PenaltyExpirationDate string        `json:"penaltyExpirationDate"`
	Status                string        `json:"status"`
	ProductDetail         ProductDetail `json:"productDetail"`
	PenaltyTypeGroup      int           `json:"penaltyTypeGroup"`
	Typename              string        `json:"__typename"`
}

type ShopScorePenaltyDetailVar added in v1.0.1

type ShopScorePenaltyDetailVar struct {
	ShopID    string    `json:"shopID"`
	Page      int       `json:"page"`
	Total     int       `json:"total"`
	StartDate time.Time `json:"startDate"`
	EndDate   time.Time `json:"endDate"`
	Sort      int       `json:"sort"`
	Source    string    `json:"source"`
}

func (*ShopScorePenaltyDetailVar) MarshalJSON added in v1.0.1

func (u *ShopScorePenaltyDetailVar) MarshalJSON() ([]byte, error)

type ShopScorePenaltySummary added in v1.0.1

type ShopScorePenaltySummary struct {
	Result   *ShopScorePenaltySummaryResult `json:"result"`
	Error    *ShopScorePenaltySummaryError  `json:"error"`
	Typename string                         `json:"__typename"`
}

type ShopScorePenaltySummaryData added in v1.0.1

type ShopScorePenaltySummaryData struct {
	ShopScorePenaltySummary *ShopScorePenaltySummary `json:"shopScorePenaltySummary"`
}

type ShopScorePenaltySummaryError added in v1.0.1

type ShopScorePenaltySummaryError struct {
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

func (*ShopScorePenaltySummaryError) Error added in v1.0.1

type ShopScorePenaltySummaryRes added in v1.0.1

type ShopScorePenaltySummaryRes struct {
	Data *ShopScorePenaltySummaryData `json:"data"`
}

type ShopScorePenaltySummaryResult added in v1.0.1

type ShopScorePenaltySummaryResult struct {
	Penalty       int    `json:"penalty"`
	PenaltyAmount int    `json:"penaltyAmount"`
	Typename      string `json:"__typename"`
}

type ShopScorePenaltySummaryVar added in v1.0.1

type ShopScorePenaltySummaryVar struct {
	StartDate time.Time `json:"startDate"` // "2023-07-14"
	EndDate   time.Time `json:"endDate"`
	ShopID    string    `json:"shopID"`
	Source    string    `json:"source"`
}

func (*ShopScorePenaltySummaryVar) MarshalJSON added in v1.0.1

func (u *ShopScorePenaltySummaryVar) MarshalJSON() ([]byte, error)

type ShopShowcaseData added in v1.0.1

type ShopShowcaseData struct {
	ShopShowcases ShopShowcases `json:"shopShowcases"`
}

type ShopShowcaseError added in v1.0.1

type ShopShowcaseError struct {
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

type ShopShowcaseRes added in v1.0.1

type ShopShowcaseRes struct {
	Data *ShopShowcaseData `json:"data"`
}

type ShopShowcaseResult added in v1.0.1

type ShopShowcaseResult struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Count    int    `json:"count"`
	URI      string `json:"uri"`
	Typename string `json:"__typename"`
}

type ShopShowcaseVar added in v1.0.1

type ShopShowcaseVar struct {
	WithDefault bool `json:"withDefault"`
}

type ShopShowcases added in v1.0.1

type ShopShowcases struct {
	Result   []*ShopShowcaseResult `json:"result"`
	Error    *ShopShowcaseError    `json:"error"`
	Typename string                `json:"__typename"`
}

type Status added in v1.0.2

type Status struct {
	Tier     AccountTier `json:"tier"`
	Points   Points      `json:"points"`
	Typename string      `json:"__typename"`
}

type SubmitKycData added in v1.1.66

type SubmitKycData struct {
	IsSuccessRegister bool             `json:"is_success_register"`
	ListRetake        any              `json:"list_retake"`
	ListMessage       any              `json:"list_message"`
	Apps              SubmitKycDataApp `json:"apps"`
}

type SubmitKycDataApp added in v1.1.66

type SubmitKycDataApp struct {
	Title    string `json:"title"`
	Subtitle string `json:"subtitle"`
	Button   string `json:"button"`
}

type SubmitKycHeader added in v1.1.66

type SubmitKycHeader struct {
	model.Header
}

type SubmitKycRes added in v1.1.66

type SubmitKycRes struct {
	Header SubmitKycHeader `json:"header"`
	Data   *SubmitKycData  `json:"data"`
}

type TokopediaApi

type TokopediaApi struct {
	Session Session

	AuthenticatedData *IsAtuheticatedData
	// contains filtered or unexported fields
}

func NewTokopediaApi

func NewTokopediaApi(session Session) *TokopediaApi

func (*TokopediaApi) AccountInfo added in v1.0.2

func (api *TokopediaApi) AccountInfo() (*AccountRes, error)

func (*TokopediaApi) AddShopShowcase added in v1.0.1

func (api *TokopediaApi) AddShopShowcase(name string) (*AddShopShowcaseRes, error)

func (*TokopediaApi) BankListQuery added in v1.1.67

func (api *TokopediaApi) BankListQuery(isAdmin bool) (*BankListQueryResp, error)

func (*TokopediaApi) BiometricBeginRegister added in v1.1.67

func (api *TokopediaApi) BiometricBeginRegister() (*BiometricBeginRegisterResp, error)

func (*TokopediaApi) BulkProductEditV3

func (api *TokopediaApi) BulkProductEditV3(payload *model.BulkProductEditV3Var) (*model.BulkProductEditV3Resp, error)

func (*TokopediaApi) CategoryAllListLite added in v1.0.1

func (api *TokopediaApi) CategoryAllListLite() (*CategoryAllListLiteRes, error)

func (*TokopediaApi) ChatGetBundleSticker

func (api *TokopediaApi) ChatGetBundleSticker(payload *model.ChatGetBundleStickerVar) (*model.ChatGetBundleStickerResp, error)

func (*TokopediaApi) ChatGetGroupSticker

func (api *TokopediaApi) ChatGetGroupSticker(payload *model.TypeVar) (*model.ChatGetGroupStickerResp, error)

func (*TokopediaApi) CloseShopSchedule added in v1.1.70

func (api *TokopediaApi) CloseShopSchedule(input *CloseShopScheduleInput) (*CloseShopScheduleRes, error)

func (*TokopediaApi) DeleteShopShowcase added in v1.0.1

func (api *TokopediaApi) DeleteShopShowcase(id string) (*DeleteShopShowcaseRes, error)

func (*TokopediaApi) GetBalance added in v1.1.67

func (api *TokopediaApi) GetBalance() (*SellerBalanceResp, error)

func (*TokopediaApi) GetBankAccount added in v1.1.65

func (api *TokopediaApi) GetBankAccount() (*GetBankAccountRes, error)

func (*TokopediaApi) GetInfoKyc added in v1.1.66

func (api *TokopediaApi) GetInfoKyc() (*InfoKycRes, error)

func (*TokopediaApi) GetInvoiceV3 added in v1.1.64

func (api *TokopediaApi) GetInvoiceV3(invoice string) (*model.InvoiceRes, error)

func (*TokopediaApi) GetProductAddRule added in v1.1.36

func (api *TokopediaApi) GetProductAddRule() (*ProductAddRuleRes, error)

func (*TokopediaApi) GetProductV3

func (api *TokopediaApi) GetProductV3(payload *model.GetProductV3Var) (*model.GetProductV3Resp, error)

func (*TokopediaApi) GetShopScoreLevel

func (api *TokopediaApi) GetShopScoreLevel() (*GetShopScoreLevelRes, error)

func (*TokopediaApi) GoldGetPMOSStatus

func (api *TokopediaApi) GoldGetPMOSStatus() (*GoldGetPMOSStatusRes, error)

func (*TokopediaApi) IsAutheticated

func (api *TokopediaApi) IsAutheticated() (*IsAuthenticatedRes, error)

func (*TokopediaApi) MidasGetDepositHistory added in v1.1.67

func (api *TokopediaApi) MidasGetDepositHistory(payload *DepositHistoryVariable) (*MidasGetDepositHistoryResp, error)

Api usage for getting data deposit hitories.

maximum date range is 31 days

func (*TokopediaApi) NewGraphqlReq

func (api *TokopediaApi) NewGraphqlReq(payload *GraphqlPayload) *http.Request

func (*TokopediaApi) NewRequest

func (api *TokopediaApi) NewRequest(method, ur string, query any, body io.Reader) *http.Request

func (*TokopediaApi) NotificationCounter

func (api *TokopediaApi) NotificationCounter() (*NotificationCounterRes, error)

func (*TokopediaApi) OTPModeListQuery added in v1.1.67

func (api *TokopediaApi) OTPModeListQuery(msisdn, bankAccId string) (*OTPModeListQueryResp, error)

func (*TokopediaApi) OrderIncomeDetail added in v1.1.61

func (api *TokopediaApi) OrderIncomeDetail(orderid int) (*model.SOMIncomeDetailRes, error)

func (*TokopediaApi) OrderList added in v1.1.61

func (api *TokopediaApi) OrderList(payload *query.OrderListQuery) (*model.OrderListResp, error)

func (*TokopediaApi) PinV2Check added in v1.1.67

func (api *TokopediaApi) PinV2Check(phone string) (*PinV2CheckResp, error)

func (*TokopediaApi) ProductAdd

func (api *TokopediaApi) ProductAdd(variables *model.ProductAddVar) (*model.ProductAddResp, error)

func (*TokopediaApi) ProductList

func (api *TokopediaApi) ProductList(payload *model.ProductListVar) (*model.ProductListResp, error)

func (*TokopediaApi) ProductListMeta

func (api *TokopediaApi) ProductListMeta() (*ProductListMetaRes, error)

func (*TokopediaApi) ProductUpdate

func (api *TokopediaApi) ProductUpdate(payload *model.ProductUpdateVar) (*model.ProductUpdateResp, error)

func (*TokopediaApi) SaldoQuery added in v1.1.67

func (api *TokopediaApi) SaldoQuery(isAdmin bool) (*RichieBalanceWD, error)

func (*TokopediaApi) SendRequest

func (api *TokopediaApi) SendRequest(req *http.Request, hasil any) error

func (*TokopediaApi) SendRequestCustomParse added in v1.1.66

func (api *TokopediaApi) SendRequestCustomParse(req *http.Request, parsers ...CustomParse) error

func (*TokopediaApi) SendRequestTest added in v1.1.50

func (api *TokopediaApi) SendRequestTest(req *http.Request, hasil any) ([]byte, error)

func (*TokopediaApi) SetShopActive added in v1.1.66

func (api *TokopediaApi) SetShopActive() (*SetShopActiveRes, error)

func (*TokopediaApi) ShopInfoByID

func (api *TokopediaApi) ShopInfoByID() (*model.ShopInfoByIDRes, error)

func (*TokopediaApi) ShopScorePenaltyDetail added in v1.0.1

func (api *TokopediaApi) ShopScorePenaltyDetail(payload *ShopScorePenaltyDetailVar) (*ShopScorePenaltyDetailRes, error)

func (*TokopediaApi) ShopScorePenaltySummary added in v1.0.1

func (api *TokopediaApi) ShopScorePenaltySummary(payload *ShopScorePenaltySummaryVar) (*ShopScorePenaltySummaryRes, error)

func (*TokopediaApi) ShopShowcase added in v1.0.1

func (api *TokopediaApi) ShopShowcase() (*ShopShowcaseRes, error)

func (*TokopediaApi) SubmitKyc added in v1.1.66

func (api *TokopediaApi) SubmitKyc(imgKtpFile, imgSelfieFile io.Reader) (res *SubmitKycRes, err error)

TODO: response success

func (*TokopediaApi) UploadImageChat

func (api *TokopediaApi) UploadImageChat(msgId string, locfile string) (*ImageChatRes, error)

func (*TokopediaApi) UploadImageFromUrl

func (api *TokopediaApi) UploadImageFromUrl(uri string) (*UploadMediaResp, error)

func (*TokopediaApi) UploadProductImage

func (api *TokopediaApi) UploadProductImage(content io.Reader) (*UploadMediaResp, error)

func (*TokopediaApi) UploadProductImageV2 added in v1.1.64

func (api *TokopediaApi) UploadProductImageV2(client *http.Client, content io.Reader) (*UploadMediaResp, error)

func (*TokopediaApi) UserDataQuery added in v1.1.67

func (api *TokopediaApi) UserDataQuery() (*UserDataQueryResp, error)

func (*TokopediaApi) VariantPriceValidation added in v1.1.70

func (api *TokopediaApi) VariantPriceValidation(catId int, variant *model.Variant) (*model.VPVRes, error)

func (*TokopediaApi) WindrawnGenerateKey added in v1.1.67

func (api *TokopediaApi) WindrawnGenerateKey() (*WindrawnGenerateKeyResp, error)

func (*TokopediaApi) WithDrawBalance added in v1.1.67

func (api *TokopediaApi) WithDrawBalance() (*WithdrawBalanceResp, error)

func (*TokopediaApi) WithdrawOtpRequest added in v1.1.67

func (api *TokopediaApi) WithdrawOtpRequest(msisdn string) (*OtpRequestResp, error)

func (*TokopediaApi) WithdrawOtpValidate added in v1.1.67

func (api *TokopediaApi) WithdrawOtpValidate(payload *OtpValidateVariable) (*OtpValidateResp, error)

func (*TokopediaApi) WithdrawSaldoMutation added in v1.1.67

func (api *TokopediaApi) WithdrawSaldoMutation(variable *WithdrawVariable) (*WithdrawSaldoMutationResp, error)

type UpImageHeader

type UpImageHeader struct {
	ProcessTime float64  `json:"process_time"`
	Reason      string   `json:"reason"`
	ErrorCode   string   `json:"error_code"`
	IsSuccess   bool     `json:"is_success"`
	Messages    []string `json:"messages"`
}

func (*UpImageHeader) Error

func (head *UpImageHeader) Error() string

type UpdateShopActive added in v1.1.66

type UpdateShopActive struct {
	Success  bool   `json:"success"`
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

type UploadMediaResp

type UploadMediaResp struct {
	Header *UpImageHeader `json:"header"`
	Data   struct {
		UploadID string `json:"upload_id"`
		ImageURL string `json:"image_url"`
	} `json:"data"`
}

type User added in v1.1.67

type User struct {
	ID              string `json:"id"`
	IsLoggedIn      bool   `json:"isLoggedIn"`
	ProfilePicture  string `json:"profilePicture"`
	Name            string `json:"name"`
	Email           string `json:"email"`
	PhoneVerified   bool   `json:"phone_verified"`
	Gender          string `json:"gender"`
	Bday            string `json:"bday"`
	Completion      int    `json:"completion"`
	CreatedPassword bool   `json:"createdPassword"`
	RegisterDate    string `json:"registerDate"`
	Phone           string `json:"phone"`
	PhoneMasked     string `json:"phoneMasked"`
	Age             string `json:"age"`
	Typename        string `json:"__typename"`
}

type UserDataQueryResp added in v1.1.67

type UserDataQueryResp struct {
	Data struct {
		User *User `json:"user"`
		Shop struct {
			Domain   string `json:"domain"`
			Typename string `json:"__typename"`
		} `json:"shop"`
	} `json:"data"`
}

type UserShopInfo

type UserShopInfo struct {
	Info  Info `json:"info"`
	Owner struct {
		OwnerID        int    `json:"owner_id"`
		IsGoldMerchant bool   `json:"is_gold_merchant"`
		PmStatus       string `json:"pm_status"`
		Typename       string `json:"__typename"`
	} `json:"owner"`
	Typename string `json:"__typename"`
}

type WalletAppData added in v1.1.67

type WalletAppData struct {
	State          int    `json:"state"`
	Message        string `json:"message"`
	CtaCopyWriting string `json:"cta_copy_writing"`
	CtaLink        string `json:"cta_link"`
	Typename       string `json:"__typename"`
}

type WindrawnGenerateKeyResp added in v1.1.67

type WindrawnGenerateKeyResp struct {
	Data struct {
		GenerateKey *GenerateKey `json:"generate_key"`
	} `json:"data"`
}

func (*WindrawnGenerateKeyResp) GetRSAPublicKeyContent added in v1.1.67

func (w *WindrawnGenerateKeyResp) GetRSAPublicKeyContent() (string, error)

type WithdrawBalanceResp added in v1.1.67

type WithdrawBalanceResp struct {
	Data struct {
		MidasGetAllDepositAmount *MidasGetAllDepositAmount `json:"MidasGetAllDepositAmount"`
	} `json:"data"`
}

type WithdrawGenerateKeyVariable added in v1.1.67

type WithdrawGenerateKeyVariable struct {
	Module string `json:"module"`
}

type WithdrawSaldoMutationResp added in v1.1.67

type WithdrawSaldoMutationResp struct {
	Data struct {
		RichieSubmitWithdrawal *RichieSubmitWithdrawal `json:"richieSubmitWithdrawal"`
	} `json:"data"`
}

type WithdrawVariable added in v1.1.67

type WithdrawVariable struct {
	IsJoinRP      bool   `json:"isJoinRP"`
	Action        string `json:"action"`
	Type          int    `json:"type"`
	Token         string `json:"token"`
	ValidateToken string `json:"validateToken"`
	DeviceType    string `json:"deviceType"`
	UserID        string `json:"userId"`
	Email         string `json:"email"`
	Amount        string `json:"amount"`
	MasterEmail   string `json:"masterEmail"`
	MasterID      string `json:"masterID"`
	AccountID     string `json:"accountID"`
	AccountName   string `json:"accountName"`
	AccountNumber string `json:"accountNumber"`
	BankID        string `json:"bankId"`
	BankName      string `json:"bankName"`
	Password      string `json:"password"`
	Lang          string `json:"lang"`
	IsSeller      bool   `json:"isSeller"`
	Program       string `json:"program"`
	IsAdmin       bool   `json:"isAdmin"`
}

func NewWithdrawVariable added in v1.1.67

func NewWithdrawVariable(bank *GetBankWDV2, otpValidate *OtpValidate, amount string) *WithdrawVariable

Jump to

Keyboard shortcuts

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