Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3428,8 +3428,10 @@ components:
example: level
type: string
value:
description: Constant value to use as the second operand in the filter expression.
This value is *required* when the relation operator is a binary operator.
description: "Constant value to use as the second operand in the filter\
\ expression. This value is *required* when the relation operator is a\
\ binary operator. For `in_array` and `not_in_array` relations, provide\
\ a comma-separated list of up to 20 values."
example: "10"
type: string
hours_ago:
Expand Down Expand Up @@ -3460,6 +3462,8 @@ components:
- not_exists
- time_elapsed_gt
- time_elapsed_lt
- in_array
- not_in_array
type: string
type: object
Operator:
Expand Down
4 changes: 3 additions & 1 deletion docs/Filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
|------------ | ------------- | ------------- | -------------|
|**field** | **String** | Required. Name of the field to use as the first operand in the filter expression. | [optional] |
|**key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
|**value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
|**value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values. | [optional] |
|**hoursAgo** | **String** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] |
|**radius** | **BigDecimal** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] |
|**lat** | **BigDecimal** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] |
Expand All @@ -30,6 +30,8 @@
| NOT_EXISTS | "not_exists" |
| TIME_ELAPSED_GT | "time_elapsed_gt" |
| TIME_ELAPSED_LT | "time_elapsed_lt" |
| IN_ARRAY | "in_array" |
| NOT_IN_ARRAY | "not_in_array" |



4 changes: 3 additions & 1 deletion docs/FilterExpression.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
|------------ | ------------- | ------------- | -------------|
|**field** | **String** | Required. Name of the field to use as the first operand in the filter expression. | [optional] |
|**key** | **String** | If `field` is `tag`, this field is *required* to specify `key` inside the tags. | [optional] |
|**value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. | [optional] |
|**value** | **String** | Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values. | [optional] |
|**hoursAgo** | **String** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional] |
|**radius** | **BigDecimal** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional] |
|**lat** | **BigDecimal** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional] |
Expand All @@ -31,6 +31,8 @@
| NOT_EXISTS | "not_exists" |
| TIME_ELAPSED_GT | "time_elapsed_gt" |
| TIME_ELAPSED_LT | "time_elapsed_lt" |
| IN_ARRAY | "in_array" |
| NOT_IN_ARRAY | "not_in_array" |



Expand Down
10 changes: 7 additions & 3 deletions src/main/java/com/onesignal/client/model/Filter.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ public enum RelationEnum {

TIME_ELAPSED_GT("time_elapsed_gt"),

TIME_ELAPSED_LT("time_elapsed_lt");
TIME_ELAPSED_LT("time_elapsed_lt"),

IN_ARRAY("in_array"),

NOT_IN_ARRAY("not_in_array");

private String value;

Expand Down Expand Up @@ -200,11 +204,11 @@ public Filter value(String value) {
}

/**
* Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.
* Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.
* @return value
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "10", value = "Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator.")
@ApiModelProperty(example = "10", value = "Constant value to use as the second operand in the filter expression. This value is *required* when the relation operator is a binary operator. For `in_array` and `not_in_array` relations, provide a comma-separated list of up to 20 values.")

public String getValue() {
return value;
Expand Down