wallee-ruby-sdk 1.0.1 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (472) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +1 -1
  3. data/LICENSE +1 -1
  4. data/README.md +107 -34
  5. data/lib/wallee-ruby-sdk.rb +260 -99
  6. data/lib/wallee-ruby-sdk/{services → api}/account_service_api.rb +37 -41
  7. data/lib/wallee-ruby-sdk/{services → api}/application_user_service_api.rb +37 -41
  8. data/lib/wallee-ruby-sdk/api/card_processing_service_api.rb +172 -0
  9. data/lib/wallee-ruby-sdk/{services → api}/charge_attempt_service_api.rb +22 -26
  10. data/lib/wallee-ruby-sdk/api/charge_flow_level_payment_link_service_api.rb +213 -0
  11. data/lib/wallee-ruby-sdk/{services → api}/charge_flow_level_service_api.rb +31 -35
  12. data/lib/wallee-ruby-sdk/{services → api}/charge_flow_service_api.rb +42 -46
  13. data/lib/wallee-ruby-sdk/{services → api}/condition_type_service_api.rb +15 -19
  14. data/lib/wallee-ruby-sdk/{services → api}/country_service_api.rb +7 -11
  15. data/lib/wallee-ruby-sdk/{services → api}/country_state_service_api.rb +15 -19
  16. data/lib/wallee-ruby-sdk/{services → api}/currency_service_api.rb +7 -11
  17. data/lib/wallee-ruby-sdk/api/customer_address_service_api.rb +460 -0
  18. data/lib/wallee-ruby-sdk/api/customer_comment_service_api.rb +522 -0
  19. data/lib/wallee-ruby-sdk/api/customer_service_api.rb +398 -0
  20. data/lib/wallee-ruby-sdk/api/debt_collection_case_service_api.rb +796 -0
  21. data/lib/wallee-ruby-sdk/api/debt_collector_configuration_service_api.rb +213 -0
  22. data/lib/wallee-ruby-sdk/api/debt_collector_service_api.rb +139 -0
  23. data/lib/wallee-ruby-sdk/{services → api}/delivery_indication_service_api.rb +40 -44
  24. data/lib/wallee-ruby-sdk/{services → api}/document_template_service_api.rb +22 -26
  25. data/lib/wallee-ruby-sdk/{services → api}/document_template_type_service_api.rb +15 -19
  26. data/lib/wallee-ruby-sdk/{services → api}/human_user_service_api.rb +94 -41
  27. data/lib/wallee-ruby-sdk/{services → api}/installment_payment_service_api.rb +33 -37
  28. data/lib/wallee-ruby-sdk/{services → api}/installment_payment_slice_service_api.rb +23 -27
  29. data/lib/wallee-ruby-sdk/{services → api}/installment_plan_calculation_service_api.rb +9 -13
  30. data/lib/wallee-ruby-sdk/{services → api}/installment_plan_configuration_service_api.rb +23 -27
  31. data/lib/wallee-ruby-sdk/{services → api}/installment_plan_slice_configuration_service_api.rb +23 -27
  32. data/lib/wallee-ruby-sdk/{services → api}/label_description_group_service_api.rb +15 -19
  33. data/lib/wallee-ruby-sdk/{services → api}/label_description_service_api.rb +15 -19
  34. data/lib/wallee-ruby-sdk/{services → api}/language_service_api.rb +7 -11
  35. data/lib/wallee-ruby-sdk/api/legal_organization_form_service_api.rb +197 -0
  36. data/lib/wallee-ruby-sdk/{services → api}/manual_task_service_api.rb +22 -26
  37. data/lib/wallee-ruby-sdk/api/mertic_usage_service_api.rb +96 -0
  38. data/lib/wallee-ruby-sdk/{services → api}/payment_connector_configuration_service_api.rb +22 -26
  39. data/lib/wallee-ruby-sdk/{services → api}/payment_connector_service_api.rb +15 -19
  40. data/lib/wallee-ruby-sdk/{services/token_service_api.rb → api/payment_link_service_api.rb} +68 -72
  41. data/lib/wallee-ruby-sdk/api/payment_method_brand_service_api.rb +139 -0
  42. data/lib/wallee-ruby-sdk/{services → api}/payment_method_configuration_service_api.rb +22 -26
  43. data/lib/wallee-ruby-sdk/{services → api}/payment_method_service_api.rb +15 -19
  44. data/lib/wallee-ruby-sdk/{services → api}/payment_processor_configuration_service_api.rb +22 -26
  45. data/lib/wallee-ruby-sdk/{services → api}/payment_processor_service_api.rb +15 -19
  46. data/lib/wallee-ruby-sdk/{services/email_template_service_api.rb → api/payment_terminal_service_api.rb} +36 -40
  47. data/lib/wallee-ruby-sdk/api/payment_terminal_till_service_api.rb +99 -0
  48. data/lib/wallee-ruby-sdk/{services → api}/permission_service_api.rb +15 -19
  49. data/lib/wallee-ruby-sdk/api/refund_comment_service_api.rb +464 -0
  50. data/lib/wallee-ruby-sdk/{services → api}/refund_service_api.rb +125 -61
  51. data/lib/wallee-ruby-sdk/api/shopify_recurring_order_service_api.rb +274 -0
  52. data/lib/wallee-ruby-sdk/api/shopify_subscriber_service_api.rb +213 -0
  53. data/lib/wallee-ruby-sdk/api/shopify_subscription_product_service_api.rb +337 -0
  54. data/lib/wallee-ruby-sdk/api/shopify_subscription_service_api.rb +466 -0
  55. data/lib/wallee-ruby-sdk/api/shopify_subscription_suspension_service_api.rb +337 -0
  56. data/lib/wallee-ruby-sdk/api/shopify_subscription_version_service_api.rb +213 -0
  57. data/lib/wallee-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  58. data/lib/wallee-ruby-sdk/{services → api}/space_service_api.rb +37 -41
  59. data/lib/wallee-ruby-sdk/{services → api}/static_value_service_api.rb +15 -19
  60. data/lib/wallee-ruby-sdk/{services → api}/subscriber_service_api.rb +46 -50
  61. data/lib/wallee-ruby-sdk/api/subscription_affiliate_service_api.rb +398 -0
  62. data/lib/wallee-ruby-sdk/{services → api}/subscription_charge_service_api.rb +38 -42
  63. data/lib/wallee-ruby-sdk/{services → api}/subscription_ledger_entry_service_api.rb +29 -33
  64. data/lib/wallee-ruby-sdk/{services → api}/subscription_metric_service_api.rb +43 -47
  65. data/lib/wallee-ruby-sdk/{services → api}/subscription_metric_usage_service_api.rb +29 -33
  66. data/lib/wallee-ruby-sdk/{services → api}/subscription_period_bill_service_api.rb +28 -32
  67. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_component_group_service_api.rb +43 -47
  68. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_component_service_api.rb +43 -47
  69. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_fee_tier_service_api.rb +43 -47
  70. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_metered_fee_service_api.rb +43 -47
  71. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_period_fee_service_api.rb +43 -47
  72. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_retirement_service_api.rb +29 -33
  73. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_service_api.rb +36 -40
  74. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_setup_fee_service_api.rb +43 -47
  75. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_version_retirement_service_api.rb +29 -33
  76. data/lib/wallee-ruby-sdk/{services → api}/subscription_product_version_service_api.rb +43 -47
  77. data/lib/wallee-ruby-sdk/{services → api}/subscription_service_api.rb +245 -115
  78. data/lib/wallee-ruby-sdk/{services → api}/subscription_suspension_service_api.rb +36 -40
  79. data/lib/wallee-ruby-sdk/{services → api}/subscription_version_service_api.rb +22 -26
  80. data/lib/wallee-ruby-sdk/api/token_service_api.rb +587 -0
  81. data/lib/wallee-ruby-sdk/{services → api}/token_version_service_api.rb +31 -35
  82. data/lib/wallee-ruby-sdk/api/transaction_comment_service_api.rb +464 -0
  83. data/lib/wallee-ruby-sdk/{services → api}/transaction_completion_service_api.rb +164 -44
  84. data/lib/wallee-ruby-sdk/api/transaction_iframe_service_api.rb +91 -0
  85. data/lib/wallee-ruby-sdk/api/transaction_invoice_comment_service_api.rb +464 -0
  86. data/lib/wallee-ruby-sdk/{services → api}/transaction_invoice_service_api.rb +186 -59
  87. data/lib/wallee-ruby-sdk/api/transaction_lightbox_service_api.rb +91 -0
  88. data/lib/wallee-ruby-sdk/api/transaction_mobile_sdk_service_api.rb +86 -0
  89. data/lib/wallee-ruby-sdk/api/transaction_payment_page_service_api.rb +91 -0
  90. data/lib/wallee-ruby-sdk/{services → api}/transaction_service_api.rb +273 -326
  91. data/lib/wallee-ruby-sdk/api/transaction_terminal_service_api.rb +172 -0
  92. data/lib/wallee-ruby-sdk/{services → api}/transaction_void_service_api.rb +40 -44
  93. data/lib/wallee-ruby-sdk/{services → api}/user_account_role_service_api.rb +27 -31
  94. data/lib/wallee-ruby-sdk/{services → api}/user_space_role_service_api.rb +30 -34
  95. data/lib/wallee-ruby-sdk/{services → api}/webhook_listener_service_api.rb +43 -47
  96. data/lib/wallee-ruby-sdk/{services → api}/webhook_url_service_api.rb +43 -47
  97. data/lib/wallee-ruby-sdk/api_client.rb +7 -7
  98. data/lib/wallee-ruby-sdk/api_error.rb +0 -4
  99. data/lib/wallee-ruby-sdk/configuration.rb +2 -6
  100. data/lib/wallee-ruby-sdk/models/abstract_account_update.rb +40 -14
  101. data/lib/wallee-ruby-sdk/models/abstract_application_user_update.rb +31 -14
  102. data/lib/wallee-ruby-sdk/models/abstract_customer_active.rb +312 -0
  103. data/lib/wallee-ruby-sdk/models/abstract_customer_address_active.rb +200 -0
  104. data/lib/wallee-ruby-sdk/models/abstract_customer_comment_active.rb +205 -0
  105. data/lib/wallee-ruby-sdk/models/abstract_debt_collection_case_update.rb +262 -0
  106. data/lib/wallee-ruby-sdk/models/abstract_human_user_update.rb +87 -15
  107. data/lib/wallee-ruby-sdk/models/abstract_payment_link_update.rb +309 -0
  108. data/lib/wallee-ruby-sdk/models/abstract_refund_comment_active.rb +205 -0
  109. data/lib/wallee-ruby-sdk/models/abstract_shopify_subscription_product_update.rb +320 -0
  110. data/lib/wallee-ruby-sdk/models/abstract_space_update.rb +51 -15
  111. data/lib/wallee-ruby-sdk/models/abstract_subscriber_update.rb +51 -14
  112. data/lib/wallee-ruby-sdk/models/abstract_subscription_affiliate_update.rb +246 -0
  113. data/lib/wallee-ruby-sdk/models/abstract_subscription_metric_update.rb +5 -13
  114. data/lib/wallee-ruby-sdk/models/abstract_subscription_product_active.rb +20 -13
  115. data/lib/wallee-ruby-sdk/models/abstract_token_update.rb +35 -13
  116. data/lib/wallee-ruby-sdk/models/abstract_transaction_comment_active.rb +205 -0
  117. data/lib/wallee-ruby-sdk/models/abstract_transaction_invoice_comment_active.rb +205 -0
  118. data/lib/wallee-ruby-sdk/models/abstract_transaction_pending.rb +136 -16
  119. data/lib/wallee-ruby-sdk/models/abstract_webhook_listener_update.rb +43 -14
  120. data/lib/wallee-ruby-sdk/models/abstract_webhook_url_update.rb +44 -13
  121. data/lib/wallee-ruby-sdk/models/account.rb +90 -13
  122. data/lib/wallee-ruby-sdk/models/account_create.rb +56 -14
  123. data/lib/wallee-ruby-sdk/models/account_state.rb +12 -20
  124. data/lib/wallee-ruby-sdk/models/account_type.rb +9 -17
  125. data/lib/wallee-ruby-sdk/models/account_update.rb +42 -15
  126. data/lib/wallee-ruby-sdk/models/address.rb +240 -22
  127. data/lib/wallee-ruby-sdk/models/address_create.rb +240 -22
  128. data/lib/wallee-ruby-sdk/models/application_user.rb +32 -14
  129. data/lib/wallee-ruby-sdk/models/application_user_create.rb +32 -14
  130. data/lib/wallee-ruby-sdk/models/application_user_create_with_mac_key.rb +31 -13
  131. data/lib/wallee-ruby-sdk/models/application_user_update.rb +33 -15
  132. data/lib/wallee-ruby-sdk/models/charge.rb +16 -13
  133. data/lib/wallee-ruby-sdk/models/charge_attempt.rb +61 -13
  134. data/lib/wallee-ruby-sdk/models/charge_attempt_environment.rb +8 -16
  135. data/lib/wallee-ruby-sdk/models/charge_attempt_state.rb +9 -17
  136. data/lib/wallee-ruby-sdk/models/charge_flow.rb +5 -12
  137. data/lib/wallee-ruby-sdk/models/charge_flow_level.rb +5 -12
  138. data/lib/wallee-ruby-sdk/models/charge_flow_level_configuration.rb +20 -12
  139. data/lib/wallee-ruby-sdk/models/charge_flow_level_configuration_type.rb +20 -15
  140. data/lib/wallee-ruby-sdk/models/charge_flow_level_payment_link.rb +231 -0
  141. data/lib/wallee-ruby-sdk/models/charge_flow_level_state.rb +9 -17
  142. data/lib/wallee-ruby-sdk/models/charge_state.rb +9 -17
  143. data/lib/wallee-ruby-sdk/models/charge_type.rb +10 -17
  144. data/lib/wallee-ruby-sdk/models/client_error.rb +5 -12
  145. data/lib/wallee-ruby-sdk/models/client_error_type.rb +9 -17
  146. data/lib/wallee-ruby-sdk/models/completion_line_item.rb +226 -0
  147. data/lib/wallee-ruby-sdk/models/completion_line_item_create.rb +245 -0
  148. data/lib/wallee-ruby-sdk/models/condition.rb +20 -12
  149. data/lib/wallee-ruby-sdk/models/condition_type.rb +7 -14
  150. data/lib/wallee-ruby-sdk/models/connector_invocation.rb +5 -12
  151. data/lib/wallee-ruby-sdk/models/connector_invocation_stage.rb +10 -18
  152. data/lib/wallee-ruby-sdk/models/creation_entity_state.rb +11 -19
  153. data/lib/wallee-ruby-sdk/models/criteria_operator.rb +18 -23
  154. data/lib/wallee-ruby-sdk/models/customer.rb +353 -0
  155. data/lib/wallee-ruby-sdk/models/customer_active.rb +343 -0
  156. data/lib/wallee-ruby-sdk/models/customer_address.rb +261 -0
  157. data/lib/wallee-ruby-sdk/models/customer_address_active.rb +231 -0
  158. data/lib/wallee-ruby-sdk/models/customer_address_create.rb +216 -0
  159. data/lib/wallee-ruby-sdk/models/customer_address_type.rb +36 -0
  160. data/lib/wallee-ruby-sdk/models/customer_comment.rb +296 -0
  161. data/lib/wallee-ruby-sdk/models/customer_comment_active.rb +236 -0
  162. data/lib/wallee-ruby-sdk/models/customer_comment_create.rb +221 -0
  163. data/lib/wallee-ruby-sdk/models/customer_create.rb +313 -0
  164. data/lib/wallee-ruby-sdk/models/customer_postal_address.rb +606 -0
  165. data/lib/wallee-ruby-sdk/models/customer_postal_address_create.rb +606 -0
  166. data/lib/wallee-ruby-sdk/models/customers_presence.rb +9 -17
  167. data/lib/wallee-ruby-sdk/models/data_collection_type.rb +8 -16
  168. data/lib/wallee-ruby-sdk/models/database_translated_string.rb +5 -12
  169. data/lib/wallee-ruby-sdk/models/database_translated_string_create.rb +5 -12
  170. data/lib/wallee-ruby-sdk/models/database_translated_string_item.rb +20 -12
  171. data/lib/wallee-ruby-sdk/models/database_translated_string_item_create.rb +21 -13
  172. data/lib/wallee-ruby-sdk/models/debt_collection_case.rb +495 -0
  173. data/lib/wallee-ruby-sdk/models/debt_collection_case_create.rb +303 -0
  174. data/lib/wallee-ruby-sdk/models/debt_collection_case_document.rb +338 -0
  175. data/lib/wallee-ruby-sdk/models/debt_collection_case_source.rb +225 -0
  176. data/lib/wallee-ruby-sdk/models/debt_collection_case_state.rb +40 -0
  177. data/lib/wallee-ruby-sdk/models/debt_collection_case_update.rb +293 -0
  178. data/lib/wallee-ruby-sdk/models/debt_collection_environment.rb +35 -0
  179. data/lib/wallee-ruby-sdk/models/debt_collection_receipt.rb +305 -0
  180. data/lib/wallee-ruby-sdk/models/debt_collection_receipt_source.rb +215 -0
  181. data/lib/wallee-ruby-sdk/models/debt_collector.rb +215 -0
  182. data/lib/wallee-ruby-sdk/models/{email_sender.rb → debt_collector_condition.rb} +34 -46
  183. data/lib/wallee-ruby-sdk/models/debt_collector_condition_type.rb +215 -0
  184. data/lib/wallee-ruby-sdk/models/debt_collector_configuration.rb +310 -0
  185. data/lib/wallee-ruby-sdk/models/delivery_indication.rb +16 -13
  186. data/lib/wallee-ruby-sdk/models/delivery_indication_decision_reason.rb +7 -14
  187. data/lib/wallee-ruby-sdk/models/delivery_indication_state.rb +10 -18
  188. data/lib/wallee-ruby-sdk/models/document_template.rb +41 -13
  189. data/lib/wallee-ruby-sdk/models/document_template_type.rb +18 -25
  190. data/lib/wallee-ruby-sdk/models/document_template_type_group.rb +203 -0
  191. data/lib/wallee-ruby-sdk/models/entity_export_request.rb +208 -0
  192. data/lib/wallee-ruby-sdk/models/entity_query.rb +6 -13
  193. data/lib/wallee-ruby-sdk/models/entity_query_filter.rb +6 -13
  194. data/lib/wallee-ruby-sdk/models/entity_query_filter_type.rb +9 -17
  195. data/lib/wallee-ruby-sdk/models/entity_query_order_by.rb +15 -12
  196. data/lib/wallee-ruby-sdk/models/entity_query_order_by_type.rb +8 -16
  197. data/lib/wallee-ruby-sdk/models/environment.rb +35 -0
  198. data/lib/wallee-ruby-sdk/models/failure_category.rb +11 -19
  199. data/lib/wallee-ruby-sdk/models/failure_reason.rb +7 -14
  200. data/lib/wallee-ruby-sdk/models/feature.rb +18 -15
  201. data/lib/wallee-ruby-sdk/models/feature_category.rb +225 -0
  202. data/lib/wallee-ruby-sdk/models/gender.rb +8 -16
  203. data/lib/wallee-ruby-sdk/models/human_user.rb +107 -14
  204. data/lib/wallee-ruby-sdk/models/human_user_create.rb +86 -13
  205. data/lib/wallee-ruby-sdk/models/human_user_update.rb +88 -15
  206. data/lib/wallee-ruby-sdk/models/installment_calculated_plan.rb +5 -12
  207. data/lib/wallee-ruby-sdk/models/installment_calculated_slice.rb +5 -12
  208. data/lib/wallee-ruby-sdk/models/installment_payment.rb +5 -12
  209. data/lib/wallee-ruby-sdk/models/installment_payment_slice.rb +5 -12
  210. data/lib/wallee-ruby-sdk/models/installment_payment_slice_state.rb +13 -21
  211. data/lib/wallee-ruby-sdk/models/installment_payment_state.rb +14 -22
  212. data/lib/wallee-ruby-sdk/models/installment_plan_configuration.rb +20 -12
  213. data/lib/wallee-ruby-sdk/models/installment_plan_slice_configuration.rb +5 -12
  214. data/lib/wallee-ruby-sdk/models/label.rb +5 -12
  215. data/lib/wallee-ruby-sdk/models/label_descriptor.rb +7 -14
  216. data/lib/wallee-ruby-sdk/models/label_descriptor_category.rb +8 -16
  217. data/lib/wallee-ruby-sdk/models/label_descriptor_group.rb +7 -14
  218. data/lib/wallee-ruby-sdk/models/label_descriptor_type.rb +7 -14
  219. data/lib/wallee-ruby-sdk/models/legal_organization_form.rb +5 -12
  220. data/lib/wallee-ruby-sdk/models/line_item.rb +121 -14
  221. data/lib/wallee-ruby-sdk/models/line_item_attribute.rb +35 -12
  222. data/lib/wallee-ruby-sdk/models/line_item_attribute_create.rb +45 -14
  223. data/lib/wallee-ruby-sdk/models/line_item_create.rb +84 -19
  224. data/lib/wallee-ruby-sdk/models/line_item_reduction.rb +20 -12
  225. data/lib/wallee-ruby-sdk/models/line_item_reduction_create.rb +27 -15
  226. data/lib/wallee-ruby-sdk/models/line_item_type.rb +10 -18
  227. data/lib/wallee-ruby-sdk/models/localized_string.rb +5 -12
  228. data/lib/wallee-ruby-sdk/models/manual_task.rb +5 -12
  229. data/lib/wallee-ruby-sdk/models/manual_task_action.rb +6 -13
  230. data/lib/wallee-ruby-sdk/models/manual_task_action_style.rb +9 -17
  231. data/lib/wallee-ruby-sdk/models/manual_task_state.rb +9 -17
  232. data/lib/wallee-ruby-sdk/models/manual_task_type.rb +7 -14
  233. data/lib/wallee-ruby-sdk/models/metric_usage.rb +225 -0
  234. data/lib/wallee-ruby-sdk/models/one_click_payment_mode.rb +9 -17
  235. data/lib/wallee-ruby-sdk/models/payment_connector.rb +30 -15
  236. data/lib/wallee-ruby-sdk/models/payment_connector_configuration.rb +33 -13
  237. data/lib/wallee-ruby-sdk/models/payment_connector_feature.rb +5 -12
  238. data/lib/wallee-ruby-sdk/models/payment_contract.rb +355 -0
  239. data/lib/wallee-ruby-sdk/models/payment_contract_state.rb +38 -0
  240. data/lib/wallee-ruby-sdk/models/{email_sender_type.rb → payment_contract_type.rb} +9 -16
  241. data/lib/wallee-ruby-sdk/models/payment_information_hash.rb +211 -0
  242. data/lib/wallee-ruby-sdk/models/payment_information_hash_type.rb +203 -0
  243. data/lib/wallee-ruby-sdk/models/payment_link.rb +414 -0
  244. data/lib/wallee-ruby-sdk/models/payment_link_active.rb +350 -0
  245. data/lib/wallee-ruby-sdk/models/payment_link_create.rb +373 -0
  246. data/lib/wallee-ruby-sdk/models/payment_link_protection_mode.rb +35 -0
  247. data/lib/wallee-ruby-sdk/models/payment_link_update.rb +340 -0
  248. data/lib/wallee-ruby-sdk/models/payment_method.rb +20 -15
  249. data/lib/wallee-ruby-sdk/models/payment_method_brand.rb +7 -14
  250. data/lib/wallee-ruby-sdk/models/payment_method_configuration.rb +22 -14
  251. data/lib/wallee-ruby-sdk/models/payment_primary_risk_taker.rb +9 -17
  252. data/lib/wallee-ruby-sdk/models/payment_processor.rb +10 -17
  253. data/lib/wallee-ruby-sdk/models/payment_processor_configuration.rb +31 -13
  254. data/lib/wallee-ruby-sdk/models/{email_template.rb → payment_terminal.rb} +51 -79
  255. data/lib/wallee-ruby-sdk/models/payment_terminal_address.rb +456 -0
  256. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration.rb +266 -0
  257. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_state.rb +37 -0
  258. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version.rb +313 -0
  259. data/lib/wallee-ruby-sdk/models/payment_terminal_configuration_version_state.rb +38 -0
  260. data/lib/wallee-ruby-sdk/models/{space_address_setter.rb → payment_terminal_contact_address.rb} +105 -27
  261. data/lib/wallee-ruby-sdk/models/payment_terminal_location.rb +286 -0
  262. data/lib/wallee-ruby-sdk/models/payment_terminal_location_state.rb +37 -0
  263. data/lib/wallee-ruby-sdk/models/payment_terminal_location_version.rb +281 -0
  264. data/lib/wallee-ruby-sdk/models/payment_terminal_location_version_state.rb +38 -0
  265. data/lib/wallee-ruby-sdk/models/payment_terminal_state.rb +38 -0
  266. data/lib/wallee-ruby-sdk/models/{attachment_resource.rb → payment_terminal_type.rb} +33 -28
  267. data/lib/wallee-ruby-sdk/models/permission.rb +20 -17
  268. data/lib/wallee-ruby-sdk/models/persistable_currency_amount.rb +5 -12
  269. data/lib/wallee-ruby-sdk/models/persistable_currency_amount_update.rb +5 -12
  270. data/lib/wallee-ruby-sdk/models/product_fee_type.rb +9 -17
  271. data/lib/wallee-ruby-sdk/models/product_metered_fee.rb +5 -12
  272. data/lib/wallee-ruby-sdk/models/product_metered_fee_update.rb +7 -14
  273. data/lib/wallee-ruby-sdk/models/product_metered_tier_fee.rb +5 -12
  274. data/lib/wallee-ruby-sdk/models/product_metered_tier_fee_update.rb +7 -14
  275. data/lib/wallee-ruby-sdk/models/product_metered_tier_pricing.rb +8 -16
  276. data/lib/wallee-ruby-sdk/models/product_period_fee.rb +16 -13
  277. data/lib/wallee-ruby-sdk/models/product_period_fee_update.rb +18 -15
  278. data/lib/wallee-ruby-sdk/models/product_setup_fee.rb +5 -12
  279. data/lib/wallee-ruby-sdk/models/product_setup_fee_update.rb +7 -14
  280. data/lib/wallee-ruby-sdk/models/refund.rb +130 -13
  281. data/lib/wallee-ruby-sdk/models/refund_comment.rb +296 -0
  282. data/lib/wallee-ruby-sdk/models/refund_comment_active.rb +236 -0
  283. data/lib/wallee-ruby-sdk/models/refund_comment_create.rb +221 -0
  284. data/lib/wallee-ruby-sdk/models/refund_create.rb +67 -21
  285. data/lib/wallee-ruby-sdk/models/refund_state.rb +12 -19
  286. data/lib/wallee-ruby-sdk/models/refund_type.rb +10 -18
  287. data/lib/wallee-ruby-sdk/models/rendered_document.rb +5 -12
  288. data/lib/wallee-ruby-sdk/models/rendered_terminal_receipt.rb +203 -0
  289. data/lib/wallee-ruby-sdk/models/resource_path.rb +29 -12
  290. data/lib/wallee-ruby-sdk/models/resource_state.rb +9 -17
  291. data/lib/wallee-ruby-sdk/models/rest_address_format.rb +227 -0
  292. data/lib/wallee-ruby-sdk/models/rest_address_format_field.rb +43 -0
  293. data/lib/wallee-ruby-sdk/models/rest_country.rb +16 -13
  294. data/lib/wallee-ruby-sdk/models/rest_country_state.rb +5 -12
  295. data/lib/wallee-ruby-sdk/models/rest_currency.rb +5 -12
  296. data/lib/wallee-ruby-sdk/models/rest_language.rb +5 -12
  297. data/lib/wallee-ruby-sdk/models/role.rb +16 -13
  298. data/lib/wallee-ruby-sdk/models/sales_channel.rb +245 -0
  299. data/lib/wallee-ruby-sdk/models/scope.rb +61 -13
  300. data/lib/wallee-ruby-sdk/models/server_error.rb +5 -12
  301. data/lib/wallee-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  302. data/lib/wallee-ruby-sdk/models/shopify_integration.rb +470 -0
  303. data/lib/wallee-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  304. data/lib/wallee-ruby-sdk/models/shopify_integration_subscription_app_version.rb +36 -0
  305. data/lib/wallee-ruby-sdk/models/shopify_recurring_order.rb +351 -0
  306. data/lib/wallee-ruby-sdk/models/shopify_recurring_order_state.rb +39 -0
  307. data/lib/wallee-ruby-sdk/models/shopify_recurring_order_update_request.rb +201 -0
  308. data/lib/wallee-ruby-sdk/models/shopify_subscriber.rb +281 -0
  309. data/lib/wallee-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  310. data/lib/wallee-ruby-sdk/models/shopify_subscriber_state.rb +36 -0
  311. data/lib/wallee-ruby-sdk/models/shopify_subscription.rb +365 -0
  312. data/lib/wallee-ruby-sdk/models/shopify_subscription_address.rb +546 -0
  313. data/lib/wallee-ruby-sdk/models/shopify_subscription_address_create.rb +546 -0
  314. data/lib/wallee-ruby-sdk/models/shopify_subscription_billing_interval_unit.rb +39 -0
  315. data/lib/wallee-ruby-sdk/models/shopify_subscription_creation_request.rb +353 -0
  316. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +261 -0
  317. data/lib/wallee-ruby-sdk/models/shopify_subscription_model_item.rb +233 -0
  318. data/lib/wallee-ruby-sdk/models/{entity_reference.rb → shopify_subscription_model_tax_line.rb} +27 -14
  319. data/lib/wallee-ruby-sdk/models/shopify_subscription_product.rb +471 -0
  320. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_create.rb +366 -0
  321. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_pricing_option.rb +38 -0
  322. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_state.rb +39 -0
  323. data/lib/wallee-ruby-sdk/models/shopify_subscription_product_update.rb +351 -0
  324. data/lib/wallee-ruby-sdk/models/shopify_subscription_state.rb +39 -0
  325. data/lib/wallee-ruby-sdk/models/shopify_subscription_suspension.rb +311 -0
  326. data/lib/wallee-ruby-sdk/models/shopify_subscription_suspension_create.rb +226 -0
  327. data/lib/wallee-ruby-sdk/models/shopify_subscription_suspension_initiator.rb +35 -0
  328. data/lib/wallee-ruby-sdk/models/shopify_subscription_suspension_state.rb +35 -0
  329. data/lib/wallee-ruby-sdk/models/shopify_subscription_suspension_type.rb +35 -0
  330. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  331. data/lib/wallee-ruby-sdk/models/shopify_subscription_update_request.rb +233 -0
  332. data/lib/wallee-ruby-sdk/models/shopify_subscription_version.rb +453 -0
  333. data/lib/wallee-ruby-sdk/models/shopify_subscription_version_item.rb +233 -0
  334. data/lib/wallee-ruby-sdk/models/shopify_subscription_version_item_price_strategy.rb +35 -0
  335. data/lib/wallee-ruby-sdk/models/shopify_subscription_version_state.rb +36 -0
  336. data/lib/wallee-ruby-sdk/models/shopify_subscription_weekday.rb +40 -0
  337. data/lib/wallee-ruby-sdk/models/shopify_tax_line.rb +231 -0
  338. data/lib/wallee-ruby-sdk/models/shopify_transaction.rb +301 -0
  339. data/lib/wallee-ruby-sdk/models/shopify_transaction_state.rb +38 -0
  340. data/lib/wallee-ruby-sdk/models/space.rb +91 -14
  341. data/lib/wallee-ruby-sdk/models/space_address.rb +120 -22
  342. data/lib/wallee-ruby-sdk/models/space_address_create.rb +120 -22
  343. data/lib/wallee-ruby-sdk/models/space_create.rb +52 -15
  344. data/lib/wallee-ruby-sdk/models/space_reference.rb +5 -12
  345. data/lib/wallee-ruby-sdk/models/space_reference_state.rb +11 -19
  346. data/lib/wallee-ruby-sdk/models/space_update.rb +53 -16
  347. data/lib/wallee-ruby-sdk/models/space_view.rb +29 -12
  348. data/lib/wallee-ruby-sdk/models/static_value.rb +7 -14
  349. data/lib/wallee-ruby-sdk/models/subscriber.rb +51 -13
  350. data/lib/wallee-ruby-sdk/models/subscriber_active.rb +53 -15
  351. data/lib/wallee-ruby-sdk/models/subscriber_create.rb +52 -14
  352. data/lib/wallee-ruby-sdk/models/subscriber_update.rb +53 -15
  353. data/lib/wallee-ruby-sdk/models/subscription.rb +86 -13
  354. data/lib/wallee-ruby-sdk/models/subscription_affiliate.rb +355 -0
  355. data/lib/wallee-ruby-sdk/models/subscription_affiliate_create.rb +333 -0
  356. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleted.rb +355 -0
  357. data/lib/wallee-ruby-sdk/models/subscription_affiliate_deleting.rb +355 -0
  358. data/lib/wallee-ruby-sdk/models/subscription_affiliate_inactive.rb +277 -0
  359. data/lib/wallee-ruby-sdk/models/subscription_affiliate_update.rb +277 -0
  360. data/lib/wallee-ruby-sdk/models/subscription_change_request.rb +27 -17
  361. data/lib/wallee-ruby-sdk/models/subscription_charge.rb +79 -13
  362. data/lib/wallee-ruby-sdk/models/subscription_charge_create.rb +71 -15
  363. data/lib/wallee-ruby-sdk/models/subscription_charge_processing_type.rb +8 -16
  364. data/lib/wallee-ruby-sdk/models/subscription_charge_state.rb +11 -19
  365. data/lib/wallee-ruby-sdk/models/subscription_charge_type.rb +8 -16
  366. data/lib/wallee-ruby-sdk/models/subscription_component_configuration.rb +201 -0
  367. data/lib/wallee-ruby-sdk/models/subscription_component_reference_configuration.rb +201 -0
  368. data/lib/wallee-ruby-sdk/models/subscription_create_request.rb +22 -17
  369. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry.rb +29 -12
  370. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_create.rb +38 -17
  371. data/lib/wallee-ruby-sdk/models/subscription_ledger_entry_state.rb +9 -17
  372. data/lib/wallee-ruby-sdk/models/subscription_metric.rb +5 -12
  373. data/lib/wallee-ruby-sdk/models/subscription_metric_active.rb +7 -14
  374. data/lib/wallee-ruby-sdk/models/subscription_metric_create.rb +7 -14
  375. data/lib/wallee-ruby-sdk/models/subscription_metric_type.rb +7 -14
  376. data/lib/wallee-ruby-sdk/models/subscription_metric_update.rb +7 -14
  377. data/lib/wallee-ruby-sdk/models/subscription_metric_usage_report.rb +20 -12
  378. data/lib/wallee-ruby-sdk/models/subscription_metric_usage_report_create.rb +24 -16
  379. data/lib/wallee-ruby-sdk/models/subscription_pending.rb +48 -15
  380. data/lib/wallee-ruby-sdk/models/subscription_period_bill.rb +5 -12
  381. data/lib/wallee-ruby-sdk/models/subscription_period_bill_state.rb +8 -16
  382. data/lib/wallee-ruby-sdk/models/subscription_product.rb +35 -12
  383. data/lib/wallee-ruby-sdk/models/subscription_product_active.rb +22 -14
  384. data/lib/wallee-ruby-sdk/models/subscription_product_component.rb +36 -13
  385. data/lib/wallee-ruby-sdk/models/subscription_product_component_group.rb +5 -12
  386. data/lib/wallee-ruby-sdk/models/subscription_product_component_group_update.rb +7 -14
  387. data/lib/wallee-ruby-sdk/models/subscription_product_component_reference.rb +20 -12
  388. data/lib/wallee-ruby-sdk/models/subscription_product_component_reference_state.rb +10 -18
  389. data/lib/wallee-ruby-sdk/models/subscription_product_component_update.rb +38 -15
  390. data/lib/wallee-ruby-sdk/models/subscription_product_create.rb +40 -13
  391. data/lib/wallee-ruby-sdk/models/subscription_product_retirement.rb +5 -12
  392. data/lib/wallee-ruby-sdk/models/subscription_product_retirement_create.rb +6 -13
  393. data/lib/wallee-ruby-sdk/models/subscription_product_state.rb +11 -19
  394. data/lib/wallee-ruby-sdk/models/subscription_product_version.rb +31 -13
  395. data/lib/wallee-ruby-sdk/models/subscription_product_version_pending.rb +19 -16
  396. data/lib/wallee-ruby-sdk/models/subscription_product_version_retirement.rb +5 -12
  397. data/lib/wallee-ruby-sdk/models/subscription_product_version_retirement_create.rb +6 -13
  398. data/lib/wallee-ruby-sdk/models/subscription_product_version_state.rb +11 -19
  399. data/lib/wallee-ruby-sdk/models/subscription_state.rb +14 -21
  400. data/lib/wallee-ruby-sdk/models/subscription_suspension.rb +20 -12
  401. data/lib/wallee-ruby-sdk/models/subscription_suspension_action.rb +8 -16
  402. data/lib/wallee-ruby-sdk/models/subscription_suspension_create.rb +23 -15
  403. data/lib/wallee-ruby-sdk/models/subscription_suspension_reason.rb +9 -17
  404. data/lib/wallee-ruby-sdk/models/subscription_suspension_running.rb +20 -12
  405. data/lib/wallee-ruby-sdk/models/subscription_suspension_state.rb +8 -16
  406. data/lib/wallee-ruby-sdk/models/subscription_update.rb +33 -15
  407. data/lib/wallee-ruby-sdk/models/subscription_update_request.rb +206 -0
  408. data/lib/wallee-ruby-sdk/models/subscription_version.rb +18 -13
  409. data/lib/wallee-ruby-sdk/models/subscription_version_state.rb +12 -20
  410. data/lib/wallee-ruby-sdk/models/tax.rb +29 -12
  411. data/lib/wallee-ruby-sdk/models/tax_calculation.rb +35 -0
  412. data/lib/wallee-ruby-sdk/models/tax_class.rb +20 -12
  413. data/lib/wallee-ruby-sdk/models/tax_create.rb +35 -14
  414. data/lib/wallee-ruby-sdk/models/tenant_database.rb +20 -12
  415. data/lib/wallee-ruby-sdk/models/token.rb +59 -12
  416. data/lib/wallee-ruby-sdk/models/token_create.rb +64 -13
  417. data/lib/wallee-ruby-sdk/models/token_update.rb +37 -14
  418. data/lib/wallee-ruby-sdk/models/token_version.rb +78 -13
  419. data/lib/wallee-ruby-sdk/models/token_version_state.rb +9 -17
  420. data/lib/wallee-ruby-sdk/models/token_version_type.rb +7 -14
  421. data/lib/wallee-ruby-sdk/models/tokenization_mode.rb +37 -0
  422. data/lib/wallee-ruby-sdk/models/transaction.rb +291 -16
  423. data/lib/wallee-ruby-sdk/models/transaction_aware_entity.rb +5 -12
  424. data/lib/wallee-ruby-sdk/models/transaction_comment.rb +296 -0
  425. data/lib/wallee-ruby-sdk/models/transaction_comment_active.rb +236 -0
  426. data/lib/wallee-ruby-sdk/models/transaction_comment_create.rb +221 -0
  427. data/lib/wallee-ruby-sdk/models/transaction_completion.rb +151 -13
  428. data/lib/wallee-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  429. data/lib/wallee-ruby-sdk/models/transaction_completion_mode.rb +9 -17
  430. data/lib/wallee-ruby-sdk/models/transaction_completion_request.rb +291 -0
  431. data/lib/wallee-ruby-sdk/models/transaction_completion_state.rb +11 -18
  432. data/lib/wallee-ruby-sdk/models/transaction_create.rb +200 -15
  433. data/lib/wallee-ruby-sdk/models/transaction_environment_selection_strategy.rb +36 -0
  434. data/lib/wallee-ruby-sdk/models/transaction_group.rb +20 -12
  435. data/lib/wallee-ruby-sdk/models/transaction_group_state.rb +9 -17
  436. data/lib/wallee-ruby-sdk/models/transaction_invoice.rb +85 -13
  437. data/lib/wallee-ruby-sdk/models/transaction_invoice_comment.rb +296 -0
  438. data/lib/wallee-ruby-sdk/models/transaction_invoice_comment_active.rb +236 -0
  439. data/lib/wallee-ruby-sdk/models/transaction_invoice_comment_create.rb +221 -0
  440. data/lib/wallee-ruby-sdk/models/transaction_invoice_replacement.rb +62 -16
  441. data/lib/wallee-ruby-sdk/models/transaction_invoice_state.rb +13 -21
  442. data/lib/wallee-ruby-sdk/models/transaction_line_item_update_request.rb +6 -13
  443. data/lib/wallee-ruby-sdk/models/transaction_line_item_version.rb +5 -12
  444. data/lib/wallee-ruby-sdk/models/transaction_pending.rb +137 -16
  445. data/lib/wallee-ruby-sdk/models/transaction_state.rb +16 -24
  446. data/lib/wallee-ruby-sdk/models/transaction_user_interface_type.rb +11 -17
  447. data/lib/wallee-ruby-sdk/models/transaction_void.rb +5 -12
  448. data/lib/wallee-ruby-sdk/models/transaction_void_mode.rb +8 -16
  449. data/lib/wallee-ruby-sdk/models/transaction_void_state.rb +10 -18
  450. data/lib/wallee-ruby-sdk/models/{email_template_type.rb → two_factor_authentication_type.rb} +18 -71
  451. data/lib/wallee-ruby-sdk/models/unencrypted_card_data.rb +284 -0
  452. data/lib/wallee-ruby-sdk/models/unencrypted_card_data_create.rb +293 -0
  453. data/lib/wallee-ruby-sdk/models/user.rb +5 -12
  454. data/lib/wallee-ruby-sdk/models/user_account_role.rb +5 -12
  455. data/lib/wallee-ruby-sdk/models/user_space_role.rb +5 -12
  456. data/lib/wallee-ruby-sdk/models/user_type.rb +11 -19
  457. data/lib/wallee-ruby-sdk/models/webhook_identity.rb +20 -12
  458. data/lib/wallee-ruby-sdk/models/webhook_listener.rb +20 -12
  459. data/lib/wallee-ruby-sdk/models/webhook_listener_create.rb +44 -41
  460. data/lib/wallee-ruby-sdk/models/webhook_listener_entity.rb +7 -24
  461. data/lib/wallee-ruby-sdk/models/webhook_listener_update.rb +45 -15
  462. data/lib/wallee-ruby-sdk/models/webhook_url.rb +44 -12
  463. data/lib/wallee-ruby-sdk/models/webhook_url_create.rb +44 -12
  464. data/lib/wallee-ruby-sdk/models/webhook_url_update.rb +46 -14
  465. data/lib/wallee-ruby-sdk/version.rb +1 -5
  466. data/test/{transactioncreate.rb → transaction_create_service_test.rb} +2 -2
  467. data/test/transaction_payment_page_service_test.rb +91 -0
  468. data/wallee-ruby-sdk.gemspec +5 -8
  469. metadata +262 -87
  470. data/lib/wallee-ruby-sdk/services/email_sender_service_api.rb +0 -219
  471. data/lib/wallee-ruby-sdk/services/email_sender_type_service_api.rb +0 -143
  472. data/lib/wallee-ruby-sdk/services/email_template_type_service_api.rb +0 -143
