b2w 0.2.5 → 0.2.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20055d4c97a60ddb91bbc5a7a8b952430e42bf53
4
- data.tar.gz: cb1bcf83346fc2afc663441273a6208e897baef3
3
+ metadata.gz: a607b25930f3a0af94697962f617c1e50e7df123
4
+ data.tar.gz: 4e810d77415e77149cca3dd70af08c186394819e
5
5
  SHA512:
6
- metadata.gz: 822fa0e9fc7083844ef72b374da88fd2a763d8396509bb39bacc0237bf27c628d1b886caf77d8add7c118d82ec72efc9c45014e73279967977d3997877ce58e2
7
- data.tar.gz: 891e0e1215d2436759370265c87d41a7353fc2208f3f69ecb9fed05f779a9ef22d75e1ad1f2c288d1e3d3ebc9fa5437d397a5fe2f4475dcb1799ebda4e55480b
6
+ metadata.gz: c6160b411173825fc41b7f5639a4107114f4f7c588512c90088c56129c651d3f1cacdb492ec98206d43a5801993ec8ed638346b724431b53bc26b524d938ebe2
7
+ data.tar.gz: d37d13859c2bbb6a37a3e930c3caecc8a5ece7da026ccbb8225657b636d8c62f82f0c6bce80780076f359a7e4a33ae4e2bd6e4e4e959f574a8e53f32ca93c6ac
@@ -8,23 +8,11 @@ module B2W
8
8
  end
9
9
 
10
10
  def update!(params)
11
- bool_operation do
12
- self.class.post("product/#{sku}/sku", params) do |body, request, result|
13
- binding.pry
14
- yield body, request, result if block_given?
15
- end
16
- end
11
+ bool_operation { self.class.post "product/#{sku}/sku", params }
17
12
  end
18
13
 
19
14
  def update_price!
20
- put(:sku, "#{sku}/price", sellPrice: self['sell_price'], listPrice: self['list_price']) do |body, request, result|
21
- binding.pry
22
- yield body, request, result if block_given?
23
- end
24
- end
25
-
26
- def self.find(sku)
27
- get "sku/#{sku}"
15
+ put(:sku, "#{sku}/price", sellPrice: self['sell_price'], listPrice: self['list_price'])
28
16
  end
29
17
 
30
18
  def update_stock!
@@ -39,6 +27,10 @@ module B2W
39
27
  bool_operation { self.class.get "product/#{id}" }
40
28
  end
41
29
 
30
+ def self.find(sku)
31
+ get "sku/#{sku}"
32
+ end
33
+
42
34
  private
43
35
 
44
36
  def bool_operation
@@ -1,3 +1,3 @@
1
1
  module B2W
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: b2w
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Carrion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-10 00:00:00.000000000 Z
11
+ date: 2016-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client