RockyRoad 0.0.586__py3-none-any.whl → 0.0.592__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.
- rockyroad/modules/parts.py +2 -1
- rockyroad/modules/tco_calculator.py +90 -43
- {rockyroad-0.0.586.dist-info → rockyroad-0.0.592.dist-info}/METADATA +1 -1
- {rockyroad-0.0.586.dist-info → rockyroad-0.0.592.dist-info}/RECORD +7 -7
- {rockyroad-0.0.586.dist-info → rockyroad-0.0.592.dist-info}/WHEEL +0 -0
- {rockyroad-0.0.586.dist-info → rockyroad-0.0.592.dist-info}/licenses/LICENSE +0 -0
- {rockyroad-0.0.586.dist-info → rockyroad-0.0.592.dist-info}/top_level.txt +0 -0
rockyroad/modules/parts.py
CHANGED
|
@@ -63,8 +63,9 @@ class Parts(Consumer):
|
|
|
63
63
|
@http_get("parts/information")
|
|
64
64
|
def list_information(
|
|
65
65
|
self,
|
|
66
|
-
|
|
66
|
+
part_number: Query = None,
|
|
67
67
|
brand: Query = None,
|
|
68
|
+
exact_match: Query = None,
|
|
68
69
|
):
|
|
69
70
|
"""This call will return the part information for the part(s) specified."""
|
|
70
71
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .module_imports import
|
|
1
|
+
from .module_imports import get_key
|
|
2
2
|
from uplink.retry.when import status_5xx
|
|
3
3
|
from uplink import (
|
|
4
4
|
Consumer,
|
|
@@ -14,6 +14,9 @@ from uplink import (
|
|
|
14
14
|
Query,
|
|
15
15
|
)
|
|
16
16
|
|
|
17
|
+
# Module configuration
|
|
18
|
+
USE_SERVICES_API = True
|
|
19
|
+
key = get_key(use_services_api=USE_SERVICES_API)
|
|
17
20
|
|
|
18
21
|
@headers({"Ocp-Apim-Subscription-Key": key})
|
|
19
22
|
@retry(max_attempts=20, when=status_5xx())
|
|
@@ -21,8 +24,8 @@ class _TCO(Consumer):
|
|
|
21
24
|
"""Inteface to TCO resource for the RockyRoad API."""
|
|
22
25
|
|
|
23
26
|
def __init__(self, Resource, *args, **kw):
|
|
24
|
-
self._base_url = Resource._base_url
|
|
25
|
-
super().__init__(base_url=
|
|
27
|
+
self._base_url = Resource._services_base_url if USE_SERVICES_API else Resource._base_url
|
|
28
|
+
super().__init__(base_url=self._base_url, *args, **kw)
|
|
26
29
|
|
|
27
30
|
def costModel(self):
|
|
28
31
|
return self._Cost_Model(self)
|
|
@@ -30,6 +33,12 @@ class _TCO(Consumer):
|
|
|
30
33
|
def maintenance(self):
|
|
31
34
|
return self._Maintenance(self)
|
|
32
35
|
|
|
36
|
+
def tasks(self):
|
|
37
|
+
return self._Tasks(self)
|
|
38
|
+
|
|
39
|
+
def parts(self):
|
|
40
|
+
return self._Parts(self)
|
|
41
|
+
|
|
33
42
|
@headers({"Ocp-Apim-Subscription-Key": key})
|
|
34
43
|
@retry(max_attempts=20, when=status_5xx())
|
|
35
44
|
class _Cost_Model(Consumer):
|
|
@@ -103,13 +112,10 @@ class _TCO(Consumer):
|
|
|
103
112
|
self._base_url = Resource._base_url
|
|
104
113
|
super().__init__(base_url=Resource._base_url, *args, **kw)
|
|
105
114
|
|
|
106
|
-
def parts(self):
|
|
107
|
-
return self._Parts(self)
|
|
108
|
-
|
|
109
115
|
@returns.json
|
|
110
116
|
@http_get("calculators/tco/maintenance")
|
|
111
117
|
def list(
|
|
112
|
-
self,
|
|
118
|
+
self, tco_cost_model_uid: Query = None,
|
|
113
119
|
):
|
|
114
120
|
"""This call will return list of TCO Maintenances."""
|
|
115
121
|
|
|
@@ -133,41 +139,82 @@ class _TCO(Consumer):
|
|
|
133
139
|
def update(self, uid: str, tco_part: Body):
|
|
134
140
|
"""This call will update the TCO Maintenance."""
|
|
135
141
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
142
|
+
@headers({"Ocp-Apim-Subscription-Key": key})
|
|
143
|
+
@retry(max_attempts=20, when=status_5xx())
|
|
144
|
+
class _Parts(Consumer):
|
|
145
|
+
"""Inteface to TCO resource for the RockyRoad API."""
|
|
140
146
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
147
|
+
def __init__(self, Resource, *args, **kw):
|
|
148
|
+
self._base_url = Resource._base_url
|
|
149
|
+
super().__init__(base_url=Resource._base_url, *args, **kw)
|
|
150
|
+
|
|
151
|
+
def parts(self):
|
|
152
|
+
return self.TCO(self)
|
|
153
|
+
|
|
154
|
+
@returns.json
|
|
155
|
+
@http_get("calculators/tco/parts")
|
|
156
|
+
def list(
|
|
157
|
+
self,
|
|
158
|
+
tco_task_uid: Query = None
|
|
159
|
+
):
|
|
160
|
+
"""This call will return list of TCO Parts."""
|
|
161
|
+
|
|
162
|
+
@returns.json
|
|
163
|
+
@http_get("calculators/tco/parts/{uid}")
|
|
164
|
+
def get(self, uid: str):
|
|
165
|
+
"""This call will return the specified TCO Part."""
|
|
166
|
+
|
|
167
|
+
@delete("calculators/tco/parts/{uid}")
|
|
168
|
+
def delete(self, uid: str):
|
|
169
|
+
"""This call will delete the TCO Part."""
|
|
144
170
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
@returns.json
|
|
172
|
+
@json
|
|
173
|
+
@post("calculators/tco/parts")
|
|
174
|
+
def insert(self, tco_part: Body):
|
|
175
|
+
"""This call will create the TCO Part."""
|
|
176
|
+
|
|
177
|
+
@json
|
|
178
|
+
@patch("calculators/tco/parts/{uid}")
|
|
179
|
+
def update(self, uid: str, tco_part: Body):
|
|
180
|
+
"""This call will update the TCO Part."""
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
@headers({"Ocp-Apim-Subscription-Key": key})
|
|
184
|
+
@retry(max_attempts=20, when=status_5xx())
|
|
185
|
+
class _Tasks(Consumer):
|
|
186
|
+
"""Interface to TCO Tasks resource for the RockyRoad API."""
|
|
187
|
+
|
|
188
|
+
def __init__(self, Resource, *args, **kw):
|
|
189
|
+
self._base_url = Resource._base_url
|
|
190
|
+
super().__init__(base_url=Resource._base_url, *args, **kw)
|
|
191
|
+
|
|
192
|
+
@returns.json
|
|
193
|
+
@http_get("calculators/tco/tasks")
|
|
194
|
+
def list(self, tco_cost_model_uid: Query = None):
|
|
195
|
+
"""This call will return list of TCO Tasks."""
|
|
196
|
+
|
|
197
|
+
@returns.json
|
|
198
|
+
@http_get("calculators/tco/tasks/{uid}")
|
|
199
|
+
def get(self, uid: str):
|
|
200
|
+
"""This call will return the specified TCO Task."""
|
|
201
|
+
|
|
202
|
+
@delete("calculators/tco/tasks/{uid}")
|
|
203
|
+
def delete(self, uid: str):
|
|
204
|
+
"""This call will delete the TCO Task."""
|
|
205
|
+
|
|
206
|
+
@returns.json
|
|
207
|
+
@json
|
|
208
|
+
@post("calculators/tco/tasks")
|
|
209
|
+
def insert(self, tco_task: Body):
|
|
210
|
+
"""This call will create the TCO Task."""
|
|
211
|
+
|
|
212
|
+
@json
|
|
213
|
+
@post("calculators/tco/tasks/batch")
|
|
214
|
+
def insert_batch(self, tco_tasks: Body):
|
|
215
|
+
"""This call will create multiple TCO Tasks."""
|
|
216
|
+
|
|
217
|
+
@json
|
|
218
|
+
@patch("calculators/tco/tasks/{uid}")
|
|
219
|
+
def update(self, uid: str, tco_task: Body):
|
|
220
|
+
"""This call will update the TCO Task."""
|
|
@@ -34,7 +34,7 @@ rockyroad/modules/module_imports.py,sha256=vWkjAbKKZJyP_M31KlvWmSENDKlIaD9OO1i5M
|
|
|
34
34
|
rockyroad/modules/oracle_installed_base_assets.py,sha256=Kxci11rEcBDs0fuU4s3TNRK_GF_ZJ0Nk0ws85fkbErs,2844
|
|
35
35
|
rockyroad/modules/oracle_knowledge_management.py,sha256=P3nzpdlDtJQAbN7yW2BIDx6h5BHYp4yOm8fADrbKrNs,1873
|
|
36
36
|
rockyroad/modules/oracle_users.py,sha256=wtMcA70JKAQxj1j-izNjNbpZ_DPLN7_Nl59Ay9zXy0U,1726
|
|
37
|
-
rockyroad/modules/parts.py,sha256=
|
|
37
|
+
rockyroad/modules/parts.py,sha256=Ee4bKSoOzhrdMH1RTBSRMIMJf5BRFxkdppxwD22z-mA,5679
|
|
38
38
|
rockyroad/modules/portal_configurations.py,sha256=6mYcEK9VSuQi348m_1vzRmgS8hxbcJB7NiLQXnHoYgg,2673
|
|
39
39
|
rockyroad/modules/portal_users.py,sha256=h1IpyD02NtbZaVYy-mtyygBmJgvOHWzPRiJoQHyOj2k,1018
|
|
40
40
|
rockyroad/modules/predictive_maintenance.py,sha256=-lpt93hJC__oGmn8pdAHhwSmJVMTpDHhQLhOg8k-FlQ,695
|
|
@@ -44,7 +44,7 @@ rockyroad/modules/sharepoint.py,sha256=H_Oy2Q6ST1g-uX4spvlcYAf95zfuA-XO8UOKmtBvN
|
|
|
44
44
|
rockyroad/modules/simple_forms.py,sha256=mHrGDjHu_t8RIxF0Av-WaIb6U_1gNXY3oNpENsQw2mU,3555
|
|
45
45
|
rockyroad/modules/subscriptions.py,sha256=eT2AdETZqqtx55CxF0sW92-D5z9Eww1m8TSnybt2L7g,4472
|
|
46
46
|
rockyroad/modules/summaries.py,sha256=-UYNUaSBZB4jVatIItAVEF0ac4rlO-4Fk5hvL60lofs,2709
|
|
47
|
-
rockyroad/modules/tco_calculator.py,sha256=
|
|
47
|
+
rockyroad/modules/tco_calculator.py,sha256=KDBGWY5Wkfx8ODSUNvfwdt276suZGuBUnbLudbfan5w,7428
|
|
48
48
|
rockyroad/modules/technical_content_feedback.py,sha256=tZUZJ3CSi3Fv3MVnoGN15gzzi8EhOLYbVhcpwNsc_xg,18134
|
|
49
49
|
rockyroad/modules/telematics.py,sha256=qaU_ndUFGM6CpzpXjGhWsgZOScjpkW4Ui3KZJUliKjU,2040
|
|
50
50
|
rockyroad/modules/template.py,sha256=6RdWzHX3YZqdMQCU3IaCUgn1VWjS312Ok8pB8yDK790,2837
|
|
@@ -59,8 +59,8 @@ rockyroad/modules/warranty_pip.py,sha256=_viDrbdMOX07OirXCH-22bfeeid60IoIl-lqZr_
|
|
|
59
59
|
rockyroad/modules/warranty_rates.py,sha256=8oeDfg3boooBa3KPOWoR1JIm9yaX9Kslo4ZZnuuCDZA,1704
|
|
60
60
|
rockyroad/modules/warranty_registrations.py,sha256=ycTKiYoV9T_OTyKlwKSiLrDH7cOigSBzjIFI47GPhFA,1969
|
|
61
61
|
rockyroad/modules/warranty_rga.py,sha256=9rDQFE1YLw4dcpbt2yD3qIMxbvhUfoBNdpWl6KBRTPU,4714
|
|
62
|
-
rockyroad-0.0.
|
|
63
|
-
rockyroad-0.0.
|
|
64
|
-
rockyroad-0.0.
|
|
65
|
-
rockyroad-0.0.
|
|
66
|
-
rockyroad-0.0.
|
|
62
|
+
rockyroad-0.0.592.dist-info/licenses/LICENSE,sha256=2bm9uFabQZ3Ykb_SaSU_uUbAj2-htc6WJQmS_65qD00,1073
|
|
63
|
+
rockyroad-0.0.592.dist-info/METADATA,sha256=G-a-qL8knX0OJD19ohBvnBNzTPA5pz4mTW6tRWc9_SI,34189
|
|
64
|
+
rockyroad-0.0.592.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
65
|
+
rockyroad-0.0.592.dist-info/top_level.txt,sha256=2i16gCpB6x-hh1eUXH0KijIjfx08oEvLfV7eS9TL3Bs,10
|
|
66
|
+
rockyroad-0.0.592.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|