item_builder 0.1.50 → 0.1.51

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85cdb400a2a96b3ec48a7c3595dc11cd6c98bab1c22057b603697482981496d8
4
- data.tar.gz: a6f283e3c3670a6d190846c3b0951d8ef5847e5f5e17ca39789c1d2b65cf06eb
3
+ metadata.gz: 69fd543a88549b7f8e3cd3d9314b9373971251c77a7d6c18f40afd48eeb017e2
4
+ data.tar.gz: 691182911781462cc4a0261892404502baddcb9cb2d74e9ef7d491563db17014
5
5
  SHA512:
6
- metadata.gz: 542f97bacef6a7cab57a646d9b919bc09b025eb893e6063095d644641469610436d82f6e6176b33fcb8808c65a6a19206f5dfe94ca00b9c6030622859d26e1bd
7
- data.tar.gz: 416d6c22f105c24ea3e943fdef89495342fc2f654ba719bed64d2612480a4b9fcff9ed53ab6c96554886578a667a6eb5992d550a7bca7cfabb925ae4786cc387
6
+ metadata.gz: 0c17a80b92159a623786861ed21c8a33ca6c3ab58c32686c241879406f964789dc0395ade3700d38da293f08a0d350316469e28e99e6d0a06fcdb53d5ee1eda1
7
+ data.tar.gz: 02ea415d4ce6a832a1c832d2a67b7bcbde7c0c73c1fafa739472d18db8b3362ced51c7801209ef7a1628f73342d28e6da5388b52ffbbf11c2157b59284b5a30c
@@ -28,7 +28,6 @@ class ItemBuilder
28
28
  stock_allocs: stock_allocs, variant_listings: variant_listings,
29
29
  bundles: bundles, item_bundle_variants: item_bundle_variants,
30
30
  existing_alloc_stocks: existing_alloc_stocks,
31
- reserved_stocks: reserved_stocks,
32
31
  zilingo_quantity: zilingo_quantity,
33
32
  zalora_reserved_stock: zalora_reserved_stock
34
33
  ).to_h
@@ -22,7 +22,6 @@ class ItemBuilder
22
22
  stock_allocs: stock_allocs, variant_listings: variant_listings,
23
23
  bundles: bundles, item_bundle_variants: item_bundle_variants,
24
24
  existing_alloc_stocks: existing_alloc_stocks,
25
- reserved_stocks: reserved_stocks,
26
25
  zilingo_quantity: zilingo_quantity
27
26
  ).to_h
28
27
  end
@@ -16,7 +16,6 @@ class ItemBuilder
16
16
  attr_reader :item_bundle_variants
17
17
  attr_reader :existing_alloc_stocks
18
18
  attr_reader :variant_listings
19
- attr_reader :reserved_stocks
20
19
  attr_reader :zilingo_quantity
21
20
  attr_reader :lazada_quantity
22
21
  attr_reader :zalora_reserved_stock
@@ -31,7 +30,6 @@ class ItemBuilder
31
30
  @item_bundle_variants = args.fetch(:item_bundle_variants, [])
32
31
  @existing_alloc_stocks = args.fetch(:existing_alloc_stocks, [])
33
32
  @variant_listings = args.fetch(:variant_listings, [])
34
- @reserved_stocks = args.fetch(:reserved_stocks, [])
35
33
  @zilingo_quantity = args.fetch(:zilingo_quantity, [])
36
34
  @lazada_quantity = args.fetch(:lazada_quantity, [])
37
35
  @zalora_reserved_stock = args.fetch(:zalora_reserved_stock, [])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ItemBuilder
4
- VERSION = '0.1.50'
4
+ VERSION = '0.1.51'
5
5
  end
data/lib/item_builder.rb CHANGED
@@ -68,8 +68,7 @@ class ItemBuilder
68
68
  listing: listing, wh_spaces: wh_spaces, variants: variants,
69
69
  stock_allocs: stock_allocs, variant_listings: variant_listings,
70
70
  bundles: bundles, item_bundle_variants: item_bundle_variants,
71
- existing_alloc_stocks: existing_alloc_stocks,
72
- reserved_stocks: reserved_stocks, wh_id: @wh_id
71
+ existing_alloc_stocks: existing_alloc_stocks, wh_id: wh_id
73
72
  }
74
73
  end
75
74
 
@@ -177,22 +176,6 @@ class ItemBuilder
177
176
  }
178
177
  end
179
178
 
180
- def order_host
181
- url = ENV['ORDERS_URL'] || 'orders.forstok.com'
182
- url + '/api/v3/item_line/reserved_stock'
183
- end
184
-
185
- def reserved_params
186
- "account_id=#{account_id}
187
- &item_variant_ids=#{variant_ids.join(',')}"
188
- end
189
-
190
- def reserved_stocks
191
- @reserved_stocks ||= JSON.parse(RestClient.get(
192
- "#{order_host}?#{reserved_params}"
193
- ).body) if [3].include?(listings[0].channel_id)
194
- end
195
-
196
179
  def wh_mapping
197
180
  @wh_mapping ||= WarehouseMapping.where(
198
181
  profile_channel_association_id: account_id
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: item_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.50
4
+ version: 0.1.51
5
5
  platform: ruby
6
6
  authors:
7
7
  - okaaryanata
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-28 00:00:00.000000000 Z
11
+ date: 2021-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler