repzo-sap-absjo 1.0.8 → 1.0.9
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.
- package/lib/actions/create_invoice.d.ts +19 -13
- package/lib/actions/create_invoice.js +363 -214
- package/lib/actions/create_payment.d.ts +4 -1
- package/lib/actions/create_payment.js +200 -125
- package/lib/actions/create_proforma.d.ts +4 -1
- package/lib/actions/create_proforma.js +290 -165
- package/lib/actions/create_return_invoice.d.ts +4 -1
- package/lib/actions/create_return_invoice.js +321 -177
- package/lib/actions/create_transfer.d.ts +4 -1
- package/lib/actions/create_transfer.js +220 -143
- package/lib/actions/index.js +23 -15
- package/lib/commands/adjust_inventory.d.ts +4 -2
- package/lib/commands/adjust_inventory.js +290 -160
- package/lib/commands/bank.d.ts +4 -2
- package/lib/commands/bank.js +279 -157
- package/lib/commands/basic.js +66 -47
- package/lib/commands/category.d.ts +3 -1
- package/lib/commands/category.js +178 -104
- package/lib/commands/channel.d.ts +3 -1
- package/lib/commands/channel.js +198 -117
- package/lib/commands/client.d.ts +34 -32
- package/lib/commands/client.js +404 -244
- package/lib/commands/client_disabled.d.ts +3 -1
- package/lib/commands/client_disabled.js +163 -94
- package/lib/commands/index.d.ts +15 -11
- package/lib/commands/index.js +60 -60
- package/lib/commands/join.js +192 -66
- package/lib/commands/measureunit.d.ts +19 -14
- package/lib/commands/measureunit.js +289 -191
- package/lib/commands/measureunit_family.d.ts +10 -8
- package/lib/commands/measureunit_family.js +250 -138
- package/lib/commands/payment_term.d.ts +3 -1
- package/lib/commands/payment_term.js +202 -123
- package/lib/commands/price_list.d.ts +15 -15
- package/lib/commands/price_list.js +612 -326
- package/lib/commands/product.d.ts +32 -30
- package/lib/commands/product.js +425 -243
- package/lib/commands/product_disabled.d.ts +3 -1
- package/lib/commands/product_disabled.js +164 -94
- package/lib/commands/rep.js +221 -141
- package/lib/commands/tag.js +174 -109
- package/lib/commands/tax.js +177 -112
- package/lib/commands/warehouse.d.ts +3 -1
- package/lib/commands/warehouse.js +207 -119
- package/lib/index.d.ts +21 -12
- package/lib/test/actions/create_invoice.js +193 -188
- package/lib/test/actions/create_payment.js +112 -107
- package/lib/test/actions/create_proforma.js +220 -216
- package/lib/test/actions/create_return_invoice.js +205 -200
- package/lib/test/actions/create_transfer.js +120 -115
- package/lib/test/commands/adjust_inventory.js +90 -90
- package/lib/test/commands/bank.js +90 -90
- package/lib/test/commands/basic.js +328 -327
- package/lib/test/commands/category.js +90 -90
- package/lib/test/commands/channel.js +90 -90
- package/lib/test/commands/client.js +355 -353
- package/lib/test/commands/client_disabled.js +90 -90
- package/lib/test/commands/join.js +328 -327
- package/lib/test/commands/measureunit.js +90 -90
- package/lib/test/commands/measureunit_family.js +90 -90
- package/lib/test/commands/payment_term.js +90 -90
- package/lib/test/commands/price_list.js +337 -334
- package/lib/test/commands/product.js +90 -90
- package/lib/test/commands/product_disabled.js +90 -90
- package/lib/test/commands/rep.js +346 -344
- package/lib/test/commands/tag.js +90 -90
- package/lib/test/commands/tax.js +90 -90
- package/lib/test/commands/warehouse.js +90 -90
- package/lib/types.d.ts +83 -60
- package/lib/util.d.ts +70 -19
- package/lib/util.js +170 -144
- package/package.json +1 -1
- package/src/actions/create_invoice.ts +4 -13
- package/src/actions/create_payment.ts +4 -13
- package/src/actions/create_proforma.ts +28 -40
- package/src/actions/create_return_invoice.ts +4 -16
- package/src/actions/create_transfer.ts +24 -36
|
@@ -1,210 +1,215 @@
|
|
|
1
1
|
import { Actions } from "../../index.js";
|
|
2
|
-
Actions(
|
|
2
|
+
Actions(
|
|
3
|
+
{
|
|
3
4
|
version: "2.0",
|
|
4
5
|
routeKey: "POST /actions",
|
|
5
6
|
rawPath: "/actions",
|
|
6
7
|
rawQueryString: "app=repzo-sap-absjo&action=create_invoice",
|
|
7
8
|
headers: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
action_sync_id: "Actions-0000001",
|
|
10
|
+
accept: "*/*",
|
|
11
|
+
"accept-encoding": "gzip, deflate",
|
|
12
|
+
"content-length": "3658",
|
|
13
|
+
"content-type": "application/json",
|
|
14
|
+
host: "staging.marketplace.api.repzo.me",
|
|
15
|
+
"svix-id": "msg_29I1By29ETyPiZ4SNrc99KIg7D6",
|
|
16
|
+
"svix-signature": "v1,OkktM+dibxzeb0M6383POFjBr7DX14HECpBIh17FQnU=",
|
|
17
|
+
"svix-timestamp": "1652785653",
|
|
18
|
+
"user-agent": "Svix-Webhooks/1.4",
|
|
19
|
+
"x-amzn-trace-id": "Root=1-628381f6-0b2c6f346d2eb5d207b582ee",
|
|
20
|
+
"x-forwarded-for": "52.215.16.239",
|
|
21
|
+
"x-forwarded-port": "443",
|
|
22
|
+
"x-forwarded-proto": "https",
|
|
22
23
|
},
|
|
23
24
|
queryStringParameters: {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
action: "create_invoice",
|
|
26
|
+
app: "repzo-sap-absjo",
|
|
26
27
|
},
|
|
27
28
|
requestContext: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
accountId: "478266140170",
|
|
30
|
+
apiId: "ulkb1ikop2",
|
|
31
|
+
domainName: "staging.marketplace.api.repzo.me",
|
|
32
|
+
domainPrefix: "staging",
|
|
33
|
+
http: {
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: "/actions",
|
|
36
|
+
protocol: "HTTP/1.1",
|
|
37
|
+
sourceIp: "52.215.16.239",
|
|
38
|
+
userAgent: "Svix-Webhooks/1.4",
|
|
39
|
+
},
|
|
40
|
+
requestId: "SRE-ejb6IAMEPWQ=",
|
|
41
|
+
routeKey: "POST /actions",
|
|
42
|
+
stage: "$default",
|
|
43
|
+
time: "17/May/2022:11:07:34 +0000",
|
|
44
|
+
timeEpoch: 1652785654069,
|
|
44
45
|
},
|
|
45
46
|
body: JSON.stringify({
|
|
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
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
],
|
|
127
|
-
latest: true,
|
|
128
|
-
origin_warehouse: "6391cce3f3a9fd99bd2d17e4",
|
|
129
|
-
overwriteTaxExempt: false,
|
|
130
|
-
pre_discount_amount: 0,
|
|
131
|
-
pre_subtotal: 16840,
|
|
132
|
-
pre_tax_amount: 2694,
|
|
133
|
-
pre_taxable_subtotal: 16840,
|
|
134
|
-
pre_total: 19534,
|
|
135
|
-
processable: true,
|
|
136
|
-
promotions: [],
|
|
137
|
-
return_discount_amount: 0,
|
|
138
|
-
return_items: [],
|
|
139
|
-
return_subtotal: 0,
|
|
140
|
-
return_tax_amount: 0,
|
|
141
|
-
return_taxable_subtotal: 0,
|
|
142
|
-
return_total: 0,
|
|
143
|
-
route: null,
|
|
144
|
-
serial_number: {
|
|
145
|
-
_id: "639eaf84c843d331be3658bd",
|
|
146
|
-
count: 80,
|
|
147
|
-
formatted: "INV-1165-80",
|
|
148
|
-
identifier: "1165",
|
|
47
|
+
__v: 0,
|
|
48
|
+
_id: "639eaf634428fb70bdc0f1cd",
|
|
49
|
+
authorization:
|
|
50
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aW1lem9uZSI6IkFzaWEvUml5YWRoIiwidXNlcm5hbWUiOiJ1bmlwYWxqbzIwNCIsIm5hbWUiOiJWUyBBeWVzaCBJYnJhaGltICBBbGxib29uIiwic2NvcGUiOiJyZXAiLCJuYW1lU3BhY2UiOlsidW5pcGFsam8iXSwidGVhbSI6WyI2MzhjOWNlOWRmOWRjNzcyOTFiMWQyNzgiXSwiaWRlbnRpZmllciI6MTE2NSwiaWQiOiI2MzZhNWY3ZjYyNmJiOTU5Mzc1NzM1NWQiLCJhcHBfY29kZSI6InJlcHpvX3BybyIsImNvdW50cnlfY29kZSI6WyJKTyJdLCJwZXJtYVN0cmluZyI6InZ2djB2dnZ2djB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYwdnZ2dnZ2djAwMDB2MHYwdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2MHZ2dnZ2MHZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2MHYwdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYiLCJpYXQiOjE2NzEzMzg2NzksImV4cCI6MTY3MTM4MTg3OX0.E2H5w7-idnhtU5bGNcdo5_8E94z5TUdzTqXXNCEr7oA",
|
|
51
|
+
business_day: "2022-12-18",
|
|
52
|
+
client_id: "639ad007506dfca71556d892",
|
|
53
|
+
client_name: "الاصدقاء - الظليل",
|
|
54
|
+
comment: "",
|
|
55
|
+
company_namespace: ["unisap"],
|
|
56
|
+
createdAt: "2022-12-18T06:13:24.425Z",
|
|
57
|
+
creator: {
|
|
58
|
+
_id: "6395afcaa7fbbe901db1c5d9",
|
|
59
|
+
name: "VS Ayesh Ibrahim Allboon",
|
|
60
|
+
rep: "6395afcaa7fbbe901db1c5d9",
|
|
61
|
+
type: "rep",
|
|
62
|
+
},
|
|
63
|
+
currency: "JOD",
|
|
64
|
+
deductionFixed: 0,
|
|
65
|
+
deductionRatio: 0,
|
|
66
|
+
delivery_date: null,
|
|
67
|
+
discount_amount: 0,
|
|
68
|
+
due_date: "2022-12-18",
|
|
69
|
+
is_void: false,
|
|
70
|
+
issue_date: "2022-12-18",
|
|
71
|
+
items: [
|
|
72
|
+
{
|
|
73
|
+
_id: "639eaf84c843d331be3658c2",
|
|
74
|
+
applicable_promotions: [],
|
|
75
|
+
base_unit_qty: 4,
|
|
76
|
+
class: "invoice",
|
|
77
|
+
company_namespace: [],
|
|
78
|
+
deductedTax: 0,
|
|
79
|
+
deduction: 0,
|
|
80
|
+
deductionBeforeTax: 0,
|
|
81
|
+
deductionRatio: 0,
|
|
82
|
+
discount_value: 0,
|
|
83
|
+
discounted_price: 4210,
|
|
84
|
+
general_promotions: [],
|
|
85
|
+
gross_value: 4884,
|
|
86
|
+
isAdditional: false,
|
|
87
|
+
lineTotalAfterDeduction: 19534,
|
|
88
|
+
line_total: 19534,
|
|
89
|
+
line_total_without_modifiers: 19534,
|
|
90
|
+
measureunit: {
|
|
91
|
+
_id: "63981ca3bee5dd4b6b12e8c6",
|
|
92
|
+
company_namespace: [],
|
|
93
|
+
disabled: false,
|
|
94
|
+
factor: 1,
|
|
95
|
+
name: "PC",
|
|
96
|
+
parent: "63981c32e9f3eafb51d7f0af",
|
|
97
|
+
},
|
|
98
|
+
modifiers_groups: [],
|
|
99
|
+
modifiers_tax_total: 0,
|
|
100
|
+
modifiers_total: 0,
|
|
101
|
+
modifiers_total_before_tax: 0,
|
|
102
|
+
note: "",
|
|
103
|
+
overwritePrice: null,
|
|
104
|
+
price: 4210,
|
|
105
|
+
qty: 4,
|
|
106
|
+
tax: {
|
|
107
|
+
_id: "639715d5edafde008aefe936",
|
|
108
|
+
disabled: false,
|
|
109
|
+
name: "امانات ضريبة المبيعات 16%",
|
|
110
|
+
rate: 0.16,
|
|
111
|
+
type: "additive",
|
|
112
|
+
},
|
|
113
|
+
tax_amount: 674,
|
|
114
|
+
tax_total: 2694,
|
|
115
|
+
tax_total_without_modifiers: 2694,
|
|
116
|
+
total_before_tax: 16840,
|
|
117
|
+
total_before_tax_without_modifiers: 16840,
|
|
118
|
+
used_promotions: [],
|
|
119
|
+
variant: {
|
|
120
|
+
_id: "6398a6ade8a1cfdd26dc66fe",
|
|
121
|
+
listed_price: 0,
|
|
122
|
+
product_id: "6398a6ade8a1cfdd26dc66fc",
|
|
123
|
+
product_name: "BREITSAMER HONEY GOLDEN 500GR",
|
|
124
|
+
variant_id: "6398a6ade8a1cfdd26dc66fe",
|
|
125
|
+
variant_name: "010-BRE-HO0008",
|
|
126
|
+
},
|
|
149
127
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
128
|
+
],
|
|
129
|
+
latest: true,
|
|
130
|
+
origin_warehouse: "6391cce3f3a9fd99bd2d17e4",
|
|
131
|
+
overwriteTaxExempt: false,
|
|
132
|
+
pre_discount_amount: 0,
|
|
133
|
+
pre_subtotal: 16840,
|
|
134
|
+
pre_tax_amount: 2694,
|
|
135
|
+
pre_taxable_subtotal: 16840,
|
|
136
|
+
pre_total: 19534,
|
|
137
|
+
processable: true,
|
|
138
|
+
promotions: [],
|
|
139
|
+
return_discount_amount: 0,
|
|
140
|
+
return_items: [],
|
|
141
|
+
return_subtotal: 0,
|
|
142
|
+
return_tax_amount: 0,
|
|
143
|
+
return_taxable_subtotal: 0,
|
|
144
|
+
return_total: 0,
|
|
145
|
+
route: null,
|
|
146
|
+
serial_number: {
|
|
147
|
+
_id: "639eaf84c843d331be3658bd",
|
|
148
|
+
count: 80,
|
|
149
|
+
formatted: "INV-1165-80",
|
|
150
|
+
identifier: "1165",
|
|
151
|
+
},
|
|
152
|
+
shipping_charge: 0,
|
|
153
|
+
shipping_price: 0,
|
|
154
|
+
shipping_tax: 0,
|
|
155
|
+
signature: null,
|
|
156
|
+
status: "paid",
|
|
157
|
+
subtotal: 16840,
|
|
158
|
+
sync_id: "948ff1f9-b654-4a87-8858-9d11cb353de4",
|
|
159
|
+
tax_amount: 2694,
|
|
160
|
+
tax_exempt: false,
|
|
161
|
+
taxable_subtotal: 16840,
|
|
162
|
+
taxes: {
|
|
163
|
+
"امانات ضريبة المبيعات 16%": {
|
|
164
|
+
name: "امانات ضريبة المبيعات 16%",
|
|
165
|
+
rate: 0.16,
|
|
166
|
+
total: 2694,
|
|
167
|
+
type: "additive",
|
|
167
168
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
169
|
+
},
|
|
170
|
+
teams: ["638c9ce9df9dc77291b1d278"],
|
|
171
|
+
time: 1671343991648,
|
|
172
|
+
total: 19534,
|
|
173
|
+
totalDeductedTax: 0,
|
|
174
|
+
totalDeduction: 0,
|
|
175
|
+
totalDeductionBeforeTax: 0,
|
|
176
|
+
total_with_charges: 19534,
|
|
177
|
+
transaction_processed: true,
|
|
178
|
+
updatedAt: "2022-12-18T06:13:29.951Z",
|
|
179
|
+
version: 2,
|
|
180
|
+
visit_id: "15c245fa-3767-4efa-ae63-f5ee962b699d",
|
|
179
181
|
}),
|
|
180
182
|
isBase64Encoded: false,
|
|
181
|
-
},
|
|
183
|
+
},
|
|
184
|
+
{
|
|
182
185
|
app_id: "",
|
|
183
186
|
repzoEndPoint: "",
|
|
184
187
|
serviceEndPoint: "",
|
|
185
188
|
env: "staging",
|
|
186
189
|
data: {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
190
|
+
invoices: {
|
|
191
|
+
createInvoiceHook: false,
|
|
192
|
+
createReturnInvoiceHook: false,
|
|
193
|
+
},
|
|
194
|
+
payments: {
|
|
195
|
+
createPaymentHook: false,
|
|
196
|
+
},
|
|
197
|
+
proformas: {
|
|
198
|
+
createApprovedProformaHook: false,
|
|
199
|
+
},
|
|
200
|
+
transfer: {
|
|
201
|
+
createApprovedTransferHook: false,
|
|
202
|
+
},
|
|
203
|
+
repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
|
|
204
|
+
sapHostUrl: "http://unipal.b1pro.com:8083/api",
|
|
205
|
+
errorEmail: "maram.alshen@repzoapp.com",
|
|
206
|
+
serviceApiKey: "awdas",
|
|
207
|
+
warehouseDefaultUpdateDate: "2015-01-01",
|
|
208
|
+
DepartmentCode: "D2",
|
|
209
|
+
return_reason:
|
|
210
|
+
'[{sap_id:1,sap_name:"BarcodeIssue",repzo_name:"Barcodeissue",repzo_id:"62b074972b332895edf114fc"},{sap_id:2,sap_name:"Damaged",repzo_name:"Damaged",repzo_id:"62b074ace96258fb745982e4"},{sap_id:3,sap_name:"Nearexpiry",repzo_name:"Nearexpiry",repzo_id:"62b074c0a066173bd1c1ea0d"},{sap_id:4,sap_name:"Wrongprinting",repzo_name:"Wrongprinting",repzo_id:"62b074d79e7f41f306a4cb42"},{sap_id:5,sap_name:"experied",repzo_name:"Experied",repzo_id:"62b074faa066173bd1c1eec0"}]',
|
|
211
|
+
SalPersCode: "111",
|
|
212
|
+
SalesPersonCode: "111",
|
|
209
213
|
},
|
|
210
|
-
}
|
|
214
|
+
}
|
|
215
|
+
);
|
|
@@ -1,127 +1,132 @@
|
|
|
1
1
|
import { Actions } from "../../index.js";
|
|
2
|
-
Actions(
|
|
2
|
+
Actions(
|
|
3
|
+
{
|
|
3
4
|
version: "2.0",
|
|
4
5
|
routeKey: "POST /actions",
|
|
5
6
|
rawPath: "/actions",
|
|
6
7
|
rawQueryString: "app=repzo-sap-absjo&action=create_payment",
|
|
7
8
|
headers: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
action_sync_id: "Actions-0000004",
|
|
10
|
+
accept: "*/*",
|
|
11
|
+
"accept-encoding": "gzip, deflate",
|
|
12
|
+
"content-length": "3658",
|
|
13
|
+
"content-type": "application/json",
|
|
14
|
+
host: "staging.marketplace.api.repzo.me",
|
|
15
|
+
"svix-id": "msg_29I1By29ETyPiZ4SNrc99KIg7D6",
|
|
16
|
+
"svix-signature": "v1,OkktM+dibxzeb0M6383POFjBr7DX14HECpBIh17FQnU=",
|
|
17
|
+
"svix-timestamp": "1652785653",
|
|
18
|
+
"user-agent": "Svix-Webhooks/1.4",
|
|
19
|
+
"x-amzn-trace-id": "Root=1-628381f6-0b2c6f346d2eb5d207b582ee",
|
|
20
|
+
"x-forwarded-for": "52.215.16.239",
|
|
21
|
+
"x-forwarded-port": "443",
|
|
22
|
+
"x-forwarded-proto": "https",
|
|
22
23
|
},
|
|
23
24
|
queryStringParameters: {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
action: "create_payment",
|
|
26
|
+
app: "repzo-sap-absjo",
|
|
26
27
|
},
|
|
27
28
|
requestContext: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
accountId: "478266140170",
|
|
30
|
+
apiId: "ulkb1ikop2",
|
|
31
|
+
domainName: "staging.marketplace.api.repzo.me",
|
|
32
|
+
domainPrefix: "staging",
|
|
33
|
+
http: {
|
|
34
|
+
method: "POST",
|
|
35
|
+
path: "/actions",
|
|
36
|
+
protocol: "HTTP/1.1",
|
|
37
|
+
sourceIp: "52.215.16.239",
|
|
38
|
+
userAgent: "Svix-Webhooks/1.4",
|
|
39
|
+
},
|
|
40
|
+
requestId: "SRE-ejb6IAMEPWQ=",
|
|
41
|
+
routeKey: "POST /actions",
|
|
42
|
+
stage: "$default",
|
|
43
|
+
time: "17/May/2022:11:07:34 +0000",
|
|
44
|
+
timeEpoch: 1652785654069,
|
|
44
45
|
},
|
|
45
46
|
body: JSON.stringify({
|
|
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
|
-
|
|
47
|
+
_id: "639da8a8298f9ea4d6d543dd",
|
|
48
|
+
status: "unconsumed",
|
|
49
|
+
remainder: 3651631,
|
|
50
|
+
amount: 3651631,
|
|
51
|
+
client_id: "639adef7b4dc172fc503645e",
|
|
52
|
+
client_name: "ماي ماركت _ مسكه لتجارة المواد الغذائية",
|
|
53
|
+
creator: {
|
|
54
|
+
_id: "6395af44a7fbbe901db1c2aa",
|
|
55
|
+
type: "rep",
|
|
56
|
+
name: "RET MUSTAFA MOHAMMAD RASHEED ABDALLAH",
|
|
57
|
+
},
|
|
58
|
+
time: 1671276710322,
|
|
59
|
+
serial_number: {
|
|
60
|
+
identifier: "1036",
|
|
61
|
+
formatted: "PAY-1036-362",
|
|
62
|
+
count: 362,
|
|
63
|
+
_id: "639da8a8298f9ea4d6d543de",
|
|
64
|
+
},
|
|
65
|
+
route: null,
|
|
66
|
+
paytime: "2022-12-17",
|
|
67
|
+
note: "",
|
|
68
|
+
currency: "JOD",
|
|
69
|
+
payment_type: "check",
|
|
70
|
+
check: {
|
|
71
|
+
drawer_name: "شركة مسكة لتجارة المواد الغذائيه ",
|
|
72
|
+
bank: "639863e6333b84929c539077",
|
|
73
|
+
bank_branch: "دابوق ",
|
|
74
|
+
check_number: 11322,
|
|
75
|
+
check_date: "2022-12-17",
|
|
76
|
+
photo:
|
|
77
|
+
"https://repzo-media-service.s3.eu-west-2.amazonaws.com/unisap/image/2022/12/17/f7027375-8e21-4b0d-baff-15bc7e642803.jpeg",
|
|
78
|
+
media: [],
|
|
79
|
+
caption: null,
|
|
80
|
+
disabled: false,
|
|
81
|
+
_id: "639da8a8298f9ea4d6d543df",
|
|
82
|
+
},
|
|
83
|
+
company_namespace: ["unisap"],
|
|
84
|
+
sync_id: "0109372a-8479-44ba-b519-5f1041afca8e",
|
|
85
|
+
teams: [],
|
|
86
|
+
paymentsData: {
|
|
87
|
+
amount: -3651631,
|
|
88
|
+
paid: 0,
|
|
89
|
+
balance: -3651631,
|
|
90
|
+
payments: [],
|
|
91
|
+
_id: "639da8a8298f9ea4d6d543e0",
|
|
92
|
+
},
|
|
93
|
+
reference: "",
|
|
94
|
+
createdAt: "2022-12-17T11:31:52.069Z",
|
|
95
|
+
updatedAt: "2022-12-17T11:31:52.069Z",
|
|
96
|
+
__v: 0,
|
|
97
|
+
balance_to_refund: 3651631,
|
|
96
98
|
}),
|
|
97
99
|
isBase64Encoded: false,
|
|
98
|
-
},
|
|
100
|
+
},
|
|
101
|
+
{
|
|
99
102
|
app_id: "",
|
|
100
103
|
repzoEndPoint: "",
|
|
101
104
|
serviceEndPoint: "",
|
|
102
105
|
env: "staging",
|
|
103
106
|
data: {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
107
|
+
invoices: {
|
|
108
|
+
createInvoiceHook: false,
|
|
109
|
+
createReturnInvoiceHook: false,
|
|
110
|
+
},
|
|
111
|
+
payments: {
|
|
112
|
+
createPaymentHook: false,
|
|
113
|
+
},
|
|
114
|
+
proformas: {
|
|
115
|
+
createApprovedProformaHook: false,
|
|
116
|
+
},
|
|
117
|
+
transfer: {
|
|
118
|
+
createApprovedTransferHook: false,
|
|
119
|
+
},
|
|
120
|
+
repzoApiKey: "L98_Pc8qZG2R5hZIIMjxLQNUgUzT3_0aX2BuLvkyh74",
|
|
121
|
+
sapHostUrl: "http://unipal.b1pro.com:8083/api",
|
|
122
|
+
errorEmail: "maram.alshen@repzoapp.com",
|
|
123
|
+
serviceApiKey: "awdas",
|
|
124
|
+
warehouseDefaultUpdateDate: "2015-01-01",
|
|
125
|
+
DepartmentCode: "D2",
|
|
126
|
+
return_reason:
|
|
127
|
+
'[{sap_id:1,sap_name:"BarcodeIssue",repzo_name:"Barcodeissue",repzo_id:"62b074972b332895edf114fc"},{sap_id:2,sap_name:"Damaged",repzo_name:"Damaged",repzo_id:"62b074ace96258fb745982e4"},{sap_id:3,sap_name:"Nearexpiry",repzo_name:"Nearexpiry",repzo_id:"62b074c0a066173bd1c1ea0d"},{sap_id:4,sap_name:"Wrongprinting",repzo_name:"Wrongprinting",repzo_id:"62b074d79e7f41f306a4cb42"},{sap_id:5,sap_name:"experied",repzo_name:"Experied",repzo_id:"62b074faa066173bd1c1eec0"}]',
|
|
128
|
+
SalPersCode: "111",
|
|
129
|
+
SalesPersonCode: "111",
|
|
126
130
|
},
|
|
127
|
-
}
|
|
131
|
+
}
|
|
132
|
+
);
|