shipvine 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shipvine/item.rb +11 -0
- data/lib/shipvine/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe8ee7cb264399a906888f2ca89d36546da8623
|
4
|
+
data.tar.gz: d54128f0311c73978d17ade9f136ac481aeae65d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73818d703fc87823ad5f71a135ca7312844e4827200cf40d0e99b1a13235ee362ce8a9d0317d8863150a0c0fa4f12473cbdc8a83bff7d5a499217f6c1d460808
|
7
|
+
data.tar.gz: 3bd4a784f8de487e5b5aafe6990e2023609f6b6cabc955cf46ec8b781e4d6e3853dee91262633b392f0e896b85524177c21db9c766475eeaa8f47f47b02e95ed
|
data/lib/shipvine/item.rb
CHANGED
@@ -30,6 +30,7 @@ module Shipvine
|
|
30
30
|
group_merchant_identifier = translated_payload.delete(:group_merchant_identifier)
|
31
31
|
|
32
32
|
preprocess_metadata(translated_payload)
|
33
|
+
preprocess_variations(translated_payload)
|
33
34
|
|
34
35
|
client.request(
|
35
36
|
:put,
|
@@ -56,6 +57,16 @@ module Shipvine
|
|
56
57
|
# NOTE there is no XSD for item group!
|
57
58
|
end
|
58
59
|
|
60
|
+
def preprocess_variations(item_hash)
|
61
|
+
variations = item_hash.delete(:variations)
|
62
|
+
|
63
|
+
if variations
|
64
|
+
item_hash[:variations] = {
|
65
|
+
variation: variations
|
66
|
+
}
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
59
70
|
def preprocess_metadata(item_hash)
|
60
71
|
metadata = item_hash.delete(:metadata)
|
61
72
|
|
data/lib/shipvine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shipvine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bianco
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.5.1
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Shipvine API bindings
|