spree-shipstation 5.0.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.
- checksums.yaml +7 -0
- data/.github/stale.yml +17 -0
- data/.github/workflows/lint.yml +24 -0
- data/.github/workflows/security.yml +41 -0
- data/.github/workflows/test.yml +32 -0
- data/.gitignore +23 -0
- data/.rspec +3 -0
- data/.standard.yml +3 -0
- data/Appraisals +20 -0
- data/CHANGELOG.md +43 -0
- data/CLAUDE.md +95 -0
- data/Gemfile +14 -0
- data/LICENSE +21 -0
- data/README.md +120 -0
- data/Rakefile +69 -0
- data/app/assets/config/spree_shipstation_manifest.js +1 -0
- data/app/assets/images/integration_icons/shipstation-logo.webp +0 -0
- data/app/controllers/spree/shipstation_controller.rb +57 -0
- data/app/helpers/spree/shipstation/export_helper.rb +53 -0
- data/app/models/spree/integrations/shipstation.rb +61 -0
- data/app/models/spree/shipment_decorator.rb +28 -0
- data/app/presenters/spree/shipstation/export/item_presenter.rb +52 -0
- data/app/presenters/spree/shipstation/export/order_presenter.rb +91 -0
- data/app/presenters/spree/shipstation/export/weight.rb +45 -0
- data/app/views/spree/admin/integrations/forms/_shipstation.html.erb +6 -0
- data/app/views/spree/shipstation/export.xml.builder +59 -0
- data/bin/rails +8 -0
- data/config/initializers/spree.rb +3 -0
- data/config/locales/en.yml +15 -0
- data/config/routes.rb +6 -0
- data/gemfiles/spree_5_2.gemfile +18 -0
- data/gemfiles/spree_5_3.gemfile +18 -0
- data/gemfiles/spree_5_4.gemfile +18 -0
- data/lib/spree/shipstation/engine.rb +32 -0
- data/lib/spree/shipstation/errors.rb +25 -0
- data/lib/spree/shipstation/factories.rb +5 -0
- data/lib/spree/shipstation/shipment_notice.rb +68 -0
- data/lib/spree/shipstation/testing_support/factories/shipstation_integration.rb +9 -0
- data/lib/spree/shipstation/version.rb +12 -0
- data/lib/spree/shipstation.rb +11 -0
- data/lib/spree-shipstation.rb +8 -0
- data/spec/fixtures/shipstation_xml_schema.xsd +171 -0
- data/spree-shipstation.gemspec +36 -0
- metadata +140 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
<xs:element name="Orders">
|
|
3
|
+
<xs:complexType>
|
|
4
|
+
<xs:sequence>
|
|
5
|
+
<xs:element name="Order" maxOccurs="unbounded" minOccurs="0">
|
|
6
|
+
<xs:complexType>
|
|
7
|
+
<xs:all>
|
|
8
|
+
<xs:element type="String50" name="OrderID" minOccurs="0"/>
|
|
9
|
+
<xs:element type="String50" name="OrderNumber"/>
|
|
10
|
+
<xs:element type="DateTime" name="OrderDate"/>
|
|
11
|
+
<xs:element type="String50" name="OrderStatus"/>
|
|
12
|
+
<xs:element type="DateTime" name="LastModified"/>
|
|
13
|
+
<xs:element type="String100" name="ShippingMethod" minOccurs="0"/>
|
|
14
|
+
<xs:element type="String50" name="PaymentMethod" minOccurs="0"/>
|
|
15
|
+
<xs:element type="xs:float" name="OrderTotal"/>
|
|
16
|
+
<xs:element type="xs:float" name="TaxAmount" minOccurs="0"/>
|
|
17
|
+
<xs:element type="xs:float" name="ShippingAmount" minOccurs="0"/>
|
|
18
|
+
<xs:element type="String1000" name="CustomerNotes" minOccurs="0"/>
|
|
19
|
+
<xs:element type="String1000" name="InternalNotes" minOccurs="0"/>
|
|
20
|
+
<xs:element type="xs:boolean" name="Gift" minOccurs="0"/>
|
|
21
|
+
<xs:element type="String1000" name="GiftMessage" minOccurs="0"/>
|
|
22
|
+
<xs:element type="String100" name="CustomField1" minOccurs="0"/>
|
|
23
|
+
<xs:element type="String100" name="CustomField2" minOccurs="0"/>
|
|
24
|
+
<xs:element type="String100" name="CustomField3" minOccurs="0"/>
|
|
25
|
+
<xs:element type="String100" name="RequestedWarehouse" minOccurs="0"/>
|
|
26
|
+
<xs:element type="String50" name="Source" minOccurs="0" />
|
|
27
|
+
<xs:element name="Customer">
|
|
28
|
+
<xs:complexType>
|
|
29
|
+
<xs:all>
|
|
30
|
+
<xs:element type="String100" name="CustomerCode"/>
|
|
31
|
+
<xs:element name="BillTo">
|
|
32
|
+
<xs:complexType>
|
|
33
|
+
<xs:all>
|
|
34
|
+
<xs:element type="String100" name="Name"/>
|
|
35
|
+
<xs:element type="String100" name="Company" minOccurs="0"/>
|
|
36
|
+
<xs:element type="String50" name="Phone" minOccurs="0"/>
|
|
37
|
+
<xs:element type="Email" name="Email" minOccurs="0"/>
|
|
38
|
+
<xs:element type="String200" name="Address1" minOccurs="0"/>
|
|
39
|
+
<xs:element type="String200" name="Address2" minOccurs="0"/>
|
|
40
|
+
<xs:element type="String100" name="City" minOccurs="0"/>
|
|
41
|
+
<xs:element type="String100" name="State" minOccurs="0"/>
|
|
42
|
+
<xs:element type="String50" name="PostalCode" minOccurs="0"/>
|
|
43
|
+
<xs:element type="String50" name="Country" minOccurs="0"/>
|
|
44
|
+
</xs:all>
|
|
45
|
+
</xs:complexType>
|
|
46
|
+
</xs:element>
|
|
47
|
+
<xs:element name="ShipTo">
|
|
48
|
+
<xs:complexType>
|
|
49
|
+
<xs:all>
|
|
50
|
+
<xs:element type="String100" name="Name"/>
|
|
51
|
+
<xs:element type="String100" name="Company" minOccurs="0"/>
|
|
52
|
+
<xs:element type="String200" name="Address1"/>
|
|
53
|
+
<xs:element type="String200" name="Address2" minOccurs="0"/>
|
|
54
|
+
<xs:element type="String100" name="City"/>
|
|
55
|
+
<xs:element type="String100" name="State" minOccurs="0"/>
|
|
56
|
+
<xs:element type="String50" name="PostalCode" minOccurs="1"/>
|
|
57
|
+
<xs:element type="String50" name="Country"/>
|
|
58
|
+
<xs:element type="String50" name="Phone" minOccurs="0"/>
|
|
59
|
+
</xs:all>
|
|
60
|
+
</xs:complexType>
|
|
61
|
+
</xs:element>
|
|
62
|
+
</xs:all>
|
|
63
|
+
</xs:complexType>
|
|
64
|
+
</xs:element>
|
|
65
|
+
<xs:element name="Items">
|
|
66
|
+
<xs:complexType>
|
|
67
|
+
<xs:sequence>
|
|
68
|
+
<xs:element name="Item" maxOccurs="unbounded" minOccurs="0">
|
|
69
|
+
<xs:complexType>
|
|
70
|
+
<xs:all>
|
|
71
|
+
<xs:element type="String50" name="LineItemID" minOccurs="0"/>
|
|
72
|
+
<xs:element type="String100" name="SKU"/>
|
|
73
|
+
<xs:element type="String200" name="Name"/>
|
|
74
|
+
<xs:element type="xs:boolean" name="Adjustment" minOccurs="0"/>
|
|
75
|
+
<xs:element type="xs:anyURI" name="ImageUrl" minOccurs="0"/>
|
|
76
|
+
<xs:element type="xs:float" name="Weight" minOccurs="0"/>
|
|
77
|
+
<xs:element name="WeightUnits" minOccurs="0">
|
|
78
|
+
<xs:simpleType>
|
|
79
|
+
<xs:restriction base="xs:string">
|
|
80
|
+
<xs:pattern value="|pound|pounds|lb|lbs|gram|grams|gm|oz|ounces|Pound|Pounds|Lb|Lbs|Gram|Grams|Gm|Oz|Ounces|POUND|POUNDS|LB|LBS|GRAM|GRAMS|GM|OZ|OUNCES"/>
|
|
81
|
+
</xs:restriction>
|
|
82
|
+
</xs:simpleType>
|
|
83
|
+
</xs:element>
|
|
84
|
+
<xs:element name="Dimensions" minOccurs="0">
|
|
85
|
+
<xs:complexType>
|
|
86
|
+
<xs:all>
|
|
87
|
+
<xs:element name="DimensionUnits" minOccurs="0">
|
|
88
|
+
<xs:simpleType>
|
|
89
|
+
<xs:restriction base="xs:string">
|
|
90
|
+
<xs:pattern value="|inch|inches|in|centimeter|centimeters|cm|INCH|INCHES|IN|CENTIMETER|CENTIMETERS|CM"/>
|
|
91
|
+
</xs:restriction>
|
|
92
|
+
</xs:simpleType>
|
|
93
|
+
</xs:element>
|
|
94
|
+
<xs:element type="xs:float" name="Length"/>
|
|
95
|
+
<xs:element type="xs:float" name="Width"/>
|
|
96
|
+
<xs:element type="xs:float" name="Height"/>
|
|
97
|
+
</xs:all>
|
|
98
|
+
</xs:complexType>
|
|
99
|
+
</xs:element>
|
|
100
|
+
<xs:element type="xs:int" name="Quantity"/>
|
|
101
|
+
<xs:element type="xs:float" name="UnitPrice"/>
|
|
102
|
+
<xs:element type="String100" name="Location" minOccurs="0"/>
|
|
103
|
+
<xs:element name="Options" minOccurs="0">
|
|
104
|
+
<xs:complexType>
|
|
105
|
+
<xs:sequence>
|
|
106
|
+
<xs:element name="Option" maxOccurs="100" minOccurs="0">
|
|
107
|
+
<xs:complexType>
|
|
108
|
+
<xs:all>
|
|
109
|
+
<xs:element type="String100" name="Name"/>
|
|
110
|
+
<xs:element type="String100" name="Value"/>
|
|
111
|
+
<xs:element type="xs:float" name="Weight" minOccurs="0"/>
|
|
112
|
+
</xs:all>
|
|
113
|
+
</xs:complexType>
|
|
114
|
+
</xs:element>
|
|
115
|
+
</xs:sequence>
|
|
116
|
+
</xs:complexType>
|
|
117
|
+
</xs:element>
|
|
118
|
+
</xs:all>
|
|
119
|
+
</xs:complexType>
|
|
120
|
+
</xs:element>
|
|
121
|
+
</xs:sequence>
|
|
122
|
+
</xs:complexType>
|
|
123
|
+
</xs:element>
|
|
124
|
+
</xs:all>
|
|
125
|
+
</xs:complexType>
|
|
126
|
+
</xs:element>
|
|
127
|
+
</xs:sequence>
|
|
128
|
+
<xs:attribute type="xs:short" name="pages"/>
|
|
129
|
+
</xs:complexType>
|
|
130
|
+
</xs:element>
|
|
131
|
+
<xs:simpleType name="DateTime">
|
|
132
|
+
<xs:restriction base="xs:string">
|
|
133
|
+
<xs:pattern value="[0-9][0-9]?/[0-9][0-9]?/[0-9][0-9][0-9]?[0-9]? [0-9][0-9]?:[0-9][0-9]?:?[0-9]?[0-9]?. ?[aApP]?[mM]?"/>
|
|
134
|
+
</xs:restriction>
|
|
135
|
+
</xs:simpleType>
|
|
136
|
+
<xs:simpleType name="Email">
|
|
137
|
+
<xs:restriction base="xs:string">
|
|
138
|
+
</xs:restriction>
|
|
139
|
+
</xs:simpleType>
|
|
140
|
+
<xs:simpleType name="StringExactly2">
|
|
141
|
+
<xs:restriction base="xs:string">
|
|
142
|
+
<xs:minLength value="2"/>
|
|
143
|
+
<xs:maxLength value="2"/>
|
|
144
|
+
</xs:restriction>
|
|
145
|
+
</xs:simpleType>
|
|
146
|
+
<xs:simpleType name="String30">
|
|
147
|
+
<xs:restriction base="xs:string">
|
|
148
|
+
<xs:maxLength value="30"/>
|
|
149
|
+
</xs:restriction>
|
|
150
|
+
</xs:simpleType>
|
|
151
|
+
<xs:simpleType name="String50">
|
|
152
|
+
<xs:restriction base="xs:string">
|
|
153
|
+
<xs:maxLength value="50"/>
|
|
154
|
+
</xs:restriction>
|
|
155
|
+
</xs:simpleType>
|
|
156
|
+
<xs:simpleType name="String100">
|
|
157
|
+
<xs:restriction base="xs:string">
|
|
158
|
+
<xs:maxLength value="100"/>
|
|
159
|
+
</xs:restriction>
|
|
160
|
+
</xs:simpleType>
|
|
161
|
+
<xs:simpleType name="String200">
|
|
162
|
+
<xs:restriction base="xs:string">
|
|
163
|
+
<xs:maxLength value="200"/>
|
|
164
|
+
</xs:restriction>
|
|
165
|
+
</xs:simpleType>
|
|
166
|
+
<xs:simpleType name="String1000">
|
|
167
|
+
<xs:restriction base="xs:string">
|
|
168
|
+
<xs:maxLength value="1000"/>
|
|
169
|
+
</xs:restriction>
|
|
170
|
+
</xs:simpleType>
|
|
171
|
+
</xs:schema>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
|
4
|
+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
|
5
|
+
|
|
6
|
+
require "spree/shipstation/version"
|
|
7
|
+
|
|
8
|
+
Gem::Specification.new do |s|
|
|
9
|
+
s.platform = Gem::Platform::RUBY
|
|
10
|
+
s.name = "spree-shipstation"
|
|
11
|
+
s.version = Spree::Shipstation.version
|
|
12
|
+
s.summary = "ShipStation integration for Spree e-commerce"
|
|
13
|
+
s.description = "Connects Spree stores to ShipStation via an XML export endpoint and shipnotify webhook, enabling automated label creation and shipment tracking."
|
|
14
|
+
s.required_ruby_version = ">= 3.1"
|
|
15
|
+
|
|
16
|
+
s.author = "Matthew Kennedy"
|
|
17
|
+
s.email = "m.kennedy@me.com"
|
|
18
|
+
s.homepage = "https://github.com/aypex-io/spree-shipstation"
|
|
19
|
+
s.license = "MIT"
|
|
20
|
+
|
|
21
|
+
s.metadata = {
|
|
22
|
+
"source_code_uri" => s.homepage,
|
|
23
|
+
"bug_tracker_uri" => "#{s.homepage}/issues",
|
|
24
|
+
"changelog_uri" => "#{s.homepage}/blob/main/CHANGELOG.md",
|
|
25
|
+
"rubygems_mfa_required" => "true"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
s.files = `git ls-files`.split("\n").reject { |f| f.match(/^spec/) && !f.match(%r{^spec/fixtures}) }
|
|
29
|
+
s.require_path = "lib"
|
|
30
|
+
|
|
31
|
+
spree_version = ">= 5.0", "< 6.0"
|
|
32
|
+
|
|
33
|
+
s.add_dependency "pagy", ">= 43.0", "< 45.0"
|
|
34
|
+
s.add_dependency "spree", spree_version
|
|
35
|
+
s.add_dependency "spree_extension"
|
|
36
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: spree-shipstation
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 5.0.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Matthew Kennedy
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: pagy
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '43.0'
|
|
19
|
+
- - "<"
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '45.0'
|
|
22
|
+
type: :runtime
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '43.0'
|
|
29
|
+
- - "<"
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '45.0'
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: spree
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '5.0'
|
|
39
|
+
- - "<"
|
|
40
|
+
- !ruby/object:Gem::Version
|
|
41
|
+
version: '6.0'
|
|
42
|
+
type: :runtime
|
|
43
|
+
prerelease: false
|
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '5.0'
|
|
49
|
+
- - "<"
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: '6.0'
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: spree_extension
|
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
- - ">="
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: '0'
|
|
59
|
+
type: :runtime
|
|
60
|
+
prerelease: false
|
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
62
|
+
requirements:
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: '0'
|
|
66
|
+
description: Connects Spree stores to ShipStation via an XML export endpoint and shipnotify
|
|
67
|
+
webhook, enabling automated label creation and shipment tracking.
|
|
68
|
+
email: m.kennedy@me.com
|
|
69
|
+
executables: []
|
|
70
|
+
extensions: []
|
|
71
|
+
extra_rdoc_files: []
|
|
72
|
+
files:
|
|
73
|
+
- ".github/stale.yml"
|
|
74
|
+
- ".github/workflows/lint.yml"
|
|
75
|
+
- ".github/workflows/security.yml"
|
|
76
|
+
- ".github/workflows/test.yml"
|
|
77
|
+
- ".gitignore"
|
|
78
|
+
- ".rspec"
|
|
79
|
+
- ".standard.yml"
|
|
80
|
+
- Appraisals
|
|
81
|
+
- CHANGELOG.md
|
|
82
|
+
- CLAUDE.md
|
|
83
|
+
- Gemfile
|
|
84
|
+
- LICENSE
|
|
85
|
+
- README.md
|
|
86
|
+
- Rakefile
|
|
87
|
+
- app/assets/config/spree_shipstation_manifest.js
|
|
88
|
+
- app/assets/images/integration_icons/shipstation-logo.webp
|
|
89
|
+
- app/controllers/spree/shipstation_controller.rb
|
|
90
|
+
- app/helpers/spree/shipstation/export_helper.rb
|
|
91
|
+
- app/models/spree/integrations/shipstation.rb
|
|
92
|
+
- app/models/spree/shipment_decorator.rb
|
|
93
|
+
- app/presenters/spree/shipstation/export/item_presenter.rb
|
|
94
|
+
- app/presenters/spree/shipstation/export/order_presenter.rb
|
|
95
|
+
- app/presenters/spree/shipstation/export/weight.rb
|
|
96
|
+
- app/views/spree/admin/integrations/forms/_shipstation.html.erb
|
|
97
|
+
- app/views/spree/shipstation/export.xml.builder
|
|
98
|
+
- bin/rails
|
|
99
|
+
- config/initializers/spree.rb
|
|
100
|
+
- config/locales/en.yml
|
|
101
|
+
- config/routes.rb
|
|
102
|
+
- gemfiles/spree_5_2.gemfile
|
|
103
|
+
- gemfiles/spree_5_3.gemfile
|
|
104
|
+
- gemfiles/spree_5_4.gemfile
|
|
105
|
+
- lib/spree-shipstation.rb
|
|
106
|
+
- lib/spree/shipstation.rb
|
|
107
|
+
- lib/spree/shipstation/engine.rb
|
|
108
|
+
- lib/spree/shipstation/errors.rb
|
|
109
|
+
- lib/spree/shipstation/factories.rb
|
|
110
|
+
- lib/spree/shipstation/shipment_notice.rb
|
|
111
|
+
- lib/spree/shipstation/testing_support/factories/shipstation_integration.rb
|
|
112
|
+
- lib/spree/shipstation/version.rb
|
|
113
|
+
- spec/fixtures/shipstation_xml_schema.xsd
|
|
114
|
+
- spree-shipstation.gemspec
|
|
115
|
+
homepage: https://github.com/aypex-io/spree-shipstation
|
|
116
|
+
licenses:
|
|
117
|
+
- MIT
|
|
118
|
+
metadata:
|
|
119
|
+
source_code_uri: https://github.com/aypex-io/spree-shipstation
|
|
120
|
+
bug_tracker_uri: https://github.com/aypex-io/spree-shipstation/issues
|
|
121
|
+
changelog_uri: https://github.com/aypex-io/spree-shipstation/blob/main/CHANGELOG.md
|
|
122
|
+
rubygems_mfa_required: 'true'
|
|
123
|
+
rdoc_options: []
|
|
124
|
+
require_paths:
|
|
125
|
+
- lib
|
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
- - ">="
|
|
129
|
+
- !ruby/object:Gem::Version
|
|
130
|
+
version: '3.1'
|
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
|
+
requirements:
|
|
133
|
+
- - ">="
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: '0'
|
|
136
|
+
requirements: []
|
|
137
|
+
rubygems_version: 4.0.15
|
|
138
|
+
specification_version: 4
|
|
139
|
+
summary: ShipStation integration for Spree e-commerce
|
|
140
|
+
test_files: []
|