brightpearl_api 1.1.0 → 1.1.1

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: de3f247e0c29d578aa0e77827d90d832f5d1745c
4
- data.tar.gz: 5d2d8f081c1aad77138804ba5b8b51c33ba100c7
3
+ metadata.gz: a9ed4285f460bff1d9b32236d309e8318cded615
4
+ data.tar.gz: d2694f048357171046e5b2f847ae47a1e29c09f2
5
5
  SHA512:
6
- metadata.gz: 5843054f1a25b32942366abfdf9a845c2534e19261959e61d7eb5c7b25f0c1165b1ede6628ec38eb4ccb45e441784a534c85dc8467082474d62f2da628bb3e3c
7
- data.tar.gz: fd467668eeddaddf46f52f6c583cf989d003983c41f58188dd83d9abba4b4cc188214e7c5fbc6b86403a8b0d90e50cbe9983537678eac4cb8149edb7e8defd76
6
+ metadata.gz: d9c6bd8cd38c48436a7c9babeecbebe0803c59079e99605d7eff36dc7af7d5c2e60902555489f5439cdde703f8c3ecbbcf79cf31587ceb8fc43230de755663ba
7
+ data.tar.gz: e6f587b08aaccddd1e39afde4af42ebe19a8eb0a8737b2a3e3434bd82946ca815ae506f2a1e48ad15943c8f4a6eac9c93c633c0c0d0fe4fb91bbf20feae75d5e
@@ -22,11 +22,9 @@ module BrightpearlApi
22
22
  id_set = nil
23
23
  case idset
24
24
  when Range
25
- id_set = "#{idset.min.to_int}-#{idset.max.to_int}"
25
+ id_set = "#{idset.min.to_i}-#{idset.max.to_i}"
26
26
  when Array
27
- id_set = idset.collect{ |x| x.to_int }.join(',')
28
- else
29
- id_set = idset.to_int
27
+ id_set = idset.collect{ |x| x.to_i }.join(',')
30
28
  end
31
29
  id_set
32
30
  end
@@ -49,11 +47,11 @@ module BrightpearlApi
49
47
  def update_resource(service, resource, resource_id)
50
48
  body = {}
51
49
  yield(body)
52
- call(:put, "/#{service}-service/#{resource}/#{resource_id.to_int}", body)
50
+ call(:put, "/#{service}-service/#{resource}/#{resource_id.to_i}", body)
53
51
  end
54
52
 
55
53
  def delete_resource(service, resource, resource_id)
56
- call(:delete, "/#{service}-service/#{resource}/#{resource_id.to_int}")
54
+ call(:delete, "/#{service}-service/#{resource}/#{resource_id.to_i}")
57
55
  end
58
56
 
59
57
  def get_resource_range(service, resource, idset = nil)
@@ -5,7 +5,7 @@ module BrightpearlApi
5
5
  klass.class_eval do
6
6
  def associate_tag(idset, tag_id)
7
7
  id_set = parse_idset(idset)
8
- call(:post, "/contact-service/contact/#{id_set}/tag/#{tag_id.to_int}")
8
+ call(:post, "/contact-service/contact/#{id_set}/tag/#{tag_id.to_i}")
9
9
  end
10
10
  end
11
11
  end
@@ -7,35 +7,35 @@ module BrightpearlApi
7
7
  body = {
8
8
  reference: "#{reference}"
9
9
  }
10
- call(:put, "/order-service/order/#{order_id.to_int}/acknowledgement", body)
10
+ call(:put, "/order-service/order/#{order_id.to_i}/acknowledgement", body)
11
11
  end
12
12
 
13
13
  def create_order_note(order_id)
14
14
  body = {}
15
15
  yield(body)
16
- call(:post, "/order-service/order/#{order_id.to_int}/note", body)
16
+ call(:post, "/order-service/order/#{order_id.to_i}/note", body)
17
17
  end
18
18
 
19
19
  def get_order_row(order_id, row_id)
