vrpayment-ruby-sdk 6.3.0 → 7.0.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 (174) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +68 -19
  3. data/LICENSE +1 -1
  4. data/README.md +355 -108
  5. data/lib/vrpayment-ruby-sdk/api_client.rb +1 -1
  6. data/lib/vrpayment-ruby-sdk/models/abstract_role_update.rb +13 -1
  7. data/lib/vrpayment-ruby-sdk/models/abstract_walleejoin_partnership.rb +330 -0
  8. data/lib/vrpayment-ruby-sdk/models/{payment_terminal_preparing.rb → account_create_with_owner.rb} +63 -34
  9. data/lib/vrpayment-ruby-sdk/models/analytics_query_execution_request.rb +279 -0
  10. data/lib/vrpayment-ruby-sdk/models/analytics_query_execution_response.rb +231 -0
  11. data/lib/vrpayment-ruby-sdk/models/authenticated_card_data_create.rb +30 -1
  12. data/lib/vrpayment-ruby-sdk/models/bank_payment_type.rb +50 -0
  13. data/lib/vrpayment-ruby-sdk/models/boarding_strategy_information_request.rb +247 -0
  14. data/lib/vrpayment-ruby-sdk/models/{express_checkout_session_create.rb → charge_attempt_lookup_result.rb} +16 -20
  15. data/lib/vrpayment-ruby-sdk/models/charge_attempt_projection.rb +560 -0
  16. data/lib/vrpayment-ruby-sdk/models/dunning_case_level.rb +403 -0
  17. data/lib/vrpayment-ruby-sdk/models/{user_account_role_list_response.rb → dunning_case_level_list_response.rb} +4 -4
  18. data/lib/vrpayment-ruby-sdk/models/dunning_case_level_search_response.rb +263 -0
  19. data/lib/vrpayment-ruby-sdk/models/dunning_case_level_state.rb +53 -0
  20. data/lib/vrpayment-ruby-sdk/models/{express_checkout_session_state.rb → facade_user_friendly_query_status_model.rb} +6 -7
  21. data/lib/vrpayment-ruby-sdk/models/invoice_processor.rb +51 -0
  22. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record.rb +633 -0
  23. data/lib/vrpayment-ruby-sdk/models/{express_checkout_shipping_option.rb → invoice_reconciliation_record_invoice_link.rb} +35 -48
  24. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_invoice_link_list_response.rb +253 -0
  25. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_invoice_link_search_response.rb +263 -0
  26. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_list_response.rb +253 -0
  27. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_rejection_status.rb +51 -0
  28. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_search_response.rb +263 -0
  29. data/lib/vrpayment-ruby-sdk/models/invoice_reconciliation_record_state.rb +53 -0
  30. data/lib/vrpayment-ruby-sdk/models/{express_checkout_wallet_type.rb → invoice_reconciliation_record_type.rb} +3 -3
  31. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement.rb +463 -0
  32. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement_list_response.rb +253 -0
  33. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement_search_response.rb +263 -0
  34. data/lib/vrpayment-ruby-sdk/models/invoice_reimbursement_state.rb +54 -0
  35. data/lib/vrpayment-ruby-sdk/models/{express_checkout_create_response.rb → payment_facilitator_pricing_profile_dto.rb} +16 -16
  36. data/lib/vrpayment-ruby-sdk/models/payment_facilitator_pricing_profile_state.rb +53 -0
  37. data/lib/vrpayment-ruby-sdk/models/{express_checkout_session.rb → payment_initiation_advice_file.rb} +60 -37
  38. data/lib/vrpayment-ruby-sdk/models/payment_initiation_advice_file_state.rb +55 -0
  39. data/lib/vrpayment-ruby-sdk/models/payment_terminal.rb +37 -1
  40. data/lib/vrpayment-ruby-sdk/models/payment_terminal_activation_status.rb +301 -0
  41. data/lib/vrpayment-ruby-sdk/models/payment_terminal_activation_status_detail_search_response.rb +263 -0
  42. data/lib/vrpayment-ruby-sdk/models/payment_terminal_address_create.rb +511 -0
  43. data/lib/vrpayment-ruby-sdk/models/{payment_terminal_create.rb → payment_terminal_creation_request.rb} +88 -62
  44. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location.rb +1 -0
  45. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_crud_model.rb +398 -0
  46. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_crud_model_rest_api_create.rb +359 -0
  47. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_list_response.rb +253 -0
  48. data/lib/vrpayment-ruby-sdk/models/payment_terminal_location_version_state.rb +2 -1
  49. data/lib/vrpayment-ruby-sdk/models/pricing_history_dto.rb +266 -0
  50. data/lib/vrpayment-ruby-sdk/models/product_metered_fee.rb +11 -1
  51. data/lib/vrpayment-ruby-sdk/models/product_metered_fee_update.rb +11 -1
  52. data/lib/vrpayment-ruby-sdk/models/refund.rb +13 -1
  53. data/lib/vrpayment-ruby-sdk/models/refund_create.rb +13 -1
  54. data/lib/vrpayment-ruby-sdk/models/{user_space_role.rb → rest_member.rb} +50 -37
  55. data/lib/vrpayment-ruby-sdk/models/result_portion_model.rb +263 -0
  56. data/lib/vrpayment-ruby-sdk/models/role.rb +13 -1
  57. data/lib/vrpayment-ruby-sdk/models/role_create.rb +13 -1
  58. data/lib/vrpayment-ruby-sdk/models/{abstract_payment_terminal_update.rb → role_ref.rb} +18 -27
  59. data/lib/vrpayment-ruby-sdk/models/role_update.rb +13 -1
  60. data/lib/vrpayment-ruby-sdk/models/scope.rb +28 -16
  61. data/lib/vrpayment-ruby-sdk/models/setter.rb +618 -0
  62. data/lib/vrpayment-ruby-sdk/models/{user_space_role_list_response.rb → state_list_response.rb} +4 -4
  63. data/lib/vrpayment-ruby-sdk/models/store_trial_subscription_request.rb +273 -0
  64. data/lib/vrpayment-ruby-sdk/models/store_trial_subscription_request_setter.rb +307 -0
  65. data/lib/vrpayment-ruby-sdk/models/submitted_analytics_query_execution.rb +342 -0
  66. data/lib/vrpayment-ruby-sdk/models/subscription_component_group_configuration_request.rb +249 -0
  67. data/lib/vrpayment-ruby-sdk/models/subscription_component_group_configuration_request_setter.rb +249 -0
  68. data/lib/vrpayment-ruby-sdk/models/subscription_product_dto.rb +239 -0
  69. data/lib/vrpayment-ruby-sdk/models/tokenized_card_data_create.rb +30 -1
  70. data/lib/vrpayment-ruby-sdk/models/transaction_completion.rb +13 -1
  71. data/lib/vrpayment-ruby-sdk/models/transaction_completion_details.rb +26 -4
  72. data/lib/vrpayment-ruby-sdk/models/transaction_overview.rb +1144 -0
  73. data/lib/vrpayment-ruby-sdk/models/transaction_projection.rb +1135 -0
  74. data/lib/vrpayment-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
  75. data/lib/vrpayment-ruby-sdk/models/walleejoin_admin_partner_configuration_request_dto.rb +360 -0
  76. data/lib/vrpayment-ruby-sdk/models/walleejoin_admin_partner_configuration_response_dto.rb +351 -0
  77. data/lib/vrpayment-ruby-sdk/models/walleejoin_admin_pricing_type.rb +51 -0
  78. data/lib/vrpayment-ruby-sdk/models/{user_account_role.rb → walleejoin_create_partnership_api_request_dto.rb} +34 -49
  79. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership.rb +357 -0
  80. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_create.rb +337 -0
  81. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_response_dto.rb +342 -0
  82. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_response_dto_list_response.rb +253 -0
  83. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_response_dto_search_response.rb +263 -0
  84. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_state.rb +51 -0
  85. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_type.rb +50 -0
  86. data/lib/vrpayment-ruby-sdk/models/walleejoin_partnership_update.rb +364 -0
  87. data/lib/vrpayment-ruby-sdk/models/wallet_type.rb +40 -1
  88. data/lib/vrpayment-ruby-sdk/models/web_ui_account_theme.rb +230 -0
  89. data/lib/vrpayment-ruby-sdk/service/accounts_service.rb +16 -9
  90. data/lib/vrpayment-ruby-sdk/service/analytics_queries_service.rb +613 -0
  91. data/lib/vrpayment-ruby-sdk/service/bank_accounts_service.rb +3 -3
  92. data/lib/vrpayment-ruby-sdk/service/bank_transactions_service.rb +3 -3
  93. data/lib/vrpayment-ruby-sdk/service/boarding_subscription_strategy_service.rb +181 -0
  94. data/lib/vrpayment-ruby-sdk/service/charge_attempts_service.rb +3 -3
  95. data/lib/vrpayment-ruby-sdk/service/charge_bank_transactions_service.rb +3 -3
  96. data/lib/vrpayment-ruby-sdk/service/charge_flow_levels_service.rb +4 -4
  97. data/lib/vrpayment-ruby-sdk/service/charge_flows_level_payment_links_service.rb +3 -3
  98. data/lib/vrpayment-ruby-sdk/service/charge_flows_service.rb +3 -3
  99. data/lib/vrpayment-ruby-sdk/service/consumed_resources_service.rb +1 -1
  100. data/lib/vrpayment-ruby-sdk/service/countries_service.rb +15 -6
  101. data/lib/vrpayment-ruby-sdk/service/currency_bank_accounts_service.rb +3 -3
  102. data/lib/vrpayment-ruby-sdk/service/customer_addresses_service.rb +7 -7
  103. data/lib/vrpayment-ruby-sdk/service/customer_comments_service.rb +8 -8
  104. data/lib/vrpayment-ruby-sdk/service/customers_service.rb +11 -11
  105. data/lib/vrpayment-ruby-sdk/service/delivery_indications_service.rb +5 -5
  106. data/lib/vrpayment-ruby-sdk/service/document_templates_service.rb +3 -3
  107. data/lib/vrpayment-ruby-sdk/service/dunning_case_levels_service.rb +291 -0
  108. data/lib/vrpayment-ruby-sdk/service/dunning_cases_service.rb +5 -5
  109. data/lib/vrpayment-ruby-sdk/service/dunning_flow_levels_service.rb +3 -3
  110. data/lib/vrpayment-ruby-sdk/service/dunning_flows_service.rb +3 -3
  111. data/lib/vrpayment-ruby-sdk/service/external_transfer_bank_transactions_service.rb +3 -3
  112. data/lib/vrpayment-ruby-sdk/service/internal_transfer_bank_transactions_service.rb +3 -3
  113. data/lib/vrpayment-ruby-sdk/service/invoice_reconciliation_record_invoice_links_service.rb +453 -0
  114. data/lib/vrpayment-ruby-sdk/service/invoice_reconciliation_records_service.rb +433 -0
  115. data/lib/vrpayment-ruby-sdk/service/invoice_reimbursements_service.rb +450 -0
  116. data/lib/vrpayment-ruby-sdk/service/join_admin_partner_configuration_service.rb +306 -0
  117. data/lib/vrpayment-ruby-sdk/service/join_partnership_service.rb +586 -0
  118. data/lib/vrpayment-ruby-sdk/service/manual_tasks_service.rb +5 -5
  119. data/lib/vrpayment-ruby-sdk/service/members_service.rb +215 -0
  120. data/lib/vrpayment-ruby-sdk/service/payment_connector_configurations_service.rb +6 -6
  121. data/lib/vrpayment-ruby-sdk/service/payment_links_service.rb +6 -6
  122. data/lib/vrpayment-ruby-sdk/service/payment_method_configurations_service.rb +6 -6
  123. data/lib/vrpayment-ruby-sdk/service/payment_processor_configurations_service.rb +85 -6
  124. data/lib/vrpayment-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +4 -4
  125. data/lib/vrpayment-ruby-sdk/service/payment_terminals_service.rb +475 -22
  126. data/lib/vrpayment-ruby-sdk/service/payment_web_apps_service.rb +11 -11
  127. data/lib/vrpayment-ruby-sdk/service/refund_bank_transactions_service.rb +3 -3
  128. data/lib/vrpayment-ruby-sdk/service/refund_comments_service.rb +8 -8
  129. data/lib/vrpayment-ruby-sdk/service/refund_recovery_bank_transactions_service.rb +3 -3
  130. data/lib/vrpayment-ruby-sdk/service/refunds_service.rb +7 -7
  131. data/lib/vrpayment-ruby-sdk/service/spaces_service.rb +10 -3
  132. data/lib/vrpayment-ruby-sdk/service/subscribers_service.rb +6 -6
  133. data/lib/vrpayment-ruby-sdk/service/subscription_affiliates_service.rb +6 -6
  134. data/lib/vrpayment-ruby-sdk/service/subscription_charges_service.rb +5 -5
  135. data/lib/vrpayment-ruby-sdk/service/subscription_ledger_entries_service.rb +4 -4
  136. data/lib/vrpayment-ruby-sdk/service/subscription_metric_usage_reports_service.rb +4 -4
  137. data/lib/vrpayment-ruby-sdk/service/subscription_metrics_service.rb +6 -6
  138. data/lib/vrpayment-ruby-sdk/service/subscription_period_bills_service.rb +4 -4
  139. data/lib/vrpayment-ruby-sdk/service/subscription_product_component_groups_service.rb +6 -6
  140. data/lib/vrpayment-ruby-sdk/service/subscription_product_components_service.rb +6 -6
  141. data/lib/vrpayment-ruby-sdk/service/subscription_product_metered_fee_tiers_service.rb +6 -6
  142. data/lib/vrpayment-ruby-sdk/service/subscription_product_metered_fees_service.rb +6 -6
  143. data/lib/vrpayment-ruby-sdk/service/subscription_product_period_fees_service.rb +6 -6
  144. data/lib/vrpayment-ruby-sdk/service/subscription_product_retirements_service.rb +3 -3
  145. data/lib/vrpayment-ruby-sdk/service/subscription_product_setup_fees_service.rb +6 -6
  146. data/lib/vrpayment-ruby-sdk/service/subscription_product_version_retirements_service.rb +3 -3
  147. data/lib/vrpayment-ruby-sdk/service/subscription_product_versions_service.rb +7 -7
  148. data/lib/vrpayment-ruby-sdk/service/subscription_products_service.rb +6 -6
  149. data/lib/vrpayment-ruby-sdk/service/subscription_suspensions_service.rb +3 -3
  150. data/lib/vrpayment-ruby-sdk/service/subscription_versions_service.rb +3 -3
  151. data/lib/vrpayment-ruby-sdk/service/subscriptions_service.rb +13 -13
  152. data/lib/vrpayment-ruby-sdk/service/terminal_locations_service.rb +276 -0
  153. data/lib/vrpayment-ruby-sdk/service/token_versions_service.rb +3 -3
  154. data/lib/vrpayment-ruby-sdk/service/tokens_service.rb +8 -8
  155. data/lib/vrpayment-ruby-sdk/service/transaction_client_platforms_service.rb +3 -3
  156. data/lib/vrpayment-ruby-sdk/service/transaction_comments_service.rb +8 -8
  157. data/lib/vrpayment-ruby-sdk/service/transaction_completions_service.rb +3 -3
  158. data/lib/vrpayment-ruby-sdk/service/transaction_invoice_comments_service.rb +8 -8
  159. data/lib/vrpayment-ruby-sdk/service/transaction_invoices_service.rb +86 -8
  160. data/lib/vrpayment-ruby-sdk/service/transaction_line_item_versions_service.rb +4 -4
  161. data/lib/vrpayment-ruby-sdk/service/transaction_voids_service.rb +3 -3
  162. data/lib/vrpayment-ruby-sdk/service/transactions_service.rb +179 -37
  163. data/lib/vrpayment-ruby-sdk/service/web_apps_service.rb +2 -2
  164. data/lib/vrpayment-ruby-sdk/service/web_ui_account_theme_service.rb +245 -0
  165. data/lib/vrpayment-ruby-sdk/service/webhook_listeners_service.rb +9 -9
  166. data/lib/vrpayment-ruby-sdk/service/webhook_urls_service.rb +9 -9
  167. data/lib/vrpayment-ruby-sdk/version.rb +1 -1
  168. data/lib/vrpayment-ruby-sdk.rb +76 -17
  169. data/test/test_querying.rb +11 -0
  170. metadata +78 -19
  171. data/lib/vrpayment-ruby-sdk/service/application_users_roles_service.rb +0 -478
  172. data/lib/vrpayment-ruby-sdk/service/express_checkout_service.rb +0 -107
  173. data/lib/vrpayment-ruby-sdk/service/human_users_roles_service.rb +0 -478
  174. data/lib/vrpayment-ruby-sdk/service/single_sign_on_users_roles_service.rb +0 -478
@@ -0,0 +1,403 @@
1
+ =begin
2
+ # VR Payment Ruby SDK
3
+ #
4
+ # This library allows to interact with the VR Payment payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.vr-payment.de
8
+ # Developer email: ecosystem-team@wallee.com
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ =end
22
+
23
+ require 'date'
24
+ require 'time'
25
+
26
+ module VrpaymentRubySdk
27
+ class DunningCaseLevel
28
+ attr_accessor :canceled_on
29
+
30
+ # The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.
31
+ attr_accessor :planned_purge_date
32
+
33
+ # The language that is linked to the object.
34
+ attr_accessor :language
35
+
36
+ # The date and time when the object was created.
37
+ attr_accessor :created_on
38
+
39
+ # The version is used for optimistic locking and incremented whenever the object is updated.
40
+ attr_accessor :version
41
+
42
+ attr_accessor :flow_level
43
+
44
+ # The ID of the space this object belongs to.
45
+ attr_accessor :linked_space_id
46
+
47
+ attr_accessor :timeout_on
48
+
49
+ attr_accessor :environment
50
+
51
+ attr_accessor :succeeded_on
52
+
53
+ # A unique identifier for the object.
54
+ attr_accessor :id
55
+
56
+ attr_accessor :invoice
57
+
58
+ attr_accessor :state
59
+
60
+ # The payment transaction this object is linked to.
61
+ attr_accessor :linked_transaction
62
+
63
+ attr_accessor :failed_on
64
+
65
+ attr_accessor :most_recent_level
66
+
67
+ attr_accessor :dunning_case
68
+
69
+ class EnumAttributeValidator
70
+ attr_reader :datatype
71
+ attr_reader :allowable_values
72
+
73
+ def initialize(datatype, allowable_values)
74
+ @allowable_values = allowable_values.map do |value|
75
+ case datatype.to_s
76
+ when /Integer/i
77
+ value.to_i
78
+ when /Float/i
79
+ value.to_f
80
+ else
81
+ value
82
+ end
83
+ end
84
+ end
85
+
86
+ def valid?(value)
87
+ !value || allowable_values.include?(value)
88
+ end
89
+ end
90
+
91
+ # Attribute mapping from ruby-style variable name to JSON key.
92
+ def self.attribute_map
93
+ {
94
+ :'canceled_on' => :'canceledOn',
95
+ :'planned_purge_date' => :'plannedPurgeDate',
96
+ :'language' => :'language',
97
+ :'created_on' => :'createdOn',
98
+ :'version' => :'version',
99
+ :'flow_level' => :'flowLevel',
100
+ :'linked_space_id' => :'linkedSpaceId',
101
+ :'timeout_on' => :'timeoutOn',
102
+ :'environment' => :'environment',
103
+ :'succeeded_on' => :'succeededOn',
104
+ :'id' => :'id',
105
+ :'invoice' => :'invoice',
106
+ :'state' => :'state',
107
+ :'linked_transaction' => :'linkedTransaction',
108
+ :'failed_on' => :'failedOn',
109
+ :'most_recent_level' => :'mostRecentLevel',
110
+ :'dunning_case' => :'dunningCase'
111
+ }
112
+ end
113
+
114
+ # Returns attribute mapping this model knows about
115
+ def self.acceptable_attribute_map
116
+ attribute_map
117
+ end
118
+
119
+ # Returns all the JSON keys this model knows about
120
+ def self.acceptable_attributes
121
+ acceptable_attribute_map.values
122
+ end
123
+
124
+ # Attribute type mapping.
125
+ def self.openapi_types
126
+ {
127
+ :'canceled_on' => :'Time',
128
+ :'planned_purge_date' => :'Time',
129
+ :'language' => :'String',
130
+ :'created_on' => :'Time',
131
+ :'version' => :'Integer',
132
+ :'flow_level' => :'Integer',
133
+ :'linked_space_id' => :'Integer',
134
+ :'timeout_on' => :'Time',
135
+ :'environment' => :'Environment',
136
+ :'succeeded_on' => :'Time',
137
+ :'id' => :'Integer',
138
+ :'invoice' => :'Integer',
139
+ :'state' => :'DunningCaseLevelState',
140
+ :'linked_transaction' => :'Integer',
141
+ :'failed_on' => :'Time',
142
+ :'most_recent_level' => :'Boolean',
143
+ :'dunning_case' => :'DunningCase'
144
+ }
145
+ end
146
+
147
+ # List of attributes with nullable: true
148
+ def self.openapi_nullable
149
+ Set.new([
150
+ ])
151
+ end
152
+
153
+ # Initializes the object
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ def initialize(attributes = {})
156
+ if (!attributes.is_a?(Hash))
157
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::DunningCaseLevel` initialize method"
158
+ end
159
+
160
+ # check to see if the attribute exists and convert string to symbol for hash key
161
+ acceptable_attribute_map = self.class.acceptable_attribute_map
162
+ attributes = attributes.each_with_object({}) { |(k, v), h|
163
+ if (!acceptable_attribute_map.key?(k.to_sym))
164
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::DunningCaseLevel`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
165
+ end
166
+ h[k.to_sym] = v
167
+ }
168
+
169
+ if attributes.key?(:'canceled_on')
170
+ self.canceled_on = attributes[:'canceled_on']
171
+ end
172
+
173
+ if attributes.key?(:'planned_purge_date')
174
+ self.planned_purge_date = attributes[:'planned_purge_date']
175
+ end
176
+
177
+ if attributes.key?(:'language')
178
+ self.language = attributes[:'language']
179
+ end
180
+
181
+ if attributes.key?(:'created_on')
182
+ self.created_on = attributes[:'created_on']
183
+ end
184
+
185
+ if attributes.key?(:'version')
186
+ self.version = attributes[:'version']
187
+ end
188
+
189
+ if attributes.key?(:'flow_level')
190
+ self.flow_level = attributes[:'flow_level']
191
+ end
192
+
193
+ if attributes.key?(:'linked_space_id')
194
+ self.linked_space_id = attributes[:'linked_space_id']
195
+ end
196
+
197
+ if attributes.key?(:'timeout_on')
198
+ self.timeout_on = attributes[:'timeout_on']
199
+ end
200
+
201
+ if attributes.key?(:'environment')
202
+ self.environment = attributes[:'environment']
203
+ end
204
+
205
+ if attributes.key?(:'succeeded_on')
206
+ self.succeeded_on = attributes[:'succeeded_on']
207
+ end
208
+
209
+ if attributes.key?(:'id')
210
+ self.id = attributes[:'id']
211
+ end
212
+
213
+ if attributes.key?(:'invoice')
214
+ self.invoice = attributes[:'invoice']
215
+ end
216
+
217
+ if attributes.key?(:'state')
218
+ self.state = attributes[:'state']
219
+ end
220
+
221
+ if attributes.key?(:'linked_transaction')
222
+ self.linked_transaction = attributes[:'linked_transaction']
223
+ end
224
+
225
+ if attributes.key?(:'failed_on')
226
+ self.failed_on = attributes[:'failed_on']
227
+ end
228
+
229
+ if attributes.key?(:'most_recent_level')
230
+ self.most_recent_level = attributes[:'most_recent_level']
231
+ end
232
+
233
+ if attributes.key?(:'dunning_case')
234
+ self.dunning_case = attributes[:'dunning_case']
235
+ end
236
+ end
237
+
238
+ # Show invalid properties with the reasons. Usually used together with valid?
239
+ # @return Array for valid properties with the reasons
240
+ def list_invalid_properties
241
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
242
+ invalid_properties = Array.new
243
+ invalid_properties
244
+ end
245
+
246
+ # Check to see if the all the properties in the model are valid
247
+ # @return true if the model is valid
248
+ def valid?
249
+ warn '[DEPRECATED] the `valid?` method is obsolete'
250
+ true
251
+ end
252
+
253
+ # Checks equality by comparing each attribute.
254
+ # @param [Object] Object to be compared
255
+ def ==(o)
256
+ return true if self.equal?(o)
257
+ self.class == o.class &&
258
+ canceled_on == o.canceled_on &&
259
+ planned_purge_date == o.planned_purge_date &&
260
+ language == o.language &&
261
+ created_on == o.created_on &&
262
+ version == o.version &&
263
+ flow_level == o.flow_level &&
264
+ linked_space_id == o.linked_space_id &&
265
+ timeout_on == o.timeout_on &&
266
+ environment == o.environment &&
267
+ succeeded_on == o.succeeded_on &&
268
+ id == o.id &&
269
+ invoice == o.invoice &&
270
+ state == o.state &&
271
+ linked_transaction == o.linked_transaction &&
272
+ failed_on == o.failed_on &&
273
+ most_recent_level == o.most_recent_level &&
274
+ dunning_case == o.dunning_case
275
+ end
276
+
277
+ # @see the `==` method
278
+ # @param [Object] Object to be compared
279
+ def eql?(o)
280
+ self == o
281
+ end
282
+
283
+ # Calculates hash code according to all attributes.
284
+ # @return [Integer] Hash code
285
+ def hash
286
+ [canceled_on, planned_purge_date, language, created_on, version, flow_level, linked_space_id, timeout_on, environment, succeeded_on, id, invoice, state, linked_transaction, failed_on, most_recent_level, dunning_case].hash
287
+ end
288
+
289
+ # Builds the object from hash
290
+ # @param [Hash] attributes Model attributes in the form of hash
291
+ # @return [Object] Returns the model itself
292
+ def self.build_from_hash(attributes)
293
+ return nil unless attributes.is_a?(Hash)
294
+ attributes = attributes.transform_keys(&:to_sym)
295
+ transformed_hash = {}
296
+ openapi_types.each_pair do |key, type|
297
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
298
+ transformed_hash["#{key}"] = nil
299
+ elsif type =~ /\AArray<(.*)>/i
300
+ # check to ensure the input is an array given that the attribute
301
+ # is documented as an array but the input is not
302
+ if attributes[attribute_map[key]].is_a?(Array)
303
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
304
+ end
305
+ elsif !attributes[attribute_map[key]].nil?
306
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
307
+ end
308
+ end
309
+ new(transformed_hash)
310
+ end
311
+
312
+ # Deserializes the data based on type
313
+ # @param string type Data type
314
+ # @param string value Value to be deserialized
315
+ # @return [Object] Deserialized data
316
+ def self._deserialize(type, value)
317
+ case type.to_sym
318
+ when :Time
319
+ Time.parse(value)
320
+ when :Date
321
+ Date.parse(value)
322
+ when :String
323
+ value.to_s
324
+ when :Integer
325
+ value.to_i
326
+ when :Float
327
+ value.to_f
328
+ when :Boolean
329
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
330
+ true
331
+ else
332
+ false
333
+ end
334
+ when :Object
335
+ # generic object (usually a Hash), return directly
336
+ value
337
+ when /\AArray<(?<inner_type>.+)>\z/
338
+ inner_type = Regexp.last_match[:inner_type]
339
+ value.map { |v| _deserialize(inner_type, v) }
340
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
341
+ k_type = Regexp.last_match[:k_type]
342
+ v_type = Regexp.last_match[:v_type]
343
+ {}.tap do |hash|
344
+ value.each do |k, v|
345
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
346
+ end
347
+ end
348
+ else # model
349
+ # models (e.g. Pet) or oneOf
350
+ klass = VrpaymentRubySdk.const_get(type)
351
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
352
+ end
353
+ end
354
+
355
+ # Returns the string representation of the object
356
+ # @return [String] String presentation of the object
357
+ def to_s
358
+ to_hash.to_s
359
+ end
360
+
361
+ # to_body is an alias to to_hash (backward compatibility)
362
+ # @return [Hash] Returns the object in the form of hash
363
+ def to_body
364
+ to_hash
365
+ end
366
+
367
+ # Returns the object in the form of hash
368
+ # @return [Hash] Returns the object in the form of hash
369
+ def to_hash
370
+ hash = {}
371
+ self.class.attribute_map.each_pair do |attr, param|
372
+ value = self.send(attr)
373
+ if value.nil?
374
+ is_nullable = self.class.openapi_nullable.include?(attr)
375
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
376
+ end
377
+
378
+ hash[param] = _to_hash(value)
379
+ end
380
+ hash
381
+ end
382
+
383
+ # Outputs non-array value in the form of hash
384
+ # For object, use to_hash. Otherwise, just return the value
385
+ # @param [Object] value Any valid value
386
+ # @return [Hash] Returns the value in the form of hash
387
+ def _to_hash(value)
388
+ if value.is_a?(Array)
389
+ value.compact.map { |v| _to_hash(v) }
390
+ elsif value.is_a?(Hash)
391
+ {}.tap do |hash|
392
+ value.each { |k, v| hash[k] = _to_hash(v) }
393
+ end
394
+ elsif value.respond_to? :to_hash
395
+ value.to_hash
396
+ else
397
+ value
398
+ end
399
+ end
400
+
401
+ end
402
+
403
+ end
@@ -24,7 +24,7 @@ require 'date'
24
24
  require 'time'
