~evanj/cms

ref: 99a3bb7fc511e3f448a358691896ba1300f73a93 cms/vendor/github.com/stripe/stripe-go/v71/radar_valuelist.go -rw-r--r-- 2.3 KiB
99a3bb7fEvan M Jones WIP(rbac): Decorator object complete. TODO: Specify role in invite. 1 year, 1 month ago
                                                                                
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
package stripe

// RadarValueListItemType is the possible values for a type of value list items.
type RadarValueListItemType string

// List of values that RadarValueListItemType can take.
const (
	RadarValueListItemTypeCardBin             RadarValueListItemType = "card_bin"
	RadarValueListItemTypeCardFingerprint     RadarValueListItemType = "card_fingerprint"
	RadarValueListItemTypeCountry             RadarValueListItemType = "country"
	RadarValueListItemTypeEmail               RadarValueListItemType = "email"
	RadarValueListItemTypeIPAddress           RadarValueListItemType = "ip_address"
	RadarValueListItemTypeString              RadarValueListItemType = "string"
	RadarValueListItemTypeCaseSensitiveString RadarValueListItemType = "case_sensitive_string"
)

// RadarValueListParams is the set of parameters that can be used when creating a value list.
type RadarValueListParams struct {
	Params   `form:"*"`
	Alias    *string `form:"alias"`
	ItemType *string `form:"item_type"`
	Name     *string `form:"name"`
}

// RadarValueListListParams is the set of parameters that can be used when listing value lists.
type RadarValueListListParams struct {
	ListParams   `form:"*"`
	Alias        *string           `form:"alias"`
	Contains     *string           `form:"contains"`
	Created      *int64            `form:"created"`
	CreatedRange *RangeQueryParams `form:"created"`
}

// RadarValueList is the resource representing a value list.
type RadarValueList struct {
	APIResource
	Alias     string                  `json:"alias"`
	Created   int64                   `json:"created"`
	CreatedBy string                  `json:"created_by"`
	Deleted   bool                    `json:"deleted"`
	ID        string                  `json:"id"`
	ItemType  RadarValueListItemType  `json:"item_type"`
	ListItems *RadarValueListItemList `json:"list_items"`
	Livemode  bool                    `json:"livemode"`
	Metadata  map[string]string       `json:"metadata"`
	Name      string                  `json:"name"`
	Object    string                  `json:"object"`
	Updated   int64                   `json:"updated"`
	UpdatedBy string                  `json:"updated_by"`
}

// RadarValueListList is a list of value lists as retrieved from a list endpoint.
type RadarValueListList struct {
	APIResource
	ListMeta
	Data []*RadarValueList `json:"data"`
}