lmb-developers 1.3.0 → 1.4.0

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: 905ee8df8f98770914ccd0ccb57b189bfa4ac88bc1c6a2442030322199e86c59
4
- data.tar.gz: c0997d3bf1170b44ded8402ca6fc1ce5deb7b11ffdb12863697c8b69ff677035
3
+ metadata.gz: 5048b78a2023adb91caa9ba1a496731b7b31ec66ca3ad38bd847af03f6f2668a
4
+ data.tar.gz: 25866b18dd59915a1e2d343855d1780e052835689d65dbb452b9ecfc9755ffd7
5
5
  SHA512:
6
- metadata.gz: b013245670313eb06f8783c050fbd6fbdc7f368a469b67add904d53196c2faeb3219e965fd85db75a5db449532686d0c18e6ca4e5d1e28a08340b7a1aaa21399
7
- data.tar.gz: ff968a11436f26bd82a86785abf8596aec91e2dc8d4b589f73b77d8283ddca4a807fb7448f7106b899f233e099db5a8726a9800a36ad86a55c6156fa64fa6d3c
6
+ metadata.gz: d727c35b3bf5c9f7c071954233c769a883cc8f027f7c1544b3eaeb8b8d5911bdf1c1644dbfcdf937a5785513ec29b266ee309841b1094382317ca368ed4ff751
7
+ data.tar.gz: 6feab99e2fb12e7928b662b237a51d8b968dd4ed9cd394e34bc29c29099f8007d18782a05adc8c7cbbbd1675b67574fbb817279b003297b344a5735b81082ef2
@@ -64,7 +64,7 @@ module Lmb
64
64
  #
65
65
  # @param endpoint [String] the API endpoint.
66
66
  # @param body [Hash] the request body.
67
- # @return [Boolean] returns true if response code is 202, false otherwise.
67
+ # @return [Object] returns response object or exception object.
68
68
  def self.post_request(endpoint, body)
69
69
  uri = URI.parse("#{configuration.url}#{endpoint}")
70
70
  request = Net::HTTP::Post.new(uri)
@@ -78,7 +78,7 @@ module Lmb
78
78
  http.request(request)
79
79
  end
80
80
 
81
- response.code.to_i == 202
81
+ response
82
82
  rescue StandardError => exception
83
83
  exception
84
84
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'lmb-developers'
3
- s.version = '1.3.0'
4
- s.date = '2023-09-25'
3
+ s.version = '1.4.0'
4
+ s.date = '2023-12-18'
5
5
  s.summary = "Consume APIs at Leroy Merlin Brazil Developer's Portal"
6
6
  s.description = "Gem to consume APIs available at Leroy Merlin Brazil Developer's Portal https://developers.leroymerlin.com.br"
7
7
  s.author = "PRTE - Tecnologia e Soluções"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lmb-developers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PRTE - Tecnologia e Soluções
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-25 00:00:00.000000000 Z
11
+ date: 2023-12-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gem to consume APIs available at Leroy Merlin Brazil Developer's Portal
14
14
  https://developers.leroymerlin.com.br