20
- call(:get, "/order-service/order/#{order_id.to_int}/row/#{row_id.to_int}")
20
+ call(:get, "/order-service/order/#{order_id.to_i}/row/#{row_id.to_i}")
21
21
  end
22
22
 
23
23
  def create_order_row(order_id)
24
24
  body = {}
25
25
  yield(body)
26
- call(:post, "/order-service/order/#{order_id.to_int}/row", body)
26
+ call(:post, "/order-service/order/#{order_id.to_i}/row", body)
27
27
  end
28
28
 
29
29
  def update_order_row(order_id, row_id)
30
30
  body = {}
31
31
  yield(body)
32
- call(:put, "/order-service/order/#{order_id.to_int}/row/#{row_id.to_int}", body)
32
+ call(:put, "/order-service/order/#{order_id.to_i}/row/#{row_id.to_i}", body)
33
33
  end
34
34
 
35
35
  def update_order_status(order_id)
36
36
  body = {}
37
37
  yield(body)
38
- call(:put, "/order-service/order/#{order_id.to_int}/status", body)
38
+ call(:put, "/order-service/order/#{order_id.to_i}/status", body)
39
39
  end
40
40
  end
41
41
  end
@@ -28,13 +28,13 @@ module BrightpearlApi
28
28
  body = {
29
29
  optionValueName: optionValueName
30
30
  }
31
- call(:post, "/product-service/option/#{option_id.to_int}/value", body)
31
+ call(:post, "/product-service/option/#{option_id.to_i}/value", body)
32
32
  end
33
33
 
34
34
  def update_product_price(product_id)
35
35
  body = {}
36
36
  yield(body)
37
- call(:put, "/product-service/product-service/#{product_id.to_int}/price-list", body)
37
+ call(:put, "/product-service/product-service/#{product_id.to_i}/price-list", body)
38
38
  end
39
39
 
40
40
  def create_product_type(name)
@@ -6,30 +6,30 @@ module BrightpearlApi
6
6
  def asset_value_correction(warehouse_id)
7
7
  body = {}
8
8
  yield(body)
9
- call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_int}/asset-value-correction", body)
9
+ call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_i}/asset-value-correction", body)
10
10
  end
11
11
 
12
12
  def get_default_location(warehouse_id)
13
- call(:get, "/warehouse-service/warehouse/#{warehouse_id.to_int}/location/default")
13
+ call(:get, "/warehouse-service/warehouse/#{warehouse_id.to_i}/location/default")
14
14
  end
15
15
 
16
16
  def get_quarantine_location(warehouse_id)
17
- call(:get, "/warehouse-service/warehouse/#{warehouse_id.to_int}/location/quarantine")
17
+ call(:get, "/warehouse-service/warehouse/#{warehouse_id.to_i}/location/quarantine")
18
18
  end
19
19
 
20
20
  def get_location(warehouse_id, location_id_set = nil)
21
21
  lid = location_id_set.nil? ? "" : parse_idset(location_id_set)
22
- call(:get, "/warehouse-service/warehouse/#{warehouse_id.to_int}/location/#{lid}")
22
+ call(:get, "/warehouse-service/warehouse/#{warehouse_id.to_i}/location/#{lid}")
23
23
  end
24
24
 
25
25
  def create_location(warehouse_id)
26
26
  body = {}
27
27
  yield(body)
28
- call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_int}/location/", body)
28
+ call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_i}/location/", body)
29
29
  end
30
30
 
31
31
  def delete_location(warehouse_id, location_id)
32
- call(:delete, "/warehouse-service/warehouse/#{warehouse_id.to_int}/location/#{location_id.to_int}")
32
+ call(:delete, "/warehouse-service/warehouse/#{warehouse_id.to_i}/location/#{location_id.to_i}")
33
33
  end
34
34
 
35
35
  def get_drop_ship_note(sales_id_set, drop_ship_note_id_set = nil)
@@ -41,33 +41,33 @@ module BrightpearlApi
41
41
  def create_drop_ship_note(sales_order_id)
42
42
  body = {}
43
43
  yield(body)
