-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathon_status.jsonata
More file actions
96 lines (93 loc) · 4.37 KB
/
on_status.jsonata
File metadata and controls
96 lines (93 loc) · 4.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
"data":$.responses.{
"context": context,
"message":{
"order":{
"id": message.order.id,
"status": message.order.status,
"created_at": message.order.created_at,
"provider":{
"id": message.order.provider.id,
"name": message.order.provider.descriptor.name,
"short_desc": message.order.provider.descriptor.short_desc,
"long_desc": message.order.provider.descriptor.long_desc,
"rating": message.order.provider.rating,
"images": message.order.provider.descriptor.images.
{
"url": url,
"size_type": size_type
},
"media": message.order.provider.descriptor.media.
{
"url": url
},
"rateable": message.order.provider.rateable,
"fulfillments":message.order.provider.fulfillments
},
"items": message.order.items.{
"id": id,
"code":descriptor.code,
"name": descriptor.name,
"short_desc": descriptor.short_desc,
"long_desc": descriptor.long_desc,
"images": descriptor.images.{"url": url, "size_type": size_type, "width": width, "height": height}[],
"price": price,
"rating": rating,
"xinput": xinput,
"rateable": rateable,
"time": time,
"quantity": quantity,
"categories": $map(
$filter(%.provider.categories, function($categories){$boolean($category.id in categories_ids)}),
function($category) {
{ "id": $category.id, "name": $category.descriptor.name, "code": $category.descriptor.code }
}
)[],
"fulfillments":$map(
$filter(%.provider.fulfillments, function($fulfillment) { $boolean($fulfillment.id in fulfillment_ids)}),
function($fulfillment) {
{
"id": $fulfillment.id,
"type": $fulfillment.type,
"rating": $fulfillment.rating,
"tags": $fulfillment.tags
}
}
)[],
"locations": $map(
$filter(%.provider.locations, function($location) { $boolean($location.id in location_ids)}),
function($location) {
{
"id": $location.id,
"city": $location.city.name,
"state": $location.state.name,
"country": $location.country.name
}
}
)[],
"tags": tags.{
"code": descriptor.code,
"name": descriptor.name,
"description": descriptor.description,
"display": display,
"list": list.{ "code": descriptor.code, "name": descriptor.name, "value": value, "display": display }[]
}[]
}[],
"fulfillments": message.order.fulfillments,
"quote": message.order.quote,
"billing": message.order.billing,
"payments": message.order.payments,
"cancellation_terms": message.order.cancellation_terms,
"type": message.order.type,
"tags": message.order.tags.{
"code": descriptor.code,
"name": descriptor.name,
"description": descriptor.description,
"display": display,
"list": list.{ "code": descriptor.code, "name": descriptor.name, "value": value, "display": display }[]
}[]
}
},
"rawResponse": $includeRawResponse ? $ :{}
}[]
}