25
25
 
26
26
  module VrpaymentRubySdk
27
- class UserAccountRoleListResponse
27
+ class DunningCaseLevelListResponse
28
28
  # An array containing the actual response objects.
29
29
  attr_accessor :data
30
30
 
@@ -56,7 +56,7 @@ module VrpaymentRubySdk
56
56
  # Attribute type mapping.
57
57
  def self.openapi_types
58
58
  {
59
- :'data' => :'Array<UserAccountRole>',
59
+ :'data' => :'Array<DunningCaseLevel>',
60
60
  :'has_more' => :'Boolean',
61
61
  :'limit' => :'Integer'
62
62
  }
@@ -72,14 +72,14 @@ module VrpaymentRubySdk
72
72
  # @param [Hash] attributes Model attributes in the form of hash
73
73
  def initialize(attributes = {})
74
74
  if (!attributes.is_a?(Hash))
75
- fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::UserAccountRoleListResponse` initialize method"
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::DunningCaseLevelListResponse` initialize method"
76
76
  end
77
77
 
78
78
  # check to see if the attribute exists and convert string to symbol for hash key
79
79
  acceptable_attribute_map = self.class.acceptable_attribute_map
80
80
  attributes = attributes.each_with_object({}) { |(k, v), h|
81
81
  if (!acceptable_attribute_map.key?(k.to_sym))
82
- fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::UserAccountRoleListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::DunningCaseLevelListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
83
  end
84
84
  h[k.to_sym] = v
85
85
  }
