Skip to content

Commit 6672921

Browse files
authored
Merge pull request #32 from adzerk/rs/user-segments
add user segments
2 parents 3e463d3 + b7a8ca5 commit 6672921

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

adzerk_decision_sdk/models/user.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,33 @@ class User(object):
3434
"""
3535
openapi_types = {
3636
'key': 'str',
37-
'group': 'int'
37+
'group': 'int',
38+
'segments': 'list[int]'
3839
}
3940

4041
attribute_map = {
4142
'key': 'key',
42-
'group': 'group'
43+
'group': 'group',
44+
'segments': 'segments'
4345
}
4446

45-
def __init__(self, key=None, group=None, local_vars_configuration=None): # noqa: E501
47+
def __init__(self, key=None, group=None, segments=None, local_vars_configuration=None): # noqa: E501
4648
"""User - a model defined in OpenAPI""" # noqa: E501
4749
if local_vars_configuration is None:
4850
local_vars_configuration = Configuration()
4951
self.local_vars_configuration = local_vars_configuration
5052

5153
self._key = None
5254
self._group = None
55+
self._segments = None
5356
self.discriminator = None
5457

5558
if key is not None:
5659
self.key = key
5760
if group is not None:
5861
self.group = group
62+
if segments is not None:
63+
self.segments = segments
5964

6065
@property
6166
def key(self):
@@ -103,6 +108,29 @@ def group(self, group):
103108

104109
self._group = group
105110

111+
@property
112+
def segments(self):
113+
"""Gets the segments of this User. # noqa: E501
114+
115+
Array of Segment Ids that will override any set on the UserDB record for the User # noqa: E501
116+
117+
:return: The segments of this User. # noqa: E501
118+
:rtype: list[int]
119+
"""
120+
return self._segments
121+
122+
@segments.setter
123+
def segments(self, segments):
124+
"""Sets the segments of this User.
125+
126+
Array of Segment Ids that will override any set on the UserDB record for the User # noqa: E501
127+
128+
:param segments: The segments of this User. # noqa: E501
129+
:type: list[int]
130+
"""
131+
132+
self._segments = segments
133+
106134
def to_dict(self):
107135
"""Returns the model properties as a dict"""
108136
result = {}

docs/User.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**key** | **str** | The UserKey used for UserDB Targeting | [optional]
88
**group** | **int** | The assigned cohort for the User | [optional]
9+
**segments** | **list[int]** | Array of Segment Ids that will override any set on the UserDB record for the User | [optional]
910

1011
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1112

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from setuptools import setup, find_packages # noqa: H301
88

99
NAME = "adzerk-decision-sdk"
10-
VERSION = "1.0.0-beta.20"
10+
VERSION = "1.0.0-beta.21"
1111
# To install the library, run the following
1212
#
1313
# python setup.py install

0 commit comments

Comments
 (0)