dto

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchDeleteCouponRequest

type BatchDeleteCouponRequest struct {
	Ids []int64 `json:"ids" validate:"required"`
}

type BillingBalanceLogSnapshot

type BillingBalanceLogSnapshot struct {
	Type             uint16 `json:"type"`
	UserId           int64  `json:"user_id"`
	Amount           int64  `json:"amount"`
	OrderNo          string `json:"order_no,omitempty"`
	Balance          int64  `json:"balance"`
	Timestamp        int64  `json:"timestamp"`
	ClientIP         string `json:"client_ip,omitempty"`
	UserAgent        string `json:"user_agent,omitempty"`
	ActorID          int64  `json:"actor_id,omitempty"`
	IPCountryCode    string `json:"ip_country_code,omitempty"`
	IPCountry        string `json:"ip_country,omitempty"`
	IPRegion         string `json:"ip_region,omitempty"`
	IPCity           string `json:"ip_city,omitempty"`
	IPASN            uint   `json:"ip_asn,omitempty"`
	IPASOrganization string `json:"ip_as_organization,omitempty"`

} // @name dto.BalanceLog

type BillingCommissionLogSnapshot

type BillingCommissionLogSnapshot struct {
	Type             uint16 `json:"type"`
	UserId           int64  `json:"user_id"`
	Amount           int64  `json:"amount"`
	OrderNo          string `json:"order_no"`
	Timestamp        int64  `json:"timestamp"`
	ClientIP         string `json:"client_ip,omitempty"`
	UserAgent        string `json:"user_agent,omitempty"`
	ActorID          int64  `json:"actor_id,omitempty"`
	IPCountryCode    string `json:"ip_country_code,omitempty"`
	IPCountry        string `json:"ip_country,omitempty"`
	IPRegion         string `json:"ip_region,omitempty"`
	IPCity           string `json:"ip_city,omitempty"`
	IPASN            uint   `json:"ip_asn,omitempty"`
	IPASOrganization string `json:"ip_as_organization,omitempty"`

} // @name dto.CommissionLog

type BillingNodeIDList

type BillingNodeIDList []int64 // @name dto.StringInt64Slice

func (BillingNodeIDList) Int64s

func (s BillingNodeIDList) Int64s() []int64

func (BillingNodeIDList) MarshalJSON

func (s BillingNodeIDList) MarshalJSON() ([]byte, error)

func (*BillingNodeIDList) UnmarshalJSON

func (s *BillingNodeIDList) UnmarshalJSON(data []byte) error

type BillingSubscribeDiscount

type BillingSubscribeDiscount struct {
	Quantity int64   `json:"quantity"`
	Discount float64 `json:"discount"`

} // @name dto.SubscribeDiscount

type BillingSubscribeSnapshot

type BillingSubscribeSnapshot struct {
	Id                int64                      `json:"id"`
	Name              string                     `json:"name"`
	Language          string                     `json:"language"`
	Description       string                     `json:"description"`
	UnitPrice         int64                      `json:"unit_price"`
	UnitTime          string                     `json:"unit_time"`
	Discount          []BillingSubscribeDiscount `json:"discount"`
	Replacement       int64                      `json:"replacement"`
	Inventory         int64                      `json:"inventory"`
	Traffic           int64                      `json:"traffic"`
	SpeedLimit        int64                      `json:"speed_limit"`
	DeviceLimit       int64                      `json:"device_limit"`
	Quota             int64                      `json:"quota"`
	Nodes             BillingNodeIDList          `json:"nodes"`
	NodeTags          []string                   `json:"node_tags"`
	Show              bool                       `json:"show"`
	Sell              bool                       `json:"sell"`
	Sort              int64                      `json:"sort"`
	DeductionRatio    int64                      `json:"deduction_ratio"`
	AllowDeduction    bool                       `json:"allow_deduction"`
	ResetCycle        int64                      `json:"reset_cycle"`
	RenewalReset      bool                       `json:"renewal_reset"`
	ShowOriginalPrice bool                       `json:"show_original_price"`
	CreatedAt         int64                      `json:"created_at"`
	UpdatedAt         int64                      `json:"updated_at"`

} // @name dto.Subscribe

type CheckoutOrderRequest

type CheckoutOrderRequest struct {
	OrderNo       string `json:"orderNo"`
	CheckoutToken string `json:"checkout_token,omitempty"`
	ReturnUrl     string `json:"returnUrl,omitempty"`
}

type CheckoutOrderResponse

type CheckoutOrderResponse struct {
	// Type is url, qr, stripe, or balance.
	Type        string         `json:"type" enums:"url,qr,stripe,balance" example:"url"`
	CheckoutUrl string         `json:"checkout_url,omitempty"`
	Stripe      *StripePayment `json:"stripe,omitempty"`
}

type CloseOrderRequest

type CloseOrderRequest struct {
	OrderNo string `json:"orderNo" validate:"required"`
}

type CommissionWithdrawRequest

type CommissionWithdrawRequest struct {
	Amount  int64  `json:"amount" validate:"required,gt=0,lte=2000000000"`
	Content string `json:"content" validate:"required,max=4000"`
}

type Coupon

type Coupon struct {
	Id         int64   `json:"id"`
	Name       string  `json:"name"`
	Code       string  `json:"code"`
	Count      int64   `json:"count"`
	Type       uint8   `json:"type"`
	Discount   int64   `json:"discount"`
	StartTime  int64   `json:"start_time"`
	ExpireTime int64   `json:"expire_time"`
	UserLimit  int64   `json:"user_limit"`
	Subscribe  []int64 `json:"subscribe"`
	UsedCount  int64   `json:"used_count"`
	Enable     bool    `json:"enable"`
	CreatedAt  int64   `json:"created_at"`
	UpdatedAt  int64   `json:"updated_at"`
}

type CreateCouponRequest

type CreateCouponRequest struct {
	Name       string  `json:"name" validate:"required"`
	Code       string  `json:"code,omitempty"`
	Count      int64   `json:"count,omitempty"`
	Type       uint8   `json:"type" validate:"required"`
	Discount   int64   `json:"discount" validate:"required"`
	StartTime  int64   `json:"start_time" validate:"required"`
	ExpireTime int64   `json:"expire_time" validate:"required"`
	UserLimit  int64   `json:"user_limit,omitempty"`
	Subscribe  []int64 `json:"subscribe,omitempty"`
	UsedCount  int64   `json:"used_count,omitempty"`
	Enable     *bool   `json:"enable,omitempty"`
}

type CreateOrderRequest

type CreateOrderRequest struct {
	UserId         int64  `json:"user_id" validate:"required"`
	Type           uint8  `json:"type" validate:"required"`
	Quantity       int64  `json:"quantity,omitempty" validate:"omitempty,lte=1000"`
	Price          int64  `json:"price" validate:"required,gte=0,lte=2000000000"`
	Amount         int64  `json:"amount" validate:"required,gte=0,lte=2147483647"`
	Discount       int64  `json:"discount,omitempty" validate:"omitempty,gte=0,lte=2000000000"`
	Coupon         string `json:"coupon,omitempty"`
	CouponDiscount int64  `json:"coupon_discount,omitempty" validate:"omitempty,gte=0,lte=2000000000"`
	Commission     int64  `json:"commission" validate:"gte=0,lte=2000000000"`
	FeeAmount      int64  `json:"fee_amount" validate:"required,gte=0,lte=2000000000"`
	PaymentId      int64  `json:"payment_id" validate:"required"`
	TradeNo        string `json:"trade_no,omitempty"`
	Status         uint8  `json:"status,omitempty"`
	SubscribeId    int64  `json:"subscribe_id,omitempty"`
}

type CreatePaymentMethodRequest

type CreatePaymentMethodRequest struct {
	Name        string      `json:"name" validate:"required"`
	Platform    string      `json:"platform" validate:"required"`
	Description string      `json:"description"`
	Icon        string      `json:"icon,omitempty"`
	Domain      string      `json:"domain,omitempty"`
	Config      interface{} `json:"config" validate:"required"`
	FeeMode     uint        `json:"fee_mode"`
	FeePercent  int64       `json:"fee_percent,omitempty"`
	FeeAmount   int64       `json:"fee_amount,omitempty"`
	Sort        int64       `json:"sort,omitempty"`
	Enable      *bool       `json:"enable" validate:"required"`
}