44
- call(:post, "/warehouse-service/order/#{sales_order_id.to_int}/goods-note/drop-ship", body)
44
+ call(:post, "/warehouse-service/order/#{sales_order_id.to_i}/goods-note/drop-ship", body)
45
45
  end
46
46
 
47
47
  def create_drop_ship_note_event(drop_ship_note_id)
48
48
  body = {}
49
49
  yield(body)
50
- call(:post, "/warehouse-service/goods-note/drop-ship/#{drop_ship_note_id.to_int}/event", body)
50
+ call(:post, "/warehouse-service/goods-note/drop-ship/#{drop_ship_note_id.to_i}/event", body)
51
51
  end
52
52
 
53
53
  def goods_in_note_correction(batch_id)
54
54
  body = {}
55
55
  yield(body)
56
- call(:post, "/warehouse-service/goods-note/goods-in/#{batch_id.to_int}/correction", body)
56
+ call(:post, "/warehouse-service/goods-note/goods-in/#{batch_id.to_i}/correction", body)
57
57
  end
58
58
 
59
59
  def create_goods_in_note(order_id)
60
60
  body = {}
61
61
  yield(body)
62
- call(:post, "/warehouse-service/order/#{order_id.to_int}/goods-note/goods-in", body)
62
+ call(:post, "/warehouse-service/order/#{order_id.to_i}/goods-note/goods-in", body)
63
63
  end
64
64
 
65
65
  def delete_goods_in_note(goods_in_note_id)
66
- call(:delete, "/warehouse-service/goods-note/goods-in/#{goods_in_note_id.to_int}")
66
+ call(:delete, "/warehouse-service/goods-note/goods-in/#{goods_in_note_id.to_i}")
67
67
  end
68
68
 
69
69
  def delete_goods_out_note(order_id, goods_out_note_id)
70
- call(:delete, "/warehouse-service/order/#{order_id.to_int}/goods-note/goods-out/#{goods_out_note_id.to_int}")
70
+ call(:delete, "/warehouse-service/order/#{order_id.to_i}/goods-note/goods-out/#{goods_out_note_id.to_i}")
71
71
  end
72
72
 
73
73
  def get_goods_out_note(order_id_set, goods_out_note_id_set = nil)
@@ -79,31 +79,31 @@ module BrightpearlApi
79
79
  def create_goods_out_note(order_id)
80
80
  body = {}
81
81
  yield(body)
82
- call(:post, "/warehouse-service/order/#{order_id.to_int}/goods-note/goods-out", body)
82
+ call(:post, "/warehouse-service/order/#{order_id.to_i}/goods-note/goods-out", body)
83
83
  end
84
84
 
85
85
  def update_goods_out_note(goods_out_note_id)
86
86
  body = {}
87
87
  yield(body)
88
- call(:put, "/warehouse-service/goods-note/goods-out/#{goods_out_note_id.to_int}", body)
88
+ call(:put, "/warehouse-service/goods-note/goods-out/#{goods_out_note_id.to_i}", body)
89
89
  end
90
90
 
91
91
  def create_goods_out_note_event(goods_out_note_id)
92
92
  body = {}
93
93
  yield(body)
94
- call(:post, "/warehouse-service/goods-note/goods-out/#{goods_out_note_id.to_int}/event", body)
94
+ call(:post, "/warehouse-service/goods-note/goods-out/#{goods_out_note_id.to_i}/event", body)
95
95
  end
96
96
 
97
97
  def create_internal_transfer(warehouse_id)
98
98
  body = {}
99
99
  yield(body)
100
- call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_int}/internal-transfer", body)
100
+ call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_i}/internal-transfer", body)
101
101
  end
102
102
 
103
103
  def quarantine_release(warehouse_id)
104
104
  body = {}
105
105
  yield(body)
106
- call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_int}/quarantine/release", body)
106
+ call(:post, "/warehouse-service/warehouse/#{warehouse_id.to_i}/quarantine/release", body)
107
107
  end
108
108
  end
109
109
  end
@@ -1,3 +1,3 @@
1
1
  module BrightpearlApi
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brightpearl_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kunwar Aditya Raghuwanshi