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