-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_customer_custom_attribute_filter_value.go
31 lines (29 loc) · 5.04 KB
/
model_customer_custom_attribute_filter_value.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
/*
* Square Connect API
*
* Client library for accessing the Square Connect APIs
*
* API version: 2.0
* Contact: developers@squareup.com
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package models
// A type-specific filter used in a [custom attribute filter](https://developer.squareup.com/reference/square_2023-12-13/objects/CustomerCustomAttributeFilter) to search based on the value of a customer-related [custom attribute](https://developer.squareup.com/reference/square_2023-12-13/objects/CustomAttribute).
type CustomerCustomAttributeFilterValue struct {
// A filter for a query based on the value of an `Email`-type custom attribute. This filter is case-insensitive and can include `exact` or `fuzzy`, but not both. For an `exact` match, provide the complete email address. For a `fuzzy` match, provide a query expression containing one or more query tokens to match against the email address. Square removes any punctuation (including periods (.), underscores (_), and the @ symbol) and tokenizes the email addresses on spaces. A match is found if a tokenized email address contains all the tokens in the search query, irrespective of the token order. For example, `Steven gmail` matches steven.jones@gmail.com and mygmail@stevensbakery.com.
Email *CustomerTextFilter `json:"email,omitempty"`
// A filter for a query based on the value of a `PhoneNumber`-type custom attribute. This filter is case-insensitive and can include `exact` or `fuzzy`, but not both. For an `exact` match, provide the complete phone number. This is always an E.164-compliant phone number that starts with the + sign followed by the country code and subscriber number. For example, the format for a US phone number is +12061112222. For a `fuzzy` match, provide a query expression containing one or more query tokens to match against the phone number. Square removes any punctuation and tokenizes the expression on spaces. A match is found if a tokenized phone number contains all the tokens in the search query, irrespective of the token order. For example, `415 123 45` is tokenized to `415`, `123`, and `45`, which matches +14151234567 and +12345674158, but does not match +1234156780. Similarly, the expression `415` matches +14151234567, +12345674158, and +1234156780.
Phone *CustomerTextFilter `json:"phone,omitempty"`
// A filter for a query based on the value of a `String`-type custom attribute. This filter is case-insensitive and can include `exact` or `fuzzy`, but not both. For an `exact` match, provide the complete string. For a `fuzzy` match, provide a query expression containing one or more query tokens in any order that contain complete words to match against the string. Square tokenizes the expression using a grammar-based tokenizer. For example, the expressions `quick brown`, `brown quick`, and `quick fox` match \"The quick brown fox jumps over the lazy dog\". However, `quick foxes` and `qui` do not match.
Text *CustomerTextFilter `json:"text,omitempty"`
// A filter for a query based on the display name for a `Selection`-type custom attribute value. This filter is case-sensitive and can contain `any`, `all`, or both. The `none` condition is not supported. Provide the display name of each item that you want to search for. To find the display names for the selection, use the [Customer Custom Attributes API](https://developer.squareup.com/reference/square_2023-12-13/customer-custom-attributes-api) to retrieve the corresponding custom attribute definition and then check the `schema.items.names` field. For more information, see [Search based on selection](https://developer.squareup.com/docs/customers-api/use-the-api/search-customers#custom-attribute-value-filter-selection). Note that when a `Selection`-type custom attribute is assigned to a customer profile, the custom attribute value is a list of one or more UUIDs (sourced from the `schema.items.enum` field) that map to the item names. These UUIDs are unique per seller.
Selection *FilterValue `json:"selection,omitempty"`
// A filter for a query based on the value of a `Date`-type custom attribute. Provide a date range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Dates can be specified in `YYYY-MM-DD` format or as RFC 3339 timestamps.
Date *TimeRange `json:"date,omitempty"`
// A filter for a query based on the value of a `Number`-type custom attribute, which can be an integer or a decimal with up to 5 digits of precision. Provide a numerical range for this filter using `start_at`, `end_at`, or both. Range boundaries are inclusive. Numbers are specified as decimals or integers. The absolute value of range boundaries must not exceed `(2^63-1)/10^5`, or 92233720368547.
Number *FloatNumberRange `json:"number,omitempty"`
// A filter for a query based on the value of a `Boolean`-type custom attribute.
Boolean bool `json:"boolean,omitempty"`
// A filter for a query based on the value of an `Address`-type custom attribute. The filter can include `postal_code`, `country`, or both.
Address *CustomerAddressFilter `json:"address,omitempty"`
}