me_api 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/me_api/client.rb +2 -1
- data/lib/me_api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c018a543c6d96c95c8d5110ab949c8f7af53c478c2e2ddfcc761382d9bf38cd8
|
4
|
+
data.tar.gz: 7615b66c73e1aeb659646567828f9d09a3ed6cda61d9c6d8c6f4dba094dcd565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c83c1bece8bb5b7e3c251a3a8ce1f4d19f3bc5b7f03916456f94225ed23beab97f4c0cf5c4699758678e9478ba8e82fc8172f54f4b5e8f8d746926087b365bf
|
7
|
+
data.tar.gz: 0f9e45675f298603e5473dba684f316903bc29359628fefcfd94058ee8e009c94c9c36bf93a6632f9f1331d5a807818d9aede6efaf48d72a97b0644c7ad21a5c
|
data/lib/me_api/client.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module MeApi
|
2
2
|
class Client < Ac::Base
|
3
3
|
BASE_URL = "https://melhorenvio.com.br"
|
4
|
-
Rate = Data.define(:from, :to, :price, :delivery_range, :service_name, :carrier_name, :carrier_logo_url)
|
4
|
+
Rate = Data.define(:id, :from, :to, :price, :delivery_range, :service_name, :carrier_name, :carrier_logo_url)
|
5
5
|
|
6
6
|
attr_reader :default_height, :default_width, :default_length
|
7
7
|
def initialize(access_token = nil, default_height: 24, default_width: 16, default_length: 10)
|
@@ -35,6 +35,7 @@ module MeApi
|
|
35
35
|
response = post "api/v2/me/shipment/calculate", body: JSON.dump(body)
|
36
36
|
response.json.map do |rate|
|
37
37
|
Rate.new(
|
38
|
+
id: rate["id"],
|
38
39
|
from: from,
|
39
40
|
to: to,
|
40
41
|
price: rate["price"].to_f,
|
data/lib/me_api/version.rb
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Todas Essas Coisas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-11 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.5.
|
64
|
+
rubygems_version: 3.5.16
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: ''
|