gpd_debtposition_api 3.8.0

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.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +141 -0
  4. data/Rakefile +10 -0
  5. data/docs/AppInfo.md +22 -0
  6. data/docs/DebtPositionActionsAPIApi.md +165 -0
  7. data/docs/DebtPositionsAPIApi.md +424 -0
  8. data/docs/HomeApi.md +82 -0
  9. data/docs/MultipleIUPDModel.md +18 -0
  10. data/docs/MultiplePaymentPositionModel.md +18 -0
  11. data/docs/PageInfo.md +24 -0
  12. data/docs/PaymentOptionMetadataModel.md +20 -0
  13. data/docs/PaymentOptionMetadataModelResponse.md +20 -0
  14. data/docs/PaymentOptionModel.md +38 -0
  15. data/docs/PaymentOptionModelResponse.md +58 -0
  16. data/docs/PaymentPositionModel.md +60 -0
  17. data/docs/PaymentPositionModelBaseResponse.md +44 -0
  18. data/docs/PaymentPositionsInfo.md +20 -0
  19. data/docs/ProblemJson.md +22 -0
  20. data/docs/Stamp.md +22 -0
  21. data/docs/TransferMetadataModel.md +20 -0
  22. data/docs/TransferMetadataModelResponse.md +20 -0
  23. data/docs/TransferModel.md +34 -0
  24. data/docs/TransferModelResponse.md +40 -0
  25. data/git_push.sh +57 -0
  26. data/gpd_debtposition_api.gemspec +39 -0
  27. data/lib/gpd_debtposition_api/api/debt_position_actions_api_api.rb +162 -0
  28. data/lib/gpd_debtposition_api/api/debt_positions_api_api.rb +439 -0
  29. data/lib/gpd_debtposition_api/api/home_api.rb +80 -0
  30. data/lib/gpd_debtposition_api/api_client.rb +394 -0
  31. data/lib/gpd_debtposition_api/api_error.rb +58 -0
  32. data/lib/gpd_debtposition_api/configuration.rb +320 -0
  33. data/lib/gpd_debtposition_api/models/app_info.rb +232 -0
  34. data/lib/gpd_debtposition_api/models/multiple_iupd_model.rb +251 -0
  35. data/lib/gpd_debtposition_api/models/multiple_payment_position_model.rb +223 -0
  36. data/lib/gpd_debtposition_api/models/page_info.rb +273 -0
  37. data/lib/gpd_debtposition_api/models/payment_option_metadata_model.rb +231 -0
  38. data/lib/gpd_debtposition_api/models/payment_option_metadata_model_response.rb +223 -0
  39. data/lib/gpd_debtposition_api/models/payment_option_model.rb +396 -0
  40. data/lib/gpd_debtposition_api/models/payment_option_model_response.rb +432 -0
  41. data/lib/gpd_debtposition_api/models/payment_position_model.rb +568 -0
  42. data/lib/gpd_debtposition_api/models/payment_position_model_base_response.rb +383 -0
  43. data/lib/gpd_debtposition_api/models/payment_positions_info.rb +239 -0
  44. data/lib/gpd_debtposition_api/models/problem_json.rb +259 -0
  45. data/lib/gpd_debtposition_api/models/stamp.rb +305 -0
  46. data/lib/gpd_debtposition_api/models/transfer_metadata_model.rb +231 -0
  47. data/lib/gpd_debtposition_api/models/transfer_metadata_model_response.rb +223 -0
  48. data/lib/gpd_debtposition_api/models/transfer_model.rb +378 -0
  49. data/lib/gpd_debtposition_api/models/transfer_model_response.rb +349 -0
  50. data/lib/gpd_debtposition_api/version.rb +15 -0
  51. data/lib/gpd_debtposition_api.rb +59 -0
  52. data/spec/api/debt_position_actions_api_api_spec.rb +61 -0
  53. data/spec/api/debt_positions_api_api_spec.rb +111 -0
  54. data/spec/api/home_api_spec.rb +46 -0
  55. data/spec/models/app_info_spec.rb +48 -0
  56. data/spec/models/multiple_iupd_model_spec.rb +36 -0
  57. data/spec/models/multiple_payment_position_model_spec.rb +36 -0
  58. data/spec/models/page_info_spec.rb +54 -0
  59. data/spec/models/payment_option_metadata_model_response_spec.rb +42 -0
  60. data/spec/models/payment_option_metadata_model_spec.rb +42 -0
  61. data/spec/models/payment_option_model_response_spec.rb +160 -0
  62. data/spec/models/payment_option_model_spec.rb +96 -0
  63. data/spec/models/payment_position_model_base_response_spec.rb +122 -0
  64. data/spec/models/payment_position_model_spec.rb +170 -0
  65. data/spec/models/payment_positions_info_spec.rb +42 -0
  66. data/spec/models/problem_json_spec.rb +48 -0
  67. data/spec/models/stamp_spec.rb +48 -0
  68. data/spec/models/transfer_metadata_model_response_spec.rb +42 -0
  69. data/spec/models/transfer_metadata_model_spec.rb +42 -0
  70. data/spec/models/transfer_model_response_spec.rb +106 -0
  71. data/spec/models/transfer_model_spec.rb +88 -0
  72. data/spec/spec_helper.rb +111 -0
  73. metadata +175 -0
