shipvine 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2e8973ad13a47f70e97fb602a6ae011552eb68cb
4
+ data.tar.gz: e3f7c3a7d7146db64245fd3e9803e06d81ebbde0
5
+ SHA512:
6
+ metadata.gz: fade6f262867eb0ad96fa99bfc7ec5609c6d1139da3a5222be26690cfaa64b2302fa26f0fe154055497339519a9cf612a0cb37a62d18c430c69a7cab19019a7e
7
+ data.tar.gz: b73c5a077fc449406aeff64690b397d1c20b26dc5d537b22ab20feb824a43c42712b6a751223425f23b71bf93df558fe65dace0795bfdc481152c8629bfd356b
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
@@ -0,0 +1,104 @@
1
+ # Shipvine
2
+
3
+ ## Installation
4
+
5
+ ```ruby
6
+ gem 'shipvine'
7
+ ```
8
+
9
+ ## Configuration
10
+
11
+ ```ruby
12
+ Shipvine.api_key = ENV['SHIPVINE_API_KEY']
13
+ Shipvine.merchant_code = ENV['SHIPVINE_MERCHANT_CODE']
14
+
15
+ # optional, if you want to disable XML validation
16
+ Shipvine.validate_xml = false
17
+
18
+ # optional
19
+ Shipvine.testmode = true
20
+
21
+ # optional, if you want to use HTTPParty's debugging
22
+ if !Rails.env.production?
23
+ Shipvine::Client.debug_output $stdout
24
+ end
25
+
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ #### FulfillmentRequest
31
+
32
+ ```ruby
33
+ fulfillment_request = Shipvine::FulfillmentRequest.new(
34
+ merchant_identifier: order_id,
35
+ email_address: email,
36
+ first_name: first_name,
37
+ last_name: last_name,
38
+ address: {
39
+ company: company,
40
+ address1: address1,
41
+ address2: address2,
42
+ city_or_town: city,
43
+ state_or_province: state,
44
+ postal_code: zipcode,
45
+ phone: phone,
46
+ },
47
+ lines: items,
48
+ shipping_method: shipping_method,
49
+ # optional
50
+ metadata: {
51
+ channel: channel,
52
+ environment: Rails.env
53
+ }
54
+ )
55
+
56
+ fulfillment_request.create
57
+ ```
58
+
59
+ * Discount, tax, and shipping is set to 0 USD. If you need to pass the actual values, submit a PR adding the feature to pass these values to the fulfillment request.
60
+ * First name, last name is required. The company name is used if no name is defined.
61
+ * `ShipVine::FulfillmentRequest#get_shipvine_identifier` will throw a 404 if the fulfillment request is not shipped
62
+
63
+ #### Item & Item Group
64
+
65
+ ```ruby
66
+
67
+ item_group = Shipvine::ItemGroup.new(
68
+ merchant_identifier: 'group-name',
69
+ name: 'group-name',
70
+ harmonized_code: '6105100000',
71
+ country_of_origin: 'US'
72
+ )
73
+
74
+ item_group.create
75
+
76
+ item = Shipvine::Item.new(
77
+ group_merchant_identifier: 'group-name'
78
+ merchant_identifier: 'item-sku',
79
+ name: 'item-name',
80
+ harmonized_code: '6105100000',
81
+ country_of_origin: 'US',
82
+ weight: {
83
+ magnitude: 0.25,
84
+ unit: 'Pounds'
85
+ },
86
+ barcodes: {
87
+ barcode: 'UPC'
88
+ },
89
+ metadata: {
90
+ environment: Rails.env,
91
+ }
92
+ )
93
+
94
+ item.create
95
+ ```
96
+
97
+ ## Development
98
+
99
+ http://support.shipvine.com/articles/index
100
+
101
+ ## Notes
102
+
103
+ * `deep_compact!` is added to `Hash` and `Array`. This might cause issues if this gem is used in larger applications. Feel free to submit a PR :)
104
+ * There are no tests for this gem. It is tested via integration tests in another project.
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "shipvine"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,603 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <xs:schema id="FulfillmentRequestSubmissionResource"
3
+ targetNamespace="urn:WarehouseFS-1.0"
4
+ elementFormDefault="qualified"
5
+ xmlns="urn:WarehouseFS-1.0"
6
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
7
+ <xs:element name="Errors">
8
+ <xs:complexType>
9
+ <xs:sequence>
10
+ <xs:element name="Error" minOccurs="1" maxOccurs="unbounded">
11
+ <xs:complexType>
12
+ <xs:sequence>
13
+ <xs:element name="Code" type="xs:int" />
14
+ <xs:element name="Message" type="xs:string" />
15
+ </xs:sequence>
16
+ </xs:complexType>
17
+ </xs:element>
18
+ </xs:sequence>
19
+ </xs:complexType>
20
+ </xs:element>
21
+ <xs:element name="FulfillmentRequestSubmission">
22
+ <xs:annotation>
23
+ <xs:documentation>
24
+ Represents the submission of a fulfillment request via the API. Note
25
+ that a fulfillment request submission is distinct from the actual
26
+ fulfillment request, if any, that is generated as a result of the
27
+ submission.
28
+ </xs:documentation>
29
+ </xs:annotation>
30
+ <xs:complexType>
31
+ <xs:sequence>
32
+ <xs:element name="MerchantCode">
33
+ <xs:annotation>
34
+ <xs:documentation>
35
+ The merchant code assigned to the merchant account for whom this
36
+ fulfillment request submission and its resulting fulfillment
37
+ request should belong to.
38
+ </xs:documentation>
39
+ </xs:annotation>
40
+ <xs:simpleType>
41
+ <xs:restriction base="xs:string">
42
+ <xs:minLength value="1" />
43
+ <xs:maxLength value="8" />
44
+ </xs:restriction>
45
+ </xs:simpleType>
46
+ </xs:element>
47
+ <xs:element name="MerchantIdentifier">
48
+ <xs:annotation>
49
+ <xs:documentation>
50
+ The merchant's identifier for the fulfillment request. This is
51
+ usually the order number in the merchant's e-commerce system.
52
+ </xs:documentation>
53
+ </xs:annotation>
54
+ <xs:simpleType>
55
+ <xs:restriction base="xs:string">
56
+ <xs:minLength value="1" />
57
+ <xs:maxLength value="50" />
58
+ </xs:restriction>
59
+ </xs:simpleType>
60
+ </xs:element>
61
+ <xs:element name="CustomerIdentifier" minOccurs="0" maxOccurs="1">
62
+ <xs:annotation>
63
+ <xs:documentation>
64
+ The customer's identifier for the fulfillment request. This is
65
+ usually the customer's purchase order number in the customer's
66
+ system. It is optional. WFS does not use this value except that it
67
+ prints on some box labels and packing slips for the customer's
68
+ convenience.
69
+ </xs:documentation>
70
+ </xs:annotation>
71
+ <xs:simpleType>
72
+ <xs:restriction base="xs:string">
73
+ <xs:minLength value="0" />
74
+ <xs:maxLength value="50" />
75
+ </xs:restriction>
76
+ </xs:simpleType>
77
+ </xs:element>
78
+ <xs:element name="BillOfLadingNumber" minOccurs="0" maxOccurs="1">
79
+ <xs:simpleType>
80
+ <xs:restriction base="xs:string">
81
+ <xs:minLength value="0" />
82
+ <xs:maxLength value="50" />
83
+ </xs:restriction>
84
+ </xs:simpleType>
85
+ </xs:element>
86
+ <xs:element name="MasterBillOfLadingNumber" minOccurs="0" maxOccurs="1">
87
+ <xs:simpleType>
88
+ <xs:restriction base="xs:string">
89
+ <xs:minLength value="0" />
90
+ <xs:maxLength value="50" />
91
+ </xs:restriction>
92
+ </xs:simpleType>
93
+ </xs:element>
94
+ <xs:element name="CustomerMessage" minOccurs="0" maxOccurs="1" type="xs:string">
95
+ <xs:annotation>
96
+ <xs:documentation>
97
+ The customer message is an optional note that is printed on
98
+ receipts or packing slips. The most common use is a gift message
99
+ that the customer is allowed to enter during checkout.
100
+ </xs:documentation>
101
+ </xs:annotation>
102
+ </xs:element>
103
+ <xs:element name="Currency" type="Currency">
104
+ <xs:annotation>
105
+ <xs:documentation>
106
+ The base currency of the fulfillment request. Currently, only USD
107
+ is supported.
108
+ </xs:documentation>
109
+ </xs:annotation>
110
+ </xs:element>
111
+ <xs:element name="EmailAddress" minOccurs="0">
112
+ <xs:annotation>
113
+ <xs:documentation>
114
+ The e-mail address that is associated with the shipping address.
115
+ Optional.
116
+ </xs:documentation>
117
+ </xs:annotation>
118
+ <xs:simpleType>
119
+ <xs:restriction base="xs:string">
120
+ <xs:minLength value="0" />
121
+ <xs:maxLength value="255" />
122
+ </xs:restriction>
123
+ </xs:simpleType>
124
+ </xs:element>
125
+ <xs:element name="Address" type="Address">
126
+ <xs:annotation>
127
+ <xs:documentation>
128
+ The shipping address for the fulfillment request.
129
+ </xs:documentation>
130
+ </xs:annotation>
131
+ </xs:element>
132
+ <xs:element name="Lines">
133
+ <xs:complexType>
134
+ <xs:sequence>
135
+ <xs:element name="Line" minOccurs="1" maxOccurs="unbounded">
136
+ <xs:complexType>
137
+ <xs:sequence>
138
+ <xs:element name="Item">
139
+ <xs:complexType>
140
+ <xs:sequence>
141
+ <xs:element name="MerchantIdentifier">
142
+ <xs:annotation>
143
+ <xs:documentation>
144
+ The merchant's identifier for the item as stored
145
+ in the WFS system.
146
+ </xs:documentation>
147
+ </xs:annotation>
148
+ <xs:simpleType>
149
+ <xs:restriction base="xs:string">
150
+ <xs:minLength value="1" />
151
+ <xs:maxLength value="50" />
152
+ </xs:restriction>
153
+ </xs:simpleType>
154
+ </xs:element>
155
+ <xs:element name="Modifications" minOccurs="0" maxOccurs="1">
156
+ <xs:complexType>
157
+ <xs:sequence minOccurs="0" maxOccurs="3">
158
+ <xs:element name="Modification" type="xs:string" />
159
+ </xs:sequence>
160
+ </xs:complexType>
161
+ </xs:element>
162
+ <xs:element name="StoredValue" minOccurs="0" maxOccurs="1" type="MonetaryAmount" />
163
+ <xs:element name="GiftBox" minOccurs="0" maxOccurs="1" type="xs:boolean" />
164
+ </xs:sequence>
165
+ </xs:complexType>
166
+ </xs:element>
167
+ <xs:element name="Quantity" type="xs:unsignedInt" />
168
+ <xs:element name="UnitPrice" type="MonetaryAmount" />
169
+ </xs:sequence>
170
+ </xs:complexType>
171
+ </xs:element>
172
+ </xs:sequence>
173
+ </xs:complexType>
174
+ </xs:element>
175
+ <xs:element name="RequestedDocuments" minOccurs="0" maxOccurs="1">
176
+ <xs:complexType>
177
+ <xs:sequence>
178
+ <xs:element name="RequestedDocument" minOccurs="0" maxOccurs="unbounded" type="FulfillmentRequestDocumentType" />
179
+ </xs:sequence>
180
+ </xs:complexType>
181
+ </xs:element>
182
+ <xs:element name="MerchantReturnProfile" minOccurs="0" maxOccurs="1" type="xs:string" />
183
+ <xs:element name="PackingSlipTemplate" minOccurs="0" maxOccurs="1" type="xs:string" />
184
+ <xs:element name="UccLabelTemplate" minOccurs="0" maxOccurs="1" type="xs:string" />
185
+ <xs:element name="LabelReferences" minOccurs="0" maxOccurs="1">
186
+ <xs:complexType>
187
+ <xs:sequence>
188
+ <xs:element name="LabelReference" minOccurs="0" maxOccurs="2" type="xs:string" />
189
+ </xs:sequence>
190
+ </xs:complexType>
191
+ </xs:element>
192
+ <xs:element name="PrivacyLabel" minOccurs="0" maxOccurs="1" type="xs:boolean" />
193
+ <xs:element name="GiftWrap" minOccurs="0" maxOccurs="1" type="xs:boolean" />
194
+ <xs:element name="ShipmentConfirmationEmail" minOccurs="0" maxOccurs="1" type="xs:boolean" />
195
+ <xs:element name="ShippingMethod" type="xs:string" />
196
+ <xs:element name="ShippingChargesPayer" minOccurs="0" maxOccurs="1">
197
+ <xs:complexType>
198
+ <xs:sequence>
199
+ <xs:element name="Kind" type="xs:string" />
200
+ <xs:element name="Carrier" type="xs:string" />
201
+ <xs:element name="AccountNo" type="xs:string" />
202
+ <xs:element name="PostalCode" type="xs:string" />
203
+ </xs:sequence>
204
+ </xs:complexType>
205
+ </xs:element>
206
+ <xs:element name="TaxChargesPayer" minOccurs="0" maxOccurs="1">
207
+ <xs:complexType>
208
+ <xs:sequence>
209
+ <xs:element name="Kind" type="xs:string" />
210
+ </xs:sequence>
211
+ </xs:complexType>
212
+ </xs:element>
213
+ <xs:element name="ReturnLabel" minOccurs="0" maxOccurs="1">
214
+ <xs:complexType>
215
+ <xs:sequence>
216
+ <xs:element name="CarrierMethod" type="xs:string" />
217
+ <xs:element name="ReturnChargesPayer" minOccurs="0" maxOccurs="1">
218
+ <xs:complexType>
219
+ <xs:sequence>
220
+ <xs:element name="Kind" type="xs:string" />
221
+ <xs:element name="Carrier" type="xs:string" />
222
+ <xs:element name="AccountNo" type="xs:string" />
223
+ <xs:element name="PostalCode" type="xs:string" />
224
+ </xs:sequence>
225
+ </xs:complexType>
226
+ </xs:element>
227
+ </xs:sequence>
228
+ </xs:complexType>
229
+ </xs:element>
230
+ <xs:element name="Discount" type="MonetaryAmount" />
231
+ <xs:element name="Tax" type="MonetaryAmount" />
232
+ <xs:element name="Shipping" type="MonetaryAmount" />
233
+ <xs:element name="RequestMetadata" minOccurs="0" maxOccurs="1">
234
+ <xs:complexType>
235
+ <xs:sequence>
236
+ <xs:element name="Metadata" minOccurs="1" maxOccurs="unbounded">
237
+ <xs:complexType>
238
+ <xs:sequence>
239
+ <xs:element name="Name" type="xs:string" />
240
+ <xs:element name="Value" type="xs:string" />
241
+ </xs:sequence>
242
+ </xs:complexType>
243
+ </xs:element>
244
+ </xs:sequence>
245
+ </xs:complexType>
246
+ </xs:element>
247
+ </xs:sequence>
248
+ <xs:attribute name="test" type="xs:boolean" use="optional">
249
+ <xs:annotation>
250
+ <xs:documentation>
251
+ Indicates that the fulfillment request submission (and its resulting fulfillment
252
+ request, if any) should be considered a test request. If the request passes the
253
+ validation process, then it will be automatically canceled and not fulfilled if
254
+ the test flag is set. The default value is false. There is no charge for using the
255
+ test flag.
256
+ </xs:documentation>
257
+ </xs:annotation>
258
+ </xs:attribute>
259
+ </xs:complexType>
260
+ </xs:element>
261
+ <xs:element name="Inventories">
262
+ <xs:complexType>
263
+ <xs:sequence>
264
+ <xs:element name="Inventory" minOccurs="0" maxOccurs="unbounded">
265
+ <xs:complexType>
266
+ <xs:sequence>
267
+ <xs:element name="Item">
268
+ <xs:complexType>
269
+ <xs:sequence>
270
+ <xs:element name="MerchantIdentifier" type="xs:string" />
271
+ </xs:sequence>
272
+ </xs:complexType>
273
+ </xs:element>
274
+ <xs:element name="Quantities">
275
+ <xs:complexType>
276
+ <xs:sequence>
277
+ <xs:element name="QuantityOnHand" type="xs:unsignedInt" />
278
+ <xs:element name="QuantityReserved" type="xs:unsignedInt" />
279
+ </xs:sequence>
280
+ </xs:complexType>
281
+ </xs:element>
282
+ </xs:sequence>
283
+ </xs:complexType>
284
+ </xs:element>
285
+ </xs:sequence>
286
+ </xs:complexType>
287
+ </xs:element>
288
+ <xs:element name="OutboundShipments">
289
+ <xs:complexType>
290
+ <xs:sequence>
291
+ <xs:element name="OutboundShipment" type="OutboundShipment" minOccurs="0" maxOccurs="unbounded" />
292
+ </xs:sequence>
293
+ </xs:complexType>
294
+ </xs:element>
295
+ <xs:element name="ShippingRateQuote">
296
+ <xs:complexType>
297
+ <xs:sequence>
298
+ <xs:element name="ShippingMethod" type="xs:string" />
299
+ <xs:element name="Country">
300
+ <xs:simpleType>
301
+ <xs:restriction base="xs:string">
302
+ <xs:pattern value="^[A-Z]{2}$" />
303
+ </xs:restriction>
304
+ </xs:simpleType>
305
+ </xs:element>
306
+ <xs:element name="PostalCode">
307
+ <xs:simpleType>
308
+ <xs:restriction base="xs:string">
309
+ <xs:minLength value="1" />
310
+ <xs:maxLength value="30" />
311
+ </xs:restriction>
312
+ </xs:simpleType>
313
+ </xs:element>
314
+ <xs:element name="Weight" type="Weight" />
315
+ <xs:element name="Value" type="MonetaryAmount" />
316
+ <xs:element name="Price" type="MonetaryAmount" />
317
+ </xs:sequence>
318
+ </xs:complexType>
319
+ </xs:element>
320
+ <xs:element name="StockReservation">
321
+ <xs:complexType>
322
+ <xs:sequence>
323
+ <xs:element name="State" type="StockReservationAcquisitionType" />
324
+ <xs:element name="Note" minOccurs="0">
325
+ <xs:annotation>
326
+ <xs:documentation>
327
+ An optional, short note for convenience.
328
+ </xs:documentation>
329
+ </xs:annotation>
330
+ <xs:simpleType>
331
+ <xs:restriction base="xs:string">
332
+ <xs:minLength value="0" />
333
+ <xs:maxLength value="255" />
334
+ </xs:restriction>
335
+ </xs:simpleType>
336
+ </xs:element>
337
+ <xs:element name="Lines">
338
+ <xs:complexType>
339
+ <xs:sequence>
340
+ <xs:element name="Line" minOccurs="1" maxOccurs="unbounded">
341
+ <xs:complexType>
342
+ <xs:sequence>
343
+ <xs:element name="Item">
344
+ <xs:complexType>
345
+ <xs:sequence>
346
+ <xs:element name="MerchantIdentifier">
347
+ <xs:annotation>
348
+ <xs:documentation>
349
+ The merchant's identifier for the item as stored
350
+ in the WFS system.
351
+ </xs:documentation>
352
+ </xs:annotation>
353
+ <xs:simpleType>
354
+ <xs:restriction base="xs:string">
355
+ <xs:minLength value="1" />
356
+ <xs:maxLength value="50" />
357
+ </xs:restriction>
358
+ </xs:simpleType>
359
+ </xs:element>
360
+ </xs:sequence>
361
+ </xs:complexType>
362
+ </xs:element>
363
+ <xs:element name="Quantity" type="xs:unsignedInt" />
364
+ </xs:sequence>
365
+ </xs:complexType>
366
+ </xs:element>
367
+ </xs:sequence>
368
+ </xs:complexType>
369
+ </xs:element>
370
+ </xs:sequence>
371
+ </xs:complexType>
372
+ </xs:element>
373
+ <xs:element name="Tracking">
374
+ <xs:complexType>
375
+ <xs:sequence>
376
+ <xs:element name="Status" type="TrackingStatusType" />
377
+ <xs:element name="EstimatedDeliveryAtLocal" type="xs:dateTime" minOccurs="0" />
378
+ <xs:element name="Waypoints">
379
+ <xs:complexType>
380
+ <xs:sequence>
381
+ <xs:element name="Waypoint" minOccurs="1" maxOccurs="unbounded">
382
+ <xs:complexType>
383
+ <xs:sequence>
384
+ <xs:element name="TransactedAtLocal" type="xs:dateTime" />
385
+ <xs:element name="Location" type="xs:string" />
386
+ <xs:element name="Note" type="xs:string" />
387
+ </xs:sequence>
388
+ </xs:complexType>
389
+ </xs:element>
390
+ </xs:sequence>
391
+ </xs:complexType>
392
+ </xs:element>
393
+ </xs:sequence>
394
+ </xs:complexType>
395
+ </xs:element>
396
+ <xs:complexType name="Address">
397
+ <xs:sequence>
398
+ <xs:element name="Country">
399
+ <xs:simpleType>
400
+ <xs:restriction base="xs:string">
401
+ <xs:pattern value="[A-Z]{2}" />
402
+ </xs:restriction>
403
+ </xs:simpleType>
404
+ </xs:element>
405
+ <xs:element name="PersonalName" type="PersonalName" />
406
+ <xs:element name="Company" minOccurs="0">
407
+ <xs:simpleType>
408
+ <xs:restriction base="xs:string">
409
+ <xs:minLength value="1" />
410
+ <xs:maxLength value="255" />
411
+ </xs:restriction>
412
+ </xs:simpleType>
413
+ </xs:element>
414
+ <xs:element name="StreetLines">
415
+ <xs:complexType>
416
+ <xs:sequence>
417
+ <xs:element name="StreetLine" minOccurs="1" maxOccurs="2">
418
+ <xs:simpleType>
419
+ <xs:restriction base="xs:string">
420
+ <xs:minLength value="1" />
421
+ <xs:maxLength value="255" />
422
+ </xs:restriction>
423
+ </xs:simpleType>
424
+ </xs:element>
425
+ </xs:sequence>
426
+ </xs:complexType>
427
+ </xs:element>
428
+ <xs:element name="CityOrTown">
429
+ <xs:simpleType>
430
+ <xs:restriction base="xs:string">
431
+ <xs:minLength value="0" />
432
+ <xs:maxLength value="255" />
433
+ </xs:restriction>
434
+ </xs:simpleType>
435
+ </xs:element>
436
+ <xs:element name="StateOrProvince">
437
+ <xs:simpleType>
438
+ <xs:restriction base="xs:string">
439
+ <xs:minLength value="0" />
440
+ <xs:maxLength value="255" />
441
+ </xs:restriction>
442
+ </xs:simpleType>
443
+ </xs:element>
444
+ <xs:element name="PostalCode">
445
+ <xs:simpleType>
446
+ <xs:restriction base="xs:string">
447
+ <xs:minLength value="0" />
448
+ <xs:maxLength value="255" />
449
+ </xs:restriction>
450
+ </xs:simpleType>
451
+ </xs:element>
452
+ <xs:element name="Phone">
453
+ <xs:simpleType>
454
+ <xs:restriction base="xs:string">
455
+ <xs:minLength value="0" />
456
+ <xs:maxLength value="30" />
457
+ </xs:restriction>
458
+ </xs:simpleType>
459
+ </xs:element>
460
+ </xs:sequence>
461
+ <xs:attribute name="type" type="AddressType" />
462
+ </xs:complexType>
463
+ <xs:simpleType name="AddressType">
464
+ <xs:restriction base="xs:string">
465
+ <xs:enumeration value="Shipping" />
466
+ </xs:restriction>
467
+ </xs:simpleType>
468
+ <xs:simpleType name="Currency">
469
+ <xs:restriction base="xs:string">
470
+ <xs:enumeration value="AUD" />
471
+ <xs:enumeration value="USD" />
472
+ </xs:restriction>
473
+ </xs:simpleType>
474
+ <xs:complexType name="MonetaryAmount">
475
+ <xs:sequence>
476
+ <xs:element name="Amount" type="xs:decimal" />
477
+ <xs:element name="Currency" type="Currency" />
478
+ </xs:sequence>
479
+ </xs:complexType>
480
+ <xs:complexType name="OutboundShipment">
481
+ <xs:sequence>
482
+ <xs:element name="FulfillmentRequest">
483
+ <xs:complexType>
484
+ <xs:sequence>
485
+ <xs:element name="MerchantIdentifier" type="xs:string" />
486
+ <xs:element name="WfsIdentifier" type="xs:string" />
487
+ </xs:sequence>
488
+ </xs:complexType>
489
+ </xs:element>
490
+ <xs:element name="IdentificationNo" type="xs:string" />
491
+ <xs:element name="CarrierMethod">
492
+ <xs:complexType>
493
+ <xs:sequence>
494
+ <xs:element name="Code" type="xs:string" />
495
+ <xs:element name="Name" type="xs:string" />
496
+ </xs:sequence>
497
+ </xs:complexType>
498
+ </xs:element>
499
+ <xs:element name="PackagingType">
500
+ <xs:complexType>
501
+ <xs:sequence>
502
+ <xs:element name="Code" type="xs:string" />
503
+ <xs:element name="Name" type="xs:string" />
504
+ </xs:sequence>
505
+ </xs:complexType>
506
+ </xs:element>
507
+ <xs:element name="ShippedAtUtc" type="xs:dateTime" />
508
+ <xs:element name="Cost" type="MonetaryAmount" />
509
+ <xs:element name="Weight" type="Weight" />
510
+ <xs:element name="MerchantPrepaid" type="xs:boolean" />
511
+ <xs:element name="Lines">
512
+ <xs:complexType>
513
+ <xs:sequence>
514
+ <xs:element name="Line" minOccurs="1" maxOccurs="unbounded">
515
+ <xs:complexType>
516
+ <xs:sequence>
517
+ <xs:element name="Item">
518
+ <xs:complexType>
519
+ <xs:sequence>
520
+ <xs:element name="MerchantIdentifier">
521
+ <xs:simpleType>
522
+ <xs:restriction base="xs:string">
523
+ <xs:minLength value="1" />
524
+ <xs:maxLength value="50" />
525
+ </xs:restriction>
526
+ </xs:simpleType>
527
+ </xs:element>
528
+ </xs:sequence>
529
+ </xs:complexType>
530
+ </xs:element>
531
+ <xs:element name="Quantity" type="xs:unsignedInt" />
532
+ </xs:sequence>
533
+ </xs:complexType>
534
+ </xs:element>
535
+ </xs:sequence>
536
+ </xs:complexType>
537
+ </xs:element>
538
+ </xs:sequence>
539
+ </xs:complexType>
540
+ <xs:complexType name="PersonalName">
541
+ <xs:sequence>
542
+ <xs:element name="Prefix" minOccurs="0" type="xs:string" />
543
+ <xs:element name="First">
544
+ <xs:simpleType>
545
+ <xs:restriction base="xs:string">
546
+ <xs:minLength value="1" />
547
+ <xs:maxLength value="255" />
548
+ </xs:restriction>
549
+ </xs:simpleType>
550
+ </xs:element>
551
+ <xs:element name="Middle" minOccurs="0">
552
+ <xs:simpleType>
553
+ <xs:restriction base="xs:string">
554
+ <xs:minLength value="1" />
555
+ <xs:maxLength value="255" />
556
+ </xs:restriction>
557
+ </xs:simpleType>
558
+ </xs:element>
559
+ <xs:element name="Last">
560
+ <xs:simpleType>
561
+ <xs:restriction base="xs:string">
562
+ <xs:minLength value="1" />
563
+ <xs:maxLength value="255" />
564
+ </xs:restriction>
565
+ </xs:simpleType>
566
+ </xs:element>
567
+ <xs:element name="Suffix" minOccurs="0" type="xs:string" />
568
+ </xs:sequence>
569
+ </xs:complexType>
570
+ <xs:simpleType name="StockReservationAcquisitionType">
571
+ <xs:restriction base="xs:string">
572
+ <xs:enumeration value="ACQUIRED" />
573
+ <xs:enumeration value="NOT-ACQUIRED" />
574
+ </xs:restriction>
575
+ </xs:simpleType>
576
+ <xs:simpleType name="FulfillmentRequestDocumentType">
577
+ <xs:restriction base="xs:string">
578
+ <xs:enumeration value="RETAIL-RECEIPT" />
579
+ <xs:enumeration value="PACKING-SLIP" />
580
+ <xs:enumeration value="UCC-LABEL" />
581
+ </xs:restriction>
582
+ </xs:simpleType>
583
+ <xs:simpleType name="TrackingStatusType">
584
+ <xs:restriction base="xs:string">
585
+ <xs:enumeration value="Unknown" />
586
+ <xs:enumeration value="Pending" />
587
+ <xs:enumeration value="EnRoute" />
588
+ <xs:enumeration value="Delivered" />
589
+ <xs:enumeration value="Problem" />
590
+ </xs:restriction>
591
+ </xs:simpleType>
592
+ <xs:complexType name="Weight">
593
+ <xs:sequence>
594
+ <xs:element name="Magnitude" type="xs:decimal" />
595
+ <xs:element name="Unit" type="WeightUnit" />
596
+ </xs:sequence>
597
+ </xs:complexType>
598
+ <xs:simpleType name="WeightUnit">
599
+ <xs:restriction base="xs:string">
600
+ <xs:enumeration value="Pounds" />
601
+ </xs:restriction>
602
+ </xs:simpleType>
603
+ </xs:schema>