pombo 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 35fb92fd616447ed99abc77f38f839713b2ffdc0
4
- data.tar.gz: 989a30ac9bc9864400659a5abf69873e533e8f92
3
+ metadata.gz: e752ca0637eda97df2e9a68751c1443f943adb7e
4
+ data.tar.gz: 206b655fb984a4dd26064d7e33acb104fcbbf37b
5
5
  SHA512:
6
- metadata.gz: c685feb2c81600a948222fc56067b11239f0f32e093fee4fa9830e88a61d3fce71d38c610894bd0bdd8a586cc07391d2b8999ce3d321c7d8d527b13a231d9e68
7
- data.tar.gz: 29bd9a308c2b423c5c0225b4682c050fd9934c55e97ab5174edceb2480399b9f399f8bb997e23aa0459df0ee729171ce075e16e17eed154155e34dadc70a4213
6
+ metadata.gz: eb0bd8490d6d640bd7c66e81a50f2fd0be093beafe62dfc6b2865b07f2e0c1432908d8c17cdda5bd696f636fb89c50194acabaf321c23bf1894b242c8e67df5f
7
+ data.tar.gz: a3c44fa28eef726c7dd4617869e4fa54ebd2ce41aeb41346248c963186528f08677ed9123b8b4d92c27410b55c953d5af8c9889cee36a21da39646beef302ab0
@@ -1,3 +1,9 @@
1
+ ## v1.0.2
2
+
3
+ #### Fix
4
+ * Fix Correios services' codes changes
5
+
6
+
1
7
  ## v1.0.1
2
8
 
3
9
  #### Fix
@@ -5,6 +11,7 @@
5
11
  * Fix the method "str_real_to_float" to work with numbers above thousand
6
12
  * Add zip code not found error #999
7
13
 
14
+
8
15
  ## v1.0.0
9
16
 
10
17
  #### New features
data/README.md CHANGED
@@ -108,7 +108,7 @@ Listar todos os serviços de entrega suportados pelos Correios.
108
108
  Pombo::Services.all
109
109
 
110
110
  # => [
111
- # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (sem contrato)">,
111
+ # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (sem contrato)">,
112
112
  # => ....
113
113
  # => ]
114
114
  ```
@@ -118,7 +118,7 @@ Listar todos os serviços de um grupo.
118
118
  ```ruby
119
119
  Pombo::Services.all :pac
120
120
  # => [
121
- # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (sem contrato)">,
121
+ # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (sem contrato)">,
122
122
  # => ....
123
123
  # => ]
124
124
  ```
@@ -126,8 +126,8 @@ Pombo::Services.all :pac
126
126
  Encontrar um serviço pelo seu código.
127
127
 
128
128
  ```ruby
129
- Pombo::Services.find "41106"
130
- # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (sem contrato)">
129
+ Pombo::Services.find "04510"
130
+ # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (sem contrato)">
131
131
  ```
132
132
 
133
133
  ## Pacotes
@@ -141,7 +141,7 @@ Criando um pacote:
141
141
  package = Pombo::Package.new ({
142
142
  destination_zip_code: '29160565',
143
143
  origin_zip_code: '29108046',
144
- services: "40010",
144
+ services: "04014",
145
145
  in_hand: false,
146
146
  delivery_notice: false
147
147
  })
@@ -149,7 +149,7 @@ package = Pombo::Package.new ({
149
149
  ```
150
150
 
151
151
  > Pode ser informador um array de serviços para realizar a consulta em vários serviços.
152
- > `Pombo::Package.new services: ["40010", "41068", "40568"]`
152
+ > `Pombo::Package.new services: ["04014", "41068", "40568"]`
153
153
 
154
154
  Adicionando items:
155
155
 
@@ -183,7 +183,7 @@ Para realizar uma consulta para saber o valor e o prazo de entrega
183
183
  ```ruby
184
184
  Pombo.shipping package
185
185
  # => [
186
- # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1cd9d1a0 @code="40010", @value=31.3, @delivery_time="1", @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @error_code="0", @value_without_additions=31.3, @delivery_home=true, @delivery_sartuday=true>
186
+ # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1cd9d1a0 @code="04014", @value=31.3, @delivery_time="1", @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @error_code="0", @value_without_additions=31.3, @delivery_home=true, @delivery_sartuday=true>
187
187
  # => ]
188
188
  ```
189
189
 
