me_api 0.3.0 → 0.3.1

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: b739cbab3d6a59b85faf9c0b94852bab1ac82a0e2275be317d22b11dc427b23c
4
- data.tar.gz: 761c5f271e9f0c74e5d1442ef52bc706377f95063f56f5430b8ecdbe150bb491
3
+ metadata.gz: f05ebe3cbc84189e5046360b1681461bc3ef70d9e0be1b1b9e5d93b9f89684b1
4
+ data.tar.gz: 54c73b7354f873f111874be5cdb70ef8354eee784aa46584acc48db85de9e629
5
5
  SHA512:
6
- metadata.gz: eeb9081b2571adc12fcb67dd00a436b1a0fb19001af70d67d100ed6a27715d9160762b74cee2e09279d99f63ed05f7d626286c0aa91da65c881e4cf6b398af2b
7
- data.tar.gz: a6e25a74c0493c4006a272efe8c44c1ed1b05dccae962ac20cfbb429f2cebe93410de46a503e734810c682d7fcec6c171c75f3f6ec2968d4f43525a19b8102bd
6
+ metadata.gz: c4ca78216dff73609ef612c8b69c8c4046986bde3b07de6cd5271ff9ace99d99679f549ad5fa8373c44edf06442c6918fc67eaad5acb642285f8953f6ff07e8e
7
+ data.tar.gz: 3ea393fc78dda10fb1e7398dacbe738cc74a3ac8c2adc551acfe0a473884939404416f78a9ccdd3e40d38a2cc92363d6b8674a252212394d1ea89293b915dc68
data/lib/me_api/client.rb CHANGED
@@ -32,8 +32,12 @@ module MeApi
32
32
  }
33
33
  }
34
34
  response = post "api/v2/me/shipment/calculate", body: JSON.dump(body)
35
-
36
- response.json.map do |rate|
35
+ if response.json.is_a?(Array)
36
+ rates = response.json
37
+ else
38
+ rates = [response.json]
39
+ end
40
+ rates.map do |rate|
37
41
  Rate.new(
38
42
  from: from,
39
43
  to: to,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeApi
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: me_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ulysses-bull
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-06 00:00:00.000000000 Z
11
+ date: 2024-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ac
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []
64
- rubygems_version: 3.4.19
64
+ rubygems_version: 3.5.10
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: ''