pnap_invoicing_api 1.0.0 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a32817deaf98f40b7bde7e579154b8eb31809d06294e6843338863785b601b62
4
- data.tar.gz: 98d2ee76805c252b167388ae87941dc9712c33036d9047ad6c8827941b7ee1dd
3
+ metadata.gz: df421bf59bb3386fffa77039a98388730943b220ed494735825f7698c14c62a1
4
+ data.tar.gz: ea005fcda0b7323d489e3e614aee0d9e572aacd38b5bb3e2a43472f66aeffd53
5
5
  SHA512:
6
- metadata.gz: 805036b6f1e81cd471f2bacda5d862aea306319c87fdda326a06cd20b7628e9ee2f29217639cfb1c3bee52d9984ce58c85eecc12a7da0c5d6baa64c458e28d4f
7
- data.tar.gz: ca9aa3410d1d4a2063eada1ffbf8440219da161ca65cdbc19abd1c5cba30ff83dcfda2f885015cfaf3e8164e2127b7a9a7fc9ff140e4375f5ee17f3fc48d6f12
6
+ metadata.gz: 04dc99b321aaeaf3324cdde970a928bc7100fafee7a731abe7f7f7e6cb4aa7008e3d1100423915e76ce13f490ff834aa22344758738a8bf22d05bb45d6208d10
7
+ data.tar.gz: 4825922261e8b3ab0f39095451275274a05fa42639ba49cc07e7eb3f3c40cae54b9e421fa0c0f031d9901e79bbc9d559300c786797a9205c936431ee985d7650
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -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
- [results, limit, offset, total].hash
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 "results"' do
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 "limit"' do
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 "offset"' do
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 "total"' do
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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PhoenixNAP
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -109,8 +109,8 @@ specification_version: 4
109
109
  summary: Invoicing API Ruby Gem
110
110
  test_files:
111
111
  - spec/api/invoices_api_spec.rb
112
- - spec/models/error_spec.rb
113
- - spec/models/paginated_response_spec.rb
114
112
  - spec/models/invoice_spec.rb
113
+ - spec/models/paginated_response_spec.rb
114
+ - spec/models/error_spec.rb
115
115
  - spec/models/paginated_invoices_spec.rb
116
116
  - spec/spec_helper.rb