unleashed 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/unleashed/models/customer.rb +1 -0
- data/lib/unleashed/models/invoice.rb +1 -1
- data/lib/unleashed/resources/invoice_resource.rb +15 -2
- data/lib/unleashed/version.rb +1 -1
- data/unleashed.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ffacf8f04243fffe2099a80a56ea810d82fd60a70ae3cf343eab0be4ba4dee9
|
4
|
+
data.tar.gz: f02cfd0bcf6664f8571360908557ba6286545c07b8936cf4e617d54303f9de82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4144ef508cbca43006f4467616a44c008471c5585f87b837502538995f0920b95b7c284ad7eca2fa852c4020eb7c5de3181126b01711463fbd4fd1ad0d060228
|
7
|
+
data.tar.gz: fafc99a815f14e471d82754ddd923fd8e9d03a6f6a5f62afe03ae267736a2a5b72e17b3a80e2ea5cef3acce92e873a50c1fdd805c8efbaafb30564b7c9777954
|
data/README.md
CHANGED
@@ -102,6 +102,18 @@ client.invoices.all
|
|
102
102
|
client.invoices.find('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX')
|
103
103
|
```
|
104
104
|
|
105
|
+
#### Get the first invoice
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
client.invoices.first
|
109
|
+
```
|
110
|
+
|
111
|
+
#### Get the last invoice
|
112
|
+
|
113
|
+
```ruby
|
114
|
+
client.invoices.last
|
115
|
+
```
|
116
|
+
|
105
117
|
## 4. Contributing
|
106
118
|
|
107
119
|
1. Fork it [https://github.com/nnhansg/unleashed-ruby](https://github.com/nnhansg/unleashed-ruby)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Unleashed
|
2
2
|
# Resource for the Invoices API
|
3
3
|
# The Invoices resource allows sales invoices to be listed and viewed.
|
4
|
-
# An individual sales invoice details can be viewed by appending its identifier
|
4
|
+
# An individual sales invoice details can be viewed by appending its identifier
|
5
5
|
# (a GUID formatted as XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) to the URI.
|
6
6
|
#
|
7
7
|
# @see https://apidocs.unleashedsoftware.com/Invoices
|
@@ -34,6 +34,19 @@ module Unleashed
|
|
34
34
|
response = JSON.parse(@client.get("Invoices/#{id}").body)
|
35
35
|
Unleashed::Invoice.new(@client, response)
|
36
36
|
end
|
37
|
+
|
38
|
+
# Get a first invoice in all
|
39
|
+
#
|
40
|
+
# @return [Unleashed::Invoice]
|
41
|
+
def first
|
42
|
+
all.first
|
43
|
+
end
|
44
|
+
|
45
|
+
# Get a last invoice in all
|
46
|
+
#
|
47
|
+
# @return [Unleashed::Invoice]
|
48
|
+
def last
|
49
|
+
all.last
|
50
|
+
end
|
37
51
|
end
|
38
52
|
end
|
39
|
-
|
data/lib/unleashed/version.rb
CHANGED
data/unleashed.gemspec
CHANGED
@@ -40,8 +40,8 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
41
41
|
spec.require_paths = ['lib']
|
42
42
|
|
43
|
-
spec.add_dependency 'faraday'
|
44
|
-
spec.add_dependency 'json'
|
43
|
+
spec.add_dependency 'faraday', '~> 0'
|
44
|
+
spec.add_dependency 'json', '~> 0'
|
45
45
|
spec.add_development_dependency 'bundler', '~> 1.16', '>= 1.16.1'
|
46
46
|
spec.add_development_dependency 'rake', '~> 10.0'
|
47
47
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unleashed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nhan Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|