erp_integration 0.3.2 → 0.3.3

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: b64aeb4d27d23459820866bdac9a989d461f745abfb3790a0bd7b4a2a384c637
4
- data.tar.gz: 4affdf46ec9cdffd57027f0e97d8e226bcc9d82c8b382b80c7bdf26e0fbc5a69
3
+ metadata.gz: 373cc92b70776b3ab2547879840468b0b5e2c9269aaf4991a1e3c283435609c4
4
+ data.tar.gz: cd372fe6aed0b7f88ddcf0007ad895386a75ca593a0bfff4ce978cad8de84cce
5
5
  SHA512:
6
- metadata.gz: c76fa52a52650b0d3510ecb758545fd17cd9b7ccfc7b2371172498f2c9c93a9112078391d540416183474cccb2d62adee45513ced1f60bca130c91f01373730f
7
- data.tar.gz: aacd6f248f1045e8cc68bffb07152d877cc0a2bf203ad08d2cc99e1e021a91510638cfd0e0a0ad47f9bf2aa40dfc59da0bc6dfe80b784745d38b6e4c414780c5
6
+ metadata.gz: e711394078bb8e517436cd9b10f4231248cbef3bf6bb744834270e305e6329e0672611761b091d98a53fcd5d00f7f781ef2309b76c4db64cbe2bbd8b2ad3a519
7
+ data.tar.gz: 5490ad8f93dfabc1e77d8ef326ab34ee29d62b416f061cf83780f49fcb7d42882aab46e29e16e36f730ba7555a1d1482b55a2f45255fb71b252b5758a9cdf58b
data/bin/prerelease CHANGED
@@ -17,4 +17,4 @@ git push origin "release_v.$VERSION"
17
17
 
18
18
  # Tag the new gem version.
19
19
  git tag v$VERSION
20
- git push --tags
20
+ git push origin v$VERSION
@@ -12,7 +12,13 @@ module ErpIntegration
12
12
  # @param id [Integer|String] The ID of the to be cancelled order.
13
13
  # @return [boolean] Whether the sales order was cancelled successfully or not.
14
14
  def cancel(id)
15
- client.put("model/sale.sale/#{id}/cancel")
15
+ begin
16
+ client.put("model/sale.sale/#{id}/cancel")
17
+ rescue Faraday::Error::ParsingError
18
+ # Workaround: Fulfil api does not return a json when status code is 200 (a.k.a. "Ok")
19
+ # and faraday is having an error when trying to parse it. Let's skip the parse error
20
+ # and move on.
21
+ end
16
22
  true
17
23
 
18
24
  # Fulfil will return an 400 (a.k.a. "Bad Request") status code when a sales order couldn't
@@ -15,5 +15,9 @@ module ErpIntegration
15
15
  :tax_amount, :total_amount, :total_quantity, :total_shipment_cost,
16
16
  :untaxed_amount, :warehouse, :weight, :weight_uom, :write_date,
17
17
  :write_uid
18
+
19
+ def cancel
20
+ self.class.adapter.cancel(id)
21
+ end
18
22
  end
19
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ErpIntegration
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_integration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Vermaas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-13 00:00:00.000000000 Z
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -218,7 +218,7 @@ dependencies:
218
218
  - - '='
219
219
  - !ruby/object:Gem::Version
220
220
  version: 1.19.2
221
- description:
221
+ description:
222
222
  email:
223
223
  - stefan@knowndecimal.com
224
224
  executables: []
@@ -281,7 +281,7 @@ metadata:
281
281
  homepage_uri: https://www.github.com/mejuri-inc/erp-integration
282
282
  source_code_uri: https://www.github.com/mejuri-inc/erp-integration
283
283
  changelog_uri: https://www.github.com/mejuri-inc/erp-integration/blob/main/CHANGELOG.md
284
- post_install_message:
284
+ post_install_message:
285
285
  rdoc_options: []
286
286
  require_paths:
287
287
  - lib
@@ -297,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
297
  version: '0'
298
298
  requirements: []
299
299
  rubygems_version: 3.2.22
300
- signing_key:
300
+ signing_key:
301
301
  specification_version: 4
302
302
  summary: Connects Mejuri with third-party ERP vendors
303
303
  test_files: []