wallee-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 (217) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +68 -19
  3. data/LICENSE +1 -1
  4. data/README.md +451 -108
  5. data/lib/wallee-ruby-sdk/api_client.rb +1 -1
  6. data/lib/wallee-ruby-sdk/models/abstract_o_auth_client_update.rb +340 -0
  7. data/lib/wallee-ruby-sdk/models/abstract_role_update.rb +13 -1
  8. data/lib/wallee-ruby-sdk/models/abstract_walleejoin_partnership.rb +330 -0
  9. data/lib/wallee-ruby-sdk/models/{payment_terminal_preparing.rb → account_create_with_owner.rb} +63 -34
  10. data/lib/wallee-ruby-sdk/models/authenticated_card_data_create.rb +30 -1
  11. data/lib/wallee-ruby-sdk/models/bank_payment_type.rb +50 -0
  12. data/lib/wallee-ruby-sdk/models/basic_address.rb +266 -0
  13. data/lib/wallee-ruby-sdk/models/boarding_strategy_information_request.rb +247 -0
  14. data/lib/wallee-ruby-sdk/models/{express_checkout_session_create.rb → charge_attempt_lookup_result.rb} +16 -20
  15. data/lib/wallee-ruby-sdk/models/charge_attempt_projection.rb +560 -0
  16. data/lib/wallee-ruby-sdk/models/{express_checkout_shipping_option.rb → create_fulfillment_request.rb} +25 -50
  17. data/lib/wallee-ruby-sdk/models/delivery_days_range.rb +60 -0
  18. data/lib/wallee-ruby-sdk/models/delivery_destination.rb +51 -0
  19. data/lib/wallee-ruby-sdk/models/dunning_case_level.rb +403 -0
  20. data/lib/wallee-ruby-sdk/models/dunning_case_level_list_response.rb +253 -0
  21. data/lib/wallee-ruby-sdk/models/dunning_case_level_search_response.rb +263 -0
  22. data/lib/wallee-ruby-sdk/models/{express_checkout_session_state.rb → dunning_case_level_state.rb} +7 -7
  23. data/lib/wallee-ruby-sdk/models/extended_rest_o_auth_client.rb +425 -0
  24. data/lib/wallee-ruby-sdk/models/fulfillment.rb +428 -0
  25. data/lib/wallee-ruby-sdk/models/fulfillment_search_response.rb +263 -0
  26. data/lib/wallee-ruby-sdk/models/fulfillment_state.rb +52 -0
  27. data/lib/wallee-ruby-sdk/models/identity_info.rb +279 -0
  28. data/lib/wallee-ruby-sdk/models/invoice_processor.rb +51 -0
  29. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record.rb +633 -0
  30. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link.rb +278 -0
  31. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link_list_response.rb +253 -0
  32. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_invoice_link_search_response.rb +263 -0
  33. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_list_response.rb +253 -0
  34. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_rejection_status.rb +51 -0
  35. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_search_response.rb +263 -0
  36. data/lib/wallee-ruby-sdk/models/invoice_reconciliation_record_state.rb +53 -0
  37. data/lib/wallee-ruby-sdk/models/{express_checkout_wallet_type.rb → invoice_reconciliation_record_type.rb} +3 -3
  38. data/lib/wallee-ruby-sdk/models/invoice_reimbursement.rb +463 -0
  39. data/lib/wallee-ruby-sdk/models/invoice_reimbursement_list_response.rb +253 -0
  40. data/lib/wallee-ruby-sdk/models/invoice_reimbursement_search_response.rb +263 -0
  41. data/lib/wallee-ruby-sdk/models/invoice_reimbursement_state.rb +54 -0
  42. data/lib/wallee-ruby-sdk/models/legal_form.rb +83 -0
  43. data/lib/wallee-ruby-sdk/models/merchant_application_data_dto.rb +275 -0
  44. data/lib/wallee-ruby-sdk/models/merchant_application_state.rb +50 -0
  45. data/lib/wallee-ruby-sdk/models/merchant_application_status_dto.rb +284 -0
  46. data/lib/wallee-ruby-sdk/models/merchant_bank_details_dto.rb +253 -0
  47. data/lib/wallee-ruby-sdk/models/merchant_company_details_dto.rb +331 -0
  48. data/lib/wallee-ruby-sdk/models/merchant_contract_revenue_dto.rb +261 -0
  49. data/lib/wallee-ruby-sdk/models/merchant_ecommerce_details_dto.rb +348 -0
  50. data/lib/wallee-ruby-sdk/models/merchant_payment_channels_dto.rb +263 -0
  51. data/lib/wallee-ruby-sdk/models/merchant_related_persons_dto.rb +243 -0
  52. data/lib/wallee-ruby-sdk/models/o_auth_client.rb +397 -0
  53. data/lib/wallee-ruby-sdk/models/o_auth_client_create.rb +365 -0
  54. data/lib/wallee-ruby-sdk/models/{user_space_role_list_response.rb → o_auth_client_list_response.rb} +4 -4
  55. data/lib/wallee-ruby-sdk/models/o_auth_client_search_response.rb +263 -0
  56. data/lib/wallee-ruby-sdk/models/o_auth_client_update.rb +374 -0
  57. data/lib/wallee-ruby-sdk/models/o_auth_consent.rb +321 -0
  58. data/lib/wallee-ruby-sdk/models/{user_account_role_list_response.rb → o_auth_consent_list_response.rb} +4 -4
  59. data/lib/wallee-ruby-sdk/models/o_auth_consent_search_response.rb +263 -0
  60. data/lib/wallee-ruby-sdk/models/{user_account_role.rb → o_auth_user.rb} +56 -29
  61. data/lib/wallee-ruby-sdk/models/{express_checkout_create_response.rb → payment_facilitator_pricing_profile_dto.rb} +16 -16
  62. data/lib/wallee-ruby-sdk/models/payment_facilitator_pricing_profile_state.rb +53 -0
  63. data/lib/wallee-ruby-sdk/models/payment_initiation_advice_file.rb +337 -0
  64. data/lib/wallee-ruby-sdk/models/payment_initiation_advice_file_state.rb +55 -0
  65. data/lib/wallee-ruby-sdk/models/payment_terminal.rb +37 -1
  66. data/lib/wallee-ruby-sdk/models/payment_terminal_activation_status.rb +301 -0
  67. data/lib/wallee-ruby-sdk/models/payment_terminal_activation_status_detail_search_response.rb +263 -0
  68. data/lib/wallee-ruby-sdk/models/payment_terminal_address_create.rb +511 -0
  69. data/lib/wallee-ruby-sdk/models/{payment_terminal_create.rb → payment_terminal_creation_request.rb} +88 -62
  70. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +1 -0
  71. data/lib/wallee-ruby-sdk/models/payment_terminal_location_crud_model.rb +398 -0
  72. data/lib/wallee-ruby-sdk/models/payment_terminal_location_crud_model_rest_api_create.rb +359 -0
  73. data/lib/wallee-ruby-sdk/models/payment_terminal_location_list_response.rb +253 -0
  74. data/lib/wallee-ruby-sdk/models/payment_terminal_location_version_state.rb +2 -1
  75. data/lib/wallee-ruby-sdk/models/payout_account_info.rb +257 -0
  76. data/lib/wallee-ruby-sdk/models/person_salutation.rb +54 -0
  77. data/lib/wallee-ruby-sdk/models/pricing_history_dto.rb +266 -0
  78. data/lib/wallee-ruby-sdk/models/product_metered_fee.rb +11 -1
  79. data/lib/wallee-ruby-sdk/models/product_metered_fee_update.rb +11 -1
  80. data/lib/wallee-ruby-sdk/models/refund.rb +13 -1
  81. data/lib/wallee-ruby-sdk/models/refund_create.rb +13 -1
  82. data/lib/wallee-ruby-sdk/models/refund_days_range.rb +51 -0
  83. data/lib/wallee-ruby-sdk/models/refund_percentage_range.rb +56 -0
  84. data/lib/wallee-ruby-sdk/models/related_person.rb +329 -0
  85. data/lib/wallee-ruby-sdk/models/representative_info.rb +239 -0
  86. data/lib/wallee-ruby-sdk/models/rest_member.rb +284 -0
  87. data/lib/wallee-ruby-sdk/models/{user_space_role.rb → rest_o_auth_client_secret.rb} +38 -37
  88. data/lib/wallee-ruby-sdk/models/{express_checkout_session.rb → rest_o_auth_client_secret_created.rb} +27 -52
  89. data/lib/wallee-ruby-sdk/models/role.rb +13 -1
  90. data/lib/wallee-ruby-sdk/models/role_create.rb +13 -1
  91. data/lib/wallee-ruby-sdk/models/{abstract_payment_terminal_update.rb → role_ref.rb} +18 -27
  92. data/lib/wallee-ruby-sdk/models/role_update.rb +13 -1
  93. data/lib/wallee-ruby-sdk/models/sales_channel.rb +15 -230
  94. data/lib/wallee-ruby-sdk/models/scope.rb +28 -16
  95. data/lib/wallee-ruby-sdk/models/secret_key_state.rb +51 -0
  96. data/lib/wallee-ruby-sdk/models/setter.rb +618 -0
  97. data/lib/wallee-ruby-sdk/models/sole_proprietor_ownership_type.rb +51 -0
  98. data/lib/wallee-ruby-sdk/models/sole_proprietorship_info.rb +261 -0
  99. data/lib/wallee-ruby-sdk/models/state_list_response.rb +253 -0
  100. data/lib/wallee-ruby-sdk/models/store_trial_subscription_request.rb +273 -0
  101. data/lib/wallee-ruby-sdk/models/store_trial_subscription_request_setter.rb +307 -0
  102. data/lib/wallee-ruby-sdk/models/subscription_component_group_configuration_request.rb +249 -0
  103. data/lib/wallee-ruby-sdk/models/subscription_component_group_configuration_request_setter.rb +249 -0
  104. data/lib/wallee-ruby-sdk/models/subscription_product_dto.rb +239 -0
  105. data/lib/wallee-ruby-sdk/models/tokenized_card_data_create.rb +30 -1
  106. data/lib/wallee-ruby-sdk/models/tracking_number_request.rb +230 -0
  107. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +13 -1
  108. data/lib/wallee-ruby-sdk/models/transaction_completion_details.rb +26 -4
  109. data/lib/wallee-ruby-sdk/models/transaction_overview.rb +1144 -0
  110. data/lib/wallee-ruby-sdk/models/transaction_projection.rb +1135 -0
  111. data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +2 -1
  112. data/lib/wallee-ruby-sdk/models/walleejoin_admin_partner_configuration_request_dto.rb +360 -0
  113. data/lib/wallee-ruby-sdk/models/walleejoin_admin_partner_configuration_response_dto.rb +351 -0
  114. data/lib/wallee-ruby-sdk/models/walleejoin_admin_pricing_type.rb +51 -0
  115. data/lib/wallee-ruby-sdk/models/walleejoin_create_partnership_api_request_dto.rb +266 -0
  116. data/lib/wallee-ruby-sdk/models/walleejoin_partnership.rb +357 -0
  117. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_create.rb +337 -0
  118. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_response_dto.rb +342 -0
  119. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_response_dto_list_response.rb +253 -0
  120. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_response_dto_search_response.rb +263 -0
  121. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_state.rb +51 -0
  122. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_type.rb +50 -0
  123. data/lib/wallee-ruby-sdk/models/walleejoin_partnership_update.rb +364 -0
  124. data/lib/wallee-ruby-sdk/models/wallet_type.rb +40 -1
  125. data/lib/wallee-ruby-sdk/models/web_ui_account_theme.rb +230 -0
  126. data/lib/wallee-ruby-sdk/service/accounts_service.rb +16 -9
  127. data/lib/wallee-ruby-sdk/service/analytics_queries_service.rb +8 -8
  128. data/lib/wallee-ruby-sdk/service/bank_accounts_service.rb +3 -3
  129. data/lib/wallee-ruby-sdk/service/bank_transactions_service.rb +3 -3
  130. data/lib/wallee-ruby-sdk/service/boarding_subscription_strategy_service.rb +181 -0
  131. data/lib/wallee-ruby-sdk/service/charge_attempts_service.rb +3 -3
  132. data/lib/wallee-ruby-sdk/service/charge_bank_transactions_service.rb +3 -3
  133. data/lib/wallee-ruby-sdk/service/charge_flow_levels_service.rb +4 -4
  134. data/lib/wallee-ruby-sdk/service/charge_flows_level_payment_links_service.rb +3 -3
  135. data/lib/wallee-ruby-sdk/service/charge_flows_service.rb +3 -3
  136. data/lib/wallee-ruby-sdk/service/consumed_resources_service.rb +1 -1
  137. data/lib/wallee-ruby-sdk/service/countries_service.rb +15 -6
  138. data/lib/wallee-ruby-sdk/service/currency_bank_accounts_service.rb +3 -3
  139. data/lib/wallee-ruby-sdk/service/customer_addresses_service.rb +7 -7
  140. data/lib/wallee-ruby-sdk/service/customer_comments_service.rb +8 -8
  141. data/lib/wallee-ruby-sdk/service/customers_service.rb +11 -11
  142. data/lib/wallee-ruby-sdk/service/debt_collection_cases_service.rb +12 -12
  143. data/lib/wallee-ruby-sdk/service/debt_collector_configurations_service.rb +6 -6
  144. data/lib/wallee-ruby-sdk/service/delivery_indications_service.rb +5 -5
  145. data/lib/wallee-ruby-sdk/service/document_templates_service.rb +3 -3
  146. data/lib/wallee-ruby-sdk/service/dunning_case_levels_service.rb +291 -0
  147. data/lib/wallee-ruby-sdk/service/dunning_cases_service.rb +5 -5
  148. data/lib/wallee-ruby-sdk/service/dunning_flow_levels_service.rb +3 -3
  149. data/lib/wallee-ruby-sdk/service/dunning_flows_service.rb +3 -3
  150. data/lib/wallee-ruby-sdk/service/external_transfer_bank_transactions_service.rb +3 -3
  151. data/lib/wallee-ruby-sdk/service/fulfillments_service.rb +355 -0
  152. data/lib/wallee-ruby-sdk/service/internal_transfer_bank_transactions_service.rb +3 -3
  153. data/lib/wallee-ruby-sdk/service/invoice_reconciliation_record_invoice_links_service.rb +453 -0
  154. data/lib/wallee-ruby-sdk/service/invoice_reconciliation_records_service.rb +433 -0
  155. data/lib/wallee-ruby-sdk/service/invoice_reimbursements_service.rb +450 -0
  156. data/lib/wallee-ruby-sdk/service/join_admin_partner_configuration_service.rb +306 -0
  157. data/lib/wallee-ruby-sdk/service/join_partnership_service.rb +586 -0
  158. data/lib/wallee-ruby-sdk/service/manual_tasks_service.rb +5 -5
  159. data/lib/wallee-ruby-sdk/service/members_service.rb +215 -0
  160. data/lib/wallee-ruby-sdk/service/merchant_applications_service.rb +334 -0
  161. data/lib/wallee-ruby-sdk/service/o_auth_clients_service.rb +611 -0
  162. data/lib/wallee-ruby-sdk/service/o_auth_consents_service.rb +332 -0
  163. data/lib/wallee-ruby-sdk/service/payment_connector_configurations_service.rb +6 -6
  164. data/lib/wallee-ruby-sdk/service/payment_links_service.rb +6 -6
  165. data/lib/wallee-ruby-sdk/service/payment_method_configurations_service.rb +6 -6
  166. data/lib/wallee-ruby-sdk/service/payment_processor_configurations_service.rb +85 -6
  167. data/lib/wallee-ruby-sdk/service/payment_terminal_transaction_summaries_service.rb +4 -4
  168. data/lib/wallee-ruby-sdk/service/payment_terminals_service.rb +475 -22
  169. data/lib/wallee-ruby-sdk/service/payment_web_apps_service.rb +11 -11
  170. data/lib/wallee-ruby-sdk/service/refund_bank_transactions_service.rb +3 -3
  171. data/lib/wallee-ruby-sdk/service/refund_comments_service.rb +8 -8
  172. data/lib/wallee-ruby-sdk/service/refund_recovery_bank_transactions_service.rb +3 -3
  173. data/lib/wallee-ruby-sdk/service/refunds_service.rb +7 -7
  174. data/lib/wallee-ruby-sdk/service/spaces_service.rb +10 -3
  175. data/lib/wallee-ruby-sdk/service/subscribers_service.rb +6 -6
  176. data/lib/wallee-ruby-sdk/service/subscription_affiliates_service.rb +6 -6
  177. data/lib/wallee-ruby-sdk/service/subscription_charges_service.rb +5 -5
  178. data/lib/wallee-ruby-sdk/service/subscription_ledger_entries_service.rb +4 -4
  179. data/lib/wallee-ruby-sdk/service/subscription_metric_usage_reports_service.rb +4 -4
  180. data/lib/wallee-ruby-sdk/service/subscription_metrics_service.rb +6 -6
  181. data/lib/wallee-ruby-sdk/service/subscription_period_bills_service.rb +4 -4
  182. data/lib/wallee-ruby-sdk/service/subscription_product_component_groups_service.rb +6 -6
  183. data/lib/wallee-ruby-sdk/service/subscription_product_components_service.rb +6 -6
  184. data/lib/wallee-ruby-sdk/service/subscription_product_metered_fee_tiers_service.rb +6 -6
  185. data/lib/wallee-ruby-sdk/service/subscription_product_metered_fees_service.rb +6 -6
  186. data/lib/wallee-ruby-sdk/service/subscription_product_period_fees_service.rb +6 -6
  187. data/lib/wallee-ruby-sdk/service/subscription_product_retirements_service.rb +3 -3
  188. data/lib/wallee-ruby-sdk/service/subscription_product_setup_fees_service.rb +6 -6
  189. data/lib/wallee-ruby-sdk/service/subscription_product_version_retirements_service.rb +3 -3
  190. data/lib/wallee-ruby-sdk/service/subscription_product_versions_service.rb +7 -7
  191. data/lib/wallee-ruby-sdk/service/subscription_products_service.rb +6 -6
  192. data/lib/wallee-ruby-sdk/service/subscription_suspensions_service.rb +3 -3
  193. data/lib/wallee-ruby-sdk/service/subscription_versions_service.rb +3 -3
  194. data/lib/wallee-ruby-sdk/service/subscriptions_service.rb +13 -13
  195. data/lib/wallee-ruby-sdk/service/terminal_locations_service.rb +276 -0
  196. data/lib/wallee-ruby-sdk/service/token_versions_service.rb +3 -3
  197. data/lib/wallee-ruby-sdk/service/tokens_service.rb +8 -8
  198. data/lib/wallee-ruby-sdk/service/transaction_client_platforms_service.rb +3 -3
  199. data/lib/wallee-ruby-sdk/service/transaction_comments_service.rb +8 -8
  200. data/lib/wallee-ruby-sdk/service/transaction_completions_service.rb +3 -3
  201. data/lib/wallee-ruby-sdk/service/transaction_invoice_comments_service.rb +8 -8
  202. data/lib/wallee-ruby-sdk/service/transaction_invoices_service.rb +86 -8
  203. data/lib/wallee-ruby-sdk/service/transaction_line_item_versions_service.rb +4 -4
  204. data/lib/wallee-ruby-sdk/service/transaction_voids_service.rb +3 -3
  205. data/lib/wallee-ruby-sdk/service/transactions_service.rb +179 -37
  206. data/lib/wallee-ruby-sdk/service/web_apps_service.rb +2 -2
  207. data/lib/wallee-ruby-sdk/service/web_ui_account_theme_service.rb +245 -0
  208. data/lib/wallee-ruby-sdk/service/webhook_listeners_service.rb +9 -9
  209. data/lib/wallee-ruby-sdk/service/webhook_urls_service.rb +9 -9
  210. data/lib/wallee-ruby-sdk/version.rb +1 -1
  211. data/lib/wallee-ruby-sdk.rb +115 -17
  212. data/test/test_querying.rb +11 -0
  213. metadata +117 -19
  214. data/lib/wallee-ruby-sdk/service/application_users_roles_service.rb +0 -478
  215. data/lib/wallee-ruby-sdk/service/express_checkout_service.rb +0 -107
  216. data/lib/wallee-ruby-sdk/service/human_users_roles_service.rb +0 -478
  217. data/lib/wallee-ruby-sdk/service/single_sign_on_users_roles_service.rb +0 -478
