pnap_payments_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: 489dfe534742ec568a15226ddb5f75a28db4f345a498b62290d64ef7816489be
4
- data.tar.gz: eea7739d5aff9c33876c4d90874b558cd64460c5e9f39f9612815fa92006b7d5
3
+ metadata.gz: a8f34ca879ac7cf52d1ecd555269343200efdf7f46449aa81bb6ec3164024f35
4
+ data.tar.gz: ce50d42e91a13b96dace405da0349c00606a3118dc62bdcee113e297bdf2b0db
5
5
  SHA512:
6
- metadata.gz: b2ebe98c8ac6921d13799a2bc4d79f0520e86f55e2e9f427ea113ab61b71a3bc536467de1e68b58d0ca322c7702c178f7107d419fa263282660c0d4343eee51b
7
- data.tar.gz: 13ee5b8483b0d2e71d74b5b09c7a8dba8ee87250ec21caf38d12b1397958fef25e5e2d878b459f906146f75e8ddc91351225b550850bcf40d1acd75c9ded0938
6
+ metadata.gz: a03eec6e823a3cfc3d72c356b8eb63c74817a6df8e8d30ab8071f139abb31e4acb037c0911435e686efbc5215c75ef6165b30303be3a1c0a3bedf42d91327119
7
+ data.tar.gz: 41729671d476a87ab6814a7091848427773ab8b8dced63827f89da04b3b4d3e7d4b080fc52127d4ec21fcada196ac09235b94faa13b85520d696ad2c98937994
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.2
@@ -4,10 +4,10 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **results** | [**Array<Transaction>**](Transaction.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<Transaction>**](Transaction.md) | | |
11
11
 
12
12
  ## Example
13
13
 
@@ -15,10 +15,10 @@
15
15
  require 'pnap_payments_api'
16
16
 
17
17
  instance = PaymentsApi::PaginatedTransactions.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 PaymentsApi
33
33
  def initialize(config = Configuration.default)
34
34
  @config = config
35
35
  @config.params_encoding = :multi
36
- @user_agent = "PNAP-ruby-sdk-bmc/#{ PaymentsApi::VERSION }"
37
- @powered_by = "PNAP-ruby-sdk-bmc/#{ PaymentsApi::VERSION }"
36
+ @user_agent = "PNAP-ruby-sdk-bmc/PaymentsApi/#{ PaymentsApi::VERSION }"
37
+ @powered_by = "PNAP-ruby-sdk-bmc/PaymentsApi/#{ PaymentsApi::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 PaymentsApi
17
17
  class PaginatedTransactions
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 PaymentsApi
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 PaymentsApi
44
44
  # Attribute type mapping.
45
45
  def self.openapi_types
46
46
  {
47
- :'results' => :'Array<Transaction>',
48
47
  :'limit' => :'Integer',
49
48
  :'offset' => :'Integer',
50
- :'total' => :'Integer'
49
+ :'total' => :'Integer',
50
+ :'results' => :'Array<Transaction>'
51
51
  }
52
52
  end
53
53
 
@@ -79,14 +79,6 @@ module PaymentsApi
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 PaymentsApi
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 PaymentsApi
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 PaymentsApi
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 PaymentsApi
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 PaymentsApi
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 PaymentsApi
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 PaymentsApi::PaginatedTransactions 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_payments_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.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: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2025-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -94,7 +94,7 @@ licenses:
94
94
  - MPL-2.0
95
95
  metadata:
96
96
  source_code_uri: https://github.com/phoenixnap/ruby-sdk-bmc
97
- post_install_message:
97
+ post_install_message:
98
98
  rdoc_options: []
99
99
  require_paths:
100
100
  - lib
@@ -109,16 +109,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.3.5
113
- signing_key:
112
+ rubygems_version: 3.4.20
113
+ signing_key:
114
114
  specification_version: 4
115
115
  summary: Payments API Ruby Gem
116
116
  test_files:
117
117
  - spec/api/transactions_api_spec.rb
118
118
  - spec/models/error_spec.rb
119
- - spec/models/transaction_spec.rb
120
- - spec/models/card_payment_method_details_spec.rb
121
- - spec/models/paginated_response_spec.rb
122
119
  - spec/models/transaction_metadata_spec.rb
120
+ - spec/models/card_payment_method_details_spec.rb
123
121
  - spec/models/paginated_transactions_spec.rb
122
+ - spec/models/paginated_response_spec.rb
123
+ - spec/models/transaction_spec.rb
124
124
  - spec/spec_helper.rb