@@ -1,10 +1,6 @@
1
1
  =begin
2
- Wallee API: 1.0.0
3
-
4
2
  The wallee API allows an easy interaction with the wallee web service.
5
3
 
6
-
7
-
8
4
  Licensed under the Apache License, Version 2.0 (the "License");
9
5
  you may not use this file except in compliance with the License.
10
6
  You may obtain a copy of the License at
@@ -24,21 +20,17 @@ require 'date'
24
20
  module Wallee
25
21
  class CustomersPresence
26
22
 
27
- NOT_PRESENT = "NOT_PRESENT".freeze
28
- VIRTUAL_PRESENT = "VIRTUAL_PRESENT".freeze
29
- PHYSICAL_PRESENT = "PHYSICAL_PRESENT".freeze
30
-
31
- # Builds the object from hash
32
- # @param [Hash] attributes Model attributes in the form of hash
33
- # @return [Object] Returns the model itself
23
+ NOT_PRESENT = 'NOT_PRESENT'.freeze
24
+ VIRTUAL_PRESENT = 'VIRTUAL_PRESENT'.freeze
25
+ PHYSICAL_PRESENT = 'PHYSICAL_PRESENT'.freeze
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
34
30
  def build_from_hash(value)
35
-
36
- consantValues = CustomersPresence.constants.select{|c| c.to_s == value}
37
- raise "Invalid ENUM value #{value} for class #CustomersPresence" if consantValues.empty?
38
-
31
+ constantValues = CustomersPresence.constants.select { |c| CustomersPresence::const_get(c) == value }
32
+ raise "Invalid ENUM value #{value} for class #CustomersPresence" if constantValues.empty?
39
33
  value
