me_api 1.0.1 → 1.1.0
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 +3 -2
- data/lib/me_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6d1f29b9dbc52900ec643b65410cae1b2a026f6c0c68d43ec9e6bfc214df478
|
4
|
+
data.tar.gz: a1478841444ac4ed8ef9ab1f100fec4c70c6cee31c603ae9c4eb899c4affdcee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a31fa758d1e54d5f57f545d5c2f082abe1c7ab1fdd1c8274554be2531727ee6fa895e7e3759fc6ac78e93f7ff09c8d048f1d04297e03e439e90625ea6ba41b49
|
7
|
+
data.tar.gz: b45a72ec552139fa66eed1e4faaafe7538f2f65d0e8293582ffa7d2a189f85efe5007633d7e89b3836bc90b3162c0a0011c6522417b0282f2a954c3944d3f972
|
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(:id, :from, :to, :price, :
|
4
|
+
Rate = Data.define(:id, :from, :to, :price, :min_delivery_time, :max_delivery_time, :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)
|
@@ -39,7 +39,8 @@ module MeApi
|
|
39
39
|
from: from,
|
40
40
|
to: to,
|
41
41
|
price: rate["price"].to_f,
|
42
|
-
|
42
|
+
min_delivery_time: rate.dig("delivery_range", "min"),
|
43
|
+
max_delivery_time: rate.dig("delivery_range", "max"),
|
43
44
|
service_name: rate["name"],
|
44
45
|
carrier_name: rate["company"]["name"],
|
45
46
|
carrier_logo_url: rate["company"]["picture"]
|
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.1.0
|
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-10-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ac
|