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
2 changes: 1 addition & 1 deletion docs/Model/Filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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]
**hours_ago** | **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional]
**radius** | **float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional]
**lat** | **float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/Model/FilterExpression.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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]
**hours_ago** | **string** | If `field` is session-related, this is *required* to specify the number of hours before or after the user's session. | [optional]
**radius** | **float** | If `field` is `location`, this will specify the radius in meters from a provided location point. Use with `lat` and `long`. | [optional]
**lat** | **float** | If `field` is `location`, this is *required* to specify the user's latitude. | [optional]
Expand Down
6 changes: 5 additions & 1 deletion lib/model/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ public function getModelName()
public const RELATION_NOT_EXISTS = 'not_exists';
public const RELATION_TIME_ELAPSED_GT = 'time_elapsed_gt';
public const RELATION_TIME_ELAPSED_LT = 'time_elapsed_lt';
public const RELATION_IN_ARRAY = 'in_array';
public const RELATION_NOT_IN_ARRAY = 'not_in_array';

/**
* Gets allowable values of the enum
Expand All @@ -223,6 +225,8 @@ public function getRelationAllowableValues()
self::RELATION_NOT_EXISTS,
self::RELATION_TIME_ELAPSED_GT,
self::RELATION_TIME_ELAPSED_LT,
self::RELATION_IN_ARRAY,
self::RELATION_NOT_IN_ARRAY,
];
}

Expand Down Expand Up @@ -345,7 +349,7 @@ public function getValue()
/**
* Sets value
*
* @param string|null $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.
* @param string|null $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.
*
* @return self
*/
Expand Down
6 changes: 5 additions & 1 deletion lib/model/FilterExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ public function getModelName()
public const RELATION_NOT_EXISTS = 'not_exists';
public const RELATION_TIME_ELAPSED_GT = 'time_elapsed_gt';
public const RELATION_TIME_ELAPSED_LT = 'time_elapsed_lt';
public const RELATION_IN_ARRAY = 'in_array';
public const RELATION_NOT_IN_ARRAY = 'not_in_array';
public const OPERATOR__OR = 'OR';
public const OPERATOR__AND = 'AND';

Expand All @@ -230,6 +232,8 @@ public function getRelationAllowableValues()
self::RELATION_NOT_EXISTS,
self::RELATION_TIME_ELAPSED_GT,
self::RELATION_TIME_ELAPSED_LT,
self::RELATION_IN_ARRAY,
self::RELATION_NOT_IN_ARRAY,
];
}

Expand Down Expand Up @@ -375,7 +379,7 @@ public function getValue()
/**
* Sets value
*
* @param string|null $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.
* @param string|null $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.
*
* @return self
*/
Expand Down