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,273 @@
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
+ # Model used to store a Trial Subscription, assigning it to an Account
28
+ class StoreTrialSubscriptionRequest
29
+ attr_accessor :coupon_codes
30
+
31
+ attr_accessor :component_configurations
32
+
33
+ # ID of the product that will be used for the Trial Subscription assigned to the Account.
34
+ attr_accessor :product_id
35
+
36
+ attr_accessor :currency
37
+
38
+ # ID of the affiliate to be added in the subscription assignment.
39
+ attr_accessor :affiliate_id
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'coupon_codes' => :'couponCodes',
45
+ :'component_configurations' => :'componentConfigurations',
46
+ :'product_id' => :'productId',
47
+ :'currency' => :'currency',
48
+ :'affiliate_id' => :'affiliateId'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'coupon_codes' => :'Array<String>',
66
+ :'component_configurations' => :'Array<SubscriptionComponentGroupConfigurationRequestSetter>',
67
+ :'product_id' => :'Integer',
68
+ :'currency' => :'String',
69
+ :'affiliate_id' => :'Integer'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::StoreTrialSubscriptionRequest` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ acceptable_attribute_map = self.class.acceptable_attribute_map
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!acceptable_attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::StoreTrialSubscriptionRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'coupon_codes')
96
+ if (value = attributes[:'coupon_codes']).is_a?(Array)
97
+ self.coupon_codes = value
98
+ end
99
+ end
100
+
101
+ if attributes.key?(:'component_configurations')
102
+ if (value = attributes[:'component_configurations']).is_a?(Array)
103
+ self.component_configurations = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'product_id')
108
+ self.product_id = attributes[:'product_id']
109
+ end
110
+
111
+ if attributes.key?(:'currency')
112
+ self.currency = attributes[:'currency']
113
+ end
114
+
115
+ if attributes.key?(:'affiliate_id')
116
+ self.affiliate_id = attributes[:'affiliate_id']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
124
+ invalid_properties = Array.new
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ warn '[DEPRECATED] the `valid?` method is obsolete'
132
+ true
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] Object to be compared
137
+ def ==(o)
138
+ return true if self.equal?(o)
139
+ self.class == o.class &&
140
+ coupon_codes == o.coupon_codes &&
141
+ component_configurations == o.component_configurations &&
142
+ product_id == o.product_id &&
143
+ currency == o.currency &&
144
+ affiliate_id == o.affiliate_id
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [coupon_codes, component_configurations, product_id, currency, affiliate_id].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Deserializes the data based on type
183
+ # @param string type Data type
184
+ # @param string value Value to be deserialized
185
+ # @return [Object] Deserialized data
186
+ def self._deserialize(type, value)
187
+ case type.to_sym
188
+ when :Time
189
+ Time.parse(value)
190
+ when :Date
191
+ Date.parse(value)
192
+ when :String
193
+ value.to_s
194
+ when :Integer
195
+ value.to_i
196
+ when :Float
197
+ value.to_f
198
+ when :Boolean
199
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
200
+ true
201
+ else
202
+ false
203
+ end
204
+ when :Object
205
+ # generic object (usually a Hash), return directly
206
+ value
207
+ when /\AArray<(?<inner_type>.+)>\z/
208
+ inner_type = Regexp.last_match[:inner_type]
209
+ value.map { |v| _deserialize(inner_type, v) }
210
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
211
+ k_type = Regexp.last_match[:k_type]
212
+ v_type = Regexp.last_match[:v_type]
213
+ {}.tap do |hash|
214
+ value.each do |k, v|
215
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
216
+ end
217
+ end
218
+ else # model
219
+ # models (e.g. Pet) or oneOf
220
+ klass = WalleeRubySdk.const_get(type)
221
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
222
+ end
223
+ end
224
+
225
+ # Returns the string representation of the object
226
+ # @return [String] String presentation of the object
227
+ def to_s
228
+ to_hash.to_s
229
+ end
230
+
231
+ # to_body is an alias to to_hash (backward compatibility)
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_body
234
+ to_hash
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ self.class.attribute_map.each_pair do |attr, param|
242
+ value = self.send(attr)
243
+ if value.nil?
244
+ is_nullable = self.class.openapi_nullable.include?(attr)
245
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
246
+ end
247
+
248
+ hash[param] = _to_hash(value)
249
+ end
250
+ hash
251
+ end
252
+
253
+ # Outputs non-array value in the form of hash
254
+ # For object, use to_hash. Otherwise, just return the value
255
+ # @param [Object] value Any valid value
256
+ # @return [Hash] Returns the value in the form of hash
257
+ def _to_hash(value)
258
+ if value.is_a?(Array)
259
+ value.compact.map { |v| _to_hash(v) }
260
+ elsif value.is_a?(Hash)
261
+ {}.tap do |hash|
262
+ value.each { |k, v| hash[k] = _to_hash(v) }
263
+ end
264
+ elsif value.respond_to? :to_hash
265
+ value.to_hash
266
+ else
267
+ value
268
+ end
269
+ end
270
+
271
+ end
272
+
273
+ end
@@ -0,0 +1,307 @@
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
+ # Model used to store a Trial Subscription, assigning it to an Account
28
+ class StoreTrialSubscriptionRequestSetter
29
+ attr_accessor :coupon_codes
30
+
31
+ attr_accessor :component_configurations
32
+
33
+ # ID of the product that will be used for the Trial Subscription assigned to the Account.
34
+ attr_accessor :product_id
35
+
36
+ attr_accessor :currency
37
+
38
+ # ID of the affiliate to be added in the subscription assignment.
39
+ attr_accessor :affiliate_id
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'coupon_codes' => :'couponCodes',
45
+ :'component_configurations' => :'componentConfigurations',
46
+ :'product_id' => :'productId',
47
+ :'currency' => :'currency',
48
+ :'affiliate_id' => :'affiliateId'
49
+ }
50
+ end
51
+
52
+ # Returns attribute mapping this model knows about
53
+ def self.acceptable_attribute_map
54
+ attribute_map
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ acceptable_attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'coupon_codes' => :'Array<String>',
66
+ :'component_configurations' => :'Array<SubscriptionComponentGroupConfigurationRequestSetter>',
67
+ :'product_id' => :'Integer',
68
+ :'currency' => :'String',
69
+ :'affiliate_id' => :'Integer'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::StoreTrialSubscriptionRequestSetter` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ acceptable_attribute_map = self.class.acceptable_attribute_map
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!acceptable_attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::StoreTrialSubscriptionRequestSetter`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'coupon_codes')
96
+ if (value = attributes[:'coupon_codes']).is_a?(Array)
97
+ self.coupon_codes = value
98
+ end
99
+ end
100
+
101
+ if attributes.key?(:'component_configurations')
102
+ if (value = attributes[:'component_configurations']).is_a?(Array)
103
+ self.component_configurations = value
104
+ end
105
+ end
106
+
107
+ if attributes.key?(:'product_id')
108
+ self.product_id = attributes[:'product_id']
109
+ else
110
+ self.product_id = nil
111
+ end
112
+
113
+ if attributes.key?(:'currency')
114
+ self.currency = attributes[:'currency']
115
+ else
116
+ self.currency = nil
117
+ end
118
+
119
+ if attributes.key?(:'affiliate_id')
120
+ self.affiliate_id = attributes[:'affiliate_id']
121
+ end
122
+ end
123
+
124
+ # Show invalid properties with the reasons. Usually used together with valid?
125
+ # @return Array for valid properties with the reasons
126
+ def list_invalid_properties
127
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
128
+ invalid_properties = Array.new
129
+ if @product_id.nil?
130
+ invalid_properties.push('invalid value for "product_id", product_id cannot be nil.')
131
+ end
132
+
133
+ if @currency.nil?
134
+ invalid_properties.push('invalid value for "currency", currency cannot be nil.')
135
+ end
136
+
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ warn '[DEPRECATED] the `valid?` method is obsolete'
144
+ return false if @product_id.nil?
145
+ return false if @currency.nil?
146
+ true
147
+ end
148
+
149
+ # Custom attribute writer method with validation
150
+ # @param [Object] product_id Value to be assigned
151
+ def product_id=(product_id)
152
+ if product_id.nil?
153
+ fail ArgumentError, 'product_id cannot be nil'
154
+ end
155
+
156
+ @product_id = product_id
157
+ end
158
+
159
+ # Custom attribute writer method with validation
160
+ # @param [Object] currency Value to be assigned
161
+ def currency=(currency)
162
+ if currency.nil?
163
+ fail ArgumentError, 'currency cannot be nil'
164
+ end
165
+
166
+ @currency = currency
167
+ end
168
+
169
+ # Checks equality by comparing each attribute.
170
+ # @param [Object] Object to be compared
171
+ def ==(o)
172
+ return true if self.equal?(o)
173
+ self.class == o.class &&
174
+ coupon_codes == o.coupon_codes &&
175
+ component_configurations == o.component_configurations &&
176
+ product_id == o.product_id &&
177
+ currency == o.currency &&
178
+ affiliate_id == o.affiliate_id
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Integer] Hash code
189
+ def hash
190
+ [coupon_codes, component_configurations, product_id, currency, affiliate_id].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def self.build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ attributes = attributes.transform_keys(&:to_sym)
199
+ transformed_hash = {}
200
+ openapi_types.each_pair do |key, type|
201
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
202
+ transformed_hash["#{key}"] = nil
203
+ elsif type =~ /\AArray<(.*)>/i
204
+ # check to ensure the input is an array given that the attribute
205
+ # is documented as an array but the input is not
206
+ if attributes[attribute_map[key]].is_a?(Array)
207
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
208
+ end
209
+ elsif !attributes[attribute_map[key]].nil?
210
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
211
+ end
212
+ end
213
+ new(transformed_hash)
214
+ end
215
+
216
+ # Deserializes the data based on type
217
+ # @param string type Data type
218
+ # @param string value Value to be deserialized
219
+ # @return [Object] Deserialized data
220
+ def self._deserialize(type, value)
221
+ case type.to_sym
222
+ when :Time
223
+ Time.parse(value)
224
+ when :Date
225
+ Date.parse(value)
226
+ when :String
227
+ value.to_s
228
+ when :Integer
229
+ value.to_i
230
+ when :Float
231
+ value.to_f
232
+ when :Boolean
233
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
234
+ true
235
+ else
236
+ false
237
+ end
238
+ when :Object
239
+ # generic object (usually a Hash), return directly
240
+ value
241
+ when /\AArray<(?<inner_type>.+)>\z/
242
+ inner_type = Regexp.last_match[:inner_type]
243
+ value.map { |v| _deserialize(inner_type, v) }
244
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
245
+ k_type = Regexp.last_match[:k_type]
246
+ v_type = Regexp.last_match[:v_type]
247
+ {}.tap do |hash|
248
+ value.each do |k, v|
249
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
250
+ end
251
+ end
252
+ else # model
253
+ # models (e.g. Pet) or oneOf
254
+ klass = WalleeRubySdk.const_get(type)
255
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
256
+ end
257
+ end
258
+
259
+ # Returns the string representation of the object
260
+ # @return [String] String presentation of the object
261
+ def to_s
262
+ to_hash.to_s
263
+ end
264
+
265
+ # to_body is an alias to to_hash (backward compatibility)
266
+ # @return [Hash] Returns the object in the form of hash
267
+ def to_body
268
+ to_hash
269
+ end
270
+
271
+ # Returns the object in the form of hash
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_hash
274
+ hash = {}
275
+ self.class.attribute_map.each_pair do |attr, param|
276
+ value = self.send(attr)
277
+ if value.nil?
278
+ is_nullable = self.class.openapi_nullable.include?(attr)
279
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
280
+ end
281
+
282
+ hash[param] = _to_hash(value)
283
+ end
284
+ hash
285
+ end
286
+
287
+ # Outputs non-array value in the form of hash
288
+ # For object, use to_hash. Otherwise, just return the value
289
+ # @param [Object] value Any valid value
290
+ # @return [Hash] Returns the value in the form of hash
291
+ def _to_hash(value)
292
+ if value.is_a?(Array)
293
+ value.compact.map { |v| _to_hash(v) }
294
+ elsif value.is_a?(Hash)
295
+ {}.tap do |hash|
296
+ value.each { |k, v| hash[k] = _to_hash(v) }
297
+ end
298
+ elsif value.respond_to? :to_hash
299
+ value.to_hash
300
+ else
301
+ value
302
+ end
303
+ end
304
+
305
+ end
306
+
307
+ end
@@ -24,24 +24,20 @@ require 'date'
24
24
  require 'time'
25
25
 
26
26
  module WalleeRubySdk
27
- class ExpressCheckoutSessionCreate
28
- attr_accessor :line_items
27
+ # Model used to configure the Subscription Product to be assigned to the Account
28
+ class SubscriptionComponentGroupConfigurationRequest
29
+ attr_accessor :quantity
29
30
 
30
- # The URL to fetch the shipping options from.
31
- attr_accessor :merchant_shipping_callback_url
31
+ attr_accessor :subscription_product_component_group_id
32
32
 
33
- # The currency of the session.
34
- attr_accessor :currency
35
-
36
- attr_accessor :shipping_options
33
+ attr_accessor :subscription_product_component_reference_id
37
34
 
38
35
  # Attribute mapping from ruby-style variable name to JSON key.
39
36
  def self.attribute_map
40
37
  {
41
- :'line_items' => :'lineItems',
42
- :'merchant_shipping_callback_url' => :'merchantShippingCallbackUrl',
43
- :'currency' => :'currency',
44
- :'shipping_options' => :'shippingOptions'
38
+ :'quantity' => :'quantity',
39
+ :'subscription_product_component_group_id' => :'subscriptionProductComponentGroupId',
40
+ :'subscription_product_component_reference_id' => :'subscriptionProductComponentReferenceId'
45
41
  }
46
42
  end
47
43
 
@@ -58,10 +54,9 @@ module WalleeRubySdk
58
54
  # Attribute type mapping.
59
55
  def self.openapi_types
60
56
  {
61
- :'line_items' => :'Array<LineItem>',
62
- :'merchant_shipping_callback_url' => :'String',
63
- :'currency' => :'String',
64
- :'shipping_options' => :'Array<ExpressCheckoutShippingOption>'
57
+ :'quantity' => :'Float',
58
+ :'subscription_product_component_group_id' => :'Integer',
59
+ :'subscription_product_component_reference_id' => :'Integer'
65
60
  }
66
61
  end
67
62
 
@@ -75,36 +70,28 @@ module WalleeRubySdk
75
70
  # @param [Hash] attributes Model attributes in the form of hash
76
71
  def initialize(attributes = {})
77
72
  if (!attributes.is_a?(Hash))
78
- fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::ExpressCheckoutSessionCreate` initialize method"
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::SubscriptionComponentGroupConfigurationRequest` initialize method"
79
74
  end
80
75
 
81
76
  # check to see if the attribute exists and convert string to symbol for hash key
82
77
  acceptable_attribute_map = self.class.acceptable_attribute_map
83
78
  attributes = attributes.each_with_object({}) { |(k, v), h|
84
79
  if (!acceptable_attribute_map.key?(k.to_sym))
85
- fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::ExpressCheckoutSessionCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::SubscriptionComponentGroupConfigurationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
81
  end
87
82
  h[k.to_sym] = v
88
83
  }
89
84
 
90
- if attributes.key?(:'line_items')
91
- if (value = attributes[:'line_items']).is_a?(Array)
92
- self.line_items = value
93
- end
85
+ if attributes.key?(:'quantity')
86
+ self.quantity = attributes[:'quantity']
94
87
  end
95
88
 
96
- if attributes.key?(:'merchant_shipping_callback_url')
97
- self.merchant_shipping_callback_url = attributes[:'merchant_shipping_callback_url']
89
+ if attributes.key?(:'subscription_product_component_group_id')
90
+ self.subscription_product_component_group_id = attributes[:'subscription_product_component_group_id']
98
91
  end
99
92
 
100
- if attributes.key?(:'currency')
101
- self.currency = attributes[:'currency']
102
- end
103
-
104
- if attributes.key?(:'shipping_options')
105
- if (value = attributes[:'shipping_options']).is_a?(Array)
106
- self.shipping_options = value
107
- end
93
+ if attributes.key?(:'subscription_product_component_reference_id')
94
+ self.subscription_product_component_reference_id = attributes[:'subscription_product_component_reference_id']
108
95
  end
109
96
  end
110
97
 
@@ -128,10 +115,9 @@ module WalleeRubySdk
128
115
  def ==(o)
129
116
  return true if self.equal?(o)
130
117
  self.class == o.class &&
131
- line_items == o.line_items &&
132
- merchant_shipping_callback_url == o.merchant_shipping_callback_url &&
133
- currency == o.currency &&
134
- shipping_options == o.shipping_options
118
+ quantity == o.quantity &&
119
+ subscription_product_component_group_id == o.subscription_product_component_group_id &&
120
+ subscription_product_component_reference_id == o.subscription_product_component_reference_id
135
121
  end
136
122
 
137
123
  # @see the `==` method
@@ -143,7 +129,7 @@ module WalleeRubySdk
143
129
  # Calculates hash code according to all attributes.
144
130
  # @return [Integer] Hash code
145
131
  def hash
146
- [line_items, merchant_shipping_callback_url, currency, shipping_options].hash
132
+ [quantity, subscription_product_component_group_id, subscription_product_component_reference_id].hash
147
133
  end
148
134
 
149
135
  # Builds the object from hash