seko 0.0.9 → 0.0.10
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 +4 -4
- data/Changes.md +61 -0
- data/README.md +6 -5
- data/lib/seko/order.rb +18 -4
- data/lib/seko/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe23c3fd436c7b62514038cd51c2a37b5985048e
|
4
|
+
data.tar.gz: 5c7015b29221a7cd48cf0de63c58eba7ecfc1c6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddfa4f8386fd453e125abe16e81448d444d110555b78d1ebc1d083a41a94cf64ca56002c5837c1b4869c4d9a99191ff4f6cac00e629c1d2d2f610f07d30e288c
|
7
|
+
data.tar.gz: a8fde0ecee4a7c36afe799c0c2c7fe10aa366ede92f07a6c1823f5e4d449014de0075cdb8f82722b67d5d4fc2e845e55557f2a2781ab2305f04624024ab821f9
|
data/Changes.md
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
0.0.10
|
2
|
+
-----------
|
3
|
+
**FIXES**
|
4
|
+
- make courier attributes on order optional. With the addition of the `has_courier?` method, you can now pass either `N/A` or a blank `order[:shipping_carrier]` to exclude courier from the order submission.
|
5
|
+
|
6
|
+
0.0.9
|
7
|
+
-----------
|
8
|
+
**FIXES**
|
9
|
+
- pass separate value, `order[:shipping_carrier]`, to `CourierName`
|
10
|
+
|
11
|
+
0.0.8
|
12
|
+
-----------
|
13
|
+
**FIXES**
|
14
|
+
- rename `State` to `County` as `State` was not recongnized by Seko
|
15
|
+
|
16
|
+
0.0.7
|
17
|
+
-----------
|
18
|
+
**NEW FEATURES**
|
19
|
+
- add `State`, `CourierName`, and `CourierService` to order
|
20
|
+
|
21
|
+
0.0.6
|
22
|
+
-----------
|
23
|
+
**NEW FEATURES**
|
24
|
+
- rename `submit_receipt` to `send_return_request` to be more semantic
|
25
|
+
- add `requires_warehouse?` method for third-party use
|
26
|
+
|
27
|
+
0.0.5
|
28
|
+
-----------
|
29
|
+
**NEW FEATURES**
|
30
|
+
- add `UnitPrice`, `CurrencyCode`, and `VAT` to order line items.
|
31
|
+
|
32
|
+
0.0.4
|
33
|
+
-----------
|
34
|
+
**NEW FEATURES**
|
35
|
+
- add tracking for UPS
|
36
|
+
- `get_carrier` method now parses tracking numbers with a RegEx and returns the appropriate carrier
|
37
|
+
|
38
|
+
0.0.3
|
39
|
+
-----------
|
40
|
+
**FIXES**
|
41
|
+
- pass dashes when zipcode is blank
|
42
|
+
|
43
|
+
0.0.2
|
44
|
+
-----------
|
45
|
+
**FIXES**
|
46
|
+
- update DPD tracking url
|
47
|
+
|
48
|
+
0.0.1
|
49
|
+
-----------
|
50
|
+
- initial release using Seko Logistics' SupplyStream iHub REST API v1
|
51
|
+
**Integrations**
|
52
|
+
1. **Inbound Product Master Upload and method**
|
53
|
+
2. **Inbound Companies Upload and method**
|
54
|
+
3. **Inbound Advanced Shipment Notification**
|
55
|
+
4. **Inbound Sales Order / Cancel Orders**
|
56
|
+
5. **Retrieve GRN’s**
|
57
|
+
6. **Retrieve Stock Quantity**
|
58
|
+
7. **Retrieve Tracking Details**
|
59
|
+
8. **Retrieve Sales Order Status**
|
60
|
+
9. **Retrieve Stock Adjustments**
|
61
|
+
10. **Retrieve Stock Movements**
|
data/README.md
CHANGED
@@ -208,11 +208,12 @@ order = {
|
|
208
208
|
zipcode: "10012",
|
209
209
|
phone: "123-123-1234"
|
210
210
|
},
|
211
|
-
email:
|
212
|
-
number:
|
213
|
-
warehouse:
|
214
|
-
date:
|
215
|
-
|
211
|
+
email: "someone@somehwere.com",
|
212
|
+
number: "R123123123",
|
213
|
+
warehouse: "DC123",
|
214
|
+
date: "2013-12-12",
|
215
|
+
shipping_carrier: "DLP",
|
216
|
+
shipping_method: "22",
|
216
217
|
line_items: [
|
217
218
|
{
|
218
219
|
quantity: "1",
|
data/lib/seko/order.rb
CHANGED
@@ -34,14 +34,28 @@ module Seko
|
|
34
34
|
"SalesOrderHeader" => { "DCCode" => order[:warehouse] },
|
35
35
|
"#{order_prefix}SalesOrder" => {
|
36
36
|
"SalesOrderDate" => order[:date],
|
37
|
-
"SalesOrderNumber" => order[:number]
|
38
|
-
|
39
|
-
"CourierService" => order[:shipping_method]
|
40
|
-
}
|
37
|
+
"SalesOrderNumber" => order[:number]
|
38
|
+
}.merge(courier_attributes(order))
|
41
39
|
}
|
42
40
|
}
|
43
41
|
end
|
44
42
|
|
43
|
+
def self.courier_attributes(order)
|
44
|
+
if has_courier?(order)
|
45
|
+
{
|
46
|
+
"CourierName" => order[:shipping_carrier],
|
47
|
+
"CourierService" => order[:shipping_method]
|
48
|
+
}
|
49
|
+
else
|
50
|
+
{}
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.has_courier?(order)
|
55
|
+
order[:shipping_carrier] != nil &&
|
56
|
+
order[:shipping_carrier] != 'N/A'
|
57
|
+
end
|
58
|
+
|
45
59
|
def self.address(address, email)
|
46
60
|
{
|
47
61
|
"City" => address[:city],
|
data/lib/seko/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -125,7 +125,7 @@ def order_hash
|
|
125
125
|
email: 'stephen.jones@gmail.com',
|
126
126
|
shipping_address: address_hash,
|
127
127
|
shipping_carrier: 'DLP',
|
128
|
-
shipping_method:
|
128
|
+
shipping_method: '743',
|
129
129
|
line_items: line_items_array,
|
130
130
|
warehouse: 'DC123',
|
131
131
|
date: '2013-12-12',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seko
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Grubbs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- .gitignore
|
106
106
|
- .rspec
|
107
107
|
- .travis.yml
|
108
|
+
- Changes.md
|
108
109
|
- Gemfile
|
109
110
|
- LICENSE.txt
|
110
111
|
- README.md
|
@@ -167,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
168
|
version: '0'
|
168
169
|
requirements: []
|
169
170
|
rubyforge_project:
|
170
|
-
rubygems_version: 2.
|
171
|
+
rubygems_version: 2.2.2
|
171
172
|
signing_key:
|
172
173
|
specification_version: 4
|
173
174
|
summary: A ruby wrapper for interfacing with Seko Logistics' SupplySteam iHub API
|