type DeleteCouponRequest

type DeleteCouponRequest struct {
	Id int64 `json:"id" validate:"required"`
}

type DeletePaymentMethodRequest

type DeletePaymentMethodRequest struct {
	Id int64 `json:"id" validate:"required"`
}

type EPayNotifyRequest

type EPayNotifyRequest struct {
	Pid         string `json:"pid"          form:"pid"`
	TradeNo     string `json:"trade_no"     form:"trade_no"`
	OutTradeNo  string `json:"out_trade_no" form:"out_trade_no"`
	Type        string `json:"type"         form:"type"`
	Name        string `json:"name"         form:"name"`
	Money       string `json:"money"        form:"money"`
	TradeStatus string `json:"trade_status" form:"trade_status"`
	Param       string `json:"param"        form:"param"`
	Sign        string `json:"sign"         form:"sign"`
	SignType    string `json:"sign_type"    form:"sign_type"`
}

type GetAvailablePaymentMethodsResponse

type GetAvailablePaymentMethodsResponse struct {
	List []PaymentMethod `json:"list"`
}

type GetCouponListRequest

type GetCouponListRequest struct {
	Page      int64  `form:"page" validate:"required,gt=0"`
	Size      int64  `form:"size" validate:"required,gt=0,lte=100"`
	Subscribe int64  `form:"subscribe,omitempty"`
	Search    string `form:"search,omitempty"`
}

type GetCouponListResponse

type GetCouponListResponse struct {
	Total int64    `json:"total"`
	List  []Coupon `json:"list"`
}

type GetOrderListRequest

type GetOrderListRequest struct {
	Page        int64  `form:"page" validate:"required,gt=0"`
	Size        int64  `form:"size" validate:"required,gt=0,lte=100"`
	UserId      int64  `form:"user_id,omitempty"`
	Status      uint8  `form:"status,omitempty"`
	SubscribeId int64  `form:"subscribe_id,omitempty"`
	Search      string `form:"search,omitempty"`
}

type GetOrderListResponse

type GetOrderListResponse struct {
	Total int64   `json:"total"`
	List  []Order `json:"list"`
}

type GetPaymentMethodListRequest

type GetPaymentMethodListRequest struct {
	Page     int    `form:"page" validate:"required,gt=0"`
	Size     int    `form:"size" validate:"required,gt=0,lte=100"`
	Platform string `form:"platform,omitempty"`
	Search   string `form:"search,omitempty"`
	Enable   *bool  `form:"enable,omitempty"`
}

type GetPaymentMethodListResponse

type GetPaymentMethodListResponse struct {
	Total int64                 `json:"total"`
	List  []PaymentMethodDetail `json:"list"`
}

type GetSubscriptionRequest

type GetSubscriptionRequest struct {
	Language string `form:"language"`
}

type GetSubscriptionResponse

type GetSubscriptionResponse struct {
	List []BillingSubscribeSnapshot `json:"list"`
}

type GetWithdrawalListRequest

type GetWithdrawalListRequest struct {
	Page   int    `form:"page" validate:"required,gt=0"`
	Size   int    `form:"size" validate:"required,gt=0,lte=100"`
	UserId int64  `form:"user_id,omitempty" validate:"omitempty,gt=0"`
	Status *uint8 `form:"status,omitempty" validate:"omitempty,oneof=0 1 2"`
}

type GetWithdrawalListResponse

type GetWithdrawalListResponse struct {
	List  []WithdrawalLog `json:"list"`
	Total int64           `json:"total"`
}

type Order

type Order struct {
	Id             int64         `json:"id"`
	UserId         int64         `json:"user_id"`
	OrderNo        string        `json:"order_no"`
	Type           uint8         `json:"type"`
	Quantity       int64         `json:"quantity"`
	Price          int64         `json:"price"`
	Amount         int64         `json:"amount"`
	GiftAmount     int64         `json:"gift_amount"`
	Discount       int64         `json:"discount"`
	Coupon         string        `json:"coupon"`
	CouponDiscount int64         `json:"coupon_discount"`
	Commission     int64         `json:"commission,omitempty"`
	Payment        PaymentMethod `json:"payment"`
	FeeAmount      int64         `json:"fee_amount"`
	TradeNo        string        `json:"trade_no"`
	Status         uint8         `json:"status"`
	SubscribeId    int64         `json:"subscribe_id"`
	CreatedAt      int64         `json:"created_at"`
	UpdatedAt      int64         `json:"updated_at"`
}

type OrderDetail

type OrderDetail struct {
	Id             int64                    `json:"id"`
	UserId         int64                    `json:"user_id"`
	OrderNo        string                   `json:"order_no"`
	Type           uint8                    `json:"type"`
	Quantity       int64                    `json:"quantity"`
	Price          int64                    `json:"price"`
	Amount         int64                    `json:"amount"`
	GiftAmount     int64                    `json:"gift_amount"`
	Discount       int64                    `json:"discount"`
	Coupon         string                   `json:"coupon"`
	CouponDiscount int64                    `json:"coupon_discount"`
	Commission     int64                    `json:"commission,omitempty"`
	Payment        PaymentMethod            `json:"payment"`
	Method         string                   `json:"method"`
	FeeAmount      int64                    `json:"fee_amount"`
	TradeNo        string                   `json:"trade_no"`
	Status         uint8                    `json:"status"`
	SubscribeId    int64                    `json:"subscribe_id"`
	Subscribe      BillingSubscribeSnapshot `json:"subscribe"`
	CreatedAt      int64                    `json:"created_at"`
	UpdatedAt      int64                    `json:"updated_at"`
}

type PaymentConfig

type PaymentConfig struct {
	Id          int64       `json:"id" validate:"required"`
	Name        string      `json:"name" validate:"required"`
	Platform    string      `json:"platform" validate:"required"`
	Description string      `json:"description"`
	Icon        string      `json:"icon,omitempty"`
	Domain      string      `json:"domain,omitempty"`
	Config      interface{} `json:"config" validate:"required"`
	FeeMode     uint        `json:"fee_mode"`
	FeePercent  int64       `json:"fee_percent,omitempty"`
	FeeAmount   int64       `json:"fee_amount,omitempty"`
	Sort        int64       `json:"sort,omitempty"`
	Enable      *bool       `json:"enable" validate:"required"`
}

type PaymentMethod

type PaymentMethod struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Platform    string `json:"platform"`
	Description string `json:"description"`
	Icon        string `json:"icon"`
	FeeMode     uint   `json:"fee_mode"`
	FeePercent  int64  `json:"fee_percent"`
	FeeAmount   int64  `json:"fee_amount"`
	Sort        int64  `json:"sort"`
}

type PaymentMethodDetail

type PaymentMethodDetail struct {
	Id          int64       `json:"id"`
	Name        string      `json:"name"`
	Platform    string      `json:"platform"`
	Description string      `json:"description"`
	Icon        string      `json:"icon"`
	Domain      string      `json:"domain"`
	Config      interface{} `json:"config"`
	FeeMode     uint        `json:"fee_mode"`
	FeePercent  int64       `json:"fee_percent"`
	FeeAmount   int64       `json:"fee_amount"`
	Sort        int64       `json:"sort"`
	Enable      bool        `json:"enable"`
	NotifyURL   string      `json:"notify_url"`
}

type PaymentPlatformInfoSnapshot

type PaymentPlatformInfoSnapshot = platform.Info // @name dto.PlatformInfo

PlatformInfo is kept as a DTO alias for API compatibility. Provider metadata belongs to the infrastructure-neutral platform package.

type PaymentPlatformResponse

type PaymentPlatformResponse struct {
	List []PaymentPlatformInfoSnapshot `json:"list"`

} // @name dto.PlatformResponse

type PortalPurchaseRequest

type PortalPurchaseRequest struct {
	AuthType       string `json:"auth_type" validate:"required"`
	Identifier     string `json:"identifier" validate:"required"`
	Password       string `json:"password" validate:"required,min=8,max=128"`
	Payment        int64  `json:"payment" validate:"required,gt=0"`
	SubscribeId    int64  `json:"subscribe_id" validate:"required,gt=0"`
	Quantity       int64  `json:"quantity" validate:"required,gt=0,lte=1000"`
	Coupon         string `json:"coupon,omitempty"`
	InviteCode     string `json:"invite_code,omitempty"`
	TurnstileToken string `json:"turnstile_token,omitempty"`
}

type PortalPurchaseResponse

type PortalPurchaseResponse struct {
	OrderNo       string `json:"order_no"`
	CheckoutToken string `json:"checkout_token"`
}

type PreOrderResponse

type PreOrderResponse struct {
	Price          int64  `json:"price"`
	Amount         int64  `json:"amount"`
	Discount       int64  `json:"discount"`
	GiftAmount     int64  `json:"gift_amount"`
	Coupon         string `json:"coupon"`
	CouponDiscount int64  `json:"coupon_discount"`
	FeeAmount      int64  `json:"fee_amount"`
}

type PrePurchaseOrderRequest

type PrePurchaseOrderRequest struct {
	Payment     int64  `json:"payment,omitempty" validate:"omitempty,gt=0"`
	SubscribeId int64  `json:"subscribe_id" validate:"required,gt=0"`
	Quantity    int64  `json:"quantity" validate:"required,gt=0,lte=1000"`
	Coupon      string `json:"coupon,omitempty"`
}

type PrePurchaseOrderResponse

type PrePurchaseOrderResponse struct {
	Price          int64  `json:"price"`
	Amount         int64  `json:"amount"`
	Discount       int64  `json:"discount"`
	Coupon         string `json:"coupon"`
	CouponDiscount int64  `json:"coupon_discount"`
	FeeAmount      int64  `json:"fee_amount"`
}

type PurchaseOrderRequest

type PurchaseOrderRequest struct {
	SubscribeId     int64  `json:"subscribe_id"`
	Quantity        int64  `json:"quantity" validate:"required,gt=0,lte=1000"`
	Payment         int64  `json:"payment,omitempty"`
	Coupon          string `json:"coupon,omitempty"`
	UserSubscribeId int64  `json:"user_subscribe_id,omitempty"`
}

type PurchaseOrderResponse

type PurchaseOrderResponse struct {
	OrderNo string `json:"order_no"`
}

type QueryOrderDetailRequest

type QueryOrderDetailRequest struct {
	OrderNo string `form:"order_no" validate:"required"`
}

type QueryOrderListRequest

type QueryOrderListRequest struct {
	Page int `form:"page" validate:"required,gt=0"`
	Size int `form:"size" validate:"required,gt=0,lte=100"`
}

type QueryOrderListResponse

type QueryOrderListResponse struct {
	Total int64         `json:"total"`
	List  []OrderDetail `json:"list"`
}

type QueryPurchaseOrderRequest

type QueryPurchaseOrderRequest struct {
	OrderNo       string `form:"order_no" validate:"required"`
	CheckoutToken string `form:"checkout_token"`
}

type QueryPurchaseOrderResponse

type QueryPurchaseOrderResponse struct {
	OrderNo        string                   `json:"order_no"`
	Subscribe      BillingSubscribeSnapshot `json:"subscribe"`
	Quantity       int64                    `json:"quantity"`
	Price          int64                    `json:"price"`
	Amount         int64                    `json:"amount"`
	Discount       int64                    `json:"discount"`
	Coupon         string                   `json:"coupon"`
	CouponDiscount int64                    `json:"coupon_discount"`
	FeeAmount      int64                    `json:"fee_amount"`
	Payment        PaymentMethod            `json:"payment"`
	Status         uint8                    `json:"status"`
	CreatedAt      int64                    `json:"created_at"`
	Token          string                   `json:"token,omitempty"`
}

type QueryUserAffiliateCountResponse

type QueryUserAffiliateCountResponse struct {
	Registers       int64 `json:"registers"`
	TotalCommission int64 `json:"total_commission"`
}

type QueryUserAffiliateListRequest

type QueryUserAffiliateListRequest struct {
	Page int `form:"page" validate:"required,gt=0"`
	Size int `form:"size" validate:"required,gt=0,lte=100"`
}

type QueryUserAffiliateListResponse

type QueryUserAffiliateListResponse struct {
	List  []UserAffiliate `json:"list"`
	Total int64           `json:"total"`
}

type QueryUserBalanceLogListResponse

