invoicexpress 0.1.0 → 0.1.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 +7 -0
- data/CHANGELOG.md +8 -0
- data/README.md +9 -6
- data/invoicexpress.gemspec +1 -1
- data/lib/faraday/response/parse_xml.rb +1 -1
- data/lib/invoicexpress/connection.rb +1 -1
- data/lib/invoicexpress/models/invoice.rb +2 -1
- data/lib/invoicexpress/version.rb +1 -1
- data/spec/fixtures/item.xml +11 -0
- data/spec/invoicexpress/models/item_spec.rb +15 -0
- metadata +14 -46
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA512:
|
3
|
+
metadata.gz: 923e045ee7caffb6f89b8d22c0e46b0b31787f6ffef0d55e07b7564044a685453544471b6209be5e8980ff0e641296403cca396fca6598af43dc0df0e1d438d2
|
4
|
+
data.tar.gz: b69aed1e5ea804a0392cf7f982b5f07cef15c355e257f7e628ba41d584b00354543f9dd9993042722d3d7dbe2093b8698baf5583ad2feb43ab249943ef5bdd02
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: 69ecdffcd7f1b586de19dd3f49606c98e6fff2bc
|
7
|
+
data.tar.gz: 544dc6509fb55a744e339875dd124e3fc321719c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
# invoiceXpress GEM
|
2
2
|
|
3
|
-
Gem
|
4
|
-
|
3
|
+
[](http://badge.fury.io/rb/invoicexpress) [](https://travis-ci.org/weareswat/invoicexpress-gem) [](https://codeclimate.com/github/weareswat/invoicexpress-gem)
|
4
|
+
|
5
|
+
Gem for invoicexpress API at http://invoicexpress.com
|
6
|
+
Created with Reference: http://en.invoicexpress.com/api/overview/introduction/
|
5
7
|
|
6
8
|
## Dependencies
|
7
9
|
|
8
10
|
Run bundle, the project should need:
|
9
|
-
|
10
|
-
|
11
|
-
|
11
|
+
* Invoicexpress API Key
|
12
|
+
* Happymapper
|
13
|
+
* Faraday
|
14
|
+
* And pretzels!
|
12
15
|
|
13
16
|
## Progress
|
14
17
|
|
@@ -319,4 +322,4 @@ To update a schedule we need to pass these fields.
|
|
319
322
|
)
|
320
323
|
]
|
321
324
|
)
|
322
|
-
purchase_order = @client.create_purchase_order(purchase_order)
|
325
|
+
purchase_order = @client.create_purchase_order(purchase_order)
|
data/invoicexpress.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.files = %w(CHANGELOG.md README.md Rakefile invoicexpress.gemspec)
|
16
16
|
spec.files += Dir.glob("lib/**/*.rb")
|
17
17
|
spec.files += Dir.glob("spec/**/*")
|
18
|
-
spec.homepage = "http://invoicexpress.
|
18
|
+
spec.homepage = "http://invoicexpress.com"
|
19
19
|
spec.licenses = ['MIT']
|
20
20
|
spec.name = 'invoicexpress'
|
21
21
|
spec.require_paths = ['lib']
|
@@ -24,7 +24,7 @@ module Invoicexpress
|
|
24
24
|
element :unit_price, Float
|
25
25
|
element :quantity, Float
|
26
26
|
element :unit, String
|
27
|
-
|
27
|
+
has_one :tax, Tax
|
28
28
|
element :discount, Float
|
29
29
|
end
|
30
30
|
|
@@ -73,6 +73,7 @@ module Invoicexpress
|
|
73
73
|
element :taxes, Float
|
74
74
|
element :total, Float
|
75
75
|
element :mb_reference, Integer
|
76
|
+
element :permalink, String
|
76
77
|
end
|
77
78
|
end
|
78
79
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Invoicexpress::Models::Item do
|
4
|
+
|
5
|
+
describe '#tax' do
|
6
|
+
let(:item) do
|
7
|
+
Invoicexpress::Models::Item.parse(File.read(fixture('/item.xml')))
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'returns an Invoicexpress::Models::Tax instance' do
|
11
|
+
expect(item.tax).to be_a Invoicexpress::Models::Tax
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: invoicexpress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 0
|
10
|
-
version: 0.1.0
|
4
|
+
version: 0.1.2
|
11
5
|
platform: ruby
|
12
6
|
authors:
|
13
7
|
- Think Orange
|
@@ -15,21 +9,15 @@ autorequire:
|
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
11
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
12
|
+
date: 2015-02-23 00:00:00 Z
|
20
13
|
dependencies:
|
21
14
|
- !ruby/object:Gem::Dependency
|
22
15
|
name: bundler
|
23
16
|
prerelease: false
|
24
17
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
18
|
requirements:
|
27
19
|
- - ~>
|
28
20
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 15
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 0
|
33
21
|
version: "1.0"
|
34
22
|
type: :development
|
35
23
|
version_requirements: *id001
|
@@ -37,14 +25,9 @@ dependencies:
|
|
37
25
|
name: faraday
|
38
26
|
prerelease: false
|
39
27
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
28
|
requirements:
|
42
29
|
- - ~>
|
43
30
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 27
|
45
|
-
segments:
|
46
|
-
- 0
|
47
|
-
- 8
|
48
31
|
version: "0.8"
|
49
32
|
type: :runtime
|
50
33
|
version_requirements: *id002
|
@@ -52,14 +35,9 @@ dependencies:
|
|
52
35
|
name: faraday_middleware
|
53
36
|
prerelease: false
|
54
37
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
38
|
requirements:
|
57
39
|
- - ~>
|
58
40
|
- !ruby/object:Gem::Version
|
59
|
-
hash: 25
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
- 9
|
63
41
|
version: "0.9"
|
64
42
|
type: :runtime
|
65
43
|
version_requirements: *id003
|
@@ -67,14 +45,9 @@ dependencies:
|
|
67
45
|
name: happymapper
|
68
46
|
prerelease: false
|
69
47
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
48
|
requirements:
|
72
49
|
- - ~>
|
73
50
|
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
|
-
segments:
|
76
|
-
- 0
|
77
|
-
- 4
|
78
51
|
version: "0.4"
|
79
52
|
type: :runtime
|
80
53
|
version_requirements: *id004
|
@@ -94,7 +67,9 @@ files:
|
|
94
67
|
- invoicexpress.gemspec
|
95
68
|
- lib/faraday/response/parse_xml.rb
|
96
69
|
- lib/faraday/response/raise_invoicexpress_errors.rb
|
70
|
+
- lib/invoicexpress.rb
|
97
71
|
- lib/invoicexpress/authentication.rb
|
72
|
+
- lib/invoicexpress/client.rb
|
98
73
|
- lib/invoicexpress/client/cash_invoices.rb
|
99
74
|
- lib/invoicexpress/client/charts.rb
|
100
75
|
- lib/invoicexpress/client/clients.rb
|
@@ -108,10 +83,10 @@ files:
|
|
108
83
|
- lib/invoicexpress/client/simplified_invoices.rb
|
109
84
|
- lib/invoicexpress/client/taxes.rb
|
110
85
|
- lib/invoicexpress/client/users.rb
|
111
|
-
- lib/invoicexpress/client.rb
|
112
86
|
- lib/invoicexpress/configuration.rb
|
113
87
|
- lib/invoicexpress/connection.rb
|
114
88
|
- lib/invoicexpress/error.rb
|
89
|
+
- lib/invoicexpress/models.rb
|
115
90
|
- lib/invoicexpress/models/chart.rb
|
116
91
|
- lib/invoicexpress/models/client.rb
|
117
92
|
- lib/invoicexpress/models/filter.rb
|
@@ -124,10 +99,8 @@ files:
|
|
124
99
|
- lib/invoicexpress/models/top_client.rb
|
125
100
|
- lib/invoicexpress/models/top_debtor.rb
|
126
101
|
- lib/invoicexpress/models/user.rb
|
127
|
-
- lib/invoicexpress/models.rb
|
128
102
|
- lib/invoicexpress/request.rb
|
129
103
|
- lib/invoicexpress/version.rb
|
130
|
-
- lib/invoicexpress.rb
|
131
104
|
- spec/fixtures/charts.invoicing.xml
|
132
105
|
- spec/fixtures/charts.quarterly-results.xml
|
133
106
|
- spec/fixtures/charts.top-clients.xml
|
@@ -146,6 +119,7 @@ files:
|
|
146
119
|
- spec/fixtures/invoices.get.xml
|
147
120
|
- spec/fixtures/invoices.list.xml
|
148
121
|
- spec/fixtures/invoices.update_state.xml
|
122
|
+
- spec/fixtures/item.xml
|
149
123
|
- spec/fixtures/ok.xml
|
150
124
|
- spec/fixtures/po.create.xml
|
151
125
|
- spec/fixtures/po.email_document.xml
|
@@ -183,42 +157,34 @@ files:
|
|
183
157
|
- spec/invoicexpress/client/taxes_spec.rb
|
184
158
|
- spec/invoicexpress/client/users_spec.rb
|
185
159
|
- spec/invoicexpress/client_spec.rb
|
160
|
+
- spec/invoicexpress/models/item_spec.rb
|
186
161
|
- spec/invoicexpress_spec.rb
|
187
|
-
|
188
|
-
homepage: http://invoicexpress.pt
|
162
|
+
homepage: http://invoicexpress.com
|
189
163
|
licenses:
|
190
164
|
- MIT
|
165
|
+
metadata: {}
|
166
|
+
|
191
167
|
post_install_message:
|
192
168
|
rdoc_options: []
|
193
169
|
|
194
170
|
require_paths:
|
195
171
|
- lib
|
196
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
197
|
-
none: false
|
198
173
|
requirements:
|
199
174
|
- - ">="
|
200
175
|
- !ruby/object:Gem::Version
|
201
|
-
hash: 3
|
202
|
-
segments:
|
203
|
-
- 0
|
204
176
|
version: "0"
|
205
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
|
-
none: false
|
207
178
|
requirements:
|
208
179
|
- - ">="
|
209
180
|
- !ruby/object:Gem::Version
|
210
|
-
hash: 23
|
211
|
-
segments:
|
212
|
-
- 1
|
213
|
-
- 3
|
214
|
-
- 6
|
215
181
|
version: 1.3.6
|
216
182
|
requirements: []
|
217
183
|
|
218
184
|
rubyforge_project:
|
219
|
-
rubygems_version:
|
185
|
+
rubygems_version: 2.4.6
|
220
186
|
signing_key:
|
221
|
-
specification_version:
|
187
|
+
specification_version: 4
|
222
188
|
summary: Simple wrapper for invoicexpress.com API
|
223
189
|
test_files:
|
224
190
|
- spec/fixtures/charts.invoicing.xml
|
@@ -239,6 +205,7 @@ test_files:
|
|
239
205
|
- spec/fixtures/invoices.get.xml
|
240
206
|
- spec/fixtures/invoices.list.xml
|
241
207
|
- spec/fixtures/invoices.update_state.xml
|
208
|
+
- spec/fixtures/item.xml
|
242
209
|
- spec/fixtures/ok.xml
|
243
210
|
- spec/fixtures/po.create.xml
|
244
211
|
- spec/fixtures/po.email_document.xml
|
@@ -276,4 +243,5 @@ test_files:
|
|
276
243
|
- spec/invoicexpress/client/taxes_spec.rb
|
277
244
|
- spec/invoicexpress/client/users_spec.rb
|
278
245
|
- spec/invoicexpress/client_spec.rb
|
246
|
+
- spec/invoicexpress/models/item_spec.rb
|
279
247
|
- spec/invoicexpress_spec.rb
|