@@ -192,7 +192,7 @@ Para realizar uma consulta para saber o prazo de entrega
192
192
  ```ruby
193
193
  Pombo.delivery_time package
194
194
  # => [
195
- # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1da0b040 @code="40010", @delivery_time="1", @delivery_home=true, @delivery_sartuday=true>
195
+ # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1da0b040 @code="04014", @delivery_time="1", @delivery_home=true, @delivery_sartuday=true>
196
196
  # => ]
197
197
  ```
198
198
 
@@ -201,7 +201,7 @@ Para realizar uma consulta para saber o valor da entrega
201
201
  ```ruby
202
202
  Pombo.shipping_value package
203
203
  # => [
204
- # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1d1cb740 @code="40010", @value=31.3, @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @value_without_additions=31.3>
204
+ # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1d1cb740 @code="04014", @value=31.3, @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @value_without_additions=31.3>
205
205
  # => ]
206
206
  ```
207
207
 
@@ -5,7 +5,7 @@ module Pombo
5
5
  # package = Pombo::Package.new ({
6
6
  # destination_zip_code: '29999000',
7
7
  # origin_zip_code: '28888000',
8
- # services: "40010",
8
+ # services: "04014",
9
9
  # in_hand: false,
10
10
  # delivery_notice: false
11
11
  # })
@@ -10,7 +10,7 @@ module Pombo
10
10
  # @example
11
11
  # Pombo::Services.all
12
12
  # # => [
13
- # # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (without contract)">,
13
+ # # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (without contract)">,
14
14
  # # => ....
15
15
  # # => ]
16
16
  #
@@ -19,7 +19,7 @@ module Pombo
19
19
  # @example
20
20
  # Pombo::Services.all :pac
21
21
  # # => [
22
- # # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (without contract)">,
22
+ # # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (without contract)">,
23
23
  # # => ....
24
24
  # # => ]
25
25
  #
@@ -39,8 +39,8 @@ module Pombo
39
39
  # Search for a service code
40
40
  # @return [OpenStruct] the data structure representing a service
41
41
  # @example
42
- # Pombo::Services.find "41106"
43
- # # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (without contract)">
42
+ # Pombo::Services.find "04510"
43
+ # # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (without contract)">
44
44
  def self.find(code)
45
45
  all_services.values_at(code).first
46
46
  end
@@ -49,7 +49,7 @@ module Pombo
49
49
 
50
50
  def self.all_pac
51
51
  {
52
- "41106" => OpenStruct.new(code: "41106", max_weight: 30, name: 'PAC', description: Pombo.t('services.pac.41106')),
52
+ "04510" => OpenStruct.new(code: "04510", max_weight: 30, name: 'PAC', description: Pombo.t('services.pac.04510')),
53
53
  "41068" => OpenStruct.new(code: "41068", max_weight: 50, name: 'PAC', description: Pombo.t('services.pac.41068')),
54
54
  "41300" => OpenStruct.new(code: "41300", max_weight: 600, name: 'PAC GF', description: Pombo.t('services.pac.41300'))
55
55
  }
@@ -57,7 +57,7 @@ module Pombo
57
57
 
58
58
  def self.all_sedex
