channel-app 0.0.131__py3-none-any.whl → 0.0.135__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.
- channel_app/app/product/service.py +16 -0
- channel_app/core/commands.py +3 -1
- channel_app/core/tests.py +15 -164
- channel_app/omnitron/commands/tests/test_products.py +494 -0
- {channel_app-0.0.131.dist-info → channel_app-0.0.135.dist-info}/METADATA +1 -1
- channel_app-0.0.135.dist-info/RECORD +60 -0
- {channel_app-0.0.131.dist-info → channel_app-0.0.135.dist-info}/WHEEL +1 -1
- channel_app/channel_app/app/__init__.py +0 -0
- channel_app/channel_app/app/order/__init__.py +0 -0
- channel_app/channel_app/app/order/service.py +0 -230
- channel_app/channel_app/app/product/__init__.py +0 -0
- channel_app/channel_app/app/product/service.py +0 -237
- channel_app/channel_app/app/product_price/__init__.py +0 -0
- channel_app/channel_app/app/product_price/service.py +0 -254
- channel_app/channel_app/app/product_stock/__init__.py +0 -0
- channel_app/channel_app/app/product_stock/service.py +0 -258
- channel_app/channel_app/app/setup/__init__.py +0 -0
- channel_app/channel_app/app/setup/service.py +0 -61
- channel_app/channel_app/channel/__init__.py +0 -0
- channel_app/channel_app/channel/commands/__init__.py +0 -0
- channel_app/channel_app/channel/commands/orders/__init__.py +0 -0
- channel_app/channel_app/channel/commands/orders/orders.py +0 -329
- channel_app/channel_app/channel/commands/product_categories.py +0 -1
- channel_app/channel_app/channel/commands/product_images.py +0 -1
- channel_app/channel_app/channel/commands/product_prices.py +0 -148
- channel_app/channel_app/channel/commands/product_stocks.py +0 -220
- channel_app/channel_app/channel/commands/products.py +0 -161
- channel_app/channel_app/channel/commands/setup.py +0 -948
- channel_app/channel_app/channel/integration.py +0 -84
- channel_app/channel_app/core/__init__.py +0 -0
- channel_app/channel_app/core/clients.py +0 -12
- channel_app/channel_app/core/commands.py +0 -364
- channel_app/channel_app/core/data.py +0 -227
- channel_app/channel_app/core/integration.py +0 -74
- channel_app/channel_app/core/products.py +0 -64
- channel_app/channel_app/core/settings.py +0 -28
- channel_app/channel_app/core/utilities.py +0 -99
- channel_app/channel_app/omnitron/__init__.py +0 -0
- channel_app/channel_app/omnitron/batch_request.py +0 -82
- channel_app/channel_app/omnitron/commands/__init__.py +0 -0
- channel_app/channel_app/omnitron/commands/batch_requests.py +0 -281
- channel_app/channel_app/omnitron/commands/error_reports.py +0 -86
- channel_app/channel_app/omnitron/commands/integration_actions.py +0 -200
- channel_app/channel_app/omnitron/commands/orders/__init__.py +0 -0
- channel_app/channel_app/omnitron/commands/orders/addresses.py +0 -242
- channel_app/channel_app/omnitron/commands/orders/cargo_companies.py +0 -40
- channel_app/channel_app/omnitron/commands/orders/customers.py +0 -72
- channel_app/channel_app/omnitron/commands/orders/orders.py +0 -450
- channel_app/channel_app/omnitron/commands/product_categories.py +0 -1
- channel_app/channel_app/omnitron/commands/product_images.py +0 -1
- channel_app/channel_app/omnitron/commands/product_prices.py +0 -192
- channel_app/channel_app/omnitron/commands/product_stocks.py +0 -229
- channel_app/channel_app/omnitron/commands/products.py +0 -735
- channel_app/channel_app/omnitron/commands/setup.py +0 -839
- channel_app/channel_app/omnitron/constants.py +0 -98
- channel_app/channel_app/omnitron/exceptions.py +0 -42
- channel_app/channel_app/omnitron/integration.py +0 -159
- channel_app/setup.py +0 -21
- channel_app-0.0.131.dist-info/RECORD +0 -110
- /channel_app/{channel_app → omnitron/commands/tests}/__init__.py +0 -0
- {channel_app-0.0.131.dist-info → channel_app-0.0.135.dist-info}/top_level.txt +0 -0
@@ -1,948 +0,0 @@
|
|
1
|
-
from typing import Tuple, Any, List
|
2
|
-
|
3
|
-
from omnisdk.omnitron.models import IntegrationAction
|
4
|
-
|
5
|
-
from channel_app.core.commands import ChannelCommandInterface
|
6
|
-
from channel_app.core.data import (CategoryTreeDto, CategoryNodeDto,
|
7
|
-
CategoryDto,
|
8
|
-
CategoryAttributeDto,
|
9
|
-
CategoryAttributeValueDto, ErrorReportDto,
|
10
|
-
ChannelConfSchemaField)
|
11
|
-
from channel_app.omnitron.constants import ChannelConfSchemaDataTypes
|
12
|
-
|
13
|
-
|
14
|
-
class GetCategoryTreeAndNodes(ChannelCommandInterface):
|
15
|
-
"""
|
16
|
-
Category trees and categories represent an easy way to find, list, filter
|
17
|
-
products. Tree representation of the sales channel must be fetched and
|
18
|
-
all products we want to sell must be assigned to a category.
|
19
|
-
|
20
|
-
This command fetches all categories belonging to a sales channels and their
|
21
|
-
tree structure.
|
22
|
-
|
23
|
-
input olarak do_action'da
|
24
|
-
objects -> None tipinde kayıt alır. Yani veri almaz
|
25
|
-
batch_request -> BatchRequest tipinde kayıt alır. Ana işleme ait
|
26
|
-
BatchRequest kaydı. Rapor üretmek için kullanılır.
|
27
|
-
|
28
|
-
CategoryTreeDto -> Kategori ağacı ve buna bağlı dalları barındıran veri tipi.
|
29
|
-
|
30
|
-
ErrorReportDto -> Rapor için üretilmiş veri tipi. Hata olmasada uretilebilir.
|
31
|
-
|
32
|
-
"""
|
33
|
-
|
34
|
-
def get_data(self):
|
35
|
-
|
36
|
-
data = self.objects
|
37
|
-
return data
|
38
|
-
|
39
|
-
def validated_data(self, data) -> object:
|
40
|
-
return data
|
41
|
-
|
42
|
-
def transform_data(self, data) -> object:
|
43
|
-
return data
|
44
|
-
|
45
|
-
def send_request(self, validated_data) -> object:
|
46
|
-
response = self.__mocked_request(data=validated_data)
|
47
|
-
return response
|
48
|
-
|
49
|
-
def normalize_response(self, data, validated_data, transformed_data,
|
50
|
-
response) -> Tuple[
|
51
|
-
CategoryTreeDto, List[ErrorReportDto], Any]:
|
52
|
-
"""
|
53
|
-
Convert channel category tree to the format OmnitronIntegration
|
54
|
-
requires
|
55
|
-
"""
|
56
|
-
report = self.create_report(response)
|
57
|
-
node_dict = {}
|
58
|
-
|
59
|
-
stack = []
|
60
|
-
current = {
|
61
|
-
"id": None,
|
62
|
-
"name": "root",
|
63
|
-
"parentId": None,
|
64
|
-
"subCategories": response["categories"]
|
65
|
-
}
|
66
|
-
# TODO document parent of top level nodes should be None
|
67
|
-
# TODO document id and parent_id of root node must be None
|
68
|
-
while True:
|
69
|
-
if current:
|
70
|
-
category_node = CategoryNodeDto(
|
71
|
-
parent=node_dict[current["parentId"]] if current[
|
72
|
-
"parentId"] else None,
|
73
|
-
remote_id=current["id"],
|
74
|
-
children=[],
|
75
|
-
name=current["name"]
|
76
|
-
)
|
77
|
-
node_dict[current["id"]] = category_node
|
78
|
-
for child in current["subCategories"]:
|
79
|
-
stack.append(child)
|
80
|
-
current = None
|
81
|
-
elif stack:
|
82
|
-
current = stack.pop()
|
83
|
-
else:
|
84
|
-
break
|
85
|
-
category_tree = CategoryTreeDto(root=node_dict[None])
|
86
|
-
node_dict.pop(None)
|
87
|
-
for node_remote_id, node in node_dict.items():
|
88
|
-
if node.parent is not None:
|
89
|
-
node_dict[node.parent.remote_id].children.append(node)
|
90
|
-
else:
|
91
|
-
category_tree.root.children.append(node)
|
92
|
-
|
93
|
-
return category_tree, report, data
|
94
|
-
|
95
|
-
def __mocked_request(self, data):
|
96
|
-
"""
|
97
|
-
Mock a request and response for the send operation to mimic actual channel data
|
98
|
-
|
99
|
-
"""
|
100
|
-
return {
|
101
|
-
"categories": [
|
102
|
-
{
|
103
|
-
"id": 403,
|
104
|
-
"name": "Ayakkabı",
|
105
|
-
"parentId": None,
|
106
|
-
"subCategories": [
|
107
|
-
{
|
108
|
-
"id": 420,
|
109
|
-
"name": "Spor Ayakkabı",
|
110
|
-
"parentId": 403,
|
111
|
-
"subCategories": [
|
112
|
-
{
|
113
|
-
"id": 421,
|
114
|
-
"name": "Basketbol Ayakkabısı",
|
115
|
-
"parentId": 420,
|
116
|
-
"subCategories": []
|
117
|
-
},
|
118
|
-
{
|
119
|
-
"id": 422,
|
120
|
-
"name": "Fitness Ayakkabısı",
|
121
|
-
"parentId": 420,
|
122
|
-
"subCategories": []
|
123
|
-
},
|
124
|
-
{
|
125
|
-
"id": 426,
|
126
|
-
"name": "Halı Saha Ayakkabısı&Krampon",
|
127
|
-
"parentId": 420,
|
128
|
-
"subCategories": []
|
129
|
-
},
|
130
|
-
{
|
131
|
-
"id": 425,
|
132
|
-
"name": "Koşu & Antrenman Ayakkabısı",
|
133
|
-
"parentId": 420,
|
134
|
-
"subCategories": [
|
135
|
-
{
|
136
|
-
"id": 999,
|
137
|
-
"name": "Test Sub Category",
|
138
|
-
"parentId": 425,
|
139
|
-
"subCategories": []
|
140
|
-
}
|
141
|
-
]
|
142
|
-
}
|
143
|
-
]
|
144
|
-
}
|
145
|
-
]
|
146
|
-
}
|
147
|
-
]
|
148
|
-
}
|
149
|
-
|
150
|
-
|
151
|
-
class GetCategoryAttributes(ChannelCommandInterface):
|
152
|
-
"""
|
153
|
-
Along with classification, categories define a set of common attributes which makes
|
154
|
-
sense only for that category and not others. To manage this process the attributes
|
155
|
-
are fetched from the channel and certain validations are done to ensure product is
|
156
|
-
ready to be sold before sending to the channel.
|
157
|
-
|
158
|
-
This command fetches category attributes of a given category id.
|
159
|
-
"""
|
160
|
-
|
161
|
-
def get_data(self):
|
162
|
-
if self.objects:
|
163
|
-
assert isinstance(self.objects, IntegrationAction)
|
164
|
-
data = self.objects
|
165
|
-
return data
|
166
|
-
|
167
|
-
def validated_data(self, data) -> object:
|
168
|
-
return data
|
169
|
-
|
170
|
-
def transform_data(self, data) -> object:
|
171
|
-
return data
|
172
|
-
|
173
|
-
def send_request(self, validated_data) -> object:
|
174
|
-
response = self.__mocked_request(data=validated_data)
|
175
|
-
return response
|
176
|
-
|
177
|
-
def normalize_response(self, data, validated_data, transformed_data,
|
178
|
-
response) -> Tuple[CategoryDto, ErrorReportDto, Any]:
|
179
|
-
"""
|
180
|
-
Convert channel category tree to the format OmnitronIntegration
|
181
|
-
requires
|
182
|
-
"""
|
183
|
-
report = self.create_report(response)
|
184
|
-
|
185
|
-
category = CategoryDto(remote_id=response["id"],
|
186
|
-
name=response["name"],
|
187
|
-
attributes=[])
|
188
|
-
|
189
|
-
for channel_attribute in response["categoryAttributes"]:
|
190
|
-
attribute = CategoryAttributeDto(
|
191
|
-
remote_id=channel_attribute["attribute"]["id"],
|
192
|
-
name=channel_attribute["attribute"]["name"],
|
193
|
-
allow_custom_value=channel_attribute["allowCustom"],
|
194
|
-
required=channel_attribute["required"],
|
195
|
-
variant=channel_attribute["varianter"],
|
196
|
-
values=[]
|
197
|
-
)
|
198
|
-
for channel_attribute_value in channel_attribute["attributeValues"]:
|
199
|
-
attribute_value = CategoryAttributeValueDto(
|
200
|
-
remote_id=channel_attribute_value["id"],
|
201
|
-
name=channel_attribute_value["name"])
|
202
|
-
attribute.values.append(attribute_value)
|
203
|
-
category.attributes.append(attribute)
|
204
|
-
return category, report, data
|
205
|
-
|
206
|
-
def __mocked_request(self, data):
|
207
|
-
"""
|
208
|
-
Mock a request and response for the send operation to mimic actual channel data
|
209
|
-
"""
|
210
|
-
|
211
|
-
return {
|
212
|
-
"id": data.remote_id,
|
213
|
-
"name": "Sweatshirt",
|
214
|
-
"displayName": "Sweatshirt",
|
215
|
-
"categoryAttributes": [
|
216
|
-
{
|
217
|
-
"allowCustom": False,
|
218
|
-
"attribute": {
|
219
|
-
"id": 2,
|
220
|
-
"name": "Boy / Ölçü"
|
221
|
-
},
|
222
|
-
"attributeValues": [
|
223
|
-
{
|
224
|
-
"id": 10,
|
225
|
-
"name": "Kısa"
|
226
|
-
},
|
227
|
-
{
|
228
|
-
"id": 16,
|
229
|
-
"name": "Uzun"
|
230
|
-
},
|
231
|
-
{
|
232
|
-
"id": 572,
|
233
|
-
"name": "Orta"
|
234
|
-
},
|
235
|
-
{
|
236
|
-
"id": 575,
|
237
|
-
"name": "Battal Boy"
|
238
|
-
}
|
239
|
-
],
|
240
|
-
"categoryId": 601,
|
241
|
-
"required": False,
|
242
|
-
"varianter": False,
|
243
|
-
"slicer": False
|
244
|
-
},
|
245
|
-
{
|
246
|
-
"allowCustom": False,
|
247
|
-
"attribute": {
|
248
|
-
"id": 12,
|
249
|
-
"name": "Kol Tipi"
|
250
|
-
},
|
251
|
-
"attributeValues": [
|
252
|
-
{
|
253
|
-
"id": 62,
|
254
|
-
"name": "Askılı"
|
255
|
-
},
|
256
|
-
{
|
257
|
-
"id": 64,
|
258
|
-
"name": "Kısa Kol"
|
259
|
-
},
|
260
|
-
{
|
261
|
-
"id": 65,
|
262
|
-
"name": "Kolsuz"
|
263
|
-
},
|
264
|
-
{
|
265
|
-
"id": 67,
|
266
|
-
"name": "Tek Kol"
|
267
|
-
},
|
268
|
-
{
|
269
|
-
"id": 68,
|
270
|
-
"name": "Uzun"
|
271
|
-
},
|
272
|
-
{
|
273
|
-
"id": 69,
|
274
|
-
"name": "Uzun Kol"
|
275
|
-
},
|
276
|
-
{
|
277
|
-
"id": 622,
|
278
|
-
"name": "Geniş / Yarasa"
|
279
|
-
},
|
280
|
-
{
|
281
|
-
"id": 2841,
|
282
|
-
"name": "Volanlı"
|
283
|
-
},
|
284
|
-
{
|
285
|
-
"id": 2842,
|
286
|
-
"name": "Omzu açık"
|
287
|
-
},
|
288
|
-
{
|
289
|
-
"id": 2857,
|
290
|
-
"name": "Balon"
|
291
|
-
},
|
292
|
-
{
|
293
|
-
"id": 4020,
|
294
|
-
"name": "Ay"
|
295
|
-
},
|
296
|
-
{
|
297
|
-
"id": 7118,
|
298
|
-
"name": "Karpuz Kol"
|
299
|
-
},
|
300
|
-
{
|
301
|
-
"id": 23532,
|
302
|
-
"name": "Reglan Kol"
|
303
|
-
},
|
304
|
-
{
|
305
|
-
"id": 193959,
|
306
|
-
"name": "Mendil"
|
307
|
-
},
|
308
|
-
{
|
309
|
-
"id": 256024,
|
310
|
-
"name": "Yarasa Kol"
|
311
|
-
},
|
312
|
-
{
|
313
|
-
"id": 666277,
|
314
|
-
"name": "Takma Kol"
|
315
|
-
},
|
316
|
-
{
|
317
|
-
"id": 902440,
|
318
|
-
"name": "Ay Kol"
|
319
|
-
},
|
320
|
-
{
|
321
|
-
"id": 902442,
|
322
|
-
"name": "Standart Kol"
|
323
|
-
},
|
324
|
-
{
|
325
|
-
"id": 902443,
|
326
|
-
"name": "Düşük Kol"
|
327
|
-
},
|
328
|
-
{
|
329
|
-
"id": 902444,
|
330
|
-
"name": "Mendil Kol"
|
331
|
-
},
|
332
|
-
{
|
333
|
-
"id": 902445,
|
334
|
-
"name": "Balon Kol"
|
335
|
-
},
|
336
|
-
{
|
337
|
-
"id": 997508,
|
338
|
-
"name": "Büzgülü/Fırfırlı Kol"
|
339
|
-
},
|
340
|
-
{
|
341
|
-
"id": 997516,
|
342
|
-
"name": "İspanyol Kol"
|
343
|
-
}
|
344
|
-
],
|
345
|
-
"categoryId": 601,
|
346
|
-
"required": False,
|
347
|
-
"varianter": False,
|
348
|
-
"slicer": False
|
349
|
-
},
|
350
|
-
{
|
351
|
-
"allowCustom": False,
|
352
|
-
"attribute": {
|
353
|
-
"id": 14,
|
354
|
-
"name": "Materyal"
|
355
|
-
},
|
356
|
-
"attributeValues": [
|
357
|
-
{
|
358
|
-
"id": 77,
|
359
|
-
"name": "Akrilik"
|
360
|
-
},
|
361
|
-
{
|
362
|
-
"id": 79,
|
363
|
-
"name": "Bambu"
|
364
|
-
},
|
365
|
-
{
|
366
|
-
"id": 91,
|
367
|
-
"name": "Kumaş"
|
368
|
-
},
|
369
|
-
{
|
370
|
-
"id": 99,
|
371
|
-
"name": "Polyester"
|
372
|
-
},
|
373
|
-
{
|
374
|
-
"id": 105,
|
375
|
-
"name": "Suni Deri"
|
376
|
-
},
|
377
|
-
{
|
378
|
-
"id": 195,
|
379
|
-
"name": "Kadife"
|
380
|
-
},
|
381
|
-
{
|
382
|
-
"id": 627,
|
383
|
-
"name": "Polar"
|
384
|
-
},
|
385
|
-
{
|
386
|
-
"id": 645,
|
387
|
-
"name": "Dalgıç Kumaş"
|
388
|
-
},
|
389
|
-
{
|
390
|
-
"id": 646,
|
391
|
-
"name": "Şerpa"
|
392
|
-
},
|
393
|
-
{
|
394
|
-
"id": 654,
|
395
|
-
"name": "Poliamid"
|
396
|
-
},
|
397
|
-
{
|
398
|
-
"id": 661,
|
399
|
-
"name": "PVC"
|
400
|
-
},
|
401
|
-
{
|
402
|
-
"id": 674,
|
403
|
-
"name": "Modal"
|
404
|
-
},
|
405
|
-
{
|
406
|
-
"id": 675,
|
407
|
-
"name": "Saten"
|
408
|
-
},
|
409
|
-
{
|
410
|
-
"id": 678,
|
411
|
-
"name": "Likra"
|
412
|
-
},
|
413
|
-
{
|
414
|
-
"id": 679,
|
415
|
-
"name": "Zincir"
|
416
|
-
},
|
417
|
-
{
|
418
|
-
"id": 681,
|
419
|
-
"name": "Pamuklu"
|
420
|
-
},
|
421
|
-
{
|
422
|
-
"id": 690,
|
423
|
-
"name": "Viskon"
|
424
|
-
},
|
425
|
-
{
|
426
|
-
"id": 710,
|
427
|
-
"name": "Keten"
|
428
|
-
},
|
429
|
-
{
|
430
|
-
"id": 713,
|
431
|
-
"name": "Elyaf"
|
432
|
-
},
|
433
|
-
{
|
434
|
-
"id": 727,
|
435
|
-
"name": "Pamuk-Polyester"
|
436
|
-
},
|
437
|
-
{
|
438
|
-
"id": 7119,
|
439
|
-
"name": "Lyocell"
|
440
|
-
},
|
441
|
-
{
|
442
|
-
"id": 9328,
|
443
|
-
"name": "Naylon"
|
444
|
-
},
|
445
|
-
{
|
446
|
-
"id": 9329,
|
447
|
-
"name": "Liyosel"
|
448
|
-
},
|
449
|
-
{
|
450
|
-
"id": 9330,
|
451
|
-
"name": "Poliüretan"
|
452
|
-
},
|
453
|
-
{
|
454
|
-
"id": 9331,
|
455
|
-
"name": "Asetat"
|
456
|
-
},
|
457
|
-
{
|
458
|
-
"id": 12277,
|
459
|
-
"name": "Elastan"
|
460
|
-
},
|
461
|
-
{
|
462
|
-
"id": 12278,
|
463
|
-
"name": "Fibre"
|
464
|
-
},
|
465
|
-
{
|
466
|
-
"id": 12279,
|
467
|
-
"name": "Linen"
|
468
|
-
},
|
469
|
-
{
|
470
|
-
"id": 12280,
|
471
|
-
"name": "Lureks"
|
472
|
-
},
|
473
|
-
{
|
474
|
-
"id": 12281,
|
475
|
-
"name": "Metalik İplik"
|
476
|
-
},
|
477
|
-
{
|
478
|
-
"id": 12282,
|
479
|
-
"name": "Mikro Polyester"
|
480
|
-
},
|
481
|
-
{
|
482
|
-
"id": 12283,
|
483
|
-
"name": "Poliakrilik"
|
484
|
-
},
|
485
|
-
{
|
486
|
-
"id": 12284,
|
487
|
-
"name": "Spandeks"
|
488
|
-
},
|
489
|
-
{
|
490
|
-
"id": 12285,
|
491
|
-
"name": "Viskoz"
|
492
|
-
},
|
493
|
-
{
|
494
|
-
"id": 12286,
|
495
|
-
"name": "Yün"
|
496
|
-
},
|
497
|
-
{
|
498
|
-
"id": 16668,
|
499
|
-
"name": "%100 Viskon"
|
500
|
-
},
|
501
|
-
{
|
502
|
-
"id": 16826,
|
503
|
-
"name": "%100 Polyester"
|
504
|
-
},
|
505
|
-
{
|
506
|
-
"id": 19513,
|
507
|
-
"name": "Pamuk-Elastan"
|
508
|
-
},
|
509
|
-
{
|
510
|
-
"id": 22135,
|
511
|
-
"name": "Pamuk-Polyester-Elastan"
|
512
|
-
},
|
513
|
-
{
|
514
|
-
"id": 23674,
|
515
|
-
"name": "Elastan-Viskon-Polyester"
|
516
|
-
},
|
517
|
-
{
|
518
|
-
"id": 137105,
|
519
|
-
"name": "Yün - Akrilik - Polyester"
|
520
|
-
},
|
521
|
-
{
|
522
|
-
"id": 144229,
|
523
|
-
"name": "%100 Organik Pamuk"
|
524
|
-
},
|
525
|
-
{
|
526
|
-
"id": 144666,
|
527
|
-
"name": "Pamuk-Viskon-Polyester"
|
528
|
-
},
|
529
|
-
{
|
530
|
-
"id": 165153,
|
531
|
-
"name": "Polietilen"
|
532
|
-
},
|
533
|
-
{
|
534
|
-
"id": 176093,
|
535
|
-
"name": "Pamuk - Polyamid"
|
536
|
-
},
|
537
|
-
{
|
538
|
-
"id": 194604,
|
539
|
-
"name": "Pamuk - Polietilen"
|
540
|
-
},
|
541
|
-
{
|
542
|
-
"id": 212262,
|
543
|
-
"name": "%100 Pamuk"
|
544
|
-
},
|
545
|
-
{
|
546
|
-
"id": 997542,
|
547
|
-
"name": "Polyamid"
|
548
|
-
},
|
549
|
-
{
|
550
|
-
"id": 997984,
|
551
|
-
"name": "Viskon Karışımlı"
|
552
|
-
},
|
553
|
-
{
|
554
|
-
"id": 997987,
|
555
|
-
"name": "Polyester Karışımlı"
|
556
|
-
},
|
557
|
-
{
|
558
|
-
"id": 997994,
|
559
|
-
"name": "Polyamid Karışımlı"
|
560
|
-
},
|
561
|
-
{
|
562
|
-
"id": 998003,
|
563
|
-
"name": "Yün Karışımlı"
|
564
|
-
},
|
565
|
-
{
|
566
|
-
"id": 998008,
|
567
|
-
"name": "Pamuk Karışımlı"
|
568
|
-
},
|
569
|
-
{
|
570
|
-
"id": 998013,
|
571
|
-
"name": "Pamuk Polyester"
|
572
|
-
},
|
573
|
-
{
|
574
|
-
"id": 998020,
|
575
|
-
"name": "Keten Karışımlı"
|
576
|
-
},
|
577
|
-
{
|
578
|
-
"id": 1005632,
|
579
|
-
"name": "Lyocell Karışımlı"
|
580
|
-
},
|
581
|
-
{
|
582
|
-
"id": 1005633,
|
583
|
-
"name": "Keten Görünümlü"
|
584
|
-
},
|
585
|
-
{
|
586
|
-
"id": 1178581,
|
587
|
-
"name": "Pamuk Elastan"
|
588
|
-
},
|
589
|
-
{
|
590
|
-
"id": 1178593,
|
591
|
-
"name": "Polyester Elastan"
|
592
|
-
}
|
593
|
-
],
|
594
|
-
"categoryId": 601,
|
595
|
-
"required": False,
|
596
|
-
"varianter": False,
|
597
|
-
"slicer": False
|
598
|
-
},
|
599
|
-
{
|
600
|
-
"allowCustom": False,
|
601
|
-
"attribute": {
|
602
|
-
"id": 18,
|
603
|
-
"name": "Parça Sayısı"
|
604
|
-
},
|
605
|
-
"attributeValues": [
|
606
|
-
{
|
607
|
-
"id": 314394,
|
608
|
-
"name": "3"
|
609
|
-
},
|
610
|
-
{
|
611
|
-
"id": 314396,
|
612
|
-
"name": "1"
|
613
|
-
},
|
614
|
-
{
|
615
|
-
"id": 314398,
|
616
|
-
"name": "2"
|
617
|
-
},
|
618
|
-
{
|
619
|
-
"id": 314400,
|
620
|
-
"name": "5"
|
621
|
-
},
|
622
|
-
{
|
623
|
-
"id": 314401,
|
624
|
-
"name": "4"
|
625
|
-
},
|
626
|
-
{
|
627
|
-
"id": 417420,
|
628
|
-
"name": "6"
|
629
|
-
}
|
630
|
-
],
|
631
|
-
"categoryId": 601,
|
632
|
-
"required": False,
|
633
|
-
"varianter": False,
|
634
|
-
"slicer": False
|
635
|
-
},
|
636
|
-
{
|
637
|
-
"allowCustom": False,
|
638
|
-
"attribute": {
|
639
|
-
"id": 22,
|
640
|
-
"name": "Yaka Tipi"
|
641
|
-
},
|
642
|
-
"attributeValues": [
|
643
|
-
{
|
644
|
-
"id": 175,
|
645
|
-
"name": "Balıkçı Yaka"
|
646
|
-
},
|
647
|
-
{
|
648
|
-
"id": 176,
|
649
|
-
"name": "Bebe Yaka"
|
650
|
-
},
|
651
|
-
{
|
652
|
-
"id": 177,
|
653
|
-
"name": "Bisiklet Yaka"
|
654
|
-
},
|
655
|
-
{
|
656
|
-
"id": 178,
|
657
|
-
"name": "Degaje Yaka"
|
658
|
-
},
|
659
|
-
{
|
660
|
-
"id": 179,
|
661
|
-
"name": "Dik Yaka"
|
662
|
-
},
|
663
|
-
{
|
664
|
-
"id": 180,
|
665
|
-
"name": "Hakim Yaka"
|
666
|
-
},
|
667
|
-
{
|
668
|
-
"id": 181,
|
669
|
-
"name": "Kare Yaka"
|
670
|
-
},
|
671
|
-
{
|
672
|
-
"id": 182,
|
673
|
-
"name": "Kayık Yaka"
|
674
|
-
},
|
675
|
-
{
|
676
|
-
"id": 184,
|
677
|
-
"name": "Kruvaze Yaka"
|
678
|
-
},
|
679
|
-
{
|
680
|
-
"id": 186,
|
681
|
-
"name": "Kalp Yaka"
|
682
|
-
},
|
683
|
-
{
|
684
|
-
"id": 188,
|
685
|
-
"name": "Straplez"
|
686
|
-
},
|
687
|
-
{
|
688
|
-
"id": 189,
|
689
|
-
"name": "Şal Yaka"
|
690
|
-
},
|
691
|
-
{
|
692
|
-
"id": 190,
|
693
|
-
"name": "U Yaka"
|
694
|
-
},
|
695
|
-
{
|
696
|
-
"id": 191,
|
697
|
-
"name": "V-Yaka"
|
698
|
-
},
|
699
|
-
{
|
700
|
-
"id": 192,
|
701
|
-
"name": "Yuvarlak Yaka"
|
702
|
-
},
|
703
|
-
{
|
704
|
-
"id": 779,
|
705
|
-
"name": "Marine"
|
706
|
-
},
|
707
|
-
{
|
708
|
-
"id": 780,
|
709
|
-
"name": "Asimetrik Yaka"
|
710
|
-
},
|
711
|
-
{
|
712
|
-
"id": 781,
|
713
|
-
"name": "Boyundan Bağlamalı"
|
714
|
-
},
|
715
|
-
{
|
716
|
-
"id": 782,
|
717
|
-
"name": "Carmen Yaka"
|
718
|
-
},
|
719
|
-
{
|
720
|
-
"id": 783,
|
721
|
-
"name": "Halter Yaka"
|
722
|
-
},
|
723
|
-
{
|
724
|
-
"id": 784,
|
725
|
-
"name": "V Yaka"
|
726
|
-
},
|
727
|
-
{
|
728
|
-
"id": 785,
|
729
|
-
"name": "Choker Yaka"
|
730
|
-
},
|
731
|
-
{
|
732
|
-
"id": 786,
|
733
|
-
"name": "Boğazlı"
|
734
|
-
},
|
735
|
-
{
|
736
|
-
"id": 788,
|
737
|
-
"name": "Klasik"
|
738
|
-
},
|
739
|
-
{
|
740
|
-
"id": 789,
|
741
|
-
"name": "Kolej Yaka"
|
742
|
-
},
|
743
|
-
{
|
744
|
-
"id": 792,
|
745
|
-
"name": "Yarım Balıkçı Yaka"
|
746
|
-
},
|
747
|
-
{
|
748
|
-
"id": 793,
|
749
|
-
"name": "Ata Yaka"
|
750
|
-
},
|
751
|
-
{
|
752
|
-
"id": 795,
|
753
|
-
"name": "Gizli Düğmeli Yaka"
|
754
|
-
},
|
755
|
-
{
|
756
|
-
"id": 796,
|
757
|
-
"name": "İtalyan Yaka"
|
758
|
-
},
|
759
|
-
{
|
760
|
-
"id": 797,
|
761
|
-
"name": "Yarım İtalyan Yaka"
|
762
|
-
},
|
763
|
-
{
|
764
|
-
"id": 798,
|
765
|
-
"name": "Smokin"
|
766
|
-
},
|
767
|
-
{
|
768
|
-
"id": 799,
|
769
|
-
"name": "Beyzbol Yaka"
|
770
|
-
},
|
771
|
-
{
|
772
|
-
"id": 800,
|
773
|
-
"name": "Resort Yaka"
|
774
|
-
},
|
775
|
-
{
|
776
|
-
"id": 801,
|
777
|
-
"name": "Çentik Yaka"
|
778
|
-
},
|
779
|
-
{
|
780
|
-
"id": 802,
|
781
|
-
"name": "Sivri Yaka"
|
782
|
-
},
|
783
|
-
{
|
784
|
-
"id": 803,
|
785
|
-
"name": "Oyuk Yaka"
|
786
|
-
},
|
787
|
-
{
|
788
|
-
"id": 804,
|
789
|
-
"name": "Düğmeli"
|
790
|
-
},
|
791
|
-
{
|
792
|
-
"id": 805,
|
793
|
-
"name": "Fermuarlı"
|
794
|
-
},
|
795
|
-
{
|
796
|
-
"id": 806,
|
797
|
-
"name": "Kapamasız"
|
798
|
-
},
|
799
|
-
{
|
800
|
-
"id": 807,
|
801
|
-
"name": "Gömlek Yaka"
|
802
|
-
},
|
803
|
-
{
|
804
|
-
"id": 808,
|
805
|
-
"name": "Kapüşonlu"
|
806
|
-
},
|
807
|
-
{
|
808
|
-
"id": 2838,
|
809
|
-
"name": "Devrik Yaka"
|
810
|
-
},
|
811
|
-
{
|
812
|
-
"id": 2839,
|
813
|
-
"name": "İspanyol Yaka"
|
814
|
-
},
|
815
|
-
{
|
816
|
-
"id": 2840,
|
817
|
-
"name": "Dantel Yaka"
|
818
|
-
},
|
819
|
-
{
|
820
|
-
"id": 2845,
|
821
|
-
"name": "Madonna Yaka"
|
822
|
-
},
|
823
|
-
{
|
824
|
-
"id": 2846,
|
825
|
-
"name": "Havuz Yaka"
|
826
|
-
},
|
827
|
-
{
|
828
|
-
"id": 2847,
|
829
|
-
"name": "İspanyol"
|
830
|
-
},
|
831
|
-
{
|
832
|
-
"id": 2852,
|
833
|
-
"name": "Polo Yaka"
|
834
|
-
},
|
835
|
-
{
|
836
|
-
"id": 2854,
|
837
|
-
"name": "O Yaka"
|
838
|
-
},
|
839
|
-
{
|
840
|
-
"id": 2864,
|
841
|
-
"name": "Sıfır Yaka"
|
842
|
-
},
|
843
|
-
{
|
844
|
-
"id": 2870,
|
845
|
-
"name": "Geniş Yaka"
|
846
|
-
},
|
847
|
-
{
|
848
|
-
"id": 22140,
|
849
|
-
"name": "Balerin Yaka"
|
850
|
-
},
|
851
|
-
{
|
852
|
-
"id": 22141,
|
853
|
-
"name": "Alttan Biritli Yaka"
|
854
|
-
},
|
855
|
-
{
|
856
|
-
"id": 22142,
|
857
|
-
"name": "Mono Yaka"
|
858
|
-
},
|
859
|
-
{
|
860
|
-
"id": 22143,
|
861
|
-
"name": "Kırlangıç Yaka"
|
862
|
-
},
|
863
|
-
{
|
864
|
-
"id": 22144,
|
865
|
-
"name": "Tulum Yaka"
|
866
|
-
},
|
867
|
-
{
|
868
|
-
"id": 23359,
|
869
|
-
"name": "Pis Yaka"
|
870
|
-
},
|
871
|
-
{
|
872
|
-
"id": 175940,
|
873
|
-
"name": "Ceket Yaka"
|
874
|
-
},
|
875
|
-
{
|
876
|
-
"id": 175941,
|
877
|
-
"name": "Erkek Yaka"
|
878
|
-
},
|
879
|
-
{
|
880
|
-
"id": 175942,
|
881
|
-
"name": "Fular Yaka"
|
882
|
-
},
|
883
|
-
{
|
884
|
-
"id": 194557,
|
885
|
-
"name": "Bomber Yaka"
|
886
|
-
},
|
887
|
-
{
|
888
|
-
"id": 256019,
|
889
|
-
"name": "Kruvaze"
|
890
|
-
},
|
891
|
-
{
|
892
|
-
"id": 260637,
|
893
|
-
"name": "Apaş Yaka"
|
894
|
-
},
|
895
|
-
{
|
896
|
-
"id": 902493,
|
897
|
-
"name": "Düğmeli Yaka"
|
898
|
-
},
|
899
|
-
{
|
900
|
-
"id": 1178240,
|
901
|
-
"name": "Choker"
|
902
|
-
},
|
903
|
-
{
|
904
|
-
"id": 1178764,
|
905
|
-
"name": "Yakasız"
|
906
|
-
}
|
907
|
-
],
|
908
|
-
"categoryId": 601,
|
909
|
-
"required": False,
|
910
|
-
"varianter": False,
|
911
|
-
"slicer": False
|
912
|
-
}]
|
913
|
-
}
|
914
|
-
|
915
|
-
|
916
|
-
class GetChannelConfSchema(ChannelCommandInterface):
|
917
|
-
"""
|
918
|
-
Prepare channel conf schema
|
919
|
-
"""
|
920
|
-
|
921
|
-
def get_data(self):
|
922
|
-
return
|
923
|
-
|
924
|
-
def validated_data(self, data) -> object:
|
925
|
-
return data
|
926
|
-
|
927
|
-
def transform_data(self, data) -> object:
|
928
|
-
return data
|
929
|
-
|
930
|
-
def send_request(self, transformed_data) -> object:
|
931
|
-
return transformed_data
|
932
|
-
|
933
|
-
def normalize_response(self, data, validated_data, transformed_data,
|
934
|
-
response) -> Tuple[dict, Any, Any]:
|
935
|
-
schema = {
|
936
|
-
"setting_name": ChannelConfSchemaField(
|
937
|
-
required=True,
|
938
|
-
data_type=ChannelConfSchemaDataTypes.bool,
|
939
|
-
key="setting_name",
|
940
|
-
label="setting_name"),
|
941
|
-
"setting_name_2": ChannelConfSchemaField(
|
942
|
-
required=True,
|
943
|
-
data_type=ChannelConfSchemaDataTypes.text,
|
944
|
-
key="setting_name_2",
|
945
|
-
label="setting_name_2"),
|
946
|
-
}
|
947
|
-
|
948
|
-
return schema, None, None
|