smartsheet-python-sdk 3.4.0__py2.py3-none-any.whl → 3.5.0__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- smartsheet/models/user_model.py +9 -0
- smartsheet/models/user_plan.py +9 -0
- smartsheet/smartsheet.py +10 -4
- smartsheet/version.py +2 -2
- {smartsheet_python_sdk-3.4.0.dist-info → smartsheet_python_sdk-3.5.0.dist-info}/METADATA +6 -18
- {smartsheet_python_sdk-3.4.0.dist-info → smartsheet_python_sdk-3.5.0.dist-info}/RECORD +10 -10
- {smartsheet_python_sdk-3.4.0.dist-info → smartsheet_python_sdk-3.5.0.dist-info}/WHEEL +1 -1
- {smartsheet_python_sdk-3.4.0.dist-info/licenses → smartsheet_python_sdk-3.5.0.dist-info}/LICENSE.md +0 -0
- {smartsheet_python_sdk-3.4.0.dist-info/licenses → smartsheet_python_sdk-3.5.0.dist-info}/NOTICE +0 -0
- {smartsheet_python_sdk-3.4.0.dist-info → smartsheet_python_sdk-3.5.0.dist-info}/top_level.txt +0 -0
smartsheet/models/user_model.py
CHANGED
|
@@ -51,6 +51,7 @@ class UserModel:
|
|
|
51
51
|
self._licensed_sheet_creator = Boolean()
|
|
52
52
|
self._mobile_phone = String()
|
|
53
53
|
self._profile_image = TypedObject(ProfileImage)
|
|
54
|
+
self._provisional_expiration_date = Timestamp()
|
|
54
55
|
self._resource_viewer = Boolean()
|
|
55
56
|
self._role = String()
|
|
56
57
|
self._seat_type = EnumeratedValue(SeatType)
|
|
@@ -197,6 +198,14 @@ class UserModel:
|
|
|
197
198
|
def profile_image(self, value):
|
|
198
199
|
self._profile_image.value = value
|
|
199
200
|
|
|
201
|
+
@property
|
|
202
|
+
def provisional_expiration_date(self):
|
|
203
|
+
return self._provisional_expiration_date.value
|
|
204
|
+
|
|
205
|
+
@provisional_expiration_date.setter
|
|
206
|
+
def provisional_expiration_date(self, value):
|
|
207
|
+
self._provisional_expiration_date.value = value
|
|
208
|
+
|
|
200
209
|
@property
|
|
201
210
|
def resource_viewer(self):
|
|
202
211
|
return self._resource_viewer.value
|
smartsheet/models/user_plan.py
CHANGED
|
@@ -20,6 +20,7 @@ class UserPlan:
|
|
|
20
20
|
self._seat_type = EnumeratedValue(SeatType)
|
|
21
21
|
self._seat_type_last_changed_at = Timestamp()
|
|
22
22
|
self._is_internal = Boolean()
|
|
23
|
+
self._provisional_expiration_date = Timestamp()
|
|
23
24
|
|
|
24
25
|
if props:
|
|
25
26
|
deserialize(self, props)
|
|
@@ -58,6 +59,14 @@ class UserPlan:
|
|
|
58
59
|
def is_internal(self, value):
|
|
59
60
|
self._is_internal.value = value
|
|
60
61
|
|
|
62
|
+
@property
|
|
63
|
+
def provisional_expiration_date(self):
|
|
64
|
+
return self._provisional_expiration_date.value
|
|
65
|
+
|
|
66
|
+
@provisional_expiration_date.setter
|
|
67
|
+
def provisional_expiration_date(self, value):
|
|
68
|
+
self._provisional_expiration_date.value = value
|
|
69
|
+
|
|
61
70
|
def to_dict(self):
|
|
62
71
|
return serialize(self)
|
|
63
72
|
|
smartsheet/smartsheet.py
CHANGED
|
@@ -629,8 +629,13 @@ class OperationErrorResult:
|
|
|
629
629
|
expected (list): Dashed expectations
|
|
630
630
|
"""
|
|
631
631
|
# look up name of the error
|
|
632
|
-
error_payload =
|
|
633
|
-
|
|
632
|
+
error_payload = {}
|
|
633
|
+
try:
|
|
634
|
+
error_payload = self.resp.json()
|
|
635
|
+
except json.JSONDecodeError:
|
|
636
|
+
# Do not fail if the response is not JSON
|
|
637
|
+
pass
|
|
638
|
+
error_code = error_payload.get("errorCode", 0)
|
|
634
639
|
try:
|
|
635
640
|
error_name = OperationErrorResult.error_lookup[error_code]["name"]
|
|
636
641
|
recommendation = OperationErrorResult.error_lookup[error_code][
|
|
@@ -638,6 +643,7 @@ class OperationErrorResult:
|
|
|
638
643
|
]
|
|
639
644
|
should_retry = OperationErrorResult.error_lookup[error_code]["should_retry"]
|
|
640
645
|
except:
|
|
646
|
+
# If error_code is present in the response but not in the lookup, default to ApiError
|
|
641
647
|
error_name = OperationErrorResult.error_lookup[0]["name"]
|
|
642
648
|
recommendation = OperationErrorResult.error_lookup[0]["recommendation"]
|
|
643
649
|
should_retry = OperationErrorResult.error_lookup[0]["should_retry"]
|
|
@@ -649,8 +655,8 @@ class OperationErrorResult:
|
|
|
649
655
|
"name": error_name,
|
|
650
656
|
"status_code": self.resp.status_code,
|
|
651
657
|
"code": error_code,
|
|
652
|
-
"message": error_payload
|
|
653
|
-
"ref_id": error_payload
|
|
658
|
+
"message": error_payload.get("message"),
|
|
659
|
+
"ref_id": error_payload.get("refId"),
|
|
654
660
|
"recommendation": recommendation,
|
|
655
661
|
"should_retry": should_retry,
|
|
656
662
|
}
|
smartsheet/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: smartsheet-python-sdk
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.5.0
|
|
4
4
|
Summary: Library that uses Python to connect to Smartsheet services (using API 2.0).
|
|
5
5
|
Home-page: http://smartsheet-platform.github.io/api-docs/
|
|
6
6
|
Author: Smartsheet
|
|
@@ -27,27 +27,15 @@ Requires-Dist: requests-toolbelt
|
|
|
27
27
|
Requires-Dist: six>=1.9
|
|
28
28
|
Requires-Dist: certifi
|
|
29
29
|
Requires-Dist: python-dateutil
|
|
30
|
-
Provides-Extra: test
|
|
31
|
-
Requires-Dist: coverage; extra == "test"
|
|
32
|
-
Requires-Dist: coveralls; extra == "test"
|
|
33
|
-
Requires-Dist: pytest; extra == "test"
|
|
34
30
|
Provides-Extra: develop
|
|
35
31
|
Requires-Dist: coverage; extra == "develop"
|
|
36
32
|
Requires-Dist: coveralls[yaml]; extra == "develop"
|
|
37
33
|
Requires-Dist: pytest; extra == "develop"
|
|
38
34
|
Requires-Dist: pytest-instafail; extra == "develop"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Dynamic: description-content-type
|
|
44
|
-
Dynamic: home-page
|
|
45
|
-
Dynamic: keywords
|
|
46
|
-
Dynamic: license
|
|
47
|
-
Dynamic: license-file
|
|
48
|
-
Dynamic: provides-extra
|
|
49
|
-
Dynamic: requires-dist
|
|
50
|
-
Dynamic: summary
|
|
35
|
+
Provides-Extra: test
|
|
36
|
+
Requires-Dist: coverage; extra == "test"
|
|
37
|
+
Requires-Dist: coveralls; extra == "test"
|
|
38
|
+
Requires-Dist: pytest; extra == "test"
|
|
51
39
|
|
|
52
40
|
# Smartsheet Python SDK
|
|
53
41
|
|
|
@@ -19,13 +19,13 @@ smartsheet/server.py,sha256=9wySsa_y_G-VO88tEHGHp919zRVFS0kCFIhiM6crWEU,1429
|
|
|
19
19
|
smartsheet/session.py,sha256=TQ3IgVZ64r7Dszwo8rMISFezWxuwFYshhW9QhzoA428,2125
|
|
20
20
|
smartsheet/sheets.py,sha256=2SUhanCsRFKCsbN-oAIRMsuYnk1aSFlXKzfZhxMo7d0,70603
|
|
21
21
|
smartsheet/sights.py,sha256=IZgy8CJZBJ-pQo6vNwkDSBuoLCv5RAW39kNUMMNJ-oc,11569
|
|
22
|
-
smartsheet/smartsheet.py,sha256=
|
|
22
|
+
smartsheet/smartsheet.py,sha256=1E08a6cvfsFTJZ9RcKoapJyHEKMHN-ZnvvTeS0EeJtc,23673
|
|
23
23
|
smartsheet/templates.py,sha256=z_Tj-4jZsu3RkLNbCAZWM2W05Zbio9T_uyU33rUPxzE,2898
|
|
24
24
|
smartsheet/token.py,sha256=5uz-IG5adx_zr2-uepH-W8ATv0dq9aZNjYLeZNwldqI,4703
|
|
25
25
|
smartsheet/types.py,sha256=aIdRJ89jwclmiZ4RH3hnZHJTFWFxgNKW3d8fghm21eM,9126
|
|
26
26
|
smartsheet/users.py,sha256=1KnqKJIzJEPMNy26BQY1b9jb3dItbzglrljV1MGD5ic,15887
|
|
27
27
|
smartsheet/util.py,sha256=12Y6eluecB8k4Ns-at81AEM18ND2TCKa9bF4BlNRrKM,5633
|
|
28
|
-
smartsheet/version.py,sha256=
|
|
28
|
+
smartsheet/version.py,sha256=ib6wlQF9MxPFthehaR0Hb9nDd2RxPY0l4DXT5-OTZDQ,160
|
|
29
29
|
smartsheet/webhooks.py,sha256=7F7g4Ks0GyS3QxsNWm1SFtrOr00jBisCjj7-hcToHM8,4637
|
|
30
30
|
smartsheet/workspaces.py,sha256=r81xh3HfYsX--ll5pQ-h7kSSJELokYV-bSjuD0WloeU,22651
|
|
31
31
|
smartsheet/models/__init__.py,sha256=4P6wKY8TpbV_rI5Z5c1ifxiwJEWL5bsvecVcjtUSJ9U,4754
|
|
@@ -135,8 +135,8 @@ smartsheet/models/title_rich_text_widget_content.py,sha256=zdHd_RdPPO7flnOmKqIkk
|
|
|
135
135
|
smartsheet/models/token_paginated_result.py,sha256=gfdLwahCrG7kTRMVvoXe78jqYdw6TeZEVbnKqUPwCqc,2297
|
|
136
136
|
smartsheet/models/update_request.py,sha256=5CkaSfhPLUPqtU6O9EuwFsyccpeBB3rnLLtvyxPmrpM,2881
|
|
137
137
|
smartsheet/models/user.py,sha256=CKMjNusL7_TU0V07vqoxruL6gQbXHctBNItJJIsSQHI,1553
|
|
138
|
-
smartsheet/models/user_model.py,sha256=
|
|
139
|
-
smartsheet/models/user_plan.py,sha256=
|
|
138
|
+
smartsheet/models/user_model.py,sha256=iULkJJ9T6BcosFwXtGA6ykS3JCQtfVGfLRridR1Z6jo,7226
|
|
139
|
+
smartsheet/models/user_plan.py,sha256=X0wqktFHBoBae4WQNM8nm_WL5HW0CZ0t6Uyd5tIKEKA,2012
|
|
140
140
|
smartsheet/models/user_profile.py,sha256=vKVL2XkFdO9l2RGZRRcpiASjek1q-Ffee7x4z53SLtE,2341
|
|
141
141
|
smartsheet/models/version.py,sha256=gC8YvEjB-RO9avvz3sG2lDHrDkMi0i-o9SP8h5vLrbY,1540
|
|
142
142
|
smartsheet/models/web_content_widget_content.py,sha256=N_2HEOsWLI6D3s6vGZV_qCsVEEe3xkxeK9xUAP4SqCI,1719
|
|
@@ -185,9 +185,9 @@ smartsheet/models/enums/system_column_type.py,sha256=UfhNUBGD_0K1Pas7fujGEuax55O
|
|
|
185
185
|
smartsheet/models/enums/update_request_status.py,sha256=xYF84x1dTFhJMYVi1q3G1T9u1IGN3szlR1jj5HHC0hE,777
|
|
186
186
|
smartsheet/models/enums/user_status.py,sha256=SB7qRcA0dhdRimsOKHCGF3CB6fL0XuifxQEWZGNNS8Q,766
|
|
187
187
|
smartsheet/models/enums/widget_type.py,sha256=VfVq59fLZsT4ks_ZBrtv52u2Cl60iAdlA6mGD_elz-k,1072
|
|
188
|
-
smartsheet_python_sdk-3.
|
|
189
|
-
smartsheet_python_sdk-3.
|
|
190
|
-
smartsheet_python_sdk-3.
|
|
191
|
-
smartsheet_python_sdk-3.
|
|
192
|
-
smartsheet_python_sdk-3.
|
|
193
|
-
smartsheet_python_sdk-3.
|
|
188
|
+
smartsheet_python_sdk-3.5.0.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
189
|
+
smartsheet_python_sdk-3.5.0.dist-info/METADATA,sha256=pKQPAebnqsby3wZGtduPwfPw7g6lwXRISEKJBMxF8Uo,4734
|
|
190
|
+
smartsheet_python_sdk-3.5.0.dist-info/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
|
|
191
|
+
smartsheet_python_sdk-3.5.0.dist-info/WHEEL,sha256=Kh9pAotZVRFj97E15yTA4iADqXdQfIVTHcNaZTjxeGM,110
|
|
192
|
+
smartsheet_python_sdk-3.5.0.dist-info/top_level.txt,sha256=kozWEYiKjyJmSXzd6p5ugkQ5bhoHS9V3NnvLagUfcNw,11
|
|
193
|
+
smartsheet_python_sdk-3.5.0.dist-info/RECORD,,
|
{smartsheet_python_sdk-3.4.0.dist-info/licenses → smartsheet_python_sdk-3.5.0.dist-info}/LICENSE.md
RENAMED
|
File without changes
|
{smartsheet_python_sdk-3.4.0.dist-info/licenses → smartsheet_python_sdk-3.5.0.dist-info}/NOTICE
RENAMED
|
File without changes
|
{smartsheet_python_sdk-3.4.0.dist-info → smartsheet_python_sdk-3.5.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|