59
59
  {
60
- "40010" => OpenStruct.new(code: "40010", max_weight: 30, name: 'SEDEX', description: Pombo.t('services.sedex.40010')),
60
+ "04014" => OpenStruct.new(code: "04014", max_weight: 30, name: 'SEDEX', description: Pombo.t('services.sedex.04014')),
61
61
  "40045" => OpenStruct.new(code: "40045", max_weight: 30, name: 'SEDEX a cobrar', description: Pombo.t('services.sedex.40045')),
62
62
  "40126" => OpenStruct.new(code: "40126", max_weight: 30, name: 'SEDEX a cobrar', description: Pombo.t('services.sedex.40126')),
63
63
  "40215" => OpenStruct.new(code: "40215", max_weight: 10, name: 'SEDEX 10', description: Pombo.t('services.sedex.40215')),
@@ -1,3 +1,3 @@
1
1
  module Pombo
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -2,11 +2,11 @@
2
2
  en:
3
3
  services:
4
4
  pac:
5
- '41106': PAC (without contract)
5
+ '04510': PAC (without contract)
6
6
  '41068': PAC (with contract)
7
7
  '41300': PAC (large format)
8
8
  sedex:
9
- '40010': SEDEX (without contract)
9
+ '04014': SEDEX (without contract)
10
10
  '40045': SEDEX to charge (without contract)
11
11
  '40126': SEDEX to charge (with contract)
12
12
  '40215': SEDEX 10 (without contract)
@@ -2,11 +2,11 @@
2
2
  pt-BR:
3
3
  services:
4
4
  pac:
5
- '41106': PAC (sem contrato)
5
+ '04510': PAC (sem contrato)
6
6
  '41068': PAC (com contrato)
7
7
  '41300': PAC (grandes formatos)
8
8
  sedex:
9
- '40010': SEDEX (sem contrato)
9
+ '04014': SEDEX (sem contrato)
10
10
  '40045': SEDEX a cobrar (sem contrato)
11
11
  '40126': SEDEX a cobrar (com contrato)
12
12
  '40215': SEDEX 10 (sem contrato)
@@ -97,7 +97,7 @@ List all formats supported by delivery services
97
97
  Pombo::Services.all
98
98
 
99
99
  # => [
100
- # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (without contract)">,
100
+ # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (without contract)">,
101
101
  # => ....
102
102
  # => ]
103
103
  ```
@@ -107,7 +107,7 @@ Listing all the services of a group
107
107
  ```ruby
108
108
  Pombo::Services.all :pac
109
109
  # => [
110
- # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (without contract)">,
110
+ # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (without contract)">,
111
111
  # => ....
112
112
  # => ]
113
113
  ```
@@ -115,8 +115,8 @@ Pombo::Services.all :pac
115
115
  Search for a service code
116
116
 
117
117
  ```ruby
118
- Pombo::Services.find "41106"
119
- # => #<OpenStruct code="41106", max_weight=30, name="PAC", description="PAC (without contract)">
118
+ Pombo::Services.find "04510"
119
+ # => #<OpenStruct code="04510", max_weight=30, name="PAC", description="PAC (without contract)">
120
120
  ```
121
121
 
122
122
  ## Packages
@@ -131,7 +131,7 @@ Creating a package:
131
131
  package = Pombo::Package.new ({
132
132
  destination_zip_code: '29160565',
133
133
  origin_zip_code: '29108046',
134
- services: "40010",
134
+ services: "04014",
135
135
  in_hand: false,
136
136
  delivery_notice: false
137
137
  })
@@ -139,7 +139,7 @@ package = Pombo::Package.new ({
139
139
  ```
140
140
 
141
141
  > It can be informer an array of services to carry out the consultation on various services.
142
- > `Pombo::Package.new services: ["40010", "41068", "40568"]`
142
+ > `Pombo::Package.new services: ["04014", "41068", "40568"]`
143
143
 
144
144
  Adding items:
145
145
 
@@ -173,7 +173,7 @@ To perform a query to know the value and the delivery
173
173
  ```ruby
174
174
  Pombo.shipping package
175
175
  # => [
176
- # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1cd9d1a0 @code="40010", @value=31.3, @delivery_time="1", @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @error_code="0", @value_without_additions=31.3, @delivery_home=true, @delivery_sartuday=true>
176
+ # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1cd9d1a0 @code="04014", @value=31.3, @delivery_time="1", @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @error_code="0", @value_without_additions=31.3, @delivery_home=true, @delivery_sartuday=true>
177
177
  # => ]
178
178
  ```
179
179
 
@@ -182,7 +182,7 @@ To make an inquiry to find out the delivery time
182
182
  ```ruby
183
183
  Pombo.delivery_time package
184
184
  # => [
185
- # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1da0b040 @code="40010", @delivery_time="1", @delivery_home=true, @delivery_sartuday=true>
185
+ # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1da0b040 @code="04014", @delivery_time="1", @delivery_home=true, @delivery_sartuday=true>
186
186
  # => ]
187
187
  ```
188
188
 
@@ -191,7 +191,7 @@ To perform a query to know the value of delivery
191
191
  ```ruby
192
192
  Pombo.shipping_value package
193
193
  # => [
194
- # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1d1cb740 @code="40010", @value=31.3, @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @value_without_additions=31.3>
194
+ # => [0] #<Pombo::Webservice::CPP::Service:0x007fae1d1cb740 @code="04014", @value=31.3, @value_in_hand=0.0, @value_delivery_notice=0.0, @value_declared_value=0.0, @value_without_additions=31.3>
195
195
  # => ]
196
196
  ```
197
197
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pombo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Nunes
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-04 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -200,10 +200,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  requirements: []
202
202
  rubyforge_project:
203
- rubygems_version: 2.4.8
203
+ rubygems_version: 2.6.14
204
204
  signing_key:
205
205
  specification_version: 4
206
206
  summary: Gem to manage the shipping packages using the webservice of the Correios
207
207
  (Brazilian Post Service)
208
208
  test_files: []
209
- has_rdoc: