efatura 0.2.0 → 0.2.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -11
  3. data/lib/efatura/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53e8a8605e0ccc4c7ed733b9a29655791400c6e9d3b218afeb42c97e55dc5a66
4
- data.tar.gz: ee8ec12924530c73625d8387492675e0ccf619a48442c75ea028ffb144d7346c
3
+ metadata.gz: c39c4da271165c60fdfa547feda86de76b14f25e85cd04914a5248b871631e35
4
+ data.tar.gz: 5fd32a9b3f4794b43d293e2a2b0c293e9967f9b91f5fae31c4d29fc11790bfa3
5
5
  SHA512:
6
- metadata.gz: 82df9166df5bf58e8f6ebc42856d647c4eb8680fbee5049de49659f13c561808493497dc2ea272f3ace16e313949e89a9e7261af22e350bb118ebccec31e44de
7
- data.tar.gz: e24c003fc7b7e9489f05a7d83bef26dac7e1549704ad69d75c2c5271741fb0255c675c92a926f39402450e119d984ff579b250452ee9fb86a9b1c1c7fe228d1e
6
+ metadata.gz: c768faa5582c1d7722490cf9519c9f6f3aabeb00d4b6fd4d215a1b54757ee13839f2611a98c86a5fc61962793ff9a4dec6a96b5d2c32ef5a7b07b4953ec03668
7
+ data.tar.gz: 78975df44f575cd404f230684457f07b266514511fe7965d8c133a9017edcdbd12c4478ff086b7922a58b3a2c6b7baa0f758061d6ea66f7cece5754fb568a795
data/README.md CHANGED
@@ -35,9 +35,12 @@ Or install it yourself as:
35
35
  Start by configurating the Gem.
36
36
 
37
37
  For that you should do:
38
-
39
- Efatura.configuration.nif = 'your nif'
40
- Efatura.configuration.password = 'your password'
38
+ ```ruby
39
+ Efatura.configure do |config|
40
+ config.nif = 'your nif'
41
+ config.password = 'your password'
42
+ end
43
+ ```
41
44
 
42
45
  Be sure that you set both configurations as strings.
43
46
 
@@ -48,12 +51,14 @@ Start by configurating the Gem.
48
51
  This should return an object of Efatura with nif and password set
49
52
 
50
53
  Also this gem comes with reset options for configuration. If you wish to reset the nif and password you should do:
51
-
52
- Efatura.reset
54
+ ```ruby
55
+ Efatura.reset
56
+ ```
53
57
 
54
58
  And that's it. if you type:
55
-
56
- Efatura.configuration => you'll see that nif and password are set as nil again.
59
+ ```ruby
60
+ Efatura.configuration #=> you'll see that nif and password are set as nil again.
61
+ ```
57
62
 
58
63
 
59
64
  2- Fetching the invoices
@@ -61,16 +66,18 @@ Start by configurating the Gem.
61
66
  After doing the configuration you are now able to retrieve the invoices between 2 date periods.
62
67
 
63
68
  In order to do this type:
64
-
65
- Efatura.invoices(from_date, to_date)
69
+ ```ruby
70
+ Efatura.invoices(from_date, to_date)
71
+ ```
66
72
 
67
73
  Make sure that you pass both arguments as strings and also with the correct date format. YEAR-MONTH-DATE example: '2017-01-01'
68
74
 
69
75
  If you type the wrong format or wrong date you won't be able to retrieve any information. Also since we are sending a request to an efatura backend there's some validations that we can't avoid. So far i've detected that in order for the gem to retrieve the invoices both dates should be in the same YEAR!
70
76
 
71
77
  This is very important as it will not work if you send
72
-
73
- Efatura.invoices('2017-01-02', '2018-12-02')
78
+ ```ruby
79
+ Efatura.invoices('2017-01-02', '2018-12-02')
80
+ ```
74
81
 
75
82
 
76
83
  And that's pretty much it. Hope you enjoy!
@@ -1,3 +1,3 @@
1
1
  module Efatura
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: efatura
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - filipe custodio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-05 00:00:00.000000000 Z
11
+ date: 2019-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize