item_builder_mwh 0.1.37 → 0.1.40

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
  SHA256:
3
- metadata.gz: b5f5b09777469d722c4c2612e4e5c230d30a63e0d7c743ca02f53f65b8e2b285
4
- data.tar.gz: d6a784c648540481cb300e25c80beb3fa40ad1858e47f753919fe1980489c8fd
3
+ metadata.gz: af3292c0107dea54d5b66e550e47957601f5fc8fd315b562e39f38a5347a9924
4
+ data.tar.gz: 459116cae34aeba39a23e29f3d521b040787d731aa86ab5ebace1cc384e6dfd5
5
5
  SHA512:
6
- metadata.gz: b67c521b8560ad10a07dc8e1d896c76e6be37ddcbc363c6ab645c789995c460f65ee96581975ef9f2db1afc34deaddf5b940bfe82714cce14e32daef139af17d
7
- data.tar.gz: 2bca78cdf0c938e51e543a4d5a0f343c6863d42364bacd93c09d279bc7d6773f1cfff7a6a115817682e6d7cc89438293a85aca98b193714566dddb0f983a6a26
6
+ metadata.gz: 32e74fe7ccc05e588a9b25f9e6a2c943029cf91aa8f4d2502837b7c028ce8c528f206e2fa3974d045109c461af06ff70210476e1aba9a26994839c22e66f687a
7
+ data.tar.gz: 69575841eb1ce76f2caf90849f3b7e5aa19a2d838c09a20c3e313623a3328ccb38143419b9bfe12ca7adb8f6e8058c06320691dde84d33f4fdb536d46544ce90
@@ -49,8 +49,8 @@ class ItemBuilderMwh
49
49
  end
50
50
 
51
51
  def allocated_start_end?
52
- @stock_alloc.start_at.beginning_of_day <= Time.now &&
53
- @stock_alloc.end_at.end_of_day >= Time.now
52
+ @stock_alloc.start_at <= Time.now &&
53
+ @stock_alloc.end_at >= Time.now
54
54
  end
55
55
 
56
56
  def allocated_stock
@@ -101,6 +101,7 @@ class ItemBuilderMwh
101
101
  .joins('JOIN warehouses ON
102
102
  warehouse_spaces.warehouse_id = warehouses.id')
103
103
  .where("warehouse_mappings.profile_channel_association_id=#{pca}")
104
+ .where('warehouse_mappings.deleted_at is NULL')
104
105
  .where("warehouse_spaces.item_variant_id=#{variant_id}")
105
106
  .where('warehouses.consignment = 0')
106
107
  end
@@ -40,7 +40,7 @@ class ItemBuilderMwh
40
40
  method: :post, url: url_variant, payload: data_variant, headers: headers
41
41
  }
42
42
 
43
- resp = JSON.parse(rest_client(args, [200, 500, 406]))
43
+ resp = JSON.parse(rest_client(args, [200, 402]))
44
44
 
45
45
  hash = { listing_id => { "real_local_id" => resp['inventory_item_id'] } }
46
46
  @variant_listings = @variant_listings.merge(hash)
@@ -62,7 +62,7 @@ class ItemBuilderMwh
62
62
  method: :post, url: url_location, payload: data_location, headers: headers
63
63
  }
64
64
 
65
- resp = JSON.parse(rest_client(args, [200, 500, 406]))
65
+ resp = JSON.parse(rest_client(args, [200, 402]))
66
66
  resp['id']
67
67
  end
68
68
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ItemBuilderMwh
4
- VERSION = '0.1.37'
4
+ VERSION = '0.1.40'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: item_builder_mwh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.37
4
+ version: 0.1.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ivander
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-26 00:00:00.000000000 Z
11
+ date: 2022-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler