github.com/stripe/stripe-go/v76@v76.25.0/radar_valuelistitem.go (about)

     1  //
     2  //
     3  // File generated from our OpenAPI spec
     4  //
     5  //
     6  
     7  package stripe
     8  
     9  // Deletes a ValueListItem object, removing it from its parent value list.
    10  type RadarValueListItemParams struct {
    11  	Params `form:"*"`
    12  	// Specifies which fields in the response should be expanded.
    13  	Expand []*string `form:"expand"`
    14  	// The value of the item (whose type must match the type of the parent value list).
    15  	Value *string `form:"value"`
    16  	// The identifier of the value list which the created item will be added to.
    17  	ValueList *string `form:"value_list"`
    18  }
    19  
    20  // AddExpand appends a new field to expand.
    21  func (p *RadarValueListItemParams) AddExpand(f string) {
    22  	p.Expand = append(p.Expand, &f)
    23  }
    24  
    25  // Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
    26  type RadarValueListItemListParams struct {
    27  	ListParams `form:"*"`
    28  	// Only return items that were created during the given date interval.
    29  	Created *int64 `form:"created"`
    30  	// Only return items that were created during the given date interval.
    31  	CreatedRange *RangeQueryParams `form:"created"`
    32  	// Specifies which fields in the response should be expanded.
    33  	Expand []*string `form:"expand"`
    34  	// Return items belonging to the parent list whose value matches the specified value (using an "is like" match).
    35  	Value *string `form:"value"`
    36  	// Identifier for the parent value list this item belongs to.
    37  	ValueList *string `form:"value_list"`
    38  }
    39  
    40  // AddExpand appends a new field to expand.
    41  func (p *RadarValueListItemListParams) AddExpand(f string) {
    42  	p.Expand = append(p.Expand, &f)
    43  }
    44  
    45  // Value list items allow you to add specific values to a given Radar value list, which can then be used in rules.
    46  //
    47  // Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items)
    48  type RadarValueListItem struct {
    49  	APIResource
    50  	// Time at which the object was created. Measured in seconds since the Unix epoch.
    51  	Created int64 `json:"created"`
    52  	// The name or email address of the user who added this item to the value list.
    53  	CreatedBy string `json:"created_by"`
    54  	Deleted   bool   `json:"deleted"`
    55  	// Unique identifier for the object.
    56  	ID string `json:"id"`
    57  	// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
    58  	Livemode bool `json:"livemode"`
    59  	// String representing the object's type. Objects of the same type share the same value.
    60  	Object string `json:"object"`
    61  	// The value of the item.
    62  	Value string `json:"value"`
    63  	// The identifier of the value list this item belongs to.
    64  	ValueList string `json:"value_list"`
    65  }
    66  
    67  // RadarValueListItemList is a list of ValueListItems as retrieved from a list endpoint.
    68  type RadarValueListItemList struct {
    69  	APIResource
    70  	ListMeta
    71  	Data []*RadarValueListItem `json:"data"`
    72  }