cxml-ruby 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ruby.yml +23 -0
  3. data/.gitignore +14 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +175 -0
  6. data/Gemfile +2 -0
  7. data/LICENSE +18 -0
  8. data/README.md +94 -0
  9. data/Rakefile +6 -0
  10. data/cxml-ruby.gemspec +27 -0
  11. data/lib/cxml/accounting.rb +27 -0
  12. data/lib/cxml/additional_cost.rb +10 -0
  13. data/lib/cxml/additional_deduction.rb +12 -0
  14. data/lib/cxml/address.rb +16 -0
  15. data/lib/cxml/bill_to.rb +10 -0
  16. data/lib/cxml/browser_form_post.rb +13 -0
  17. data/lib/cxml/charge.rb +9 -0
  18. data/lib/cxml/classification.rb +9 -0
  19. data/lib/cxml/confirmation_header.rb +16 -0
  20. data/lib/cxml/confirmation_item.rb +14 -0
  21. data/lib/cxml/confirmation_request.rb +25 -0
  22. data/lib/cxml/confirmation_status.rb +32 -0
  23. data/lib/cxml/contact.rb +16 -0
  24. data/lib/cxml/country.rb +9 -0
  25. data/lib/cxml/credential.rb +49 -0
  26. data/lib/cxml/credential_mac.rb +26 -0
  27. data/lib/cxml/deducted_price.rb +9 -0
  28. data/lib/cxml/deduction_amount.rb +9 -0
  29. data/lib/cxml/description.rb +9 -0
  30. data/lib/cxml/discount.rb +10 -0
  31. data/lib/cxml/discount_percent.rb +9 -0
  32. data/lib/cxml/distribution.rb +11 -0
  33. data/lib/cxml/document.rb +71 -0
  34. data/lib/cxml/document_node.rb +126 -0
  35. data/lib/cxml/document_reference.rb +9 -0
  36. data/lib/cxml/due_amount.rb +9 -0
  37. data/lib/cxml/email.rb +10 -0
  38. data/lib/cxml/errors.rb +7 -0
  39. data/lib/cxml/extrinsic.rb +10 -0
  40. data/lib/cxml/from.rb +9 -0
  41. data/lib/cxml/gross_amount.rb +9 -0
  42. data/lib/cxml/header.rb +29 -0
  43. data/lib/cxml/id_reference.rb +13 -0
  44. data/lib/cxml/invoice_detail_discount.rb +13 -0
  45. data/lib/cxml/invoice_detail_header_indicator.rb +11 -0
  46. data/lib/cxml/invoice_detail_header_order.rb +24 -0
  47. data/lib/cxml/invoice_detail_item.rb +55 -0
  48. data/lib/cxml/invoice_detail_item_reference.rb +17 -0
  49. data/lib/cxml/invoice_detail_line_indicator.rb +14 -0
  50. data/lib/cxml/invoice_detail_line_shipping.rb +11 -0
  51. data/lib/cxml/invoice_detail_line_special_handling.rb +11 -0
  52. data/lib/cxml/invoice_detail_order.rb +24 -0
  53. data/lib/cxml/invoice_detail_order_info.rb +10 -0
  54. data/lib/cxml/invoice_detail_order_summary.rb +32 -0
  55. data/lib/cxml/invoice_detail_request.rb +40 -0
  56. data/lib/cxml/invoice_detail_request_header.rb +54 -0
  57. data/lib/cxml/invoice_detail_shipping.rb +27 -0
  58. data/lib/cxml/invoice_detail_summary.rb +18 -0
  59. data/lib/cxml/invoice_id_info.rb +10 -0
  60. data/lib/cxml/invoice_partner.rb +10 -0
  61. data/lib/cxml/item_detail.rb +27 -0
  62. data/lib/cxml/item_id.rb +10 -0
  63. data/lib/cxml/item_in.rb +14 -0
  64. data/lib/cxml/item_out.rb +17 -0
  65. data/lib/cxml/master_agreement_reference.rb +9 -0
  66. data/lib/cxml/message.rb +13 -0
  67. data/lib/cxml/modification.rb +15 -0
  68. data/lib/cxml/modification_detail.rb +16 -0
  69. data/lib/cxml/modifications.rb +23 -0
  70. data/lib/cxml/money.rb +35 -0
  71. data/lib/cxml/name.rb +9 -0
  72. data/lib/cxml/net_amount.rb +9 -0
  73. data/lib/cxml/order_reference.rb +12 -0
  74. data/lib/cxml/order_request.rb +33 -0
  75. data/lib/cxml/order_request_header.rb +66 -0
  76. data/lib/cxml/parser.rb +37 -0
  77. data/lib/cxml/payment_term.rb +28 -0
  78. data/lib/cxml/period.rb +10 -0
  79. data/lib/cxml/postal_address.rb +35 -0
  80. data/lib/cxml/protocol.rb +57 -0
  81. data/lib/cxml/punch_out_order_message.rb +33 -0
  82. data/lib/cxml/punch_out_order_message_header.rb +20 -0
  83. data/lib/cxml/punch_out_setup_request.rb +31 -0
  84. data/lib/cxml/punch_out_setup_response.rb +9 -0
  85. data/lib/cxml/request.rb +21 -0
  86. data/lib/cxml/response.rb +20 -0
  87. data/lib/cxml/segment.rb +12 -0
  88. data/lib/cxml/sender.rb +10 -0
  89. data/lib/cxml/ship_to.rb +10 -0
  90. data/lib/cxml/shipping.rb +10 -0
  91. data/lib/cxml/shipping_amount.rb +10 -0
  92. data/lib/cxml/special_handling_amount.rb +11 -0
  93. data/lib/cxml/start_page.rb +13 -0
  94. data/lib/cxml/state.rb +9 -0
  95. data/lib/cxml/status.rb +27 -0
  96. data/lib/cxml/subtotal_amount.rb +9 -0
  97. data/lib/cxml/supplier_setup.rb +13 -0
  98. data/lib/cxml/tax.rb +42 -0
  99. data/lib/cxml/tax_adjustment_amount.rb +9 -0
  100. data/lib/cxml/tax_amount.rb +9 -0
  101. data/lib/cxml/tax_detail.rb +44 -0
  102. data/lib/cxml/tax_location.rb +9 -0
  103. data/lib/cxml/taxable_amount.rb +9 -0
  104. data/lib/cxml/to.rb +9 -0
  105. data/lib/cxml/total.rb +10 -0
  106. data/lib/cxml/total_allowances.rb +9 -0
  107. data/lib/cxml/total_amount_without_tax.rb +9 -0
  108. data/lib/cxml/total_charges.rb +9 -0
  109. data/lib/cxml/unit_price.rb +9 -0
  110. data/lib/cxml/version.rb +5 -0
  111. data/lib/cxml.rb +39 -0
  112. data/spec/credential_spec.rb +37 -0
  113. data/spec/cxml_spec.rb +6 -0
  114. data/spec/document_spec.rb +155 -0
  115. data/spec/fixtures/.gitkeep +0 -0
  116. data/spec/fixtures/envelope.xml +31 -0
  117. data/spec/fixtures/envelope2.xml +36 -0
  118. data/spec/fixtures/invoice_backed_and_unbacked_by_pos.xml +106 -0
  119. data/spec/fixtures/invoice_backed_by_multiple_pos.xml +97 -0
  120. data/spec/fixtures/invoice_taxes_at_line.xml +82 -0
  121. data/spec/fixtures/invoice_taxes_at_line_multiple_taxes.xml +403 -0
  122. data/spec/fixtures/invoice_taxes_at_total.xml +78 -0
  123. data/spec/fixtures/item_in.xml +11 -0
  124. data/spec/fixtures/order_request.cxml +121 -0
  125. data/spec/fixtures/punch_out_order_message_doc.xml +32 -0
  126. data/spec/fixtures/punch_out_setup_request_doc.xml +32 -0
  127. data/spec/fixtures/punch_out_setup_request_doc_coupa.xml +42 -0
  128. data/spec/fixtures/punch_out_setup_request_doc_with_ship_to.xml +46 -0
  129. data/spec/fixtures/purchase_order_request_200.xml +132 -0
  130. data/spec/fixtures/request_doc.xml +79 -0
  131. data/spec/fixtures/response_status_200.xml +11 -0
  132. data/spec/fixtures/response_status_400.xml +5 -0
  133. data/spec/header_spec.rb +54 -0
  134. data/spec/invoice_detail_request_spec.rb +88 -0
  135. data/spec/item_detail_spec.rb +44 -0
  136. data/spec/item_id_spec.rb +40 -0
  137. data/spec/item_in_spec.rb +41 -0
  138. data/spec/money_spec.rb +44 -0
  139. data/spec/parser_spec.rb +6 -0
  140. data/spec/protocol_spec.rb +16 -0
  141. data/spec/punch_out_order_message_header_spec.rb +36 -0
  142. data/spec/punch_out_order_message_spec.rb +43 -0
  143. data/spec/punch_out_setup_request_spec.rb +60 -0
  144. data/spec/purchase_order_request_spec.rb +40 -0
  145. data/spec/request_spec.rb +36 -0
  146. data/spec/response_spec.rb +58 -0
  147. data/spec/sender_spec.rb +32 -0
  148. data/spec/spec_helper.rb +21 -0
  149. data/spec/status_spec.rb +44 -0
  150. data/spec/support/helpers.rb +5 -0
  151. metadata +317 -0
@@ -0,0 +1,403 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+
3
+ <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2...oiceDetail.dtd">
4
+
5
+ <cXML version="1.0" payloadID="1240598937@SUBDOMAIN.coupahost.com" timestamp="2018-05-04T01:24:51-07:00">
6
+
7
+ <Header>
8
+
9
+ <From>
10
+
11
+ <Credential domain="DUNS">
12
+
13
+ <Identity>Kyle</Identity>
14
+
15
+ </Credential>
16
+
17
+ </From>
18
+
19
+ <To>
20
+
21
+ <Credential domain="DUNS">
22
+
23
+ <Identity>Coupa</Identity>
24
+
25
+ </Credential>
26
+
27
+ </To>
28
+
29
+ <Sender>
30
+
31
+ <Credential domain="DUNS">
32
+
33
+ <Identity>Kyle</Identity>
34
+
35
+ <SharedSecret>Secret</SharedSecret>
36
+
37
+ </Credential>
38
+
39
+ <UserAgent>Your Very Own Agent 1.23</UserAgent>
40
+
41
+ </Sender>
42
+
43
+ </Header>
44
+
45
+ <Request deploymentMode="production">
46
+
47
+ <InvoiceDetailRequest>
48
+
49
+ <InvoiceDetailRequestHeader invoiceID="new_cxml_invoice" purpose="standard" operation="new" invoiceDate="invoice_date">
50
+
51
+ <InvoiceDetailHeaderIndicator/>
52
+
53
+ <InvoiceDetailLineIndicator isAccountingInLine="yes" isTaxInLine="yes"/>
54
+
55
+ <InvoicePartner>
56
+
57
+ <Contact role="invoiceFrom" addressID="supplier_address_code">
58
+
59
+ <Name xml:lang="en">name</Name>
60
+
61
+ <PostalAddress name="default">
62
+
63
+ <Street>alksdjfj</Street>
64
+
65
+ <Street>alksdjfj</Street>
66
+
67
+ <City>alksdjfj</City>
68
+
69
+ <State isoStateCode="la">alksdjfj</State>
70
+
71
+ <PostalCode>alksdjfj</PostalCode>
72
+
73
+ <Country isoCountryCode="CA">Caledonia</Country>
74
+
75
+ </PostalAddress>
76
+
77
+ </Contact>
78
+
79
+ <IdReference domain="taxNumber" identifier="supplier_tax_registration"/>
80
+
81
+ </InvoicePartner>
82
+
83
+ <InvoicePartner>
84
+
85
+ <Contact role="remitTo" addressID="supplier_address_code">
86
+
87
+ <Name xml:lang="en">name</Name>
88
+
89
+ </Contact>
90
+
91
+ </InvoicePartner>
92
+
93
+ <InvoicePartner>
94
+
95
+ <Contact role="billTo" addressID="bill_to_address">
96
+
97
+ <Name xml:lang="en">"bill_to_address"</Name>
98
+
99
+ <PostalAddress name="name">
100
+
101
+ <DeliverTo>name</DeliverTo>
102
+
103
+ <Street>name</Street>
104
+
105
+ <Street>name</Street>
106
+
107
+ <City>name</City>
108
+
109
+ <State isoStateCode="la">name</State>
110
+
111
+ <PostalCode>name</PostalCode>
112
+
113
+ <Country isoCountryCode="CA">Caledonia</Country>
114
+
115
+ </PostalAddress>
116
+
117
+ </Contact>
118
+
119
+ <IdReference domain="taxNumber" identifier="buyer_tax_registration"></IdReference>
120
+
121
+ </InvoicePartner>
122
+
123
+ <InvoiceDetailShipping>
124
+
125
+ <Contact role="shipFrom" addressID="supplier_address_code">
126
+
127
+ <Name xml:lang="en">oiwur</Name>
128
+
129
+ <PostalAddress name="default">
130
+
131
+ <Street>oiwuer</Street>
132
+
133
+ <Street>ldfklj</Street>
134
+
135
+ <City>lkajsdfk</City>
136
+
137
+ <State isoStateCode="la">asdlf</State>
138
+
139
+ <PostalCode>9238409</PostalCode>
140
+
141
+ <Country isoCountryCode="CA">Caledonia</Country>
142
+
143
+ </PostalAddress>
144
+
145
+ </Contact>
146
+
147
+ <Contact role="shipTo">
148
+
149
+ <Name xml:lang="en">Test</Name>
150
+
151
+ <PostalAddress name="name">
152
+
153
+ <DeliverTo>wo139480</DeliverTo>
154
+
155
+ <Street>Street</Street>
156
+
157
+ <Street>3948</Street>
158
+
159
+ <City>City</City>
160
+
161
+ <State isoStateCode="la">State</State>
162
+
163
+ <PostalCode>00001</PostalCode>
164
+
165
+ <Country isoCountryCode="US">US</Country>
166
+
167
+ </PostalAddress>
168
+
169
+ </Contact>
170
+
171
+ </InvoiceDetailShipping>
172
+
173
+ <PaymentTerm payInNumberOfDays="1">
174
+
175
+ <Discount>
176
+
177
+ <DiscountPercent percent="1" />
178
+
179
+ <DiscountDueDays>1</DiscountDueDays>
180
+
181
+ </Discount>
182
+
183
+ <NetDueDays>1</NetDueDays>
184
+
185
+ </PaymentTerm>
186
+
187
+ <Extrinsic name="ExchangeRate">1</Extrinsic>
188
+
189
+ </InvoiceDetailRequestHeader>
190
+
191
+ <InvoiceDetailOrder>
192
+
193
+ <InvoiceDetailOrderInfo>
194
+
195
+ <MasterAgreementReference>
196
+
197
+ <DocumentReference payloadID="id"/>
198
+
199
+ </MasterAgreementReference>
200
+
201
+ </InvoiceDetailOrderInfo>
202
+
203
+ <InvoiceDetailItem invoiceLineNumber="1" quantity="1">
204
+
205
+ <UnitOfMeasure>EA</UnitOfMeasure>
206
+
207
+ <UnitPrice>
208
+
209
+ <Money currency="currency_code">10</Money>
210
+
211
+ </UnitPrice>
212
+
213
+ <InvoiceDetailItemReference lineNumber="1">
214
+
215
+ <ItemID>
216
+
217
+ <SupplierPartID>part-id</SupplierPartID>
218
+
219
+ </ItemID>
220
+
221
+ <Description xml:lang="en">Goods</Description>
222
+
223
+ </InvoiceDetailItemReference>
224
+
225
+ <SubtotalAmount>
226
+
227
+ <Money currency="currency_code">10</Money>
228
+
229
+ </SubtotalAmount>
230
+
231
+ <Tax>
232
+
233
+ <Money currency="currency_code" alternateAmount="10" alternateCurrency="currency_code">1.3</Money>
234
+
235
+ <Description xml:lang="en">This is not used</Description>
236
+
237
+ <TaxDetail purpose="tax" category="HST" percentageRate="13" taxPointDate="2018-08-06T11:45:51-07:00">
238
+
239
+ <TaxableAmount>
240
+
241
+ <Money currency="currency_code">10</Money>
242
+
243
+ </TaxableAmount>
244
+
245
+ <TaxAmount>
246
+
247
+ <Money currency="currency_code">1.3</Money>
248
+
249
+ </TaxAmount>
250
+
251
+ <TaxLocation xml:lang="en">location</TaxLocation>
252
+
253
+ <Description xml:lang="en">laksdjfl</Description>
254
+
255
+ </TaxDetail>
256
+
257
+ </Tax>
258
+
259
+ <Extrinsic name="HSN/SAC">HSN/SAC value</Extrinsic>
260
+
261
+ </InvoiceDetailItem>
262
+
263
+ </InvoiceDetailOrder>
264
+
265
+ <InvoiceDetailSummary>
266
+
267
+ <SubtotalAmount>
268
+
269
+ <Money currency="currency_code">11.3</Money>
270
+
271
+ </SubtotalAmount>
272
+
273
+ <Tax>
274
+
275
+ <Money currency="currency_code" alternateAmount="10" alternateCurrency="currency_code"></Money>
276
+
277
+ <Description xml:lang="en">This is the header tax description that defaults</Description>
278
+
279
+ <TaxDetail purpose="tax" category="foo" percentageRate="1" taxPointDate="2018-08-07T11:45:51-07:00">
280
+
281
+ <TaxableAmount>
282
+
283
+ <Money currency="currency_code">100</Money>
284
+
285
+ </TaxableAmount>
286
+
287
+ <TaxAmount>
288
+
289
+ <Money currency="currency_code">0</Money>
290
+
291
+ </TaxAmount>
292
+
293
+ <TaxLocation xml:lang="en">CA</TaxLocation>
294
+
295
+ </TaxDetail>
296
+
297
+ <TaxDetail purpose="specialHandlingTax" category="HST" percentageRate="13" taxPointDate="2015-04-07T11:45:51-07:00">
298
+
299
+ <TaxableAmount>
300
+
301
+ <Money currency="currency_code">10</Money>
302
+
303
+ </TaxableAmount>
304
+
305
+ <TaxAmount>
306
+
307
+ <Money currency="currency_code">1.30</Money>
308
+
309
+ </TaxAmount>
310
+
311
+ <TaxLocation xml:lang="en">CA</TaxLocation>
312
+
313
+ </TaxDetail>
314
+
315
+ <TaxDetail purpose="specialHandlingTax" category="GST" percentageRate="5" taxPointDate="2015-04-07T11:45:51-07:00">
316
+
317
+ <TaxableAmount>
318
+
319
+ <Money currency="currency_code">10</Money>
320
+
321
+ </TaxableAmount>
322
+
323
+ <TaxAmount>
324
+
325
+ <Money currency="currency_code">0.50</Money>
326
+
327
+ </TaxAmount>
328
+
329
+ <TaxLocation xml:lang="en">CA</TaxLocation>
330
+
331
+ </TaxDetail>
332
+
333
+ <TaxDetail purpose="shippingTax" category="HST" percentageRate="13" taxPointDate="2015-04-07T11:45:51-07:00">
334
+
335
+ <TaxableAmount>
336
+
337
+ <Money currency="currency_code">10</Money>
338
+
339
+ </TaxableAmount>
340
+
341
+ <TaxAmount>
342
+
343
+ <Money currency="currency_code">1.30</Money>
344
+
345
+ </TaxAmount>
346
+
347
+ <TaxLocation xml:lang="en">CA</TaxLocation>
348
+
349
+ </TaxDetail>
350
+
351
+ <TaxDetail purpose="shippingTax" category="QST" percentageRate="9.975" taxPointDate="2015-04-07T11:45:51-07:00">
352
+
353
+ <TaxableAmount>
354
+
355
+ <Money currency="currency_code">10</Money>
356
+
357
+ </TaxableAmount>
358
+
359
+ <TaxAmount>
360
+
361
+ <Money currency="currency_code">1.00</Money>
362
+
363
+ </TaxAmount>
364
+
365
+ <TaxLocation xml:lang="en">CA</TaxLocation>
366
+
367
+ </TaxDetail>
368
+
369
+ </Tax>
370
+
371
+ <SpecialHandlingAmount>
372
+
373
+ <Money currency="currency_code">10</Money>
374
+
375
+
376
+
377
+ </SpecialHandlingAmount>
378
+
379
+ <ShippingAmount>
380
+
381
+ <Money currency="currency_code">10</Money>
382
+
383
+ </ShippingAmount>
384
+
385
+ <InvoiceDetailDiscount>
386
+
387
+ <Money currency="currency_code">123</Money>
388
+
389
+ </InvoiceDetailDiscount>
390
+
391
+ <NetAmount>
392
+
393
+ <Money currency="currency_code" />
394
+
395
+ </NetAmount>
396
+
397
+ </InvoiceDetailSummary>
398
+
399
+ </InvoiceDetailRequest>
400
+
401
+ </Request>
402
+
403
+ </cXML>
@@ -0,0 +1,78 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE cXML SYSTEM "http://xml.cXML.org/schemas/cXML/1.2.020/InvoiceDetail.dtd">
3
+ <cXML version="1.0" payloadID="1240598937@devtrunk.coupahost.com" timestamp="2009-05-04T01:24:51-07:00">
4
+ <Header>
5
+ <From>
6
+ <Credential domain="DUNS">
7
+ <Identity>supplierid</Identity>
8
+ </Credential>
9
+ </From>
10
+ <To>
11
+ <Credential domain="DUNS">
12
+ <Identity>buyerid</Identity>
13
+ </Credential>
14
+ </To>
15
+ <Sender>
16
+ <Credential domain="DUNS">
17
+ <Identity>supplierid</Identity>
18
+ <SharedSecret>secret</SharedSecret>
19
+ </Credential>
20
+ <UserAgent>Your Very Own Agent 1.23</UserAgent>
21
+ </Sender>
22
+ </Header>
23
+ <Request deploymentMode="production">
24
+ <InvoiceDetailRequest>
25
+ <InvoiceDetailRequestHeader invoiceID="3492" purpose="standard" operation="new" invoiceDate="2009-05-01T11:45:51-07:00">
26
+ <InvoiceDetailHeaderIndicator />
27
+ <InvoiceDetailLineIndicator isAccountingInLine="yes" />
28
+ <PaymentTerm payInNumberOfDays="30" />
29
+ </InvoiceDetailRequestHeader>
30
+ <InvoiceDetailOrder>
31
+ <InvoiceDetailOrderInfo>
32
+ <OrderReference>
33
+ <DocumentReference payloadID="123" />
34
+ </OrderReference>
35
+ </InvoiceDetailOrderInfo>
36
+ <InvoiceDetailItem invoiceLineNumber="1" quantity="1">
37
+ <UnitOfMeasure>EA</UnitOfMeasure>
38
+ <UnitPrice>
39
+ <Money currency="USD">365</Money>
40
+ </UnitPrice>
41
+ <InvoiceDetailItemReference lineNumber="1">
42
+ <Description xml:lang="en">NEW 1 NINTENDO WII GAME CONSOLE + WII FIT BUNDLE +GAMES</Description>
43
+ </InvoiceDetailItemReference>
44
+ <SubtotalAmount>
45
+ <Money currency="USD">365</Money>
46
+ </SubtotalAmount>
47
+ </InvoiceDetailItem>
48
+ </InvoiceDetailOrder>
49
+ <InvoiceDetailSummary>
50
+ <SubtotalAmount>
51
+ <Money currency="USD">365</Money>
52
+ </SubtotalAmount>
53
+ <Tax>
54
+ <Money currency="USD">8</Money>
55
+ <Description xml:lang="en">total tax</Description>
56
+ <TaxDetail purpose="tax" category="CA" percentageRate="8.25" taxPointDate="2009-04-24T11:45:51-07:00">
57
+ <TaxableAmount>
58
+ <Money currency="USD">365</Money>
59
+ </TaxableAmount>
60
+ <TaxAmount>
61
+ <Money currency="USD">8</Money>
62
+ </TaxAmount>
63
+ <TaxLocation xml:lang="en">CA</TaxLocation>
64
+ </TaxDetail>
65
+ </Tax>
66
+ <SpecialHandlingAmount>
67
+ <Money currency="USD">5</Money>
68
+ </SpecialHandlingAmount>
69
+ <ShippingAmount>
70
+ <Money currency="USD">30</Money>
71
+ </ShippingAmount>
72
+ <NetAmount>
73
+ <Money currency="USD" />
74
+ </NetAmount>
75
+ </InvoiceDetailSummary>
76
+ </InvoiceDetailRequest>
77
+ </Request>
78
+ </cXML>
@@ -0,0 +1,11 @@
1
+ <ItemIn quantity="1">
2
+ <ItemID>
3
+ <SupplierPartID>ACC8000160K</SupplierPartID>
4
+ <SupplierPartAuxiliaryID>lkajsdflsdf</SupplierPartAuxiliaryID>
5
+ </ItemID>
6
+ <ItemDetail>
7
+ <Description xml:lang="en">AGENDA MAGAZINE RACK A4 CHARCOAL 25990</Description>
8
+ <UnitOfMeasure>EA</UnitOfMeasure>
9
+ <UnitPrice> <Money currency="GBP">5.35</Money> </UnitPrice>
10
+ </ItemDetail>
11
+ </ItemIn>
@@ -0,0 +1,121 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
3
+ <cXML xml:lang="en-US" payloadID="1585687161.003309@stg1565utl2.int.coupahost.com" timestamp="2020-03-31T21:39:21+01:00">
4
+ <Header>
5
+ <From>
6
+ <Credential domain="NetworkID">
7
+ <Identity>kasdflkjasdf</Identity>
8
+ </Credential>
9
+ </From>
10
+ <To>
11
+ <Credential domain="alksjflkasjdfasdf">
12
+ <Identity>development@officeluv.com</Identity>
13
+ </Credential>
14
+ </To>
15
+ <Sender>
16
+ <Credential domain="NetworkID">
17
+ <Identity>DAN_Coupa</Identity>
18
+ <SharedSecret>alsdkfjalksdjflaksjdfklj</SharedSecret>
19
+ </Credential>
20
+ <UserAgent>Coupa Procurement 1.0</UserAgent>
21
+ </Sender>
22
+ </Header>
23
+ <Request>
24
+ <OrderRequest>
25
+ <OrderRequestHeader orderID="3309" orderDate="2020-03-31T21:39:22+01:00" type="new">
26
+ <Total>
27
+ <Money currency="USD">91.71</Money>
28
+ </Total>
29
+ <ShipTo>
30
+ <Address isoCountryCode="US" addressID="21444">
31
+ <Name xml:lang="en">Network</Name>
32
+ <PostalAddress name="default">
33
+ <DeliverTo>Venkat</DeliverTo>
34
+ <Street>Main Street</Street>
35
+ <City>New York</City>
36
+ <State>NY</State>
37
+ <PostalCode>10018</PostalCode>
38
+ <Country isoCountryCode="US">United States</Country>
39
+ </PostalAddress>
40
+ <Email name="default">asdfklajsdfkjl@optisconsulting.com</Email>
41
+ </Address>
42
+ </ShipTo>
43
+ <BillTo>
44
+ <Address isoCountryCode="US" addressID="21444">
45
+ <Name xml:lang="en">Network</Name>
46
+ <PostalAddress name="default">
47
+ <DeliverTo>Venkat Gunneri</DeliverTo>
48
+ <Street>Main Street</Street>
49
+ <City>New York</City>
50
+ <State>NY</State>
51
+ <PostalCode>10018</PostalCode>
52
+ <Country isoCountryCode="US">United States</Country>
53
+ </PostalAddress>
54
+ <Email name="default">kasdjfasf@optisconsulting.com</Email>
55
+ </Address>
56
+ </BillTo>
57
+ <Shipping>
58
+ <Money currency="USD">0.0</Money>
59
+ <Description xml:lang="en-US"/>
60
+ </Shipping>
61
+ <Contact role="endUser">
62
+ <Name xml:lang="en">alksdjfalskjf alk sdjflkj</Name>
63
+ <Email name="default">asdlfkjasdflkj@optisconsulting.com</Email>
64
+ </Contact>
65
+ <Extrinsic name="legacy_po"></Extrinsic>
66
+ </OrderRequestHeader>
67
+ <ItemOut quantity="1" lineNumber="1">
68
+ <ItemID>
69
+ <SupplierPartID>product:1861</SupplierPartID>
70
+ <SupplierPartAuxiliaryID>product-requisition:6236</SupplierPartAuxiliaryID>
71
+ </ItemID>
72
+ <ItemDetail>
73
+ <UnitPrice>
74
+ <Money currency="USD">8.1</Money>
75
+ </UnitPrice>
76
+ <Description xml:lang="en">Yogurt Whips, Key Lime Pie, 4oz Cup</Description>
77
+ <UnitOfMeasure>EA</UnitOfMeasure>
78
+ <Classification domain="UNSPSC">unknown</Classification>
79
+ <Extrinsic name="LineType">Quantity</Extrinsic>
80
+ </ItemDetail>
81
+ <Distribution>
82
+ <Accounting name="Amounts Invoice to Clients - International Media Bookings-TEST Center-DAN HQ-HR Talent Development">
83
+ <Segment type="Main Account (PL/BS)" id="10012" description="MAccount"/>
84
+ <Segment type="Cost Center" id="c50" description="CCentre"/>
85
+ <Segment type="Profit Center" id="B94641" description="PCenter"/>
86
+ <Segment type="Project Code" id="000384" description="PCode"/>
87
+ </Accounting>
88
+ <Charge>
89
+ <Money currency="USD">8.1</Money>
90
+ </Charge>
91
+ </Distribution>
92
+ </ItemOut>
93
+ <ItemOut quantity="9" lineNumber="2">
94
+ <ItemID>
95
+ <SupplierPartID>product:4884</SupplierPartID>
96
+ <SupplierPartAuxiliaryID>product-requisition:6235</SupplierPartAuxiliaryID>
97
+ </ItemID>
98
+ <ItemDetail>
99
+ <UnitPrice>
100
+ <Money currency="USD">9.29</Money>
101
+ </UnitPrice>
102
+ <Description xml:lang="en">Zingerman's Cheese Spreads Pimento Cheese</Description>
103
+ <UnitOfMeasure>EA</UnitOfMeasure>
104
+ <Classification domain="UNSPSC">unknown</Classification>
105
+ <Extrinsic name="LineType">Quantity</Extrinsic>
106
+ </ItemDetail>
107
+ <Distribution>
108
+ <Accounting name="Amounts Invoice to Clients - International Media Bookings-TEST Center-DAN HQ-HR Talent Development">
109
+ <Segment type="Main Account (PL/BS)" id="10012" description="MAccount"/>
110
+ <Segment type="Cost Center" id="c50" description="CCentre"/>
111
+ <Segment type="Profit Center" id="B94641" description="PCenter"/>
112
+ <Segment type="Project Code" id="000384" description="PCode"/>
113
+ </Accounting>
114
+ <Charge>
115
+ <Money currency="USD">83.61</Money>
116
+ </Charge>
117
+ </Distribution>
118
+ </ItemOut>
119
+ </OrderRequest>
120
+ </Request>
121
+ </cXML>
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0"?>
2
+ <cxml version="1.2.011" payloadID="1346769469000.process.162998590@officedepot.com" timestamp="2012-09-04T02:37:49-05:00">
3
+ <Header>
4
+ <From>
5
+ <Credential domain="NetworkID">
6
+ <Identity>AN01000000147</Identity>
7
+ </Credential>
8
+ </From>
9
+ <To>
10
+ <Credential domain="NetworkId">
11
+ <Identity>customerID</Identity>
12
+ </Credential>
13
+ </To>
14
+ <Sender>
15
+ <Credential domain="IESAnetworkUserID">
16
+ <Identity>{identity in here}</Identity>
17
+ <SharedSecret>{shared secret in here}</SharedSecret>
18
+ </Credential>
19
+ <UserAgent>IESAonlinevers1</UserAgent>
20
+ </Sender>
21
+ </Header>
22
+ <Message>
23
+ <PunchOutOrderMessage>
24
+ <BuyerCookie>
25
+ example_buyer_cookie
26
+ </BuyerCookie>
27
+ <PunchOutOrderMessageHeader operationAllowed="create">
28
+ <Total> <Money currency="GBP">5.35</Money> </Total>
29
+ </PunchOutOrderMessageHeader>
30
+ </PunchOutOrderMessage>
31
+ </Message>
32
+ </cxml>
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <cXML payloadID="demoSCAWIG@IESAonline" xml:lang="en-UK" timestamp="2007-04-30T15:52:54+00:00">
3
+ <Header>
4
+ <From>
5
+ <Credential domain="DUNS">
6
+ <Identity>punchout@test.com</Identity>
7
+ </Credential>
8
+ </From>
9
+ <To>
10
+ <Credential domain="DUNS">
11
+ <Identity>punchout@test.com</Identity>
12
+ </Credential>
13
+ </To>
14
+ <Sender>
15
+ <Credential domain="IESAnetworkUserID"> <Identity>88888888</Identity> <SharedSecret>{shared secret in here}</SharedSecret> </Credential> <UserAgent>IESAonlinevers1</UserAgent>
16
+ </Sender>
17
+ </Header>
18
+ <Request deploymentMode="production">
19
+ <PunchOutSetupRequest operation="create"> <BuyerCookie>demoSCAWIGP</BuyerCookie>
20
+ <BrowserFormPost>
21
+ <URL>
22
+ http://return_to_supplier_url.com
23
+ </URL>
24
+ </BrowserFormPost>
25
+ <SupplierSetup>
26
+ <URL>
27
+ http://localhost:3000
28
+ </URL>
29
+ </SupplierSetup>
30
+ </PunchOutSetupRequest>
31
+ </Request>
32
+ </cXML>