pnap_payments_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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13b46e57179ed0e2ad20ae8905574abb2196bd7d7ba1f8a30cd4d3eb19cc0ac7
|
4
|
+
data.tar.gz: 4db7dedbe25666104ecf6b222d252e41783a487c77ebc50133f2592ba9c9f3b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aa9e6ca728a42d5ac039a9cdfc0a49b3ada25c11d7464ad455857a19bfdbaf728113ee53fe5ddb8e7544dc95035bc5dbeb699bcb4bc20c395b8d2c0adb69271
|
7
|
+
data.tar.gz: 1bde336e089048d5a4450fc717271b4757fd11aded29ffb844d8e3fd2e9c445d0f61d02f8294bb019c6393304e68321b3d4dc0b24a2d64fa470f977482ee5a9d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -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
|
-
[
|
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 "
|
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_payments_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.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-
|
11
|
+
date: 2024-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -115,10 +115,10 @@ specification_version: 4
|
|
115
115
|
summary: Payments API Ruby Gem
|
116
116
|
test_files:
|
117
117
|
- spec/api/transactions_api_spec.rb
|
118
|
+
- spec/models/paginated_transactions_spec.rb
|
118
119
|
- spec/models/error_spec.rb
|
119
120
|
- spec/models/transaction_spec.rb
|
120
121
|
- spec/models/card_payment_method_details_spec.rb
|
121
|
-
- spec/models/paginated_response_spec.rb
|
122
122
|
- spec/models/transaction_metadata_spec.rb
|
123
|
-
- spec/models/
|
123
|
+
- spec/models/paginated_response_spec.rb
|
124
124
|
- spec/spec_helper.rb
|