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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a31e7c7edbb13a8a4ac1ce264472d5d1b76e934c19b91d4aef12892429bf5fe
4
- data.tar.gz: 0ffc254d5482c1c93f5b3741a4a5f3158773724b5fe9f7c4d246bb801ad70f85
3
+ metadata.gz: c018a543c6d96c95c8d5110ab949c8f7af53c478c2e2ddfcc761382d9bf38cd8
4
+ data.tar.gz: 7615b66c73e1aeb659646567828f9d09a3ed6cda61d9c6d8c6f4dba094dcd565
5
5
  SHA512:
6
- metadata.gz: 6217b231ae87685bf8541726c8064a85b45ffba3f343d1d5b1f627b6a0fc7212024799a513de33f1c8784aeb0e0f424fa51047e1bbc0793111cac0574d509250
7
- data.tar.gz: ea471a49a79450c4f198560c574cfaeacff1fd0ac6d1d4afd3df316d547205019b2a929ddaefbb645f9f7c71ab2c1b6acbc592c762cbf2dbd09ce624fb001e35
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,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeApi
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.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: 1.0.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-06-11 00:00:00.000000000 Z
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.9
64
+ rubygems_version: 3.5.16
65
65
  signing_key:
66
66
  specification_version: 4
67
67
  summary: ''