2026-09-30 09:36:18 +07:00
|
|
|
package contract
|
|
|
|
|
|
|
|
|
|
// AdjustCustomerWalletRequest is POST /marketing/customers/:id/wallet/adjust
|
|
|
|
|
// (docs/prd-point-coin.md F7).
|
|
|
|
|
type AdjustCustomerWalletRequest struct {
|
|
|
|
|
// POINT or COIN.
|
|
|
|
|
Currency string `json:"currency"`
|
|
|
|
|
// Signed: positive adds to the balance, negative takes from it. Never zero.
|
|
|
|
|
Amount int64 `json:"amount"`
|
|
|
|
|
Reason string `json:"reason"`
|
|
|
|
|
// Optional. Sending the same key again returns the first result instead of
|
|
|
|
|
// adjusting twice, so a retried request is safe.
|
|
|
|
|
IdempotencyKey string `json:"idempotency_key"`
|
|
|
|
|
}
|
2026-09-30 12:09:53 +07:00
|
|
|
|
|
|
|
|
// ExchangeCoinsRequest is POST /customer/wallet/exchange (docs/prd-point-coin.md F4).
|
|
|
|
|
// The Idempotency-Key header is required.
|
|
|
|
|
type ExchangeCoinsRequest struct {
|
|
|
|
|
Coins int64 `json:"coins" binding:"required,min=1"`
|
|
|
|
|
Pin string `json:"pin" binding:"required"`
|
|
|
|
|
}
|