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
@@ -24,38 +24,31 @@ require 'date'
24
24
  require 'time'
25
25
 
26
26
  module VrpaymentRubySdk
27
- class ExpressCheckoutShippingOption
28
- # Total cost of this shipping option.
29
- attr_accessor :amount
27
+ class InvoiceReconciliationRecordInvoiceLink
28
+ # The ID of the space this object belongs to.
29
+ attr_accessor :linked_space_id
30
30
 
31
- # Description of the option
32
- attr_accessor :description
31
+ attr_accessor :amount
33
32
 
34
- # Currency of the option
35
- attr_accessor :currency
33
+ attr_accessor :record
36
34
 
37
- # Identifier of the option.
35
+ # A unique identifier for the object.
38
36
  attr_accessor :id
39
37
 
40
- # Label of the option.
41
- attr_accessor :label
42
-
43
- # Amount related to taxes.
44
- attr_accessor :tax_amount
38
+ attr_accessor :invoice
45
39
 
46
- # Whether it was the option selected by the customer.
47
- attr_accessor :selected
40
+ # The date and time when the object was created.
41
+ attr_accessor :created_on
48
42
 
49
43
  # Attribute mapping from ruby-style variable name to JSON key.
50
44
  def self.attribute_map
51
45
  {
46
+ :'linked_space_id' => :'linkedSpaceId',
52
47
  :'amount' => :'amount',
53
- :'description' => :'description',
54
- :'currency' => :'currency',
48
+ :'record' => :'record',
55
49
  :'id' => :'id',
56
- :'label' => :'label',
57
- :'tax_amount' => :'taxAmount',
58
- :'selected' => :'selected'
50
+ :'invoice' => :'invoice',
51
+ :'created_on' => :'createdOn'
59
52
  }
60
53
  end
61
54
 
@@ -72,13 +65,12 @@ module VrpaymentRubySdk
72
65
  # Attribute type mapping.
73
66
  def self.openapi_types
74
67
  {
68
+ :'linked_space_id' => :'Integer',
75
69
  :'amount' => :'Float',
76
- :'description' => :'String',
77
- :'currency' => :'String',
78
- :'id' => :'String',
79
- :'label' => :'String',
80
- :'tax_amount' => :'Float',
81
- :'selected' => :'Boolean'
70
+ :'record' => :'InvoiceReconciliationRecord',
71
+ :'id' => :'Integer',
72
+ :'invoice' => :'TransactionInvoice',
73
+ :'created_on' => :'Time'
82
74
  }
83
75
  end
84
76
 
@@ -92,44 +84,40 @@ module VrpaymentRubySdk
92
84
  # @param [Hash] attributes Model attributes in the form of hash
93
85
  def initialize(attributes = {})
94
86
  if (!attributes.is_a?(Hash))
95
- fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::ExpressCheckoutShippingOption` initialize method"
87
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::InvoiceReconciliationRecordInvoiceLink` initialize method"
96
88
  end
97
89
 
98
90
  # check to see if the attribute exists and convert string to symbol for hash key
99
91
  acceptable_attribute_map = self.class.acceptable_attribute_map
100
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
101
93
  if (!acceptable_attribute_map.key?(k.to_sym))
102
- fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::ExpressCheckoutShippingOption`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::InvoiceReconciliationRecordInvoiceLink`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
103
95
  end
104
96
  h[k.to_sym] = v
105
97
  }
106
98
 
107
- if attributes.key?(:'amount')
108
- self.amount = attributes[:'amount']
99
+ if attributes.key?(:'linked_space_id')
100
+ self.linked_space_id = attributes[:'linked_space_id']
109
101
  end
110
102
 
111
- if attributes.key?(:'description')
112
- self.description = attributes[:'description']
103
+ if attributes.key?(:'amount')
104
+ self.amount = attributes[:'amount']
113
105
  end
114
106
 
115
- if attributes.key?(:'currency')
116
- self.currency = attributes[:'currency']
107
+ if attributes.key?(:'record')
108
+ self.record = attributes[:'record']
117
109
  end
118
110
 
119
111
  if attributes.key?(:'id')
120
112
  self.id = attributes[:'id']
121
113
  end
122
114
 
123
- if attributes.key?(:'label')
124
- self.label = attributes[:'label']
125
- end
126
-
127
- if attributes.key?(:'tax_amount')
128
- self.tax_amount = attributes[:'tax_amount']
115
+ if attributes.key?(:'invoice')
116
+ self.invoice = attributes[:'invoice']
129
117
  end
130
118
 
131
- if attributes.key?(:'selected')
132
- self.selected = attributes[:'selected']
119
+ if attributes.key?(:'created_on')
120
+ self.created_on = attributes[:'created_on']
133
121
  end
134
122
  end
135
123
 
@@ -153,13 +141,12 @@ module VrpaymentRubySdk
153
141
  def ==(o)
154
142
  return true if self.equal?(o)
155
143
  self.class == o.class &&
144
+ linked_space_id == o.linked_space_id &&
156
145
  amount == o.amount &&
157
- description == o.description &&
158
- currency == o.currency &&
146
+ record == o.record &&
159
147
  id == o.id &&
160
- label == o.label &&
161
- tax_amount == o.tax_amount &&
162
- selected == o.selected
148
+ invoice == o.invoice &&
149
+ created_on == o.created_on
163
150
  end
164
151
 
165
152
  # @see the `==` method
@@ -171,7 +158,7 @@ module VrpaymentRubySdk
171
158
  # Calculates hash code according to all attributes.
172
159
  # @return [Integer] Hash code
173
160
  def hash
174
- [amount, description, currency, id, label, tax_amount, selected].hash
161
+ [linked_space_id, amount, record, id, invoice, created_on].hash
175
162
  end
176
163
 
177
164
  # Builds the object from hash
@@ -0,0 +1,253 @@
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 InvoiceReconciliationRecordInvoiceLinkListResponse
28
+ # An array containing the actual response objects.
29
+ attr_accessor :data
30
+
31
+ # Whether there are more objects available after this set. If false, there are no more objects to retrieve.
32
+ attr_accessor :has_more
33
+
34
+ # The applied limit on the number of objects returned.
35
+ attr_accessor :limit
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'data' => :'data',
41
+ :'has_more' => :'hasMore',
42
+ :'limit' => :'limit'
43
+ }
44
+ end
45
+
46
+ # Returns attribute mapping this model knows about
47
+ def self.acceptable_attribute_map
48
+ attribute_map
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ acceptable_attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'data' => :'Array<InvoiceReconciliationRecordInvoiceLink>',
60
+ :'has_more' => :'Boolean',
61
+ :'limit' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VrpaymentRubySdk::InvoiceReconciliationRecordInvoiceLinkListResponse` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VrpaymentRubySdk::InvoiceReconciliationRecordInvoiceLinkListResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'data')
88
+ if (value = attributes[:'data']).is_a?(Array)
89
+ self.data = value
90
+ end
91
+ end
92
+
93
+ if attributes.key?(:'has_more')
94
+ self.has_more = attributes[:'has_more']
95
+ end
96
+
97
+ if attributes.key?(:'limit')
98
+ self.limit = attributes[:'limit']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
106
+ invalid_properties = Array.new
107
+ invalid_properties
108
+ end
109
+
110
+ # Check to see if the all the properties in the model are valid
111
+ # @return true if the model is valid
112
+ def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ data == o.data &&
123
+ has_more == o.has_more &&
124
+ limit == o.limit
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [data, has_more, limit].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ attributes = attributes.transform_keys(&:to_sym)
145
+ transformed_hash = {}
146
+ openapi_types.each_pair do |key, type|
147
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
148
+ transformed_hash["#{key}"] = nil
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[attribute_map[key]].is_a?(Array)
153
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
+ end
155
+ elsif !attributes[attribute_map[key]].nil?
156
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
+ end
158
+ end
159
+ new(transformed_hash)
160
+ end
161
+
162
+ # Deserializes the data based on type
163
+ # @param string type Data type
164
+ # @param string value Value to be deserialized
165
+ # @return [Object] Deserialized data
166
+ def self._deserialize(type, value)
167
+ case type.to_sym
168
+ when :Time
169
+ Time.parse(value)
170
+ when :Date
171
+ Date.parse(value)
172
+ when :String
173
+ value.to_s
174
+ when :Integer
175
+ value.to_i
176
+ when :Float
177
+ value.to_f
178
+ when :Boolean
179
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
180
+ true
181
+ else
182
+ false
183
+ end
184
+ when :Object
185
+ # generic object (usually a Hash), return directly
186
+ value
187
+ when /\AArray<(?<inner_type>.+)>\z/
188
+ inner_type = Regexp.last_match[:inner_type]
189
+ value.map { |v| _deserialize(inner_type, v) }
190
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
191
+ k_type = Regexp.last_match[:k_type]
192
+ v_type = Regexp.last_match[:v_type]
193
+ {}.tap do |hash|
194
+ value.each do |k, v|
195
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
196
+ end
197
+ end
198
+ else # model
199
+ # models (e.g. Pet) or oneOf
200
+ klass = VrpaymentRubySdk.const_get(type)
201
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
202
+ end
203
+ end
204
+
205
+ # Returns the string representation of the object
206
+ # @return [String] String presentation of the object
207
+ def to_s
208
+ to_hash.to_s
209
+ end
210
+
211
+ # to_body is an alias to to_hash (backward compatibility)
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_body
214
+ to_hash
215
+ end
216
+
217
+ # Returns the object in the form of hash
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_hash
220
+ hash = {}
221
+ self.class.attribute_map.each_pair do |attr, param|
222
+ value = self.send(attr)
223
+ if value.nil?
224
+ is_nullable = self.class.openapi_nullable.include?(attr)
225
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
226
+ end
227
+
228
+ hash[param] = _to_hash(value)
229
+ end
230
+ hash
231
+ end
232
+
233
+ # Outputs non-array value in the form of hash
234
+ # For object, use to_hash. Otherwise, just return the value
235
+ # @param [Object] value Any valid value
236
+ # @return [Hash] Returns the value in the form of hash
237
+ def _to_hash(value)
238
+ if value.is_a?(Array)
239
+ value.compact.map { |v| _to_hash(v) }
240
+ elsif value.is_a?(Hash)
241
+ {}.tap do |hash|
242
+ value.each { |k, v| hash[k] = _to_hash(v) }
243
+ end
244
+ elsif value.respond_to? :to_hash
245
+ value.to_hash
246
+ else
247
+ value
248
+ end
249
+ end
250
+
251
+ end
252
+
253
+ end
@@ -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 InvoiceReconciliationRecordInvoiceLinkSearchResponse
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<InvoiceReconciliationRecordInvoiceLink>',
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::InvoiceReconciliationRecordInvoiceLinkSearchResponse` 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::InvoiceReconciliationRecordInvoiceLinkSearchResponse`. 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