@@ -0,0 +1,253 @@
1
+ =begin
2
+ # Wallee AG Ruby SDK
3
+ #
4
+ # This library allows to interact with the Wallee AG payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://en.wallee.com
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 WalleeRubySdk
27
+ class MerchantBankDetailsDto
28
+ # Whether the merchant confirms direct ownership of the payout accounts.
29
+ attr_accessor :direct_account_ownership_confirmed
30
+
31
+ # The bank accounts where merchant payouts should be sent.
32
+ attr_accessor :payout_accounts
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'direct_account_ownership_confirmed' => :'directAccountOwnershipConfirmed',
38
+ :'payout_accounts' => :'payoutAccounts'
39
+ }
40
+ end
41
+
42
+ # Returns attribute mapping this model knows about
43
+ def self.acceptable_attribute_map
44
+ attribute_map
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ acceptable_attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'direct_account_ownership_confirmed' => :'Boolean',
56
+ :'payout_accounts' => :'Array<PayoutAccountInfo>'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::MerchantBankDetailsDto` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::MerchantBankDetailsDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'direct_account_ownership_confirmed')
83
+ self.direct_account_ownership_confirmed = attributes[:'direct_account_ownership_confirmed']
84
+ end
85
+
86
+ if attributes.key?(:'payout_accounts')
87
+ if (value = attributes[:'payout_accounts']).is_a?(Array)
88
+ self.payout_accounts = value
89
+ end
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
+ invalid_properties = Array.new
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ true
106
+ end
107
+
108
+ # Custom attribute writer method with validation
109
+ # @param [Object] payout_accounts Value to be assigned
110
+ def payout_accounts=(payout_accounts)
111
+ if payout_accounts.nil?
112
+ fail ArgumentError, 'payout_accounts cannot be nil'
113
+ end
114
+
115
+ @payout_accounts = payout_accounts
116
+ end
117
+
118
+ # Checks equality by comparing each attribute.
119
+ # @param [Object] Object to be compared
120
+ def ==(o)
121
+ return true if self.equal?(o)
122
+ self.class == o.class &&
123
+ direct_account_ownership_confirmed == o.direct_account_ownership_confirmed &&
124
+ payout_accounts == o.payout_accounts
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
+ [direct_account_ownership_confirmed, payout_accounts].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 = WalleeRubySdk.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,331 @@
1
+ =begin
2
+ # Wallee AG Ruby SDK
3
+ #
4
+ # This library allows to interact with the Wallee AG payment service.
5
+ #
6
+ # Copyright owner: Wallee AG
7
+ # Website: https://en.wallee.com
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 WalleeRubySdk
27
+ class MerchantCompanyDetailsDto
28
+ # The business sector code or category of the merchant.
29
+ attr_accessor :business_sector
30
+
31
+ # The commercial register extract or reference.
32
+ attr_accessor :extract
33
+
34
+ # The year in which the merchant company was incorporated.
35
+ attr_accessor :incorporation_year
36
+
37
+ # The registered legal name of the merchant company.
38
+ attr_accessor :organization_name
39
+
40
+ # A short description of the merchant's business activity.
41
+ attr_accessor :business_description
42
+
43
+ # The sales tax or VAT number of the merchant company.
44
+ attr_accessor :sales_tax_number
45
+
46
+ # The official business identification number of the merchant company.
47
+ attr_accessor :business_identification_number
48
+
49
+ attr_accessor :incorporation_address
50
+
51
+ attr_accessor :legal_form
52
+
53
+ class EnumAttributeValidator
54
+ attr_reader :datatype
55
+ attr_reader :allowable_values
56
+
57
+ def initialize(datatype, allowable_values)
58
+ @allowable_values = allowable_values.map do |value|
59
+ case datatype.to_s
60
+ when /Integer/i
61
+ value.to_i
62
+ when /Float/i
63
+ value.to_f
64
+ else
65
+ value
66
+ end
67
+ end
68
+ end
69
+
70
+ def valid?(value)
71
+ !value || allowable_values.include?(value)
72
+ end
73
+ end
74
+
75
+ # Attribute mapping from ruby-style variable name to JSON key.
76
+ def self.attribute_map
77
+ {
78
+ :'business_sector' => :'businessSector',
79
+ :'extract' => :'extract',
80
+ :'incorporation_year' => :'incorporationYear',
81
+ :'organization_name' => :'organizationName',
82
+ :'business_description' => :'businessDescription',
83
+ :'sales_tax_number' => :'salesTaxNumber',
84
+ :'business_identification_number' => :'businessIdentificationNumber',
85
+ :'incorporation_address' => :'incorporationAddress',
86
+ :'legal_form' => :'legalForm'
87
+ }
88
+ end
89
+
90
+ # Returns attribute mapping this model knows about
91
+ def self.acceptable_attribute_map
92
+ attribute_map
93
+ end
94
+
95
+ # Returns all the JSON keys this model knows about
96
+ def self.acceptable_attributes
97
+ acceptable_attribute_map.values
98
+ end
99
+
100
+ # Attribute type mapping.
101
+ def self.openapi_types
102
+ {
103
+ :'business_sector' => :'String',
104
+ :'extract' => :'String',
105
+ :'incorporation_year' => :'String',
106
+ :'organization_name' => :'String',
107
+ :'business_description' => :'String',
108
+ :'sales_tax_number' => :'String',
109
+ :'business_identification_number' => :'String',
110
+ :'incorporation_address' => :'BasicAddress',
111
+ :'legal_form' => :'LegalForm'
112
+ }
113
+ end
114
+
115
+ # List of attributes with nullable: true
116
+ def self.openapi_nullable
117
+ Set.new([
118
+ ])
119
+ end
120
+
121
+ # Initializes the object
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ def initialize(attributes = {})
124
+ if (!attributes.is_a?(Hash))
125
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::MerchantCompanyDetailsDto` initialize method"
126
+ end
127
+
128
+ # check to see if the attribute exists and convert string to symbol for hash key
129
+ acceptable_attribute_map = self.class.acceptable_attribute_map
130
+ attributes = attributes.each_with_object({}) { |(k, v), h|
131
+ if (!acceptable_attribute_map.key?(k.to_sym))
132
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::MerchantCompanyDetailsDto`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
133
+ end
134
+ h[k.to_sym] = v
135
+ }
136
+
137
+ if attributes.key?(:'business_sector')
138
+ self.business_sector = attributes[:'business_sector']
139
+ end
140
+
141
+ if attributes.key?(:'extract')
142
+ self.extract = attributes[:'extract']
143
+ end
144
+
145
+ if attributes.key?(:'incorporation_year')
146
+ self.incorporation_year = attributes[:'incorporation_year']
147
+ end
148
+
149
+ if attributes.key?(:'organization_name')
150
+ self.organization_name = attributes[:'organization_name']
151
+ end
152
+
153
+ if attributes.key?(:'business_description')
154
+ self.business_description = attributes[:'business_description']
155
+ end
156
+
157
+ if attributes.key?(:'sales_tax_number')
158
+ self.sales_tax_number = attributes[:'sales_tax_number']
159
+ end
160
+
161
+ if attributes.key?(:'business_identification_number')
162
+ self.business_identification_number = attributes[:'business_identification_number']
163
+ end
164
+
165
+ if attributes.key?(:'incorporation_address')
166
+ self.incorporation_address = attributes[:'incorporation_address']
167
+ end
168
+
169
+ if attributes.key?(:'legal_form')
170
+ self.legal_form = attributes[:'legal_form']
171
+ end
172
+ end
173
+
174
+ # Show invalid properties with the reasons. Usually used together with valid?
175
+ # @return Array for valid properties with the reasons
176
+ def list_invalid_properties
177
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
178
+ invalid_properties = Array.new
179
+ invalid_properties
180
+ end
181
+
182
+ # Check to see if the all the properties in the model are valid
183
+ # @return true if the model is valid
184
+ def valid?
185
+ warn '[DEPRECATED] the `valid?` method is obsolete'
186
+ true
187
+ end
188
+
189
+ # Checks equality by comparing each attribute.
190
+ # @param [Object] Object to be compared
191
+ def ==(o)
192
+ return true if self.equal?(o)
193
+ self.class == o.class &&
194
+ business_sector == o.business_sector &&
195
+ extract == o.extract &&
196
+ incorporation_year == o.incorporation_year &&
197
+ organization_name == o.organization_name &&
198
+ business_description == o.business_description &&
199
+ sales_tax_number == o.sales_tax_number &&
200
+ business_identification_number == o.business_identification_number &&
201
+ incorporation_address == o.incorporation_address &&
202
+ legal_form == o.legal_form
203
+ end
204
+
205
+ # @see the `==` method
206
+ # @param [Object] Object to be compared
207
+ def eql?(o)
208
+ self == o
209
+ end
210
+
211
+ # Calculates hash code according to all attributes.
212
+ # @return [Integer] Hash code
213
+ def hash
214
+ [business_sector, extract, incorporation_year, organization_name, business_description, sales_tax_number, business_identification_number, incorporation_address, legal_form].hash
215
+ end
216
+
217
+ # Builds the object from hash
218
+ # @param [Hash] attributes Model attributes in the form of hash
219
+ # @return [Object] Returns the model itself
220
+ def self.build_from_hash(attributes)
221
+ return nil unless attributes.is_a?(Hash)
222
+ attributes = attributes.transform_keys(&:to_sym)
223
+ transformed_hash = {}
224
+ openapi_types.each_pair do |key, type|
225
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
226
+ transformed_hash["#{key}"] = nil
227
+ elsif type =~ /\AArray<(.*)>/i
228
+ # check to ensure the input is an array given that the attribute
229
+ # is documented as an array but the input is not
230
+ if attributes[attribute_map[key]].is_a?(Array)
231
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
232
+ end
233
+ elsif !attributes[attribute_map[key]].nil?
234
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
235
+ end
236
+ end
237
+ new(transformed_hash)
238
+ end
239
+
240
+ # Deserializes the data based on type
241
+ # @param string type Data type
242
+ # @param string value Value to be deserialized
243
+ # @return [Object] Deserialized data
244
+ def self._deserialize(type, value)
245
+ case type.to_sym
246
+ when :Time
247
+ Time.parse(value)
248
+ when :Date
249
+ Date.parse(value)
250
+ when :String
251
+ value.to_s
252
+ when :Integer
253
+ value.to_i
254
+ when :Float
255
+ value.to_f
256
+ when :Boolean
257
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
258
+ true
259
+ else
260
+ false
261
+ end
262
+ when :Object
263
+ # generic object (usually a Hash), return directly
264
+ value
265
+ when /\AArray<(?<inner_type>.+)>\z/
266
+ inner_type = Regexp.last_match[:inner_type]
267
+ value.map { |v| _deserialize(inner_type, v) }
268
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
269
+ k_type = Regexp.last_match[:k_type]
270
+ v_type = Regexp.last_match[:v_type]
271
+ {}.tap do |hash|
272
+ value.each do |k, v|
273
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
274
+ end
275
+ end
276
+ else # model
277
+ # models (e.g. Pet) or oneOf
278
+ klass = WalleeRubySdk.const_get(type)
279
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
280
+ end
281
+ end
282
+
283
+ # Returns the string representation of the object
284
+ # @return [String] String presentation of the object
285
+ def to_s
286
+ to_hash.to_s
287
+ end
288
+
289
+ # to_body is an alias to to_hash (backward compatibility)
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_body
292
+ to_hash
293
+ end
294
+
295
+ # Returns the object in the form of hash
296
+ # @return [Hash] Returns the object in the form of hash
297
+ def to_hash
298
+ hash = {}
299
+ self.class.attribute_map.each_pair do |attr, param|
300
+ value = self.send(attr)
301
+ if value.nil?
302
+ is_nullable = self.class.openapi_nullable.include?(attr)
303
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
304
+ end
305
+
306
+ hash[param] = _to_hash(value)
307
+ end
308
+ hash
309
+ end
310
+
311
+ # Outputs non-array value in the form of hash
312
+ # For object, use to_hash. Otherwise, just return the value
313
+ # @param [Object] value Any valid value
314
+ # @return [Hash] Returns the value in the form of hash
315
+ def _to_hash(value)
316
+ if value.is_a?(Array)
317
+ value.compact.map { |v| _to_hash(v) }
318
+ elsif value.is_a?(Hash)
319
+ {}.tap do |hash|
320
+ value.each { |k, v| hash[k] = _to_hash(v) }
321
+ end
322
+ elsif value.respond_to? :to_hash
323
+ value.to_hash
324
+ else
325
+ value
326
+ end
327
+ end
328
+
329
+ end
330
+
331
+ end