pnap_invoicing_api 1.0.0 → 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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e50a70cfc0ac3e4df3d13c90303e9c0baa81217df6eb1b5340683f080a665e0
|
4
|
+
data.tar.gz: '09f31bfbdfb59602f82f1f24ec1c1270ca369014738da0639491a30c1cc81433'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 790c2519c2f6c74be5f2d2fb8c151e5066a6dce54f2edad6bcd3575785ca68aad58e828742455bc03a4daf4bb4eb62df9ab8d62473f5196a84d143260cc1d655
|
7
|
+
data.tar.gz: 6e7096d636a640be51c4a51d914e2329860c29f0d878348d3aeac3340a304c9c020cb971e806224a18ace9a11f32c99bb56155760a9f82a7c85aeb73446cd08e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/docs/PaginatedInvoices.md
CHANGED
@@ -4,10 +4,10 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **results** | [**Array<Invoice>**](Invoice.md) | | |
|
8
7
|
| **limit** | **Integer** | Maximum number of items in the page (actual returned length can be less). | |
|
9
8
|
| **offset** | **Integer** | The number of returned items skipped. | |
|
10
9
|
| **total** | **Integer** | The total number of records available for retrieval. | |
|
10
|
+
| **results** | [**Array<Invoice>**](Invoice.md) | | |
|
11
11
|
|
12
12
|
## Example
|
13
13
|
|
@@ -15,10 +15,10 @@
|
|
15
15
|
require 'pnap_invoicing_api'
|
16
16
|
|
17
17
|
instance = InvoicingApi::PaginatedInvoices.new(
|
18
|
-
results: null,
|
19
18
|
limit: 5,
|
20
19
|
offset: 25,
|
21
|
-
total: 400
|
20
|
+
total: 400,
|
21
|
+
results: null
|
22
22
|
)
|
23
23
|
```
|
24
24
|
|
@@ -33,8 +33,8 @@ module InvoicingApi
|
|
33
33
|
def initialize(config = Configuration.default)
|
34
34
|
@config = config
|
35
35
|
@config.params_encoding = :multi
|
36
|
-
@user_agent = "PNAP-ruby-sdk-bmc/#{ InvoicingApi::VERSION }"
|
37
|
-
@powered_by = "PNAP-ruby-sdk-bmc/#{ InvoicingApi::VERSION }"
|
36
|
+
@user_agent = "PNAP-ruby-sdk-bmc/InvoicingApi/#{ InvoicingApi::VERSION }"
|
37
|
+
@powered_by = "PNAP-ruby-sdk-bmc/InvoicingApi/#{ InvoicingApi::VERSION }"
|
38
38
|
@default_headers = {
|
39
39
|
'Content-Type' => 'application/json',
|
40
40
|
'User-Agent' => @user_agent,
|
@@ -15,8 +15,6 @@ require 'time'
|
|
15
15
|
|
16
16
|
module InvoicingApi
|
17
17
|
class PaginatedInvoices
|
18
|
-
attr_accessor :results
|
19
|
-
|
20
18
|
# Maximum number of items in the page (actual returned length can be less).
|
21
19
|
attr_accessor :limit
|
22
20
|
|
@@ -26,13 +24,15 @@ module InvoicingApi
|
|
26
24
|
# The total number of records available for retrieval.
|
27
25
|
attr_accessor :total
|
28
26
|
|
27
|
+
attr_accessor :results
|
28
|
+
|
29
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
30
|
def self.attribute_map
|
31
31
|
{
|
32
|
-
:'results' => :'results',
|
33
32
|
:'limit' => :'limit',
|
34
33
|
:'offset' => :'offset',
|
35
|
-
:'total' => :'total'
|
34
|
+
:'total' => :'total',
|
35
|
+
:'results' => :'results'
|
36
36
|
}
|
37
37
|
end
|
38
38
|
|
@@ -44,10 +44,10 @@ module InvoicingApi
|
|
44
44
|
# Attribute type mapping.
|
45
45
|
def self.openapi_types
|
46
46
|
{
|
47
|
-
:'results' => :'Array<Invoice>',
|
48
47
|
:'limit' => :'Integer',
|
49
48
|
:'offset' => :'Integer',
|
50
|
-
:'total' => :'Integer'
|
49
|
+
:'total' => :'Integer',
|
50
|
+
:'results' => :'Array<Invoice>'
|
51
51
|
}
|
52
52
|
end
|
53
53
|
|
@@ -79,14 +79,6 @@ module InvoicingApi
|
|
79
79
|
h[k.to_sym] = v
|
80
80
|
}
|
81
81
|
|
82
|
-
if attributes.key?(:'results')
|
83
|
-
if (value = attributes[:'results']).is_a?(Array)
|
84
|
-
self.results = value
|
85
|
-
end
|
86
|
-
else
|
87
|
-
self.results = nil
|
88
|
-
end
|
89
|
-
|
90
82
|
if attributes.key?(:'limit')
|
91
83
|
self.limit = attributes[:'limit']
|
92
84
|
else
|
@@ -104,6 +96,14 @@ module InvoicingApi
|
|
104
96
|
else
|
105
97
|
self.total = nil
|
106
98
|
end
|
99
|
+
|
100
|
+
if attributes.key?(:'results')
|
101
|
+
if (value = attributes[:'results']).is_a?(Array)
|
102
|
+
self.results = value
|
103
|
+
end
|
104
|
+
else
|
105
|
+
self.results = nil
|
106
|
+
end
|
107
107
|
end
|
108
108
|
|
109
109
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -111,10 +111,6 @@ module InvoicingApi
|
|
111
111
|
def list_invalid_properties
|
112
112
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
113
113
|
invalid_properties = Array.new
|
114
|
-
if @results.nil?
|
115
|
-
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
116
|
-
end
|
117
|
-
|
118
114
|
if @limit.nil?
|
119
115
|
invalid_properties.push('invalid value for "limit", limit cannot be nil.')
|
120
116
|
end
|
@@ -127,6 +123,10 @@ module InvoicingApi
|
|
127
123
|
invalid_properties.push('invalid value for "total", total cannot be nil.')
|
128
124
|
end
|
129
125
|
|
126
|
+
if @results.nil?
|
127
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
130
|
invalid_properties
|
131
131
|
end
|
132
132
|
|
@@ -134,10 +134,10 @@ module InvoicingApi
|
|
134
134
|
# @return true if the model is valid
|
135
135
|
def valid?
|
136
136
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
137
|
-
return false if @results.nil?
|
138
137
|
return false if @limit.nil?
|
139
138
|
return false if @offset.nil?
|
140
139
|
return false if @total.nil?
|
140
|
+
return false if @results.nil?
|
141
141
|
true
|
142
142
|
end
|
143
143
|
|
@@ -146,10 +146,10 @@ module InvoicingApi
|
|
146
146
|
def ==(o)
|
147
147
|
return true if self.equal?(o)
|
148
148
|
self.class == o.class &&
|
149
|
-
results == o.results &&
|
150
149
|
limit == o.limit &&
|
151
150
|
offset == o.offset &&
|
152
|
-
total == o.total
|
151
|
+
total == o.total &&
|
152
|
+
results == o.results
|
153
153
|
end
|
154
154
|
|
155
155
|
# @see the `==` method
|
@@ -161,7 +161,7 @@ module InvoicingApi
|
|
161
161
|
# Calculates hash code according to all attributes.
|
162
162
|
# @return [Integer] Hash code
|
163
163
|
def hash
|
164
|
-
[
|
164
|
+
[limit, offset, total, results].hash
|
165
165
|
end
|
166
166
|
|
167
167
|
# Builds the object from hash
|
@@ -27,25 +27,25 @@ describe InvoicingApi::PaginatedInvoices do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
describe 'test attribute "
|
30
|
+
describe 'test attribute "limit"' do
|
31
31
|
it 'should work' do
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
describe 'test attribute "
|
36
|
+
describe 'test attribute "offset"' do
|
37
37
|
it 'should work' do
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
describe 'test attribute "
|
42
|
+
describe 'test attribute "total"' do
|
43
43
|
it 'should work' do
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
describe 'test attribute "
|
48
|
+
describe 'test attribute "results"' do
|
49
49
|
it 'should work' do
|
50
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
51
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pnap_invoicing_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PhoenixNAP
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -88,7 +88,7 @@ licenses:
|
|
88
88
|
- MPL-2.0
|
89
89
|
metadata:
|
90
90
|
source_code_uri: https://github.com/phoenixnap/ruby-sdk-bmc
|
91
|
-
post_install_message:
|
91
|
+
post_install_message:
|
92
92
|
rdoc_options: []
|
93
93
|
require_paths:
|
94
94
|
- lib
|
@@ -103,14 +103,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
107
|
-
signing_key:
|
106
|
+
rubygems_version: 3.4.20
|
107
|
+
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Invoicing API Ruby Gem
|
110
110
|
test_files:
|
111
111
|
- spec/api/invoices_api_spec.rb
|
112
112
|
- spec/models/error_spec.rb
|
113
|
+
- spec/models/paginated_invoices_spec.rb
|
113
114
|
- spec/models/paginated_response_spec.rb
|
114
115
|
- spec/models/invoice_spec.rb
|
115
|
-
- spec/models/paginated_invoices_spec.rb
|
116
116
|
- spec/spec_helper.rb
|