type QueryUserBalanceLogListResponse struct {
	List  []BillingBalanceLogSnapshot `json:"list"`
	Total int64                       `json:"total"`
}

type QueryUserCommissionLogListRequest

type QueryUserCommissionLogListRequest struct {
	Page int `form:"page" validate:"required,gt=0"`
	Size int `form:"size" validate:"required,gt=0,lte=100"`
}

type QueryUserCommissionLogListResponse

type QueryUserCommissionLogListResponse struct {
	List  []BillingCommissionLogSnapshot `json:"list"`
	Total int64                          `json:"total"`
}

type QueryWithdrawalLogListRequest

type QueryWithdrawalLogListRequest struct {
	Page int `form:"page" validate:"required,gt=0"`
	Size int `form:"size" validate:"required,gt=0,lte=100"`
}

type QueryWithdrawalLogListResponse

type QueryWithdrawalLogListResponse struct {
	List  []WithdrawalLog `json:"list"`
	Total int64           `json:"total"`
}

type RechargeOrderRequest

type RechargeOrderRequest struct {
	Amount  int64 `json:"amount" validate:"required,gt=0,lte=2000000000"`
	Payment int64 `json:"payment"`
}

type RechargeOrderResponse

type RechargeOrderResponse struct {
	OrderNo string `json:"order_no"`
}

type RenewalOrderRequest

type RenewalOrderRequest struct {
	UserSubscribeID int64  `json:"user_subscribe_id"`
	Quantity        int64  `json:"quantity" validate:"lte=1000"`
	Payment         int64  `json:"payment"`
	Coupon          string `json:"coupon,omitempty"`
}

type RenewalOrderResponse

type RenewalOrderResponse struct {
	OrderNo string `json:"order_no"`
}

type ResetTrafficOrderRequest

type ResetTrafficOrderRequest struct {
	UserSubscribeID int64 `json:"user_subscribe_id"`
	Payment         int64 `json:"payment"`
}

type ResetTrafficOrderResponse

type ResetTrafficOrderResponse struct {
	OrderNo string `json:"order_no"`
}

type ReviewWithdrawalRequest

type ReviewWithdrawalRequest struct {
	Id     int64  `json:"id" validate:"required,gt=0"`
	Status uint8  `json:"status" validate:"oneof=1 2"`
	Reason string `json:"reason,omitempty" validate:"omitempty,max=500"`
}

type StripePayment

type StripePayment struct {
	Method         string `json:"method"`
	ClientSecret   string `json:"client_secret"`
	PublishableKey string `json:"publishable_key"`
}

type UpdateCouponRequest

type UpdateCouponRequest struct {
	Id         int64   `json:"id" validate:"required"`
	Name       string  `json:"name" validate:"required"`
	Code       string  `json:"code,omitempty"`
	Count      int64   `json:"count,omitempty"`
	Type       uint8   `json:"type" validate:"required"`
	Discount   int64   `json:"discount" validate:"required"`
	StartTime  int64   `json:"start_time" validate:"required"`
	ExpireTime int64   `json:"expire_time" validate:"required"`
	UserLimit  int64   `json:"user_limit,omitempty"`
	Subscribe  []int64 `json:"subscribe,omitempty"`
	UsedCount  int64   `json:"used_count,omitempty"`
	Enable     *bool   `json:"enable,omitempty"`
}

type UpdateOrderStatusRequest

type UpdateOrderStatusRequest struct {
	Id        int64  `json:"id" validate:"required"`
	Status    uint8  `json:"status" validate:"required"`
	PaymentId int64  `json:"payment_id,omitempty"`
	TradeNo   string `json:"trade_no,omitempty"`
}

type UpdatePaymentMethodRequest

type UpdatePaymentMethodRequest struct {
	Id          int64       `json:"id" validate:"required"`
	Name        string      `json:"name" validate:"required"`
	Platform    string      `json:"platform" validate:"required"`
	Description string      `json:"description"`
	Icon        string      `json:"icon,omitempty"`
	Domain      string      `json:"domain,omitempty"`
	Config      interface{} `json:"config" validate:"required"`
	FeeMode     uint        `json:"fee_mode"`
	FeePercent  int64       `json:"fee_percent,omitempty"`
	FeeAmount   int64       `json:"fee_amount,omitempty"`
	Sort        int64       `json:"sort,omitempty"`
	Enable      *bool       `json:"enable" validate:"required"`
}

