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,1135 @@
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 TransactionProjection
28
+ attr_accessor :parent
29
+
30
+ # The total amount that was settled, in the transaction's currency.
31
+ attr_accessor :total_settled_amount
32
+
33
+ # Allows to link the transaction to the data collected from the customer's device.
34
+ attr_accessor :device_session_identifier
35
+
36
+ # The date and time when the processing of the transaction was started.
37
+ attr_accessor :processing_on
38
+
39
+ # The merchant's reference used to identify the invoice.
40
+ attr_accessor :invoice_merchant_reference
41
+
42
+ # The language that is linked to the object.
43
+ attr_accessor :language
44
+
45
+ # The date and time when the transaction was created.
46
+ attr_accessor :confirmed_on
47
+
48
+ # The line items purchased by the customer.
49
+ attr_accessor :line_items
50
+
51
+ # The 'Accept Language' header of the customer's web browser.
52
+ attr_accessor :accept_language_header
53
+
54
+ # Whether Java is enabled on the customer's web browser.
55
+ attr_accessor :java_enabled
56
+
57
+ # The ID of the user the transaction was confirmed by.
58
+ attr_accessor :confirmed_by
59
+
60
+ attr_accessor :payment_connector_configuration
61
+
62
+ # A unique identifier for the object.
63
+ attr_accessor :id
64
+
65
+ attr_accessor :state
66
+
67
+ # The window width of the customer's web browser.
68
+ attr_accessor :window_width
69
+
70
+ # The payment method configurations that can be used to authorize the transaction.
71
+ attr_accessor :allowed_payment_method_configurations
72
+
73
+ attr_accessor :group
74
+
75
+ # Whether the customer can make further payment attempts if the first one has failed. Default is true.
76
+ attr_accessor :charge_retry_enabled
77
+
78
+ # The 'Accept' header of the customer's web browser.
79
+ attr_accessor :accept_header
80
+
81
+ # The 'User Agent' header of the customer's web browser.
82
+ attr_accessor :user_agent_header
83
+
84
+ # The name of the shipping method used to ship the products.
85
+ attr_accessor :shipping_method
86
+
87
+ # The date and time when the object is planned to be permanently removed. If the value is empty, the object will not be removed.
88
+ attr_accessor :planned_purge_date
89
+
90
+ # The URL to redirect the customer back to after they successfully authenticated their payment.
91
+ attr_accessor :success_url
92
+
93
+ # The customer's time zone, which affects how dates and times are formatted when communicating with the customer.
94
+ attr_accessor :time_zone
95
+
96
+ # The ID of the space view this object is linked to.
97
+ attr_accessor :space_view_id
98
+
99
+ # The message that can be displayed to the customer explaining why the transaction failed, in the customer's language.
100
+ attr_accessor :user_failure_message
101
+
102
+ attr_accessor :completion_behavior
103
+
104
+ # The version is used for optimistic locking and incremented whenever the object is updated.
105
+ attr_accessor :version
106
+
107
+ # The country determined from the IP address of the customer's device.
108
+ attr_accessor :internet_protocol_address_country
109
+
110
+ # The ID of the space this object belongs to.
111
+ attr_accessor :linked_space_id
112
+
113
+ # This date and time when the decision was made as to whether the order should be shipped.
114
+ attr_accessor :delivery_decision_made_on
115
+
116
+ attr_accessor :authorization_environment
117
+
118
+ # Whether the transaction can be confirmed automatically or whether this must be done explicitly via the API. Default is true.
119
+ attr_accessor :auto_confirmation_enabled
120
+
121
+ attr_accessor :failure_reason
122
+
123
+ # The total of all fees charged, in the transaction's currency.
124
+ attr_accessor :total_applied_fees
125
+
126
+ attr_accessor :customers_presence
127
+
128
+ # The date and time when the transaction failed.
129
+ attr_accessor :failed_on
130
+
131
+ # The total amount that was refunded, in the transaction's currency.
132
+ attr_accessor :refunded_amount
133
+
134
+ # The sum of all line item prices including taxes in the transaction's currency.
135
+ attr_accessor :authorization_amount
136
+
137
+ # The screen width of the customer's web browser.
138
+ attr_accessor :screen_width
139
+
140
+ attr_accessor :environment_selection_strategy
141
+
142
+ # The customer's email address.
143
+ attr_accessor :customer_email_address
144
+
145
+ # The window height of the customer's web browser.
146
+ attr_accessor :window_height
147
+
148
+ attr_accessor :tokenization_mode
149
+
150
+ # The date and time when the transaction must be authorized, otherwise it will canceled.
151
+ attr_accessor :authorization_timeout_on
152
+
153
+ # The payment method brands that can be used to authorize the transaction.
154
+ attr_accessor :allowed_payment_method_brands
155
+
156
+ # The date and time when the object was created.
157
+ attr_accessor :created_on
158
+
159
+ # Allow to store additional information about the object.
160
+ attr_accessor :meta_data
161
+
162
+ # Whether email sending is deactivated for the transaction. Default is false.
163
+ attr_accessor :emails_disabled
164
+
165
+ attr_accessor :user_interface_type
166
+
167
+ # The unique identifier of the customer in the external system.
168
+ attr_accessor :customer_id
169
+
170
+ # The three-letter code (ISO 4217 format) of the transaction's currency.
171
+ attr_accessor :currency
172
+
173
+ # The merchant's reference used to identify the transaction.
174
+ attr_accessor :merchant_reference
175
+
176
+ # The sales channel through which the transaction was placed.
177
+ attr_accessor :authorization_sales_channel
178
+
179
+ # The number of years the transaction is kept after its authorization.
180
+ attr_accessor :years_to_keep
181
+
182
+ # The total amount that was completed, in the transaction's currency.
183
+ attr_accessor :completed_amount
184
+
185
+ # The screen height of the customer's web browser.
186
+ attr_accessor :screen_height
187
+
188
+ # The IP address of the customer's device.
189
+ attr_accessor :internet_protocol_address
190
+
191
+ attr_accessor :terminal
192
+
193
+ # The date and time when the transaction reaches its end of live. No further actions can be carried out at this time.
194
+ attr_accessor :end_of_life
195
+
196
+ attr_accessor :token
197
+
198
+ attr_accessor :environment
199
+
200
+ # The screen color depth of the customer's web browser.
201
+ attr_accessor :screen_color_depth
202
+
203
+ # The ID of the user the transaction was created by.
204
+ attr_accessor :created_by
205
+
206
+ # The date and time when the transaction was completed.
207
+ attr_accessor :completed_on
208
+
209
+ # The date and time when the transaction is completed automatically.
210
+ attr_accessor :completion_timeout_on
211
+
212
+ attr_accessor :shipping_address
213
+
214
+ attr_accessor :billing_address
215
+
216
+ # The date and time when the transaction was authorized.
217
+ attr_accessor :authorized_on
218
+
219
+ # The URL to redirect the customer back to after they canceled or failed to authenticated their payment.
220
+ attr_accessor :failed_url
221
+
222
+ class EnumAttributeValidator
223
+ attr_reader :datatype
224
+ attr_reader :allowable_values
225
+
226
+ def initialize(datatype, allowable_values)
227
+ @allowable_values = allowable_values.map do |value|
228
+ case datatype.to_s
229
+ when /Integer/i
230
+ value.to_i
231
+ when /Float/i
232
+ value.to_f
233
+ else
234
+ value
235
+ end
236
+ end
237
+ end
238
+
239
+ def valid?(value)
240
+ !value || allowable_values.include?(value)
241
+ end
242
+ end
243
+
244
+ # Attribute mapping from ruby-style variable name to JSON key.
245
+ def self.attribute_map
246
+ {
247
+ :'parent' => :'parent',
248
+ :'total_settled_amount' => :'totalSettledAmount',
249
+ :'device_session_identifier' => :'deviceSessionIdentifier',
250
+ :'processing_on' => :'processingOn',
251
+ :'invoice_merchant_reference' => :'invoiceMerchantReference',
252
+ :'language' => :'language',
253
+ :'confirmed_on' => :'confirmedOn',
254
+ :'line_items' => :'lineItems',
255
+ :'accept_language_header' => :'acceptLanguageHeader',
256
+ :'java_enabled' => :'javaEnabled',
257
+ :'confirmed_by' => :'confirmedBy',
258
+ :'payment_connector_configuration' => :'paymentConnectorConfiguration',
259
+ :'id' => :'id',
260
+ :'state' => :'state',
261
+ :'window_width' => :'windowWidth',
262
+ :'allowed_payment_method_configurations' => :'allowedPaymentMethodConfigurations',
263
+ :'group' => :'group',
264
+ :'charge_retry_enabled' => :'chargeRetryEnabled',
265
+ :'accept_header' => :'acceptHeader',
266
+ :'user_agent_header' => :'userAgentHeader',
267
+ :'shipping_method' => :'shippingMethod',
268
+ :'planned_purge_date' => :'plannedPurgeDate',
269
+ :'success_url' => :'successUrl',
270
+ :'time_zone' => :'timeZone',
271
+ :'space_view_id' => :'spaceViewId',
272
+ :'user_failure_message' => :'userFailureMessage',
273
+ :'completion_behavior' => :'completionBehavior',
274
+ :'version' => :'version',
275
+ :'internet_protocol_address_country' => :'internetProtocolAddressCountry',
276
+ :'linked_space_id' => :'linkedSpaceId',
277
+ :'delivery_decision_made_on' => :'deliveryDecisionMadeOn',
278
+ :'authorization_environment' => :'authorizationEnvironment',
279
+ :'auto_confirmation_enabled' => :'autoConfirmationEnabled',
280
+ :'failure_reason' => :'failureReason',
281
+ :'total_applied_fees' => :'totalAppliedFees',
282
+ :'customers_presence' => :'customersPresence',
283
+ :'failed_on' => :'failedOn',
284
+ :'refunded_amount' => :'refundedAmount',
285
+ :'authorization_amount' => :'authorizationAmount',
286
+ :'screen_width' => :'screenWidth',
287
+ :'environment_selection_strategy' => :'environmentSelectionStrategy',
288
+ :'customer_email_address' => :'customerEmailAddress',
289
+ :'window_height' => :'windowHeight',
290
+ :'tokenization_mode' => :'tokenizationMode',
291
+ :'authorization_timeout_on' => :'authorizationTimeoutOn',
292
+ :'allowed_payment_method_brands' => :'allowedPaymentMethodBrands',
293
+ :'created_on' => :'createdOn',
294
+ :'meta_data' => :'metaData',
295
+ :'emails_disabled' => :'emailsDisabled',
296
+ :'user_interface_type' => :'userInterfaceType',
297
+ :'customer_id' => :'customerId',
298
+ :'currency' => :'currency',
299
+ :'merchant_reference' => :'merchantReference',
300
+ :'authorization_sales_channel' => :'authorizationSalesChannel',
301
+ :'years_to_keep' => :'yearsToKeep',
302
+ :'completed_amount' => :'completedAmount',
303
+ :'screen_height' => :'screenHeight',
304
+ :'internet_protocol_address' => :'internetProtocolAddress',
305
+ :'terminal' => :'terminal',
306
+ :'end_of_life' => :'endOfLife',
307
+ :'token' => :'token',
308
+ :'environment' => :'environment',
309
+ :'screen_color_depth' => :'screenColorDepth',
310
+ :'created_by' => :'createdBy',
311
+ :'completed_on' => :'completedOn',
312
+ :'completion_timeout_on' => :'completionTimeoutOn',
313
+ :'shipping_address' => :'shippingAddress',
314
+ :'billing_address' => :'billingAddress',
315
+ :'authorized_on' => :'authorizedOn',
316
+ :'failed_url' => :'failedUrl'
317
+ }
318
+ end
319
+
320
+ # Returns attribute mapping this model knows about
321
+ def self.acceptable_attribute_map
322
+ attribute_map
323
+ end
324
+
325
+ # Returns all the JSON keys this model knows about
326
+ def self.acceptable_attributes
327
+ acceptable_attribute_map.values
328
+ end
329
+
330
+ # Attribute type mapping.
331
+ def self.openapi_types
332
+ {
333
+ :'parent' => :'Transaction',
334
+ :'total_settled_amount' => :'Float',
335
+ :'device_session_identifier' => :'String',
336
+ :'processing_on' => :'Time',
337
+ :'invoice_merchant_reference' => :'String',
338
+ :'language' => :'String',
339
+ :'confirmed_on' => :'Time',
340
+ :'line_items' => :'Array<LineItem>',
341
+ :'accept_language_header' => :'String',
342
+ :'java_enabled' => :'Boolean',
343
+ :'confirmed_by' => :'Integer',
344
+ :'payment_connector_configuration' => :'PaymentConnectorConfiguration',
345
+ :'id' => :'Integer',
346
+ :'state' => :'TransactionState',
347
+ :'window_width' => :'String',
348
+ :'allowed_payment_method_configurations' => :'Array<Integer>',
349
+ :'group' => :'TransactionGroup',
350
+ :'charge_retry_enabled' => :'Boolean',
351
+ :'accept_header' => :'String',
352
+ :'user_agent_header' => :'String',
353
+ :'shipping_method' => :'String',
354
+ :'planned_purge_date' => :'Time',
355
+ :'success_url' => :'String',
356
+ :'time_zone' => :'String',
357
+ :'space_view_id' => :'Integer',
358
+ :'user_failure_message' => :'String',
359
+ :'completion_behavior' => :'TransactionCompletionBehavior',
360
+ :'version' => :'Integer',
361
+ :'internet_protocol_address_country' => :'String',
362
+ :'linked_space_id' => :'Integer',
363
+ :'delivery_decision_made_on' => :'Time',
364
+ :'authorization_environment' => :'ChargeAttemptEnvironment',
365
+ :'auto_confirmation_enabled' => :'Boolean',
366
+ :'failure_reason' => :'FailureReason',
367
+ :'total_applied_fees' => :'Float',
368
+ :'customers_presence' => :'CustomersPresence',
369
+ :'failed_on' => :'Time',
370
+ :'refunded_amount' => :'Float',
371
+ :'authorization_amount' => :'Float',
372
+ :'screen_width' => :'String',
373
+ :'environment_selection_strategy' => :'TransactionEnvironmentSelectionStrategy',
374
+ :'customer_email_address' => :'String',
375
+ :'window_height' => :'String',
376
+ :'tokenization_mode' => :'TokenizationMode',
377
+ :'authorization_timeout_on' => :'Time',
378
+ :'allowed_payment_method_brands' => :'Array<Integer>',
379
+ :'created_on' => :'Time',
380
+ :'meta_data' => :'Hash<String, String>',
381
+ :'emails_disabled' => :'Boolean',
382
+ :'user_interface_type' => :'TransactionUserInterfaceType',
383
+ :'customer_id' => :'String',
384
+ :'currency' => :'String',
385
+ :'merchant_reference' => :'String',
386
+ :'authorization_sales_channel' => :'Integer',
387
+ :'years_to_keep' => :'Integer',
388
+ :'completed_amount' => :'Float',
389
+ :'screen_height' => :'String',
390
+ :'internet_protocol_address' => :'String',
391
+ :'terminal' => :'PaymentTerminal',
392
+ :'end_of_life' => :'Time',
393
+ :'token' => :'Token',
394
+ :'environment' => :'Environment',
395
+ :'screen_color_depth' => :'String',
396
+ :'created_by' => :'Integer',
397
+ :'completed_on' => :'Time',
398
+ :'completion_timeout_on' => :'Time',
399
+ :'shipping_address' => :'Address',
400
+ :'billing_address' => :'Address',
401
+ :'authorized_on' => :'Time',
402
+ :'failed_url' => :'String'
403
+ }
404
+ end
405
+
406
+ # List of attributes with nullable: true
407
+ def self.openapi_nullable
408
+ Set.new([
409
+ ])
410
+ end
411
+
412
+ # List of class defined in allOf (OpenAPI v3)
413
+ def self.openapi_all_of
414
+ [
415
+ :'Transaction'
416
+ ]
417
+ end
418
+
419
+ # Initializes the object
420
+ # @param [Hash] attributes Model attributes in the form of hash
421
+ def initialize(attributes = {})
422
+ if (!attributes.is_a?(Hash))
423
+ fail ArgumentError, "The input argument (attributes) must be a hash in `WalleeRubySdk::TransactionProjection` initialize method"
424
+ end
425
+
426
+ # check to see if the attribute exists and convert string to symbol for hash key
427
+ acceptable_attribute_map = self.class.acceptable_attribute_map
428
+ attributes = attributes.each_with_object({}) { |(k, v), h|
429
+ if (!acceptable_attribute_map.key?(k.to_sym))
430
+ fail ArgumentError, "`#{k}` is not a valid attribute in `WalleeRubySdk::TransactionProjection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
431
+ end
432
+ h[k.to_sym] = v
433
+ }
434
+
435
+ if attributes.key?(:'parent')
436
+ self.parent = attributes[:'parent']
437
+ end
438
+
439
+ if attributes.key?(:'total_settled_amount')
440
+ self.total_settled_amount = attributes[:'total_settled_amount']
441
+ end
442
+
443
+ if attributes.key?(:'device_session_identifier')
444
+ self.device_session_identifier = attributes[:'device_session_identifier']
445
+ end
446
+
447
+ if attributes.key?(:'processing_on')
448
+ self.processing_on = attributes[:'processing_on']
449
+ end
450
+
451
+ if attributes.key?(:'invoice_merchant_reference')
452
+ self.invoice_merchant_reference = attributes[:'invoice_merchant_reference']
453
+ end
454
+
455
+ if attributes.key?(:'language')
456
+ self.language = attributes[:'language']
457
+ end
458
+
459
+ if attributes.key?(:'confirmed_on')
460
+ self.confirmed_on = attributes[:'confirmed_on']
461
+ end
462
+
463
+ if attributes.key?(:'line_items')
464
+ if (value = attributes[:'line_items']).is_a?(Array)
465
+ self.line_items = value
466
+ end
467
+ end
468
+
469
+ if attributes.key?(:'accept_language_header')
470
+ self.accept_language_header = attributes[:'accept_language_header']
471
+ end
472
+
473
+ if attributes.key?(:'java_enabled')
474
+ self.java_enabled = attributes[:'java_enabled']
475
+ end
476
+
477
+ if attributes.key?(:'confirmed_by')
478
+ self.confirmed_by = attributes[:'confirmed_by']
479
+ end
480
+
481
+ if attributes.key?(:'payment_connector_configuration')
482
+ self.payment_connector_configuration = attributes[:'payment_connector_configuration']
483
+ end
484
+
485
+ if attributes.key?(:'id')
486
+ self.id = attributes[:'id']
487
+ end
488
+
489
+ if attributes.key?(:'state')
490
+ self.state = attributes[:'state']
491
+ end
492
+
493
+ if attributes.key?(:'window_width')
494
+ self.window_width = attributes[:'window_width']
495
+ end
496
+
497
+ if attributes.key?(:'allowed_payment_method_configurations')
498
+ if (value = attributes[:'allowed_payment_method_configurations']).is_a?(Array)
499
+ self.allowed_payment_method_configurations = value
500
+ end
501
+ end
502
+
503
+ if attributes.key?(:'group')
504
+ self.group = attributes[:'group']
505
+ end
506
+
507
+ if attributes.key?(:'charge_retry_enabled')
508
+ self.charge_retry_enabled = attributes[:'charge_retry_enabled']
509
+ end
510
+
511
+ if attributes.key?(:'accept_header')
512
+ self.accept_header = attributes[:'accept_header']
513
+ end
514
+
515
+ if attributes.key?(:'user_agent_header')
516
+ self.user_agent_header = attributes[:'user_agent_header']
517
+ end
518
+
519
+ if attributes.key?(:'shipping_method')
520
+ self.shipping_method = attributes[:'shipping_method']
521
+ end
522
+
523
+ if attributes.key?(:'planned_purge_date')
524
+ self.planned_purge_date = attributes[:'planned_purge_date']
525
+ end
526
+
527
+ if attributes.key?(:'success_url')
528
+ self.success_url = attributes[:'success_url']
529
+ end
530
+
531
+ if attributes.key?(:'time_zone')
532
+ self.time_zone = attributes[:'time_zone']
533
+ end
534
+
535
+ if attributes.key?(:'space_view_id')
536
+ self.space_view_id = attributes[:'space_view_id']
537
+ end
538
+
539
+ if attributes.key?(:'user_failure_message')
540
+ self.user_failure_message = attributes[:'user_failure_message']
541
+ end
542
+
543
+ if attributes.key?(:'completion_behavior')
544
+ self.completion_behavior = attributes[:'completion_behavior']
545
+ end
546
+
547
+ if attributes.key?(:'version')
548
+ self.version = attributes[:'version']
549
+ end
550
+
551
+ if attributes.key?(:'internet_protocol_address_country')
552
+ self.internet_protocol_address_country = attributes[:'internet_protocol_address_country']
553
+ end
554
+
555
+ if attributes.key?(:'linked_space_id')
556
+ self.linked_space_id = attributes[:'linked_space_id']
557
+ end
558
+
559
+ if attributes.key?(:'delivery_decision_made_on')
560
+ self.delivery_decision_made_on = attributes[:'delivery_decision_made_on']
561
+ end
562
+
563
+ if attributes.key?(:'authorization_environment')
564
+ self.authorization_environment = attributes[:'authorization_environment']
565
+ end
566
+
567
+ if attributes.key?(:'auto_confirmation_enabled')
568
+ self.auto_confirmation_enabled = attributes[:'auto_confirmation_enabled']
569
+ end
570
+
571
+ if attributes.key?(:'failure_reason')
572
+ self.failure_reason = attributes[:'failure_reason']
573
+ end
574
+
575
+ if attributes.key?(:'total_applied_fees')
576
+ self.total_applied_fees = attributes[:'total_applied_fees']
577
+ end
578
+
579
+ if attributes.key?(:'customers_presence')
580
+ self.customers_presence = attributes[:'customers_presence']
581
+ end
582
+
583
+ if attributes.key?(:'failed_on')
584
+ self.failed_on = attributes[:'failed_on']
585
+ end
586
+
587
+ if attributes.key?(:'refunded_amount')
588
+ self.refunded_amount = attributes[:'refunded_amount']
589
+ end
590
+
591
+ if attributes.key?(:'authorization_amount')
592
+ self.authorization_amount = attributes[:'authorization_amount']
593
+ end
594
+
595
+ if attributes.key?(:'screen_width')
596
+ self.screen_width = attributes[:'screen_width']
597
+ end
598
+
599
+ if attributes.key?(:'environment_selection_strategy')
600
+ self.environment_selection_strategy = attributes[:'environment_selection_strategy']
601
+ end
602
+
603
+ if attributes.key?(:'customer_email_address')
604
+ self.customer_email_address = attributes[:'customer_email_address']
605
+ end
606
+
607
+ if attributes.key?(:'window_height')
608
+ self.window_height = attributes[:'window_height']
609
+ end
610
+
611
+ if attributes.key?(:'tokenization_mode')
612
+ self.tokenization_mode = attributes[:'tokenization_mode']
613
+ end
614
+
615
+ if attributes.key?(:'authorization_timeout_on')
616
+ self.authorization_timeout_on = attributes[:'authorization_timeout_on']
617
+ end
618
+
619
+ if attributes.key?(:'allowed_payment_method_brands')
620
+ if (value = attributes[:'allowed_payment_method_brands']).is_a?(Array)
621
+ self.allowed_payment_method_brands = value
622
+ end
623
+ end
624
+
625
+ if attributes.key?(:'created_on')
626
+ self.created_on = attributes[:'created_on']
627
+ end
628
+
629
+ if attributes.key?(:'meta_data')
630
+ if (value = attributes[:'meta_data']).is_a?(Hash)
631
+ self.meta_data = value
632
+ end
633
+ end
634
+
635
+ if attributes.key?(:'emails_disabled')
636
+ self.emails_disabled = attributes[:'emails_disabled']
637
+ end
638
+
639
+ if attributes.key?(:'user_interface_type')
640
+ self.user_interface_type = attributes[:'user_interface_type']
641
+ end
642
+
643
+ if attributes.key?(:'customer_id')
644
+ self.customer_id = attributes[:'customer_id']
645
+ end
646
+
647
+ if attributes.key?(:'currency')
648
+ self.currency = attributes[:'currency']
649
+ end
650
+
651
+ if attributes.key?(:'merchant_reference')
652
+ self.merchant_reference = attributes[:'merchant_reference']
653
+ end
654
+
655
+ if attributes.key?(:'authorization_sales_channel')
656
+ self.authorization_sales_channel = attributes[:'authorization_sales_channel']
657
+ end
658
+
659
+ if attributes.key?(:'years_to_keep')
660
+ self.years_to_keep = attributes[:'years_to_keep']
661
+ end
662
+
663
+ if attributes.key?(:'completed_amount')
664
+ self.completed_amount = attributes[:'completed_amount']
665
+ end
666
+
667
+ if attributes.key?(:'screen_height')
668
+ self.screen_height = attributes[:'screen_height']
669
+ end
670
+
671
+ if attributes.key?(:'internet_protocol_address')
672
+ self.internet_protocol_address = attributes[:'internet_protocol_address']
673
+ end
674
+
675
+ if attributes.key?(:'terminal')
676
+ self.terminal = attributes[:'terminal']
677
+ end
678
+
679
+ if attributes.key?(:'end_of_life')
680
+ self.end_of_life = attributes[:'end_of_life']
681
+ end
682
+
683
+ if attributes.key?(:'token')
684
+ self.token = attributes[:'token']
685
+ end
686
+
687
+ if attributes.key?(:'environment')
688
+ self.environment = attributes[:'environment']
689
+ end
690
+
691
+ if attributes.key?(:'screen_color_depth')
692
+ self.screen_color_depth = attributes[:'screen_color_depth']
693
+ end
694
+
695
+ if attributes.key?(:'created_by')
696
+ self.created_by = attributes[:'created_by']
697
+ end
698
+
699
+ if attributes.key?(:'completed_on')
700
+ self.completed_on = attributes[:'completed_on']
701
+ end
702
+
703
+ if attributes.key?(:'completion_timeout_on')
704
+ self.completion_timeout_on = attributes[:'completion_timeout_on']
705
+ end
706
+
707
+ if attributes.key?(:'shipping_address')
708
+ self.shipping_address = attributes[:'shipping_address']
709
+ end
710
+
711
+ if attributes.key?(:'billing_address')
712
+ self.billing_address = attributes[:'billing_address']
713
+ end
714
+
715
+ if attributes.key?(:'authorized_on')
716
+ self.authorized_on = attributes[:'authorized_on']
717
+ end
718
+
719
+ if attributes.key?(:'failed_url')
720
+ self.failed_url = attributes[:'failed_url']
721
+ end
722
+ end
723
+
724
+ # Show invalid properties with the reasons. Usually used together with valid?
725
+ # @return Array for valid properties with the reasons
726
+ def list_invalid_properties
727
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
728
+ invalid_properties = Array.new
729
+ if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
730
+ invalid_properties.push('invalid value for "device_session_identifier", the character length must be smaller than or equal to 40.')
731
+ end
732
+
733
+ if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
734
+ invalid_properties.push('invalid value for "device_session_identifier", the character length must be great than or equal to 10.')
735
+ end
736
+
737
+ pattern = Regexp.new(/([a-zA-Z0-9_-])*/)
738
+ if !@device_session_identifier.nil? && @device_session_identifier !~ pattern
739
+ invalid_properties.push("invalid value for \"device_session_identifier\", must conform to the pattern #{pattern}.")
740
+ end
741
+
742
+ if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
743
+ invalid_properties.push('invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.')
744
+ end
745
+
746
+ pattern = Regexp.new(/[ \x20-\x7e]*/)
747
+ if !@invoice_merchant_reference.nil? && @invoice_merchant_reference !~ pattern
748
+ invalid_properties.push("invalid value for \"invoice_merchant_reference\", must conform to the pattern #{pattern}.")
749
+ end
750
+
751
+ if !@shipping_method.nil? && @shipping_method.to_s.length > 200
752
+ invalid_properties.push('invalid value for "shipping_method", the character length must be smaller than or equal to 200.')
753
+ end
754
+
755
+ if !@success_url.nil? && @success_url.to_s.length > 2000
756
+ invalid_properties.push('invalid value for "success_url", the character length must be smaller than or equal to 2000.')
757
+ end
758
+
759
+ if !@success_url.nil? && @success_url.to_s.length < 9
760
+ invalid_properties.push('invalid value for "success_url", the character length must be great than or equal to 9.')
761
+ end
762
+
763
+ if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
764
+ invalid_properties.push('invalid value for "customer_email_address", the character length must be smaller than or equal to 254.')
765
+ end
766
+
767
+ if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
768
+ invalid_properties.push('invalid value for "merchant_reference", the character length must be smaller than or equal to 100.')
769
+ end
770
+
771
+ pattern = Regexp.new(/[ \x20-\x7e]*/)
772
+ if !@merchant_reference.nil? && @merchant_reference !~ pattern
773
+ invalid_properties.push("invalid value for \"merchant_reference\", must conform to the pattern #{pattern}.")
774
+ end
775
+
776
+ if !@failed_url.nil? && @failed_url.to_s.length > 2000
777
+ invalid_properties.push('invalid value for "failed_url", the character length must be smaller than or equal to 2000.')
778
+ end
779
+
780
+ if !@failed_url.nil? && @failed_url.to_s.length < 9
781
+ invalid_properties.push('invalid value for "failed_url", the character length must be great than or equal to 9.')
782
+ end
783
+
784
+ invalid_properties
785
+ end
786
+
787
+ # Check to see if the all the properties in the model are valid
788
+ # @return true if the model is valid
789
+ def valid?
790
+ warn '[DEPRECATED] the `valid?` method is obsolete'
791
+ return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length > 40
792
+ return false if !@device_session_identifier.nil? && @device_session_identifier.to_s.length < 10
793
+ return false if !@device_session_identifier.nil? && @device_session_identifier !~ Regexp.new(/([a-zA-Z0-9_-])*/)
794
+ return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference.to_s.length > 100
795
+ return false if !@invoice_merchant_reference.nil? && @invoice_merchant_reference !~ Regexp.new(/[ \x20-\x7e]*/)
796
+ return false if !@shipping_method.nil? && @shipping_method.to_s.length > 200
797
+ return false if !@success_url.nil? && @success_url.to_s.length > 2000
798
+ return false if !@success_url.nil? && @success_url.to_s.length < 9
799
+ return false if !@customer_email_address.nil? && @customer_email_address.to_s.length > 254
800
+ return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
801
+ return false if !@merchant_reference.nil? && @merchant_reference !~ Regexp.new(/[ \x20-\x7e]*/)
802
+ return false if !@failed_url.nil? && @failed_url.to_s.length > 2000
803
+ return false if !@failed_url.nil? && @failed_url.to_s.length < 9
804
+ true
805
+ end
806
+
807
+ # Custom attribute writer method with validation
808
+ # @param [Object] device_session_identifier Value to be assigned
809
+ def device_session_identifier=(device_session_identifier)
810
+ if device_session_identifier.nil?
811
+ fail ArgumentError, 'device_session_identifier cannot be nil'
812
+ end
813
+
814
+ if device_session_identifier.to_s.length > 40
815
+ fail ArgumentError, 'invalid value for "device_session_identifier", the character length must be smaller than or equal to 40.'
816
+ end
817
+
818
+ if device_session_identifier.to_s.length < 10
819
+ fail ArgumentError, 'invalid value for "device_session_identifier", the character length must be great than or equal to 10.'
820
+ end
821
+
822
+ pattern = Regexp.new(/([a-zA-Z0-9_-])*/)
823
+ if device_session_identifier !~ pattern
824
+ fail ArgumentError, "invalid value for \"device_session_identifier\", must conform to the pattern #{pattern}."
825
+ end
826
+
827
+ @device_session_identifier = device_session_identifier
828
+ end
829
+
830
+ # Custom attribute writer method with validation
831
+ # @param [Object] invoice_merchant_reference Value to be assigned
832
+ def invoice_merchant_reference=(invoice_merchant_reference)
833
+ if invoice_merchant_reference.nil?
834
+ fail ArgumentError, 'invoice_merchant_reference cannot be nil'
835
+ end
836
+
837
+ if invoice_merchant_reference.to_s.length > 100
838
+ fail ArgumentError, 'invalid value for "invoice_merchant_reference", the character length must be smaller than or equal to 100.'
839
+ end
840
+
841
+ pattern = Regexp.new(/[ \x20-\x7e]*/)
842
+ if invoice_merchant_reference !~ pattern
843
+ fail ArgumentError, "invalid value for \"invoice_merchant_reference\", must conform to the pattern #{pattern}."
844
+ end
845
+
846
+ @invoice_merchant_reference = invoice_merchant_reference
847
+ end
848
+
849
+ # Custom attribute writer method with validation
850
+ # @param [Object] shipping_method Value to be assigned
851
+ def shipping_method=(shipping_method)
852
+ if shipping_method.nil?
853
+ fail ArgumentError, 'shipping_method cannot be nil'
854
+ end
855
+
856
+ if shipping_method.to_s.length > 200
857
+ fail ArgumentError, 'invalid value for "shipping_method", the character length must be smaller than or equal to 200.'
858
+ end
859
+
860
+ @shipping_method = shipping_method
861
+ end
862
+
863
+ # Custom attribute writer method with validation
864
+ # @param [Object] success_url Value to be assigned
865
+ def success_url=(success_url)
866
+ if success_url.nil?
867
+ fail ArgumentError, 'success_url cannot be nil'
868
+ end
869
+
870
+ if success_url.to_s.length > 2000
871
+ fail ArgumentError, 'invalid value for "success_url", the character length must be smaller than or equal to 2000.'
872
+ end
873
+
874
+ if success_url.to_s.length < 9
875
+ fail ArgumentError, 'invalid value for "success_url", the character length must be great than or equal to 9.'
876
+ end
877
+
878
+ @success_url = success_url
879
+ end
880
+
881
+ # Custom attribute writer method with validation
882
+ # @param [Object] customer_email_address Value to be assigned
883
+ def customer_email_address=(customer_email_address)
884
+ if customer_email_address.nil?
885
+ fail ArgumentError, 'customer_email_address cannot be nil'
886
+ end
887
+
888
+ if customer_email_address.to_s.length > 254
889
+ fail ArgumentError, 'invalid value for "customer_email_address", the character length must be smaller than or equal to 254.'
890
+ end
891
+
892
+ @customer_email_address = customer_email_address
893
+ end
894
+
895
+ # Custom attribute writer method with validation
896
+ # @param [Object] merchant_reference Value to be assigned
897
+ def merchant_reference=(merchant_reference)
898
+ if merchant_reference.nil?
899
+ fail ArgumentError, 'merchant_reference cannot be nil'
900
+ end
901
+
902
+ if merchant_reference.to_s.length > 100
903
+ fail ArgumentError, 'invalid value for "merchant_reference", the character length must be smaller than or equal to 100.'
904
+ end
905
+
906
+ pattern = Regexp.new(/[ \x20-\x7e]*/)
907
+ if merchant_reference !~ pattern
908
+ fail ArgumentError, "invalid value for \"merchant_reference\", must conform to the pattern #{pattern}."
909
+ end
910
+
911
+ @merchant_reference = merchant_reference
912
+ end
913
+
914
+ # Custom attribute writer method with validation
915
+ # @param [Object] failed_url Value to be assigned
916
+ def failed_url=(failed_url)
917
+ if failed_url.nil?
918
+ fail ArgumentError, 'failed_url cannot be nil'
919
+ end
920
+
921
+ if failed_url.to_s.length > 2000
922
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be smaller than or equal to 2000.'
923
+ end
924
+
925
+ if failed_url.to_s.length < 9
926
+ fail ArgumentError, 'invalid value for "failed_url", the character length must be great than or equal to 9.'
927
+ end
928
+
929
+ @failed_url = failed_url
930
+ end
931
+
932
+ # Checks equality by comparing each attribute.
933
+ # @param [Object] Object to be compared
934
+ def ==(o)
935
+ return true if self.equal?(o)
936
+ self.class == o.class &&
937
+ parent == o.parent &&
938
+ total_settled_amount == o.total_settled_amount &&
939
+ device_session_identifier == o.device_session_identifier &&
940
+ processing_on == o.processing_on &&
941
+ invoice_merchant_reference == o.invoice_merchant_reference &&
942
+ language == o.language &&
943
+ confirmed_on == o.confirmed_on &&
944
+ line_items == o.line_items &&
945
+ accept_language_header == o.accept_language_header &&
946
+ java_enabled == o.java_enabled &&
947
+ confirmed_by == o.confirmed_by &&
948
+ payment_connector_configuration == o.payment_connector_configuration &&
949
+ id == o.id &&
950
+ state == o.state &&
951
+ window_width == o.window_width &&
952
+ allowed_payment_method_configurations == o.allowed_payment_method_configurations &&
953
+ group == o.group &&
954
+ charge_retry_enabled == o.charge_retry_enabled &&
955
+ accept_header == o.accept_header &&
956
+ user_agent_header == o.user_agent_header &&
957
+ shipping_method == o.shipping_method &&
958
+ planned_purge_date == o.planned_purge_date &&
959
+ success_url == o.success_url &&
960
+ time_zone == o.time_zone &&
961
+ space_view_id == o.space_view_id &&
962
+ user_failure_message == o.user_failure_message &&
963
+ completion_behavior == o.completion_behavior &&
964
+ version == o.version &&
965
+ internet_protocol_address_country == o.internet_protocol_address_country &&
966
+ linked_space_id == o.linked_space_id &&
967
+ delivery_decision_made_on == o.delivery_decision_made_on &&
968
+ authorization_environment == o.authorization_environment &&
969
+ auto_confirmation_enabled == o.auto_confirmation_enabled &&
970
+ failure_reason == o.failure_reason &&
971
+ total_applied_fees == o.total_applied_fees &&
972
+ customers_presence == o.customers_presence &&
973
+ failed_on == o.failed_on &&
974
+ refunded_amount == o.refunded_amount &&
975
+ authorization_amount == o.authorization_amount &&
976
+ screen_width == o.screen_width &&
977
+ environment_selection_strategy == o.environment_selection_strategy &&
978
+ customer_email_address == o.customer_email_address &&
979
+ window_height == o.window_height &&
980
+ tokenization_mode == o.tokenization_mode &&
981
+ authorization_timeout_on == o.authorization_timeout_on &&
982
+ allowed_payment_method_brands == o.allowed_payment_method_brands &&
983
+ created_on == o.created_on &&
984
+ meta_data == o.meta_data &&
985
+ emails_disabled == o.emails_disabled &&
986
+ user_interface_type == o.user_interface_type &&
987
+ customer_id == o.customer_id &&
988
+ currency == o.currency &&
989
+ merchant_reference == o.merchant_reference &&
990
+ authorization_sales_channel == o.authorization_sales_channel &&
991
+ years_to_keep == o.years_to_keep &&
992
+ completed_amount == o.completed_amount &&
993
+ screen_height == o.screen_height &&
994
+ internet_protocol_address == o.internet_protocol_address &&
995
+ terminal == o.terminal &&
996
+ end_of_life == o.end_of_life &&
997
+ token == o.token &&
998
+ environment == o.environment &&
999
+ screen_color_depth == o.screen_color_depth &&
1000
+ created_by == o.created_by &&
1001
+ completed_on == o.completed_on &&
1002
+ completion_timeout_on == o.completion_timeout_on &&
1003
+ shipping_address == o.shipping_address &&
1004
+ billing_address == o.billing_address &&
1005
+ authorized_on == o.authorized_on &&
1006
+ failed_url == o.failed_url
1007
+ end
1008
+
1009
+ # @see the `==` method
1010
+ # @param [Object] Object to be compared
1011
+ def eql?(o)
1012
+ self == o
1013
+ end
1014
+
1015
+ # Calculates hash code according to all attributes.
1016
+ # @return [Integer] Hash code
1017
+ def hash
1018
+ [parent, total_settled_amount, device_session_identifier, processing_on, invoice_merchant_reference, language, confirmed_on, line_items, accept_language_header, java_enabled, confirmed_by, payment_connector_configuration, id, state, window_width, allowed_payment_method_configurations, group, charge_retry_enabled, accept_header, user_agent_header, shipping_method, planned_purge_date, success_url, time_zone, space_view_id, user_failure_message, completion_behavior, version, internet_protocol_address_country, linked_space_id, delivery_decision_made_on, authorization_environment, auto_confirmation_enabled, failure_reason, total_applied_fees, customers_presence, failed_on, refunded_amount, authorization_amount, screen_width, environment_selection_strategy, customer_email_address, window_height, tokenization_mode, authorization_timeout_on, allowed_payment_method_brands, created_on, meta_data, emails_disabled, user_interface_type, customer_id, currency, merchant_reference, authorization_sales_channel, years_to_keep, completed_amount, screen_height, internet_protocol_address, terminal, end_of_life, token, environment, screen_color_depth, created_by, completed_on, completion_timeout_on, shipping_address, billing_address, authorized_on, failed_url].hash
1019
+ end
1020
+
1021
+ # Builds the object from hash
1022
+ # @param [Hash] attributes Model attributes in the form of hash
1023
+ # @return [Object] Returns the model itself
1024
+ def self.build_from_hash(attributes)
1025
+ return nil unless attributes.is_a?(Hash)
1026
+ attributes = attributes.transform_keys(&:to_sym)
1027
+ transformed_hash = {}
1028
+ openapi_types.each_pair do |key, type|
1029
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
1030
+ transformed_hash["#{key}"] = nil
1031
+ elsif type =~ /\AArray<(.*)>/i
1032
+ # check to ensure the input is an array given that the attribute
1033
+ # is documented as an array but the input is not
1034
+ if attributes[attribute_map[key]].is_a?(Array)
1035
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
1036
+ end
1037
+ elsif !attributes[attribute_map[key]].nil?
1038
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
1039
+ end
1040
+ end
1041
+ new(transformed_hash)
1042
+ end
1043
+
1044
+ # Deserializes the data based on type
1045
+ # @param string type Data type
1046
+ # @param string value Value to be deserialized
1047
+ # @return [Object] Deserialized data
1048
+ def self._deserialize(type, value)
1049
+ case type.to_sym
1050
+ when :Time
1051
+ Time.parse(value)
1052
+ when :Date
1053
+ Date.parse(value)
1054
+ when :String
1055
+ value.to_s
1056
+ when :Integer
1057
+ value.to_i
1058
+ when :Float
1059
+ value.to_f
1060
+ when :Boolean
1061
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1062
+ true
1063
+ else
1064
+ false
1065
+ end
1066
+ when :Object
1067
+ # generic object (usually a Hash), return directly
1068
+ value
1069
+ when /\AArray<(?<inner_type>.+)>\z/
1070
+ inner_type = Regexp.last_match[:inner_type]
1071
+ value.map { |v| _deserialize(inner_type, v) }
1072
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1073
+ k_type = Regexp.last_match[:k_type]
1074
+ v_type = Regexp.last_match[:v_type]
1075
+ {}.tap do |hash|
1076
+ value.each do |k, v|
1077
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1078
+ end
1079
+ end
1080
+ else # model
1081
+ # models (e.g. Pet) or oneOf
1082
+ klass = WalleeRubySdk.const_get(type)
1083
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
1084
+ end
1085
+ end
1086
+
1087
+ # Returns the string representation of the object
1088
+ # @return [String] String presentation of the object
1089
+ def to_s
1090
+ to_hash.to_s
1091
+ end
1092
+
1093
+ # to_body is an alias to to_hash (backward compatibility)
1094
+ # @return [Hash] Returns the object in the form of hash
1095
+ def to_body
1096
+ to_hash
1097
+ end
1098
+
1099
+ # Returns the object in the form of hash
1100
+ # @return [Hash] Returns the object in the form of hash
1101
+ def to_hash
1102
+ hash = {}
1103
+ self.class.attribute_map.each_pair do |attr, param|
1104
+ value = self.send(attr)
1105
+ if value.nil?
1106
+ is_nullable = self.class.openapi_nullable.include?(attr)
1107
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1108
+ end
1109
+
1110
+ hash[param] = _to_hash(value)
1111
+ end
1112
+ hash
1113
+ end
1114
+
1115
+ # Outputs non-array value in the form of hash
1116
+ # For object, use to_hash. Otherwise, just return the value
1117
+ # @param [Object] value Any valid value
1118
+ # @return [Hash] Returns the value in the form of hash
1119
+ def _to_hash(value)
1120
+ if value.is_a?(Array)
1121
+ value.compact.map { |v| _to_hash(v) }
1122
+ elsif value.is_a?(Hash)
1123
+ {}.tap do |hash|
1124
+ value.each { |k, v| hash[k] = _to_hash(v) }
1125
+ end
1126
+ elsif value.respond_to? :to_hash
1127
+ value.to_hash
1128
+ else
1129
+ value
1130
+ end
1131
+ end
1132
+
1133
+ end
1134
+
1135
+ end