forked from checkout/checkout-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
requests.go
61 lines (50 loc) · 1.37 KB
/
requests.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package issuing
type (
CardControlRequest interface {
GetControlType() ControlType
}
CardControlTypeRequest struct {
CardControlRequest
}
CardControlCommon struct {
ControlType ControlType `json:"control_type,omitempty"`
Description string `json:"description,omitempty"`
TargetId string `json:"target_id,omitempty"`
}
velocityCardControlRequest struct {
CardControlCommon
VelocityLimit VelocityLimit `json:"velocity_limit,omitempty"`
}
mccCardControlRequest struct {
CardControlCommon
MccLimit MccLimit
}
)
func NewVelocityCardControlRequest() *velocityCardControlRequest {
return &velocityCardControlRequest{
CardControlCommon: CardControlCommon{ControlType: VelocityLimitType},
}
}
func NewMccCardControlRequest() *mccCardControlRequest {
return &mccCardControlRequest{
CardControlCommon: CardControlCommon{ControlType: MccLimitType},
}
}
func (c *velocityCardControlRequest) GetControlType() ControlType {
return c.ControlType
}
func (c *mccCardControlRequest) GetControlType() ControlType {
return c.ControlType
}
type (
CardControlsQuery struct {
TargetId string `url:"target_id,omitempty"`
}
)
type (
UpdateCardControlRequest struct {
Description string `json:"description,omitempty"`
VelocityLimit *VelocityLimit `json:"velocity_limit,omitempty"`
MccLimit *MccLimit `json:"mcc_limit,omitempty"`
}
)