@@ -0,0 +1,263 @@
1
+ =begin
2
+ # VR Payment Ruby SDK
3
+ #
4
+ # This library allows to interact with the VR Payment payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://www.vr-payment.de
8
+ # Developer email: ecosystem-team@wallee.com
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ =end
22
+
23
+ require 'date'
24
+ require 'time'
25
+
26
+ module VrpaymentRubySdk
27
+ class DunningCaseLevelSearchResponse
28
+ # An array containing the actual response objects.
29
+ attr_accessor :data
30
+
31
+ # The number of skipped objects.
32
+ attr_accessor :offset
33
+
34
+ # Whether there are more objects available after this set. If false, there are no more objects to retrieve.
35
+ attr_accessor :has_more
36
+
37
+ # The applied limit on the number of objects returned.
38
+ attr_accessor :limit
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'data' => :'data',
44
+ :'offset' => :'offset',
45
+ :'has_more' => :'hasMore',
46
+ :'limit' => :'limit'
47
+ }
48
+ end
49
+
50
+ # Returns attribute mapping this model knows about
51
+ def self.acceptable_attribute_map
52
+ attribute_map
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ acceptable_attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'data' => :'Array<DunningCaseLevel>',
64
+ :'offset' => :'Integer',
65
+ :'has_more' => :'Boolean',
66
+ :'limit' => :'Integer'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::DunningCaseLevelSearchResponse` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::DunningCaseLevelSearchResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'data')
93
+ if (value = attributes[:'data']).is_a?(Array)
94
+ self.data = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'offset')
99
+ self.offset = attributes[:'offset']
100
+ end
101
+
102
+ if attributes.key?(:'has_more')
103
+ self.has_more = attributes[:'has_more']
104
+ end
105
+
106
+ if attributes.key?(:'limit')
107
+ self.limit = attributes[:'limit']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
+ true
124
+ end
125
+
126
+ # Checks equality by comparing each attribute.
127
+ # @param [Object] Object to be compared
128
+ def ==(o)
129
+ return true if self.equal?(o)
130
+ self.class == o.class &&
131
+ data == o.data &&
132
+ offset == o.offset &&
133
+ has_more == o.has_more &&
134
+ limit == o.limit
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [data, offset, has_more, limit].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ transformed_hash = {}
156
+ openapi_types.each_pair do |key, type|
157
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
158
+ transformed_hash["#{key}"] = nil
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[attribute_map[key]].is_a?(Array)
163
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
164
+ end
165
+ elsif !attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
167
+ end
168
+ end
169
+ new(transformed_hash)
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def self._deserialize(type, value)
177
+ case type.to_sym
178
+ when :Time
179
+ Time.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ # models (e.g. Pet) or oneOf
210
+ klass = VrpaymentRubySdk.const_get(type)
211
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
+ end
213
+ end
214
+
215
+ # Returns the string representation of the object
216
+ # @return [String] String presentation of the object
217
+ def to_s
218
+ to_hash.to_s
219
+ end
220
+
221
+ # to_body is an alias to to_hash (backward compatibility)
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_body
224
+ to_hash
225
+ end
226
+
227
+ # Returns the object in the form of hash
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_hash
230
+ hash = {}
231
+ self.class.attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+
261
+ end
262
+
263
+ end