type UserAffiliate

type UserAffiliate struct {
	Avatar       string `json:"avatar"`
	Identifier   string `json:"identifier"`
	RegisteredAt int64  `json:"registered_at"`
	Enable       bool   `json:"enable"`
}

type V2CheckoutOrderRequest

type V2CheckoutOrderRequest struct {
	CheckoutToken string `json:"checkout_token,omitempty"`
	ReturnURL     string `json:"return_url,omitempty"`
}

type V2CreateOrderRequest

type V2CreateOrderRequest struct {
	Type            string               `json:"type"`
	PaymentID       int64                `json:"payment_id"`
	SubscribeID     int64                `json:"subscribe_id,omitempty"`
	UserSubscribeID int64                `json:"user_subscribe_id,omitempty"`
	Quantity        int64                `json:"quantity,omitempty"`
	Coupon          string               `json:"coupon,omitempty"`
	Amount          int64                `json:"amount,omitempty"`
	ReturnURL       string               `json:"return_url,omitempty"`
	Guest           *V2GuestOrderRequest `json:"guest,omitempty"`
}

type V2EventTicketRequest

type V2EventTicketRequest struct {
	CheckoutToken string `json:"checkout_token,omitempty"`
}

type V2EventTicketResponse

type V2EventTicketResponse struct {
	URL             string `json:"url"`
	TicketExpiresAt int64  `json:"ticket_expires_at"`
}

type V2GuestOrderRequest

type V2GuestOrderRequest struct {
	AuthType   string `json:"auth_type"`
	Identifier string `json:"identifier"`
	Password   string `json:"password"`
	InviteCode string `json:"invite_code,omitempty"`
}

V2GuestOrderRequest contains the account information held until a guest purchase is activated. It is only accepted for anonymous purchase orders.

type V2OrderEvents

type V2OrderEvents struct {
	URL             string `json:"url"`
	TicketExpiresAt int64  `json:"ticket_expires_at"`
}

type V2OrderPayment

type V2OrderPayment struct {
	// Type is url, qr, stripe, or balance.
	Type          string         `json:"type" enums:"url,qr,stripe,balance" example:"url"`
	CheckoutURL   string         `json:"checkout_url,omitempty"`
	Stripe        *StripePayment `json:"stripe,omitempty"`
	PaymentStatus string         `json:"payment_status"`
}

type V2OrderResponse

type V2OrderResponse struct {
	Order         V2OrderSnapshot `json:"order"`
	Payment       *V2OrderPayment `json:"payment,omitempty"`
	Events        V2OrderEvents   `json:"events"`
	CheckoutToken string          `json:"checkout_token,omitempty"`
}

type V2OrderSessionRequest

type V2OrderSessionRequest struct {
	CheckoutToken string `json:"checkout_token,omitempty"`
}

V2OrderSessionRequest exchanges a guest checkout capability for a normal user session after the corresponding purchase has created its account. It deliberately reuses the capability rather than putting a bearer token in an SSE URL or event payload.

type V2OrderSessionResponse

type V2OrderSessionResponse struct {
	AccessToken string `json:"access_token"`
}

type V2OrderSnapshot

type V2OrderSnapshot struct {
	OrderNo           string `json:"order_no"`
	Status            string `json:"status"`
	PaymentStatus     string `json:"payment_status"`
	FulfillmentStatus string `json:"fulfillment_status"`
	StateVersion      int64  `json:"state_version"`
	Amount            int64  `json:"amount"`
	Currency          string `json:"currency"`
	ExpiresAt         int64  `json:"expires_at"`
}

type WithdrawalLog

type WithdrawalLog struct {
	Id        int64  `json:"id"`
	UserId    int64  `json:"user_id"`
	Amount    int64  `json:"amount"`
	Content   string `json:"content"`
	Status    uint8  `json:"status"`
	Reason    string `json:"reason,omitempty"`
	CreatedAt int64  `json:"created_at"`
	UpdatedAt int64  `json:"updated_at"`
}

Jump to

Keyboard shortcuts

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