-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmodels_gift_card.go
46 lines (36 loc) · 1.01 KB
/
models_gift_card.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cloudloyalty_client
import (
"time"
"github.com/shopspring/decimal"
)
type ActivateGiftCardRequest struct {
TxID string `json:"txid"`
GiftCard GiftCardQuery `json:"giftCard"`
}
type ActivateGiftCardReply struct {
GiftCard GiftCardReply `json:"giftCard"`
}
// DiscardGiftCardRequest request model for discard-gift-card request
type DiscardGiftCardRequest struct {
TxID string `json:"txid"`
GiftCard GiftCardQuery `json:"giftCard"`
}
// DiscardGiftCardReply response model for discard-gift-card request
type DiscardGiftCardReply struct {
}
type GenerateGiftCardRequest struct {
Code string `json:"code"`
}
type GenerateGiftCardReply struct {
GiftCard GiftCardReply `json:"giftCard"`
}
type GiftCardQuery struct {
SKU string `json:"sku"`
Code string `json:"code"`
}
type GiftCardReply struct {
Number string `json:"number"`
Code string `json:"code"`
InitAmount decimal.Decimal `json:"initAmount"`
ValidUntil *time.Time `json:"validUntil,omitempty"`
}