40
-
41
34
  end
42
35
  end
43
-
44
36
  end
@@ -1,10 +1,6 @@
1
1
  =begin
2
- Wallee API: 1.0.0
3
-
4
2
  The wallee API allows an easy interaction with the wallee web service.
5
3
 
6
-
7
-
8
4
  Licensed under the Apache License, Version 2.0 (the "License");
9
5
  you may not use this file except in compliance with the License.
10
6
  You may obtain a copy of the License at
@@ -24,20 +20,16 @@ require 'date'
24
20
  module Wallee
25
21
  class DataCollectionType
26
22
 
27
- ONSITE = "ONSITE".freeze
28
- OFFSITE = "OFFSITE".freeze
29
-
30
- # Builds the object from hash
31
- # @param [Hash] attributes Model attributes in the form of hash
32
- # @return [Object] Returns the model itself
23
+ ONSITE = 'ONSITE'.freeze
24
+ OFFSITE = 'OFFSITE'.freeze
25
+
26
+ # Builds the enum from string
27
+ # @param [String] The enum value in the form of the string
28
+ # @return [String] The enum value
33
29
  def build_from_hash(value)
34
-
35
- consantValues = DataCollectionType.constants.select{|c| c.to_s == value}
36
- raise "Invalid ENUM value #{value} for class #DataCollectionType" if consantValues.empty?
37
-
30
+ constantValues = DataCollectionType.constants.select { |c| DataCollectionType::const_get(c) == value }
31
+ raise "Invalid ENUM value #{value} for class #DataCollectionType" if constantValues.empty?
38
32
  value
39
-
40
33
  end
41
34
  end
42
-
43
35
  end
@@ -1,10 +1,6 @@
1
1
  =begin
2
- Wallee API: 1.0.0
3
-
4
2
  The wallee API allows an easy interaction with the wallee web service.
5
3
 
6
-
7
-
8
4
  Licensed under the Apache License, Version 2.0 (the "License");
9
5
  you may not use this file except in compliance with the License.
10
6
  You may obtain a copy of the License at
@@ -33,7 +29,6 @@ module Wallee
33
29
  #
34
30
  attr_accessor :items
35
31
 
36
-
37
32
  # Attribute mapping from ruby-style variable name to JSON key.
38
33
  def self.attribute_map
39
34
  {
@@ -58,7 +53,7 @@ module Wallee
58
53
  return unless attributes.is_a?(Hash)
59
54
 
60
55
  # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
62
57
 
63
58
  if attributes.has_key?(:'availableLanguages')
64
59
  if (value = attributes[:'availableLanguages']).is_a?(Array)
@@ -75,20 +70,19 @@ module Wallee
75
70
  self.items = value
76
71
  end
77
72
  end
78
-
79
73
  end
80
74
 
81
75
  # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properies with the reasons
76
+ # @return Array for valid properties with the reasons
83
77
  def list_invalid_properties
84
78
  invalid_properties = Array.new
85
- return invalid_properties
79
+ invalid_properties
86
80
  end
87
81
 
88
82
  # Check to see if the all the properties in the model are valid
89
83
  # @return true if the model is valid
90
84
  def valid?
91
- return true
85
+ true
92
86
  end
93
87
 
94
88
  # Checks equality by comparing each attribute.
@@ -120,7 +114,7 @@ module Wallee
120
114
  return nil unless attributes.is_a?(Hash)
121
115
  self.class.swagger_types.each_pair do |key, type|
122
116
  if type =~ /\AArray<(.*)>/i
123
- # check to ensure the input is an array given that the the attribute
117
+ # check to ensure the input is an array given that the attribute
124
118
  # is documented as an array but the input is not
125
119
  if attributes[self.class.attribute_map[key]].is_a?(Array)
126
120
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
@@ -218,5 +212,4 @@ module Wallee
218
212
  end
219
213
 
220
214
  end
221
-
222
215
  end
@@ -1,10 +1,6 @@
1
1
  =begin
2
- Wallee API: 1.0.0
3
-
4
2
  The wallee API allows an easy interaction with the wallee web service.
5
3
 
6
-
7
-
8
4
  Licensed under the Apache License, Version 2.0 (the "License");
9
5
  you may not use this file except in compliance with the License.
10
6
  You may obtain a copy of the License at
@@ -27,7 +23,6 @@ module Wallee
27
23
  #
28
24
  attr_accessor :items
29
25
 
30
-
31
26
  # Attribute mapping from ruby-style variable name to JSON key.
32
27
  def self.attribute_map
33
28
  {
@@ -48,27 +43,26 @@ module Wallee
48
43
  return unless attributes.is_a?(Hash)
49
44
 
50
45
  # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
46
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
47
 
53
48
  if attributes.has_key?(:'items')
54
49
  if (value = attributes[:'items']).is_a?(Array)
55
50
  self.items = value
56
51
  end
57
52
  end
58
-
59
53
  end
60
54
 
61
55
  # Show invalid properties with the reasons. Usually used together with valid?
62
- # @return Array for valid properies with the reasons
56
+ # @return Array for valid properties with the reasons
63
57
  def list_invalid_properties
64
58
  invalid_properties = Array.new
65
- return invalid_properties
59
+ invalid_properties
66
60
  end
67
61
 
68
62
  # Check to see if the all the properties in the model are valid
69
63
  # @return true if the model is valid
70
64
  def valid?
71
- return true
65
+ true
72
66
  end
73
67
 
74
68
  # Checks equality by comparing each attribute.
@@ -98,7 +92,7 @@ module Wallee
98
92
  return nil unless attributes.is_a?(Hash)
99
93
  self.class.swagger_types.each_pair do |key, type|
100
94
  if type =~ /\AArray<(.*)>/i
101
- # check to ensure the input is an array given that the the attribute
95
+ # check to ensure the input is an array given that the attribute
102
96
  # is documented as an array but the input is not
103
97
  if attributes[self.class.attribute_map[key]].is_a?(Array)
104
98
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
@@ -196,5 +190,4 @@ module Wallee
196
190
  end
197
191
 
198
192
  end
199
-
200
193
  end
@@ -1,10 +1,6 @@
1
1
  =begin
2
- Wallee API: 1.0.0
3
-
4
2
  The wallee API allows an easy interaction with the wallee web service.
5
3
 
6
-
7
-
8
4
  Licensed under the Apache License, Version 2.0 (the "License");
9
5
  you may not use this file except in compliance with the License.
10
6
  You may obtain a copy of the License at
@@ -33,7 +29,6 @@ module Wallee
33
29
  #
34
30
  attr_accessor :translation
35
31
 
36
-
37
32
  # Attribute mapping from ruby-style variable name to JSON key.
38
33
  def self.attribute_map
39
34
  {
@@ -58,7 +53,7 @@ module Wallee
58
53
  return unless attributes.is_a?(Hash)
59
54
 
60
55
  # convert string to symbol for hash key
61
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
62
57
 
63
58
  if attributes.has_key?(:'language')
64
59
  self.language = attributes[:'language']
@@ -71,20 +66,34 @@ module Wallee
71
66
  if attributes.has_key?(:'translation')
72
67
  self.translation = attributes[:'translation']
73
68
  end
74
-
75
69
  end
76
70
 
77
71
  # Show invalid properties with the reasons. Usually used together with valid?
78
- # @return Array for valid properies with the reasons
72
+ # @return Array for valid properties with the reasons
79
73
  def list_invalid_properties
80
74
  invalid_properties = Array.new
81
- return invalid_properties
75
+ if !@translation.nil? && @translation.to_s.length > 16777216
76
+ invalid_properties.push('invalid value for "translation", the character length must be smaller than or equal to 16777216.')
77
+ end
78
+
79
+ invalid_properties
82
80
  end
83
81
 
84
82
  # Check to see if the all the properties in the model are valid
85
83
  # @return true if the model is valid
86
84
  def valid?
87
- return true
85
+ return false if !@translation.nil? && @translation.to_s.length > 16777216
86
+ true
87
+ end
88
+
89
+ # Custom attribute writer method with validation
90
+ # @param [Object] translation Value to be assigned
91
+ def translation=(translation)
92
+ if !translation.nil? && translation.to_s.length > 16777216
93
+ fail ArgumentError, 'invalid value for "translation", the character length must be smaller than or equal to 16777216.'
94
+ end
95
+
96
+ @translation = translation
88
97
  end
89
98
 
90
99
  # Checks equality by comparing each attribute.
@@ -116,7 +125,7 @@ module Wallee
116
125
  return nil unless attributes.is_a?(Hash)
117
126
  self.class.swagger_types.each_pair do |key, type|
118
127
  if type =~ /\AArray<(.*)>/i
119
- # check to ensure the input is an array given that the the attribute
128
+ # check to ensure the input is an array given that the attribute
120
129
  # is documented as an array but the input is not
121
130
  if attributes[self.class.attribute_map[key]].is_a?(Array)
122
131
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
@@ -214,5 +223,4 @@ module Wallee
214
223
  end
215
224
 
216
225
  end
217
-
218
226
  end
@@ -1,10 +1,6 @@
1
1
  =begin
2
- Wallee API: 1.0.0
3
-
4
2
  The wallee API allows an easy interaction with the wallee web service.
5
3
 
6
-
7
-
8
4
  Licensed under the Apache License, Version 2.0 (the "License");
9
5
  you may not use this file except in compliance with the License.
10
6
  You may obtain a copy of the License at
@@ -30,7 +26,6 @@ module Wallee
30
26
  #
31
27
  attr_accessor :translation
32
28
 
33
-
34
29
  # Attribute mapping from ruby-style variable name to JSON key.
35
30
  def self.attribute_map
36
31
  {
@@ -53,7 +48,7 @@ module Wallee
53
48
  return unless attributes.is_a?(Hash)
54
49
 
55
50
  # convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
52
 
58
53
  if attributes.has_key?(:'language')
59
54
  self.language = attributes[:'language']
@@ -62,25 +57,39 @@ module Wallee
62
57
  if attributes.has_key?(:'translation')
63
58
  self.translation = attributes[:'translation']
64
59
  end
65
-
66
60
  end
67
61
 
68
62
  # Show invalid properties with the reasons. Usually used together with valid?
69
- # @return Array for valid properies with the reasons
63
+ # @return Array for valid properties with the reasons
70
64
  def list_invalid_properties
71
65
  invalid_properties = Array.new
72
66
  if @language.nil?
73
- invalid_properties.push("invalid value for 'language', language cannot be nil.")
67
+ invalid_properties.push('invalid value for "language", language cannot be nil.')
68
+ end
69
+
70
+ if !@translation.nil? && @translation.to_s.length > 16777216
71
+ invalid_properties.push('invalid value for "translation", the character length must be smaller than or equal to 16777216.')
74
72
  end
75
73
 
76
- return invalid_properties
74
+ invalid_properties
77
75
  end
78
76
 
79
77
  # Check to see if the all the properties in the model are valid
80
78
  # @return true if the model is valid
81
79
  def valid?
82
80
  return false if @language.nil?
83
- return true
81
+ return false if !@translation.nil? && @translation.to_s.length > 16777216
82
+ true
83
+ end
84
+
85
+ # Custom attribute writer method with validation
86
+ # @param [Object] translation Value to be assigned
87
+ def translation=(translation)
88
+ if !translation.nil? && translation.to_s.length > 16777216
89
+ fail ArgumentError, 'invalid value for "translation", the character length must be smaller than or equal to 16777216.'
90
+ end
91
+
92
+ @translation = translation
84
93
  end
85
94
 
86
95
  # Checks equality by comparing each attribute.
@@ -111,7 +120,7 @@ module Wallee
111
120
  return nil unless attributes.is_a?(Hash)
112
121
  self.class.swagger_types.each_pair do |key, type|
113
122
  if type =~ /\AArray<(.*)>/i
114
- # check to ensure the input is an array given that the the attribute
123
+ # check to ensure the input is an array given that the attribute
115
124
  # is documented as an array but the input is not
116
125
  if attributes[self.class.attribute_map[key]].is_a?(Array)
117
126
  self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
@@ -209,5 +218,4 @@ module Wallee
209
218
  end
210
219
 
211
220
  end
212
-
213
221
  end
@@ -0,0 +1,495 @@
1
+ =begin
2
+ The wallee API allows an easy interaction with the wallee web service.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+
16
+ =end
17
+
18
+ require 'date'
19
+
20
+ module Wallee
21
+ # The debt collection case represents a try to collect the money from the debtor.
22
+ class DebtCollectionCase
23
+ # The amount is the total amount of the not paid items. The amount cannot be change once the case is reviewed.
24
+ attr_accessor :amount
25
+
26
+ # The billing address of the case identifies the debtor.
27
+ attr_accessor :billing_address
28
+
29
+ # The closed on date indicates when the case is closed on.
30
+ attr_accessor :closed_on
31
+
32
+ # The collector configuration determines how the debt collection case is processed.
33
+ attr_accessor :collector_configuration
34
+
35
+ # The contract date is the date on which the contract with the debtor was signed on.
36
+ attr_accessor :contract_date
37
+
38
+ # The created on date indicates the date on which the entity was stored into the database.
39
+ attr_accessor :created_on
40
+
41
+ # The creator references the user which has created the debt collection case.
42
+ attr_accessor :creator
43
+
44
+ # The currency defines the billing currency of the debt collection case.
45
+ attr_accessor :currency
46
+
47
+ # The due date indicates the date on which the amount receivable was due. This date has to be always in the past.
48
+ attr_accessor :due_date
49
+
50
+ # The environment in which this case will be processed. There must be a debt collector configuration present which supports the chosen environment.
51
+ attr_accessor :environment
52
+
53
+ # The external id helps to identify the entity and a subsequent creation of an entity with the same ID will not create a new entity.
54
+ attr_accessor :external_id
55
+
56
+ # The failed on date indicates when the case is failed on.
57
+ attr_accessor :failed_on
58
+
59
+ #
60
+ attr_accessor :failure_reason
61
+
62
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
63
+ attr_accessor :id
64
+
65
+ #
66
+ attr_accessor :labels
67
+
68
+ # The language indicates the language to be used in the communication with the debtor.
69
+ attr_accessor :language
70
+
71
+ # The line items of the debt collection case will be shown on documents sent to the debtor and the total of them makes up total amount to collect.
72
+ attr_accessor :line_items
73
+
74
+ # The linked space id holds the ID of the space to which the entity belongs to.
75
+ attr_accessor :linked_space_id
76
+
77
+ #
78
+ attr_accessor :next_attempt_on
79
+
80
+ # The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
81
+ attr_accessor :planned_purge_date
82
+
83
+ # The processing started on date indicates the date on which the processing of the case started on.
84
+ attr_accessor :processing_started_on
85
+
86
+ #
87
+ attr_accessor :processing_timeout_on
88
+
89
+ # The case reference is used in the communication with the debtor. It should be unique and it should be linkable with the source of the debt collection case.
90
+ attr_accessor :reference
91
+
92
+ #
93
+ attr_accessor :review_started_on
94
+
95
+ # The reviewed on date indicates when the review of the case was conducted on.
96
+ attr_accessor :reviewed_on
97
+
98
+ # The reviewer references the user which has reviewed the case.
99
+ attr_accessor :reviewer
100
+
101
+ # The source of the debt collection case indicates the origin of the amount receivable.
102
+ attr_accessor :source
103
+
104
+ # The source entity ID points to the object which is the origin of the debt collection case. This ID is only set when the case was triggered by an internal process.
105
+ attr_accessor :source_entity_id
106
+
107
+ #
108
+ attr_accessor :space_view_id
109
+
110
+ #
111
+ attr_accessor :state
112
+
113
+ # The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
114
+ attr_accessor :version
115
+
116
+ # Attribute mapping from ruby-style variable name to JSON key.
117
+ def self.attribute_map
118
+ {
119
+ :'amount' => :'amount',
120
+ :'billing_address' => :'billingAddress',
121
+ :'closed_on' => :'closedOn',
122
+ :'collector_configuration' => :'collectorConfiguration',
123
+ :'contract_date' => :'contractDate',
124
+ :'created_on' => :'createdOn',
125
+ :'creator' => :'creator',
126
+ :'currency' => :'currency',
127
+ :'due_date' => :'dueDate',
128
+ :'environment' => :'environment',
129
+ :'external_id' => :'externalId',
130
+ :'failed_on' => :'failedOn',
131
+ :'failure_reason' => :'failureReason',
132
+ :'id' => :'id',
133
+ :'labels' => :'labels',
134
+ :'language' => :'language',
135
+ :'line_items' => :'lineItems',
136
+ :'linked_space_id' => :'linkedSpaceId',
137
+ :'next_attempt_on' => :'nextAttemptOn',
138
+ :'planned_purge_date' => :'plannedPurgeDate',
139
+ :'processing_started_on' => :'processingStartedOn',
140
+ :'processing_timeout_on' => :'processingTimeoutOn',
141
+ :'reference' => :'reference',
142
+ :'review_started_on' => :'reviewStartedOn',
143
+ :'reviewed_on' => :'reviewedOn',
144
+ :'reviewer' => :'reviewer',
145
+ :'source' => :'source',
146
+ :'source_entity_id' => :'sourceEntityId',
147
+ :'space_view_id' => :'spaceViewId',
148
+ :'state' => :'state',
149
+ :'version' => :'version'
150
+ }
151
+ end
152
+
153
+ # Attribute type mapping.
154
+ def self.swagger_types
155
+ {
156
+ :'amount' => :'Float',
157
+ :'billing_address' => :'Address',
158
+ :'closed_on' => :'DateTime',
159
+ :'collector_configuration' => :'DebtCollectorConfiguration',
160
+ :'contract_date' => :'DateTime',
161
+ :'created_on' => :'DateTime',
162
+ :'creator' => :'Integer',
163
+ :'currency' => :'String',
164
+ :'due_date' => :'DateTime',
165
+ :'environment' => :'DebtCollectionEnvironment',
166
+ :'external_id' => :'String',
167
+ :'failed_on' => :'DateTime',
168
+ :'failure_reason' => :'FailureReason',
169
+ :'id' => :'Integer',
170
+ :'labels' => :'Array<Label>',
171
+ :'language' => :'String',
172
+ :'line_items' => :'Array<LineItem>',
173
+ :'linked_space_id' => :'Integer',
174
+ :'next_attempt_on' => :'DateTime',
175
+ :'planned_purge_date' => :'DateTime',
176
+ :'processing_started_on' => :'DateTime',
177
+ :'processing_timeout_on' => :'DateTime',
178
+ :'reference' => :'String',
179
+ :'review_started_on' => :'DateTime',
180
+ :'reviewed_on' => :'DateTime',
181
+ :'reviewer' => :'Integer',
182
+ :'source' => :'DebtCollectionCaseSource',
183
+ :'source_entity_id' => :'Integer',
184
+ :'space_view_id' => :'Integer',
185
+ :'state' => :'DebtCollectionCaseState',
186
+ :'version' => :'Integer'
187
+ }
188
+ end
189
+
190
+ # Initializes the object
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ def initialize(attributes = {})
193
+ return unless attributes.is_a?(Hash)
194
+
195
+ # convert string to symbol for hash key
196
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
197
+
198
+ if attributes.has_key?(:'amount')
199
+ self.amount = attributes[:'amount']
200
+ end
201
+
202
+ if attributes.has_key?(:'billingAddress')
203
+ self.billing_address = attributes[:'billingAddress']
204
+ end
205
+
206
+ if attributes.has_key?(:'closedOn')
207
+ self.closed_on = attributes[:'closedOn']
208
+ end
209
+
210
+ if attributes.has_key?(:'collectorConfiguration')
211
+ self.collector_configuration = attributes[:'collectorConfiguration']
212
+ end
213
+
214
+ if attributes.has_key?(:'contractDate')
215
+ self.contract_date = attributes[:'contractDate']
216
+ end
217
+
218
+ if attributes.has_key?(:'createdOn')
219
+ self.created_on = attributes[:'createdOn']
220
+ end
221
+
222
+ if attributes.has_key?(:'creator')
223
+ self.creator = attributes[:'creator']
224
+ end
225
+
226
+ if attributes.has_key?(:'currency')
227
+ self.currency = attributes[:'currency']
228
+ end
229
+
230
+ if attributes.has_key?(:'dueDate')
231
+ self.due_date = attributes[:'dueDate']
232
+ end
233
+
234
+ if attributes.has_key?(:'environment')
235
+ self.environment = attributes[:'environment']
236
+ end
237
+
238
+ if attributes.has_key?(:'externalId')
239
+ self.external_id = attributes[:'externalId']
240
+ end
241
+
242
+ if attributes.has_key?(:'failedOn')
243
+ self.failed_on = attributes[:'failedOn']
244
+ end
245
+
246
+ if attributes.has_key?(:'failureReason')
247
+ self.failure_reason = attributes[:'failureReason']
248
+ end
249
+
250
+ if attributes.has_key?(:'id')
251
+ self.id = attributes[:'id']
252
+ end
253
+
254
+ if attributes.has_key?(:'labels')
255
+ if (value = attributes[:'labels']).is_a?(Array)
256
+ self.labels = value
257
+ end
258
+ end
259
+
260
+ if attributes.has_key?(:'language')
261
+ self.language = attributes[:'language']
262
+ end
263
+
264
+ if attributes.has_key?(:'lineItems')
265
+ if (value = attributes[:'lineItems']).is_a?(Array)
266
+ self.line_items = value
267
+ end
268
+ end
269
+
270
+ if attributes.has_key?(:'linkedSpaceId')
271
+ self.linked_space_id = attributes[:'linkedSpaceId']
272
+ end
273
+
274
+ if attributes.has_key?(:'nextAttemptOn')
275
+ self.next_attempt_on = attributes[:'nextAttemptOn']
276
+ end
277
+
278
+ if attributes.has_key?(:'plannedPurgeDate')
279
+ self.planned_purge_date = attributes[:'plannedPurgeDate']
280
+ end
281
+
282
+ if attributes.has_key?(:'processingStartedOn')
283
+ self.processing_started_on = attributes[:'processingStartedOn']
284
+ end
285
+
286
+ if attributes.has_key?(:'processingTimeoutOn')
287
+ self.processing_timeout_on = attributes[:'processingTimeoutOn']
288
+ end
289
+
290
+ if attributes.has_key?(:'reference')
291
+ self.reference = attributes[:'reference']
292
+ end
293
+
294
+ if attributes.has_key?(:'reviewStartedOn')
295
+ self.review_started_on = attributes[:'reviewStartedOn']
296
+ end
297
+
298
+ if attributes.has_key?(:'reviewedOn')
299
+ self.reviewed_on = attributes[:'reviewedOn']
300
+ end
301
+
302
+ if attributes.has_key?(:'reviewer')
303
+ self.reviewer = attributes[:'reviewer']
304
+ end
305
+
306
+ if attributes.has_key?(:'source')
307
+ self.source = attributes[:'source']
308
+ end
309
+
310
+ if attributes.has_key?(:'sourceEntityId')
311
+ self.source_entity_id = attributes[:'sourceEntityId']
312
+ end
313
+
314
+ if attributes.has_key?(:'spaceViewId')
315
+ self.space_view_id = attributes[:'spaceViewId']
316
+ end
317
+
318
+ if attributes.has_key?(:'state')
319
+ self.state = attributes[:'state']
320
+ end
321
+
322
+ if attributes.has_key?(:'version')
323
+ self.version = attributes[:'version']
324
+ end
325
+ end
326
+
327
+ # Show invalid properties with the reasons. Usually used together with valid?
328
+ # @return Array for valid properties with the reasons
329
+ def list_invalid_properties
330
+ invalid_properties = Array.new
331
+ invalid_properties
332
+ end
333
+
334
+ # Check to see if the all the properties in the model are valid
335
+ # @return true if the model is valid
336
+ def valid?
337
+ true
338
+ end
339
+
340
+ # Checks equality by comparing each attribute.
341
+ # @param [Object] Object to be compared
342
+ def ==(o)
343
+ return true if self.equal?(o)
344
+ self.class == o.class &&
345
+ amount == o.amount &&
346
+ billing_address == o.billing_address &&
347
+ closed_on == o.closed_on &&
348
+ collector_configuration == o.collector_configuration &&
349
+ contract_date == o.contract_date &&
350
+ created_on == o.created_on &&
351
+ creator == o.creator &&
352
+ currency == o.currency &&
353
+ due_date == o.due_date &&
354
+ environment == o.environment &&
355
+ external_id == o.external_id &&
356
+ failed_on == o.failed_on &&
357
+ failure_reason == o.failure_reason &&
358
+ id == o.id &&
359
+ labels == o.labels &&
360
+ language == o.language &&
361
+ line_items == o.line_items &&
362
+ linked_space_id == o.linked_space_id &&
363
+ next_attempt_on == o.next_attempt_on &&
364
+ planned_purge_date == o.planned_purge_date &&
365
+ processing_started_on == o.processing_started_on &&
366
+ processing_timeout_on == o.processing_timeout_on &&
367
+ reference == o.reference &&
368
+ review_started_on == o.review_started_on &&
369
+ reviewed_on == o.reviewed_on &&
370
+ reviewer == o.reviewer &&
371
+ source == o.source &&
372
+ source_entity_id == o.source_entity_id &&
373
+ space_view_id == o.space_view_id &&
374
+ state == o.state &&
375
+ version == o.version
376
+ end
377
+
378
+ # @see the `==` method
379
+ # @param [Object] Object to be compared
380
+ def eql?(o)
381
+ self == o
382
+ end
383
+
384
+ # Calculates hash code according to all attributes.
385
+ # @return [Fixnum] Hash code
386
+ def hash
387
+ [amount, billing_address, closed_on, collector_configuration, contract_date, created_on, creator, currency, due_date, environment, external_id, failed_on, failure_reason, id, labels, language, line_items, linked_space_id, next_attempt_on, planned_purge_date, processing_started_on, processing_timeout_on, reference, review_started_on, reviewed_on, reviewer, source, source_entity_id, space_view_id, state, version].hash
388
+ end
389
+
390
+ # Builds the object from hash
391
+ # @param [Hash] attributes Model attributes in the form of hash
392
+ # @return [Object] Returns the model itself
393
+ def build_from_hash(attributes)
394
+ return nil unless attributes.is_a?(Hash)
395
+ self.class.swagger_types.each_pair do |key, type|
396
+ if type =~ /\AArray<(.*)>/i
397
+ # check to ensure the input is an array given that the attribute
398
+ # is documented as an array but the input is not
399
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
400
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
401
+ end
402
+ elsif !attributes[self.class.attribute_map[key]].nil?
403
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
404
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
405
+ end
406
+
407
+ self
408
+ end
409
+
410
+ # Deserializes the data based on type
411
+ # @param string type Data type
412
+ # @param string value Value to be deserialized
413
+ # @return [Object] Deserialized data
414
+ def _deserialize(type, value)
415
+ case type.to_sym
416
+ when :DateTime
417
+ DateTime.parse(value)
418
+ when :Date
419
+ Date.parse(value)
420
+ when :String
421
+ value.to_s
422
+ when :Integer
423
+ value.to_i
424
+ when :Float
425
+ value.to_f
426
+ when :BOOLEAN
427
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
428
+ true
429
+ else
430
+ false
431
+ end
432
+ when :Object
433
+ # generic object (usually a Hash), return directly
434
+ value
435
+ when /\AArray<(?<inner_type>.+)>\z/
436
+ inner_type = Regexp.last_match[:inner_type]
437
+ value.map { |v| _deserialize(inner_type, v) }
438
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
439
+ k_type = Regexp.last_match[:k_type]
440
+ v_type = Regexp.last_match[:v_type]
441
+ {}.tap do |hash|
442
+ value.each do |k, v|
443
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
444
+ end
445
+ end
446
+ else # model
447
+ temp_model = Wallee.const_get(type).new
448
+ temp_model.build_from_hash(value)
449
+ end
450
+ end
451
+
452
+ # Returns the string representation of the object
453
+ # @return [String] String presentation of the object
454
+ def to_s
455
+ to_hash.to_s
456
+ end
457
+
458
+ # to_body is an alias to to_hash (backward compatibility)
459
+ # @return [Hash] Returns the object in the form of hash
460
+ def to_body
461
+ to_hash
462
+ end
463
+
464
+ # Returns the object in the form of hash
465
+ # @return [Hash] Returns the object in the form of hash
466
+ def to_hash
467
+ hash = {}
468
+ self.class.attribute_map.each_pair do |attr, param|
469
+ value = self.send(attr)
470
+ next if value.nil?
471
+ hash[param] = _to_hash(value)
472
+ end
473
+ hash
474
+ end
475
+
476
+ # Outputs non-array value in the form of hash
477
+ # For object, use to_hash. Otherwise, just return the value
478
+ # @param [Object] value Any valid value
479
+ # @return [Hash] Returns the value in the form of hash
480
+ def _to_hash(value)
481
+ if value.is_a?(Array)
482
+ value.compact.map{ |v| _to_hash(v) }
483
+ elsif value.is_a?(Hash)
484
+ {}.tap do |hash|
485
+ value.each { |k, v| hash[k] = _to_hash(v) }
486
+ end
487
+ elsif value.respond_to? :to_hash
488
+ value.to_hash
489
+ else
490
+ value
491
+ end
492
+ end
493
+
494
+ end
495
+ end