@@ -0,0 +1,349 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module GPDDebtPositions
17
+ class TransferModelResponse
18
+ attr_accessor :organization_fiscal_code
19
+
20
+ attr_accessor :id_transfer
21
+
22
+ attr_accessor :amount
23
+
24
+ attr_accessor :remittance_information
25
+
26
+ attr_accessor :category
27
+
28
+ attr_accessor :iban
29
+
30
+ attr_accessor :postal_iban
31
+
32
+ attr_accessor :stamp
33
+
34
+ attr_accessor :inserted_date
35
+
36
+ attr_accessor :status
37
+
38
+ attr_accessor :last_updated_date
39
+
40
+ attr_accessor :transfer_metadata
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'organization_fiscal_code' => :'organizationFiscalCode',
68
+ :'id_transfer' => :'idTransfer',
69
+ :'amount' => :'amount',
70
+ :'remittance_information' => :'remittanceInformation',
71
+ :'category' => :'category',
72
+ :'iban' => :'iban',
73
+ :'postal_iban' => :'postalIban',
74
+ :'stamp' => :'stamp',
75
+ :'inserted_date' => :'insertedDate',
76
+ :'status' => :'status',
77
+ :'last_updated_date' => :'lastUpdatedDate',
78
+ :'transfer_metadata' => :'transferMetadata'
79
+ }
80
+ end
81
+
82
+ # Returns all the JSON keys this model knows about
83
+ def self.acceptable_attributes
84
+ attribute_map.values
85
+ end
86
+
87
+ # Attribute type mapping.
88
+ def self.openapi_types
89
+ {
90
+ :'organization_fiscal_code' => :'String',
91
+ :'id_transfer' => :'String',
92
+ :'amount' => :'Integer',
93
+ :'remittance_information' => :'String',
94
+ :'category' => :'String',
95
+ :'iban' => :'String',
96
+ :'postal_iban' => :'String',
97
+ :'stamp' => :'Stamp',
98
+ :'inserted_date' => :'Time',
99
+ :'status' => :'String',
100
+ :'last_updated_date' => :'Time',
101
+ :'transfer_metadata' => :'Array<TransferMetadataModelResponse>'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ ])
109
+ end
110
+
111
+ # Initializes the object
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ def initialize(attributes = {})
114
+ if (!attributes.is_a?(Hash))
115
+ fail ArgumentError, "The input argument (attributes) must be a hash in `GPDDebtPositions::TransferModelResponse` initialize method"
116
+ end
117
+
118
+ # check to see if the attribute exists and convert string to symbol for hash key
119
+ attributes = attributes.each_with_object({}) { |(k, v), h|
120
+ if (!self.class.attribute_map.key?(k.to_sym))
121
+ fail ArgumentError, "`#{k}` is not a valid attribute in `GPDDebtPositions::TransferModelResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
122
+ end
123
+ h[k.to_sym] = v
124
+ }
125
+
126
+ if attributes.key?(:'organization_fiscal_code')
127
+ self.organization_fiscal_code = attributes[:'organization_fiscal_code']
128
+ end
129
+
130
+ if attributes.key?(:'id_transfer')
131
+ self.id_transfer = attributes[:'id_transfer']
132
+ end
133
+
134
+ if attributes.key?(:'amount')
135
+ self.amount = attributes[:'amount']
136
+ end
137
+
138
+ if attributes.key?(:'remittance_information')
139
+ self.remittance_information = attributes[:'remittance_information']
140
+ end
141
+
142
+ if attributes.key?(:'category')
143
+ self.category = attributes[:'category']
144
+ end
145
+
146
+ if attributes.key?(:'iban')
147
+ self.iban = attributes[:'iban']
148
+ end
149
+
150
+ if attributes.key?(:'postal_iban')
151
+ self.postal_iban = attributes[:'postal_iban']
152
+ end
153
+
154
+ if attributes.key?(:'stamp')
155
+ self.stamp = attributes[:'stamp']
156
+ end
157
+
158
+ if attributes.key?(:'inserted_date')
159
+ self.inserted_date = attributes[:'inserted_date']
160
+ end
161
+
162
+ if attributes.key?(:'status')
163
+ self.status = attributes[:'status']
164
+ end
165
+
166
+ if attributes.key?(:'last_updated_date')
167
+ self.last_updated_date = attributes[:'last_updated_date']
168
+ end
169
+
170
+ if attributes.key?(:'transfer_metadata')
171
+ if (value = attributes[:'transfer_metadata']).is_a?(Array)
172
+ self.transfer_metadata = value
173
+ end
174
+ end
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
181
+ invalid_properties = Array.new
182
+ invalid_properties
183
+ end
184
+
185
+ # Check to see if the all the properties in the model are valid
186
+ # @return true if the model is valid
187
+ def valid?
188
+ warn '[DEPRECATED] the `valid?` method is obsolete'
189
+ status_validator = EnumAttributeValidator.new('String', ["T_UNREPORTED", "T_REPORTED"])
190
+ return false unless status_validator.valid?(@status)
191
+ true
192
+ end
193
+
194
+ # Custom attribute writer method checking allowed values (enum).
195
+ # @param [Object] status Object to be assigned
196
+ def status=(status)
197
+ validator = EnumAttributeValidator.new('String', ["T_UNREPORTED", "T_REPORTED"])
198
+ unless validator.valid?(status)
199
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
200
+ end
201
+ @status = status
202
+ end
203
+
204
+ # Checks equality by comparing each attribute.
205
+ # @param [Object] Object to be compared
206
+ def ==(o)
207
+ return true if self.equal?(o)
208
+ self.class == o.class &&
209
+ organization_fiscal_code == o.organization_fiscal_code &&
210
+ id_transfer == o.id_transfer &&
211
+ amount == o.amount &&
212
+ remittance_information == o.remittance_information &&
213
+ category == o.category &&
214
+ iban == o.iban &&
215
+ postal_iban == o.postal_iban &&
216
+ stamp == o.stamp &&
217
+ inserted_date == o.inserted_date &&
218
+ status == o.status &&
219
+ last_updated_date == o.last_updated_date &&
220
+ transfer_metadata == o.transfer_metadata
221
+ end
222
+
223
+ # @see the `==` method
224
+ # @param [Object] Object to be compared
225
+ def eql?(o)
226
+ self == o
227
+ end
228
+
229
+ # Calculates hash code according to all attributes.
230
+ # @return [Integer] Hash code
231
+ def hash
232
+ [organization_fiscal_code, id_transfer, amount, remittance_information, category, iban, postal_iban, stamp, inserted_date, status, last_updated_date, transfer_metadata].hash
233
+ end
234
+
235
+ # Builds the object from hash
236
+ # @param [Hash] attributes Model attributes in the form of hash
237
+ # @return [Object] Returns the model itself
238
+ def self.build_from_hash(attributes)
239
+ return nil unless attributes.is_a?(Hash)
240
+ attributes = attributes.transform_keys(&:to_sym)
241
+ transformed_hash = {}
242
+ openapi_types.each_pair do |key, type|
243
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
244
+ transformed_hash["#{key}"] = nil
245
+ elsif type =~ /\AArray<(.*)>/i
246
+ # check to ensure the input is an array given that the attribute
247
+ # is documented as an array but the input is not
248
+ if attributes[attribute_map[key]].is_a?(Array)
249
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
250
+ end
251
+ elsif !attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
253
+ end
254
+ end
255
+ new(transformed_hash)
256
+ end
257
+
258
+ # Deserializes the data based on type
259
+ # @param string type Data type
260
+ # @param string value Value to be deserialized
261
+ # @return [Object] Deserialized data
262
+ def self._deserialize(type, value)
263
+ case type.to_sym
264
+ when :Time
265
+ Time.parse(value)
266
+ when :Date
267
+ Date.parse(value)
268
+ when :String
269
+ value.to_s
270
+ when :Integer
271
+ value.to_i
272
+ when :Float
273
+ value.to_f
274
+ when :Boolean
275
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
276
+ true
277
+ else
278
+ false
279
+ end
280
+ when :Object
281
+ # generic object (usually a Hash), return directly
282
+ value
283
+ when /\AArray<(?<inner_type>.+)>\z/
284
+ inner_type = Regexp.last_match[:inner_type]
285
+ value.map { |v| _deserialize(inner_type, v) }
286
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
287
+ k_type = Regexp.last_match[:k_type]
288
+ v_type = Regexp.last_match[:v_type]
289
+ {}.tap do |hash|
290
+ value.each do |k, v|
291
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
292
+ end
293
+ end
294
+ else # model
295
+ # models (e.g. Pet) or oneOf
296
+ klass = GPDDebtPositions.const_get(type)
297
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
298
+ end
299
+ end
300
+
301
+ # Returns the string representation of the object
302
+ # @return [String] String presentation of the object
303
+ def to_s
304
+ to_hash.to_s
305
+ end
306
+
307
+ # to_body is an alias to to_hash (backward compatibility)
308
+ # @return [Hash] Returns the object in the form of hash
309
+ def to_body
310
+ to_hash
311
+ end
312
+
313
+ # Returns the object in the form of hash
314
+ # @return [Hash] Returns the object in the form of hash
315
+ def to_hash
316
+ hash = {}
317
+ self.class.attribute_map.each_pair do |attr, param|
318
+ value = self.send(attr)
319
+ if value.nil?
320
+ is_nullable = self.class.openapi_nullable.include?(attr)
321
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
322
+ end
323
+
324
+ hash[param] = _to_hash(value)
325
+ end
326
+ hash
327
+ end
328
+
329
+ # Outputs non-array value in the form of hash
330
+ # For object, use to_hash. Otherwise, just return the value
331
+ # @param [Object] value Any valid value
332
+ # @return [Hash] Returns the value in the form of hash
333
+ def _to_hash(value)
334
+ if value.is_a?(Array)
335
+ value.compact.map { |v| _to_hash(v) }
336
+ elsif value.is_a?(Hash)
337
+ {}.tap do |hash|
338
+ value.each { |k, v| hash[k] = _to_hash(v) }
339
+ end
340
+ elsif value.respond_to? :to_hash
341
+ value.to_hash
342
+ else
343
+ value
344
+ end
345
+ end
346
+
347
+ end
348
+
349
+ end
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ module GPDDebtPositions
14
+ VERSION = '3.8.0'
15
+ end
@@ -0,0 +1,59 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'gpd_debtposition_api/api_client'
15
+ require 'gpd_debtposition_api/api_error'
16
+ require 'gpd_debtposition_api/version'
17
+ require 'gpd_debtposition_api/configuration'
18
+
19
+ # Models
20
+ require 'gpd_debtposition_api/models/app_info'
21
+ require 'gpd_debtposition_api/models/multiple_iupd_model'
22
+ require 'gpd_debtposition_api/models/multiple_payment_position_model'
23
+ require 'gpd_debtposition_api/models/page_info'
24
+ require 'gpd_debtposition_api/models/payment_option_metadata_model'
25
+ require 'gpd_debtposition_api/models/payment_option_metadata_model_response'
26
+ require 'gpd_debtposition_api/models/payment_option_model'
27
+ require 'gpd_debtposition_api/models/payment_option_model_response'
28
+ require 'gpd_debtposition_api/models/payment_position_model'
29
+ require 'gpd_debtposition_api/models/payment_position_model_base_response'
30
+ require 'gpd_debtposition_api/models/payment_positions_info'
31
+ require 'gpd_debtposition_api/models/problem_json'
32
+ require 'gpd_debtposition_api/models/stamp'
33
+ require 'gpd_debtposition_api/models/transfer_metadata_model'
34
+ require 'gpd_debtposition_api/models/transfer_metadata_model_response'
35
+ require 'gpd_debtposition_api/models/transfer_model'
36
+ require 'gpd_debtposition_api/models/transfer_model_response'
37
+
38
+ # APIs
39
+ require 'gpd_debtposition_api/api/debt_position_actions_api_api'
40
+ require 'gpd_debtposition_api/api/debt_positions_api_api'
41
+ require 'gpd_debtposition_api/api/home_api'
42
+
43
+ module GPDDebtPositions
44
+ class << self
45
+ # Customize default settings for the SDK using block.
46
+ # GPDDebtPositions.configure do |config|
47
+ # config.username = "xxx"
48
+ # config.password = "xxx"
49
+ # end
50
+ # If no block given, return the default Configuration object.
51
+ def configure
52
+ if block_given?
53
+ yield(Configuration.default)
54
+ else
55
+ Configuration.default
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,61 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for GPDDebtPositions::DebtPositionActionsAPIApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'DebtPositionActionsAPIApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = GPDDebtPositions::DebtPositionActionsAPIApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of DebtPositionActionsAPIApi' do
30
+ it 'should create an instance of DebtPositionActionsAPIApi' do
31
+ expect(@api_instance).to be_instance_of(GPDDebtPositions::DebtPositionActionsAPIApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for invalidate_position
36
+ # The Organization invalidate a debt Position.
37
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
38
+ # @param iupd IUPD (Unique identifier of the debt position). Format could be &#x60;&lt;Organization fiscal code + UUID&gt;&#x60; this would make it unique within the new PD management system. It&#39;s the responsibility of the EC to guarantee uniqueness. The pagoPa system shall verify that this is &#x60;true&#x60; and if not, notify the EC.
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
41
+ # @return [PaymentPositionModel]
42
+ describe 'invalidate_position test' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ # unit tests for publish_position
49
+ # The Organization publish a debt Position.
50
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
51
+ # @param iupd IUPD (Unique identifier of the debt position). Format could be &#x60;&lt;Organization fiscal code + UUID&gt;&#x60; this would make it unique within the new PD management system. It&#39;s the responsibility of the EC to guarantee uniqueness. The pagoPa system shall verify that this is &#x60;true&#x60; and if not, notify the EC.
52
+ # @param [Hash] opts the optional parameters
53
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
54
+ # @return [PaymentPositionModel]
55
+ describe 'publish_position test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
58
+ end
59
+ end
60
+
61
+ end
@@ -0,0 +1,111 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for GPDDebtPositions::DebtPositionsAPIApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'DebtPositionsAPIApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = GPDDebtPositions::DebtPositionsAPIApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of DebtPositionsAPIApi' do
30
+ it 'should create an instance of DebtPositionsAPIApi' do
31
+ expect(@api_instance).to be_instance_of(GPDDebtPositions::DebtPositionsAPIApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for create_position
36
+ # The Organization creates a debt Position.
37
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
38
+ # @param payment_position_model
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
41
+ # @option opts [Boolean] :to_publish
42
+ # @return [PaymentPositionModel]
43
+ describe 'create_position test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
+ end
47
+ end
48
+
49
+ # unit tests for delete_position
50
+ # The Organization deletes a debt position
51
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
52
+ # @param iupd IUPD (Unique identifier of the debt position). Format could be &#x60;&lt;Organization fiscal code + UUID&gt;&#x60; this would make it unique within the new PD management system. It&#39;s the responsibility of the EC to guarantee uniqueness. The pagoPa system shall verify that this is &#x60;true&#x60; and if not, notify the EC.
53
+ # @param [Hash] opts the optional parameters
54
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
55
+ # @return [String]
56
+ describe 'delete_position test' do
57
+ it 'should work' do
58
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
59
+ end
60
+ end
61
+
62
+ # unit tests for get_organization_debt_position_by_iupd
63
+ # Return the details of a specific debt position.
64
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
65
+ # @param iupd IUPD (Unique identifier of the debt position). Format could be &#x60;&lt;Organization fiscal code + UUID&gt;&#x60; this would make it unique within the new PD management system. It&#39;s the responsibility of the EC to guarantee uniqueness. The pagoPa system shall verify that this is &#x60;true&#x60; and if not, notify the EC.
66
+ # @param [Hash] opts the optional parameters
67
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
68
+ # @return [PaymentPositionModelBaseResponse]
69
+ describe 'get_organization_debt_position_by_iupd test' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
72
+ end
73
+ end
74
+
75
+ # unit tests for get_organization_debt_positions
76
+ # Return the list of the organization debt positions. The due dates interval is mutually exclusive with the payment dates interval.
77
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
78
+ # @param page Page number. Page value starts from 0
79
+ # @param [Hash] opts the optional parameters
80
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
81
+ # @option opts [Integer] :limit Number of elements on one page. Default &#x3D; 50
82
+ # @option opts [Date] :due_date_from Filter from due_date (if provided use the format yyyy-MM-dd). If not provided will be set to 30 days before the due_date_to.
83
+ # @option opts [Date] :due_date_to Filter to due_date (if provided use the format yyyy-MM-dd). If not provided will be set to 30 days after the due_date_from.
84
+ # @option opts [Date] :payment_date_from Filter from payment_date (if provided use the format yyyy-MM-dd). If not provided will be set to 30 days before the payment_date_to.
85
+ # @option opts [Date] :payment_date_to Filter to payment_date (if provided use the format yyyy-MM-dd). If not provided will be set to 30 days after the payment_date_from
86
+ # @option opts [String] :status Filter by debt position status
87
+ # @option opts [String] :orderby Order by INSERTED_DATE, COMPANY_NAME, IUPD or STATUS
88
+ # @option opts [String] :ordering Direction of ordering
89
+ # @return [PaymentPositionsInfo]
90
+ describe 'get_organization_debt_positions test' do
91
+ it 'should work' do
92
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
93
+ end
94
+ end
95
+
96
+ # unit tests for update_position
97
+ # The Organization updates a debt position
98
+ # @param organizationfiscalcode Organization fiscal code, the fiscal code of the Organization.
99
+ # @param iupd IUPD (Unique identifier of the debt position). Format could be &#x60;&lt;Organization fiscal code + UUID&gt;&#x60; this would make it unique within the new PD management system. It&#39;s the responsibility of the EC to guarantee uniqueness. The pagoPa system shall verify that this is &#x60;true&#x60; and if not, notify the EC.
100
+ # @param payment_position_model
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
103
+ # @option opts [Boolean] :to_publish
104
+ # @return [PaymentPositionModel]
105
+ describe 'update_position test' do
106
+ it 'should work' do
107
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
108
+ end
109
+ end
110
+
111
+ end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for GPDDebtPositions::HomeApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'HomeApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = GPDDebtPositions::HomeApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of HomeApi' do
30
+ it 'should create an instance of HomeApi' do
31
+ expect(@api_instance).to be_instance_of(GPDDebtPositions::HomeApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for health_check
36
+ # Return OK if application is started
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [String] :x_request_id This header identifies the call, if not passed it is self-generated. This ID is returned in the response.
39
+ # @return [AppInfo]
40
+ describe 'health_check test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #PagoPA API Debt Position
3
+
4
+ #Progetto Gestione Posizioni Debitorie
5
+
6
+ The version of the OpenAPI document: 0.11.18
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.11.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for GPDDebtPositions::AppInfo
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe GPDDebtPositions::AppInfo do
21
+ let(:instance) { GPDDebtPositions::AppInfo.new }
22
+
23
+ describe 'test an instance of AppInfo' do
24
+ it 'should create an instance of AppInfo' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(GPDDebtPositions::AppInfo)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "name"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "version"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "environment"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end