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,342 @@
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 SubmittedAnalyticsQueryExecution
28
+ # The external id associated with this query, if any.
29
+ attr_accessor :query_external_id
30
+
31
+ # The ID of the target account for which the analytics query will be executed, determining the data scope for the request.
32
+ attr_accessor :account_id
33
+
34
+ # The total execution time, in milliseconds, that has been billed for the query.
35
+ attr_accessor :total_billed_execution_time_ms
36
+
37
+ # The date and time when the query was created.
38
+ attr_accessor :created_timestamp
39
+
40
+ # The number of times the query result file has been downloaded.
41
+ attr_accessor :download_requests
42
+
43
+ # The SQL query as originally submitted by the user.
44
+ attr_accessor :original_query
45
+
46
+ # The total bytes of data scanned by the submitted query.
47
+ attr_accessor :scanned_bytes
48
+
49
+ # The unique query token associated with the analytics query execution.
50
+ attr_accessor :portal_query_token
51
+
52
+ # The size, in bytes, of the result file generated by the query.
53
+ attr_accessor :result_file_bytes
54
+
55
+ attr_accessor :status
56
+
57
+ class EnumAttributeValidator
58
+ attr_reader :datatype
59
+ attr_reader :allowable_values
60
+
61
+ def initialize(datatype, allowable_values)
62
+ @allowable_values = allowable_values.map do |value|
63
+ case datatype.to_s
64
+ when /Integer/i
65
+ value.to_i
66
+ when /Float/i
67
+ value.to_f
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+
74
+ def valid?(value)
75
+ !value || allowable_values.include?(value)
76
+ end
77
+ end
78
+
79
+ # Attribute mapping from ruby-style variable name to JSON key.
80
+ def self.attribute_map
81
+ {
82
+ :'query_external_id' => :'queryExternalId',
83
+ :'account_id' => :'accountId',
84
+ :'total_billed_execution_time_ms' => :'totalBilledExecutionTimeMs',
85
+ :'created_timestamp' => :'createdTimestamp',
86
+ :'download_requests' => :'downloadRequests',
87
+ :'original_query' => :'originalQuery',
88
+ :'scanned_bytes' => :'scannedBytes',
89
+ :'portal_query_token' => :'portalQueryToken',
90
+ :'result_file_bytes' => :'resultFileBytes',
91
+ :'status' => :'status'
92
+ }
93
+ end
94
+
95
+ # Returns attribute mapping this model knows about
96
+ def self.acceptable_attribute_map
97
+ attribute_map
98
+ end
99
+
100
+ # Returns all the JSON keys this model knows about
101
+ def self.acceptable_attributes
102
+ acceptable_attribute_map.values
103
+ end
104
+
105
+ # Attribute type mapping.
106
+ def self.openapi_types
107
+ {
108
+ :'query_external_id' => :'String',
109
+ :'account_id' => :'Integer',
110
+ :'total_billed_execution_time_ms' => :'Integer',
111
+ :'created_timestamp' => :'Time',
112
+ :'download_requests' => :'Integer',
113
+ :'original_query' => :'String',
114
+ :'scanned_bytes' => :'Integer',
115
+ :'portal_query_token' => :'String',
116
+ :'result_file_bytes' => :'Integer',
117
+ :'status' => :'FacadeUserFriendlyQueryStatusModel'
118
+ }
119
+ end
120
+
121
+ # List of attributes with nullable: true
122
+ def self.openapi_nullable
123
+ Set.new([
124
+ ])
125
+ end
126
+
127
+ # Initializes the object
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ def initialize(attributes = {})
130
+ if (!attributes.is_a?(Hash))
131
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::SubmittedAnalyticsQueryExecution` initialize method"
132
+ end
133
+
134
+ # check to see if the attribute exists and convert string to symbol for hash key
135
+ acceptable_attribute_map = self.class.acceptable_attribute_map
136
+ attributes = attributes.each_with_object({}) { |(k, v), h|
137
+ if (!acceptable_attribute_map.key?(k.to_sym))
138
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::SubmittedAnalyticsQueryExecution`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
139
+ end
140
+ h[k.to_sym] = v
141
+ }
142
+
143
+ if attributes.key?(:'query_external_id')
144
+ self.query_external_id = attributes[:'query_external_id']
145
+ end
146
+
147
+ if attributes.key?(:'account_id')
148
+ self.account_id = attributes[:'account_id']
149
+ end
150
+
151
+ if attributes.key?(:'total_billed_execution_time_ms')
152
+ self.total_billed_execution_time_ms = attributes[:'total_billed_execution_time_ms']
153
+ end
154
+
155
+ if attributes.key?(:'created_timestamp')
156
+ self.created_timestamp = attributes[:'created_timestamp']
157
+ end
158
+
159
+ if attributes.key?(:'download_requests')
160
+ self.download_requests = attributes[:'download_requests']
161
+ end
162
+
163
+ if attributes.key?(:'original_query')
164
+ self.original_query = attributes[:'original_query']
165
+ end
166
+
167
+ if attributes.key?(:'scanned_bytes')
168
+ self.scanned_bytes = attributes[:'scanned_bytes']
169
+ end
170
+
171
+ if attributes.key?(:'portal_query_token')
172
+ self.portal_query_token = attributes[:'portal_query_token']
173
+ end
174
+
175
+ if attributes.key?(:'result_file_bytes')
176
+ self.result_file_bytes = attributes[:'result_file_bytes']
177
+ end
178
+
179
+ if attributes.key?(:'status')
180
+ self.status = attributes[:'status']
181
+ end
182
+ end
183
+
184
+ # Show invalid properties with the reasons. Usually used together with valid?
185
+ # @return Array for valid properties with the reasons
186
+ def list_invalid_properties
187
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
188
+ invalid_properties = Array.new
189
+ invalid_properties
190
+ end
191
+
192
+ # Check to see if the all the properties in the model are valid
193
+ # @return true if the model is valid
194
+ def valid?
195
+ warn '[DEPRECATED] the `valid?` method is obsolete'
196
+ true
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ query_external_id == o.query_external_id &&
205
+ account_id == o.account_id &&
206
+ total_billed_execution_time_ms == o.total_billed_execution_time_ms &&
207
+ created_timestamp == o.created_timestamp &&
208
+ download_requests == o.download_requests &&
209
+ original_query == o.original_query &&
210
+ scanned_bytes == o.scanned_bytes &&
211
+ portal_query_token == o.portal_query_token &&
212
+ result_file_bytes == o.result_file_bytes &&
213
+ status == o.status
214
+ end
215
+
216
+ # @see the `==` method
217
+ # @param [Object] Object to be compared
218
+ def eql?(o)
219
+ self == o
220
+ end
221
+
222
+ # Calculates hash code according to all attributes.
223
+ # @return [Integer] Hash code
224
+ def hash
225
+ [query_external_id, account_id, total_billed_execution_time_ms, created_timestamp, download_requests, original_query, scanned_bytes, portal_query_token, result_file_bytes, status].hash
226
+ end
227
+
228
+ # Builds the object from hash
229
+ # @param [Hash] attributes Model attributes in the form of hash
230
+ # @return [Object] Returns the model itself
231
+ def self.build_from_hash(attributes)
232
+ return nil unless attributes.is_a?(Hash)
233
+ attributes = attributes.transform_keys(&:to_sym)
234
+ transformed_hash = {}
235
+ openapi_types.each_pair do |key, type|
236
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
237
+ transformed_hash["#{key}"] = nil
238
+ elsif type =~ /\AArray<(.*)>/i
239
+ # check to ensure the input is an array given that the attribute
240
+ # is documented as an array but the input is not
241
+ if attributes[attribute_map[key]].is_a?(Array)
242
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
243
+ end
244
+ elsif !attributes[attribute_map[key]].nil?
245
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
246
+ end
247
+ end
248
+ new(transformed_hash)
249
+ end
250
+
251
+ # Deserializes the data based on type
252
+ # @param string type Data type
253
+ # @param string value Value to be deserialized
254
+ # @return [Object] Deserialized data
255
+ def self._deserialize(type, value)
256
+ case type.to_sym
257
+ when :Time
258
+ Time.parse(value)
259
+ when :Date
260
+ Date.parse(value)
261
+ when :String
262
+ value.to_s
263
+ when :Integer
264
+ value.to_i
265
+ when :Float
266
+ value.to_f
267
+ when :Boolean
268
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
269
+ true
270
+ else
271
+ false
272
+ end
273
+ when :Object
274
+ # generic object (usually a Hash), return directly
275
+ value
276
+ when /\AArray<(?<inner_type>.+)>\z/
277
+ inner_type = Regexp.last_match[:inner_type]
278
+ value.map { |v| _deserialize(inner_type, v) }
279
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
280
+ k_type = Regexp.last_match[:k_type]
281
+ v_type = Regexp.last_match[:v_type]
282
+ {}.tap do |hash|
283
+ value.each do |k, v|
284
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
285
+ end
286
+ end
287
+ else # model
288
+ # models (e.g. Pet) or oneOf
289
+ klass = VrpaymentRubySdk.const_get(type)
290
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
291
+ end
292
+ end
293
+
294
+ # Returns the string representation of the object
295
+ # @return [String] String presentation of the object
296
+ def to_s
297
+ to_hash.to_s
298
+ end
299
+
300
+ # to_body is an alias to to_hash (backward compatibility)
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_body
303
+ to_hash
304
+ end
305
+
306
+ # Returns the object in the form of hash
307
+ # @return [Hash] Returns the object in the form of hash
308
+ def to_hash
309
+ hash = {}
310
+ self.class.attribute_map.each_pair do |attr, param|
311
+ value = self.send(attr)
312
+ if value.nil?
313
+ is_nullable = self.class.openapi_nullable.include?(attr)
314
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
315
+ end
316
+
317
+ hash[param] = _to_hash(value)
318
+ end
319
+ hash
320
+ end
321
+
322
+ # Outputs non-array value in the form of hash
323
+ # For object, use to_hash. Otherwise, just return the value
324
+ # @param [Object] value Any valid value
325
+ # @return [Hash] Returns the value in the form of hash
326
+ def _to_hash(value)
327
+ if value.is_a?(Array)
328
+ value.compact.map { |v| _to_hash(v) }
329
+ elsif value.is_a?(Hash)
330
+ {}.tap do |hash|
331
+ value.each { |k, v| hash[k] = _to_hash(v) }
332
+ end
333
+ elsif value.respond_to? :to_hash
334
+ value.to_hash
335
+ else
336
+ value
337
+ end
338
+ end
339
+
340
+ end
341
+
342
+ end
@@ -0,0 +1,249 @@
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
+ # Model used to configure the Subscription Product to be assigned to the Account
28
+ class SubscriptionComponentGroupConfigurationRequest
29
+ attr_accessor :quantity
30
+
31
+ attr_accessor :subscription_product_component_group_id
32
+
33
+ attr_accessor :subscription_product_component_reference_id
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'quantity' => :'quantity',
39
+ :'subscription_product_component_group_id' => :'subscriptionProductComponentGroupId',
40
+ :'subscription_product_component_reference_id' => :'subscriptionProductComponentReferenceId'
41
+ }
42
+ end
43
+
44
+ # Returns attribute mapping this model knows about
45
+ def self.acceptable_attribute_map
46
+ attribute_map
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ acceptable_attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'quantity' => :'Float',
58
+ :'subscription_product_component_group_id' => :'Integer',
59
+ :'subscription_product_component_reference_id' => :'Integer'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::SubscriptionComponentGroupConfigurationRequest` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ acceptable_attribute_map = self.class.acceptable_attribute_map
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!acceptable_attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::SubscriptionComponentGroupConfigurationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'quantity')
86
+ self.quantity = attributes[:'quantity']
87
+ end
88
+
89
+ if attributes.key?(:'subscription_product_component_group_id')
90
+ self.subscription_product_component_group_id = attributes[:'subscription_product_component_group_id']
91
+ end
92
+
93
+ if attributes.key?(:'subscription_product_component_reference_id')
94
+ self.subscription_product_component_reference_id = attributes[:'subscription_product_component_reference_id']
95
+ end
96
+ end
97
+
98
+ # Show invalid properties with the reasons. Usually used together with valid?
99
+ # @return Array for valid properties with the reasons
100
+ def list_invalid_properties
101
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ warn '[DEPRECATED] the `valid?` method is obsolete'
110
+ true
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ quantity == o.quantity &&
119
+ subscription_product_component_group_id == o.subscription_product_component_group_id &&
120
+ subscription_product_component_reference_id == o.subscription_product_component_reference_id
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [quantity, subscription_product_component_group_id, subscription_product_component_reference_id].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ return nil unless attributes.is_a?(Hash)
140
+ attributes = attributes.transform_keys(&:to_sym)
141
+ transformed_hash = {}
142
+ openapi_types.each_pair do |key, type|
143
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[attribute_map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[attribute_map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def self._deserialize(type, value)
163
+ case type.to_sym
164
+ when :Time
165
+ Time.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :Boolean
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = VrpaymentRubySdk.const_get(type)
197
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.openapi_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end