postfinancecheckout-ruby-sdk 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (364) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/LICENSE +201 -0
  4. data/README.md +137 -0
  5. data/Rakefile +13 -0
  6. data/lib/.DS_Store +0 -0
  7. data/lib/postfinancecheckout-ruby-sdk.rb +392 -0
  8. data/lib/postfinancecheckout-ruby-sdk/api/account_service_api.rb +368 -0
  9. data/lib/postfinancecheckout-ruby-sdk/api/application_user_service_api.rb +368 -0
  10. data/lib/postfinancecheckout-ruby-sdk/api/bank_account_service_api.rb +213 -0
  11. data/lib/postfinancecheckout-ruby-sdk/api/bank_transaction_service_api.rb +213 -0
  12. data/lib/postfinancecheckout-ruby-sdk/api/charge_attempt_service_api.rb +213 -0
  13. data/lib/postfinancecheckout-ruby-sdk/api/charge_bank_transaction_service_api.rb +213 -0
  14. data/lib/postfinancecheckout-ruby-sdk/api/charge_flow_level_payment_link_service_api.rb +213 -0
  15. data/lib/postfinancecheckout-ruby-sdk/api/charge_flow_level_service_api.rb +276 -0
  16. data/lib/postfinancecheckout-ruby-sdk/api/charge_flow_service_api.rb +348 -0
  17. data/lib/postfinancecheckout-ruby-sdk/api/condition_type_service_api.rb +139 -0
  18. data/lib/postfinancecheckout-ruby-sdk/api/country_service_api.rb +81 -0
  19. data/lib/postfinancecheckout-ruby-sdk/api/country_state_service_api.rb +139 -0
  20. data/lib/postfinancecheckout-ruby-sdk/api/currency_bank_account_service_api.rb +213 -0
  21. data/lib/postfinancecheckout-ruby-sdk/api/currency_service_api.rb +81 -0
  22. data/lib/postfinancecheckout-ruby-sdk/api/customer_address_service_api.rb +460 -0
  23. data/lib/postfinancecheckout-ruby-sdk/api/customer_comment_service_api.rb +522 -0
  24. data/lib/postfinancecheckout-ruby-sdk/api/customer_service_api.rb +398 -0
  25. data/lib/postfinancecheckout-ruby-sdk/api/delivery_indication_service_api.rb +337 -0
  26. data/lib/postfinancecheckout-ruby-sdk/api/document_template_service_api.rb +213 -0
  27. data/lib/postfinancecheckout-ruby-sdk/api/document_template_type_service_api.rb +139 -0
  28. data/lib/postfinancecheckout-ruby-sdk/api/external_transfer_bank_transaction_service_api.rb +213 -0
  29. data/lib/postfinancecheckout-ruby-sdk/api/human_user_service_api.rb +425 -0
  30. data/lib/postfinancecheckout-ruby-sdk/api/internal_transfer_bank_transaction_service_api.rb +213 -0
  31. data/lib/postfinancecheckout-ruby-sdk/api/label_description_group_service_api.rb +139 -0
  32. data/lib/postfinancecheckout-ruby-sdk/api/label_description_service_api.rb +139 -0
  33. data/lib/postfinancecheckout-ruby-sdk/api/language_service_api.rb +81 -0
  34. data/lib/postfinancecheckout-ruby-sdk/api/legal_organization_form_service_api.rb +197 -0
  35. data/lib/postfinancecheckout-ruby-sdk/api/manual_task_service_api.rb +213 -0
  36. data/lib/postfinancecheckout-ruby-sdk/api/payment_connector_configuration_service_api.rb +213 -0
  37. data/lib/postfinancecheckout-ruby-sdk/api/payment_connector_service_api.rb +139 -0
  38. data/lib/postfinancecheckout-ruby-sdk/api/payment_link_service_api.rb +398 -0
  39. data/lib/postfinancecheckout-ruby-sdk/api/payment_method_brand_service_api.rb +139 -0
  40. data/lib/postfinancecheckout-ruby-sdk/api/payment_method_configuration_service_api.rb +213 -0
  41. data/lib/postfinancecheckout-ruby-sdk/api/payment_method_service_api.rb +139 -0
  42. data/lib/postfinancecheckout-ruby-sdk/api/payment_processor_configuration_service_api.rb +213 -0
  43. data/lib/postfinancecheckout-ruby-sdk/api/payment_processor_service_api.rb +139 -0
  44. data/lib/postfinancecheckout-ruby-sdk/api/payment_terminal_service_api.rb +213 -0
  45. data/lib/postfinancecheckout-ruby-sdk/api/payment_terminal_till_service_api.rb +170 -0
  46. data/lib/postfinancecheckout-ruby-sdk/api/permission_service_api.rb +139 -0
  47. data/lib/postfinancecheckout-ruby-sdk/api/refund_bank_transaction_service_api.rb +213 -0
  48. data/lib/postfinancecheckout-ruby-sdk/api/refund_comment_service_api.rb +464 -0
  49. data/lib/postfinancecheckout-ruby-sdk/api/refund_recovery_bank_transaction_service_api.rb +213 -0
  50. data/lib/postfinancecheckout-ruby-sdk/api/refund_service_api.rb +532 -0
  51. data/lib/postfinancecheckout-ruby-sdk/api/shopify_recurring_order_service_api.rb +274 -0
  52. data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscriber_service_api.rb +275 -0
  53. data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_product_service_api.rb +337 -0
  54. data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_service_api.rb +466 -0
  55. data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_suspension_service_api.rb +337 -0
  56. data/lib/postfinancecheckout-ruby-sdk/api/shopify_subscription_version_service_api.rb +213 -0
  57. data/lib/postfinancecheckout-ruby-sdk/api/shopify_transaction_service_api.rb +213 -0
  58. data/lib/postfinancecheckout-ruby-sdk/api/space_service_api.rb +368 -0
  59. data/lib/postfinancecheckout-ruby-sdk/api/static_value_service_api.rb +139 -0
  60. data/lib/postfinancecheckout-ruby-sdk/api/token_service_api.rb +650 -0
  61. data/lib/postfinancecheckout-ruby-sdk/api/token_version_service_api.rb +276 -0
  62. data/lib/postfinancecheckout-ruby-sdk/api/transaction_comment_service_api.rb +464 -0
  63. data/lib/postfinancecheckout-ruby-sdk/api/transaction_completion_service_api.rb +463 -0
  64. data/lib/postfinancecheckout-ruby-sdk/api/transaction_iframe_service_api.rb +91 -0
  65. data/lib/postfinancecheckout-ruby-sdk/api/transaction_invoice_comment_service_api.rb +464 -0
  66. data/lib/postfinancecheckout-ruby-sdk/api/transaction_invoice_service_api.rb +600 -0
  67. data/lib/postfinancecheckout-ruby-sdk/api/transaction_lightbox_service_api.rb +91 -0
  68. data/lib/postfinancecheckout-ruby-sdk/api/transaction_mobile_sdk_service_api.rb +86 -0
  69. data/lib/postfinancecheckout-ruby-sdk/api/transaction_payment_page_service_api.rb +91 -0
  70. data/lib/postfinancecheckout-ruby-sdk/api/transaction_service_api.rb +1210 -0
  71. data/lib/postfinancecheckout-ruby-sdk/api/transaction_terminal_service_api.rb +161 -0
  72. data/lib/postfinancecheckout-ruby-sdk/api/transaction_void_service_api.rb +339 -0
  73. data/lib/postfinancecheckout-ruby-sdk/api/user_account_role_service_api.rb +219 -0
  74. data/lib/postfinancecheckout-ruby-sdk/api/user_space_role_service_api.rb +216 -0
  75. data/lib/postfinancecheckout-ruby-sdk/api/webhook_listener_service_api.rb +398 -0
  76. data/lib/postfinancecheckout-ruby-sdk/api/webhook_url_service_api.rb +398 -0
  77. data/lib/postfinancecheckout-ruby-sdk/api_client.rb +405 -0
  78. data/lib/postfinancecheckout-ruby-sdk/api_error.rb +43 -0
  79. data/lib/postfinancecheckout-ruby-sdk/configuration.rb +140 -0
  80. data/lib/postfinancecheckout-ruby-sdk/models/abstract_account_update.rb +234 -0
  81. data/lib/postfinancecheckout-ruby-sdk/models/abstract_application_user_update.rb +225 -0
  82. data/lib/postfinancecheckout-ruby-sdk/models/abstract_customer_active.rb +312 -0
  83. data/lib/postfinancecheckout-ruby-sdk/models/abstract_customer_address_active.rb +200 -0
  84. data/lib/postfinancecheckout-ruby-sdk/models/abstract_customer_comment_active.rb +205 -0
  85. data/lib/postfinancecheckout-ruby-sdk/models/abstract_human_user_update.rb +320 -0
  86. data/lib/postfinancecheckout-ruby-sdk/models/abstract_payment_link_update.rb +309 -0
  87. data/lib/postfinancecheckout-ruby-sdk/models/abstract_refund_comment_active.rb +205 -0
  88. data/lib/postfinancecheckout-ruby-sdk/models/abstract_shopify_subscription_product_update.rb +320 -0
  89. data/lib/postfinancecheckout-ruby-sdk/models/abstract_space_update.rb +286 -0
  90. data/lib/postfinancecheckout-ruby-sdk/models/abstract_token_update.rb +270 -0
  91. data/lib/postfinancecheckout-ruby-sdk/models/abstract_transaction_comment_active.rb +205 -0
  92. data/lib/postfinancecheckout-ruby-sdk/models/abstract_transaction_invoice_comment_active.rb +205 -0
  93. data/lib/postfinancecheckout-ruby-sdk/models/abstract_transaction_pending.rb +486 -0
  94. data/lib/postfinancecheckout-ruby-sdk/models/abstract_webhook_listener_update.rb +237 -0
  95. data/lib/postfinancecheckout-ruby-sdk/models/abstract_webhook_url_update.rb +249 -0
  96. data/lib/postfinancecheckout-ruby-sdk/models/account.rb +375 -0
  97. data/lib/postfinancecheckout-ruby-sdk/models/account_create.rb +260 -0
  98. data/lib/postfinancecheckout-ruby-sdk/models/account_state.rb +39 -0
  99. data/lib/postfinancecheckout-ruby-sdk/models/account_type.rb +36 -0
  100. data/lib/postfinancecheckout-ruby-sdk/models/account_update.rb +265 -0
  101. data/lib/postfinancecheckout-ruby-sdk/models/address.rb +606 -0
  102. data/lib/postfinancecheckout-ruby-sdk/models/address_create.rb +606 -0
  103. data/lib/postfinancecheckout-ruby-sdk/models/application_user.rb +286 -0
  104. data/lib/postfinancecheckout-ruby-sdk/models/application_user_create.rb +241 -0
  105. data/lib/postfinancecheckout-ruby-sdk/models/application_user_create_with_mac_key.rb +296 -0
  106. data/lib/postfinancecheckout-ruby-sdk/models/application_user_update.rb +256 -0
  107. data/lib/postfinancecheckout-ruby-sdk/models/bank_account.rb +291 -0
  108. data/lib/postfinancecheckout-ruby-sdk/models/bank_account_environment.rb +35 -0
  109. data/lib/postfinancecheckout-ruby-sdk/models/bank_account_state.rb +37 -0
  110. data/lib/postfinancecheckout-ruby-sdk/models/bank_account_type.rb +227 -0
  111. data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction.rb +387 -0
  112. data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_flow_direction.rb +35 -0
  113. data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_source.rb +215 -0
  114. data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_state.rb +35 -0
  115. data/lib/postfinancecheckout-ruby-sdk/models/bank_transaction_type.rb +215 -0
  116. data/lib/postfinancecheckout-ruby-sdk/models/charge.rb +331 -0
  117. data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt.rb +468 -0
  118. data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt_environment.rb +35 -0
  119. data/lib/postfinancecheckout-ruby-sdk/models/charge_attempt_state.rb +36 -0
  120. data/lib/postfinancecheckout-ruby-sdk/models/charge_bank_transaction.rb +291 -0
  121. data/lib/postfinancecheckout-ruby-sdk/models/charge_flow.rb +263 -0
  122. data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level.rb +311 -0
  123. data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_configuration.rb +296 -0
  124. data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_configuration_type.rb +227 -0
  125. data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_payment_link.rb +231 -0
  126. data/lib/postfinancecheckout-ruby-sdk/models/charge_flow_level_state.rb +36 -0
  127. data/lib/postfinancecheckout-ruby-sdk/models/charge_state.rb +36 -0
  128. data/lib/postfinancecheckout-ruby-sdk/models/charge_type.rb +37 -0
  129. data/lib/postfinancecheckout-ruby-sdk/models/client_error.rb +231 -0
  130. data/lib/postfinancecheckout-ruby-sdk/models/client_error_type.rb +36 -0
  131. data/lib/postfinancecheckout-ruby-sdk/models/completion_line_item.rb +226 -0
  132. data/lib/postfinancecheckout-ruby-sdk/models/completion_line_item_create.rb +245 -0
  133. data/lib/postfinancecheckout-ruby-sdk/models/condition.rb +266 -0
  134. data/lib/postfinancecheckout-ruby-sdk/models/condition_type.rb +215 -0
  135. data/lib/postfinancecheckout-ruby-sdk/models/connector_invocation.rb +271 -0
  136. data/lib/postfinancecheckout-ruby-sdk/models/connector_invocation_stage.rb +37 -0
  137. data/lib/postfinancecheckout-ruby-sdk/models/creation_entity_state.rb +38 -0
  138. data/lib/postfinancecheckout-ruby-sdk/models/criteria_operator.rb +45 -0
  139. data/lib/postfinancecheckout-ruby-sdk/models/currency_bank_account.rb +241 -0
  140. data/lib/postfinancecheckout-ruby-sdk/models/customer.rb +353 -0
  141. data/lib/postfinancecheckout-ruby-sdk/models/customer_active.rb +343 -0
  142. data/lib/postfinancecheckout-ruby-sdk/models/customer_address.rb +261 -0
  143. data/lib/postfinancecheckout-ruby-sdk/models/customer_address_active.rb +231 -0
  144. data/lib/postfinancecheckout-ruby-sdk/models/customer_address_create.rb +216 -0
  145. data/lib/postfinancecheckout-ruby-sdk/models/customer_address_type.rb +36 -0
  146. data/lib/postfinancecheckout-ruby-sdk/models/customer_comment.rb +296 -0
  147. data/lib/postfinancecheckout-ruby-sdk/models/customer_comment_active.rb +236 -0
  148. data/lib/postfinancecheckout-ruby-sdk/models/customer_comment_create.rb +221 -0
  149. data/lib/postfinancecheckout-ruby-sdk/models/customer_create.rb +313 -0
  150. data/lib/postfinancecheckout-ruby-sdk/models/customer_postal_address.rb +606 -0
  151. data/lib/postfinancecheckout-ruby-sdk/models/customer_postal_address_create.rb +606 -0
  152. data/lib/postfinancecheckout-ruby-sdk/models/customers_presence.rb +36 -0
  153. data/lib/postfinancecheckout-ruby-sdk/models/data_collection_type.rb +35 -0
  154. data/lib/postfinancecheckout-ruby-sdk/models/database_translated_string.rb +215 -0
  155. data/lib/postfinancecheckout-ruby-sdk/models/database_translated_string_item.rb +226 -0
  156. data/lib/postfinancecheckout-ruby-sdk/models/delivery_indication.rb +321 -0
  157. data/lib/postfinancecheckout-ruby-sdk/models/delivery_indication_decision_reason.rb +215 -0
  158. data/lib/postfinancecheckout-ruby-sdk/models/delivery_indication_state.rb +37 -0
  159. data/lib/postfinancecheckout-ruby-sdk/models/document_template.rb +306 -0
  160. data/lib/postfinancecheckout-ruby-sdk/models/document_template_type.rb +235 -0
  161. data/lib/postfinancecheckout-ruby-sdk/models/document_template_type_group.rb +203 -0
  162. data/lib/postfinancecheckout-ruby-sdk/models/entity_export_request.rb +208 -0
  163. data/lib/postfinancecheckout-ruby-sdk/models/entity_query.rb +233 -0
  164. data/lib/postfinancecheckout-ruby-sdk/models/entity_query_filter.rb +238 -0
  165. data/lib/postfinancecheckout-ruby-sdk/models/entity_query_filter_type.rb +36 -0
  166. data/lib/postfinancecheckout-ruby-sdk/models/entity_query_order_by.rb +211 -0
  167. data/lib/postfinancecheckout-ruby-sdk/models/entity_query_order_by_type.rb +35 -0
  168. data/lib/postfinancecheckout-ruby-sdk/models/environment.rb +35 -0
  169. data/lib/postfinancecheckout-ruby-sdk/models/external_transfer_bank_transaction.rb +251 -0
  170. data/lib/postfinancecheckout-ruby-sdk/models/failure_category.rb +38 -0
  171. data/lib/postfinancecheckout-ruby-sdk/models/failure_reason.rb +237 -0
  172. data/lib/postfinancecheckout-ruby-sdk/models/feature.rb +277 -0
  173. data/lib/postfinancecheckout-ruby-sdk/models/feature_category.rb +225 -0
  174. data/lib/postfinancecheckout-ruby-sdk/models/gender.rb +35 -0
  175. data/lib/postfinancecheckout-ruby-sdk/models/human_user.rb +361 -0
  176. data/lib/postfinancecheckout-ruby-sdk/models/human_user_create.rb +331 -0
  177. data/lib/postfinancecheckout-ruby-sdk/models/human_user_update.rb +351 -0
  178. data/lib/postfinancecheckout-ruby-sdk/models/internal_transfer_bank_transaction.rb +231 -0
  179. data/lib/postfinancecheckout-ruby-sdk/models/label.rb +231 -0
  180. data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor.rb +267 -0
  181. data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor_category.rb +35 -0
  182. data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor_group.rb +225 -0
  183. data/lib/postfinancecheckout-ruby-sdk/models/label_descriptor_type.rb +215 -0
  184. data/lib/postfinancecheckout-ruby-sdk/models/legal_organization_form.rb +235 -0
  185. data/lib/postfinancecheckout-ruby-sdk/models/line_item.rb +449 -0
  186. data/lib/postfinancecheckout-ruby-sdk/models/line_item_attribute.rb +231 -0
  187. data/lib/postfinancecheckout-ruby-sdk/models/line_item_attribute_create.rb +249 -0
  188. data/lib/postfinancecheckout-ruby-sdk/models/line_item_create.rb +372 -0
  189. data/lib/postfinancecheckout-ruby-sdk/models/line_item_reduction.rb +226 -0
  190. data/lib/postfinancecheckout-ruby-sdk/models/line_item_reduction_create.rb +245 -0
  191. data/lib/postfinancecheckout-ruby-sdk/models/line_item_type.rb +37 -0
  192. data/lib/postfinancecheckout-ruby-sdk/models/localized_string.rb +211 -0
  193. data/lib/postfinancecheckout-ruby-sdk/models/manual_task.rb +283 -0
  194. data/lib/postfinancecheckout-ruby-sdk/models/manual_task_action.rb +223 -0
  195. data/lib/postfinancecheckout-ruby-sdk/models/manual_task_action_style.rb +36 -0
  196. data/lib/postfinancecheckout-ruby-sdk/models/manual_task_state.rb +36 -0
  197. data/lib/postfinancecheckout-ruby-sdk/models/manual_task_type.rb +227 -0
  198. data/lib/postfinancecheckout-ruby-sdk/models/one_click_payment_mode.rb +36 -0
  199. data/lib/postfinancecheckout-ruby-sdk/models/payment_adjustment.rb +231 -0
  200. data/lib/postfinancecheckout-ruby-sdk/models/payment_adjustment_type.rb +215 -0
  201. data/lib/postfinancecheckout-ruby-sdk/models/payment_connector.rb +321 -0
  202. data/lib/postfinancecheckout-ruby-sdk/models/payment_connector_configuration.rb +342 -0
  203. data/lib/postfinancecheckout-ruby-sdk/models/payment_connector_feature.rb +211 -0
  204. data/lib/postfinancecheckout-ruby-sdk/models/payment_contract.rb +331 -0
  205. data/lib/postfinancecheckout-ruby-sdk/models/payment_contract_state.rb +38 -0
  206. data/lib/postfinancecheckout-ruby-sdk/models/payment_contract_type.rb +225 -0
  207. data/lib/postfinancecheckout-ruby-sdk/models/payment_information_hash.rb +211 -0
  208. data/lib/postfinancecheckout-ruby-sdk/models/payment_information_hash_type.rb +203 -0
  209. data/lib/postfinancecheckout-ruby-sdk/models/payment_link.rb +390 -0
  210. data/lib/postfinancecheckout-ruby-sdk/models/payment_link_active.rb +350 -0
  211. data/lib/postfinancecheckout-ruby-sdk/models/payment_link_address_handling_mode.rb +36 -0
  212. data/lib/postfinancecheckout-ruby-sdk/models/payment_link_create.rb +345 -0
  213. data/lib/postfinancecheckout-ruby-sdk/models/payment_link_protection_mode.rb +35 -0
  214. data/lib/postfinancecheckout-ruby-sdk/models/payment_link_update.rb +340 -0
  215. data/lib/postfinancecheckout-ruby-sdk/models/payment_method.rb +261 -0
  216. data/lib/postfinancecheckout-ruby-sdk/models/payment_method_brand.rb +245 -0
  217. data/lib/postfinancecheckout-ruby-sdk/models/payment_method_configuration.rb +370 -0
  218. data/lib/postfinancecheckout-ruby-sdk/models/payment_primary_risk_taker.rb +36 -0
  219. data/lib/postfinancecheckout-ruby-sdk/models/payment_processor.rb +271 -0
  220. data/lib/postfinancecheckout-ruby-sdk/models/payment_processor_configuration.rb +276 -0
  221. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal.rb +306 -0
  222. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_address.rb +396 -0
  223. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration.rb +266 -0
  224. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_state.rb +37 -0
  225. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version.rb +323 -0
  226. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_configuration_version_state.rb +38 -0
  227. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location.rb +266 -0
  228. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_state.rb +37 -0
  229. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_version.rb +281 -0
  230. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_location_version_state.rb +38 -0
  231. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_receipt_type.rb +215 -0
  232. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_state.rb +38 -0
  233. data/lib/postfinancecheckout-ruby-sdk/models/payment_terminal_type.rb +215 -0
  234. data/lib/postfinancecheckout-ruby-sdk/models/permission.rb +299 -0
  235. data/lib/postfinancecheckout-ruby-sdk/models/refund.rb +567 -0
  236. data/lib/postfinancecheckout-ruby-sdk/models/refund_bank_transaction.rb +281 -0
  237. data/lib/postfinancecheckout-ruby-sdk/models/refund_comment.rb +296 -0
  238. data/lib/postfinancecheckout-ruby-sdk/models/refund_comment_active.rb +236 -0
  239. data/lib/postfinancecheckout-ruby-sdk/models/refund_comment_create.rb +221 -0
  240. data/lib/postfinancecheckout-ruby-sdk/models/refund_create.rb +306 -0
  241. data/lib/postfinancecheckout-ruby-sdk/models/refund_recovery_bank_transaction.rb +293 -0
  242. data/lib/postfinancecheckout-ruby-sdk/models/refund_state.rb +39 -0
  243. data/lib/postfinancecheckout-ruby-sdk/models/refund_type.rb +37 -0
  244. data/lib/postfinancecheckout-ruby-sdk/models/rendered_document.rb +223 -0
  245. data/lib/postfinancecheckout-ruby-sdk/models/rendered_terminal_receipt.rb +223 -0
  246. data/lib/postfinancecheckout-ruby-sdk/models/resource_path.rb +275 -0
  247. data/lib/postfinancecheckout-ruby-sdk/models/resource_state.rb +36 -0
  248. data/lib/postfinancecheckout-ruby-sdk/models/rest_address_format.rb +227 -0
  249. data/lib/postfinancecheckout-ruby-sdk/models/rest_address_format_field.rb +43 -0
  250. data/lib/postfinancecheckout-ruby-sdk/models/rest_country.rb +243 -0
  251. data/lib/postfinancecheckout-ruby-sdk/models/rest_country_state.rb +221 -0
  252. data/lib/postfinancecheckout-ruby-sdk/models/rest_currency.rb +211 -0
  253. data/lib/postfinancecheckout-ruby-sdk/models/rest_language.rb +241 -0
  254. data/lib/postfinancecheckout-ruby-sdk/models/role.rb +263 -0
  255. data/lib/postfinancecheckout-ruby-sdk/models/role_state.rb +37 -0
  256. data/lib/postfinancecheckout-ruby-sdk/models/sales_channel.rb +245 -0
  257. data/lib/postfinancecheckout-ruby-sdk/models/scope.rb +350 -0
  258. data/lib/postfinancecheckout-ruby-sdk/models/server_error.rb +211 -0
  259. data/lib/postfinancecheckout-ruby-sdk/models/shopify_additional_line_item_data.rb +35 -0
  260. data/lib/postfinancecheckout-ruby-sdk/models/shopify_integration.rb +470 -0
  261. data/lib/postfinancecheckout-ruby-sdk/models/shopify_integration_payment_app_version.rb +34 -0
  262. data/lib/postfinancecheckout-ruby-sdk/models/shopify_integration_subscription_app_version.rb +36 -0
  263. data/lib/postfinancecheckout-ruby-sdk/models/shopify_recurring_order.rb +351 -0
  264. data/lib/postfinancecheckout-ruby-sdk/models/shopify_recurring_order_state.rb +39 -0
  265. data/lib/postfinancecheckout-ruby-sdk/models/shopify_recurring_order_update_request.rb +201 -0
  266. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber.rb +281 -0
  267. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber_active.rb +241 -0
  268. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber_creation.rb +216 -0
  269. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscriber_state.rb +36 -0
  270. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription.rb +375 -0
  271. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_address.rb +546 -0
  272. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_address_create.rb +546 -0
  273. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_billing_interval_unit.rb +39 -0
  274. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_creation_request.rb +363 -0
  275. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_model_billing_configuration.rb +271 -0
  276. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_model_item.rb +233 -0
  277. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_model_tax_line.rb +201 -0
  278. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product.rb +471 -0
  279. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_create.rb +366 -0
  280. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_pricing_option.rb +38 -0
  281. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_state.rb +39 -0
  282. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_product_update.rb +351 -0
  283. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_state.rb +39 -0
  284. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension.rb +311 -0
  285. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_create.rb +226 -0
  286. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_initiator.rb +35 -0
  287. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_state.rb +35 -0
  288. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_suspension_type.rb +35 -0
  289. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_update_addresses_request.rb +211 -0
  290. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_update_request.rb +233 -0
  291. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version.rb +463 -0
  292. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version_item.rb +233 -0
  293. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version_item_price_strategy.rb +35 -0
  294. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_version_state.rb +36 -0
  295. data/lib/postfinancecheckout-ruby-sdk/models/shopify_subscription_weekday.rb +40 -0
  296. data/lib/postfinancecheckout-ruby-sdk/models/shopify_tax_line.rb +231 -0
  297. data/lib/postfinancecheckout-ruby-sdk/models/shopify_transaction.rb +301 -0
  298. data/lib/postfinancecheckout-ruby-sdk/models/shopify_transaction_state.rb +38 -0
  299. data/lib/postfinancecheckout-ruby-sdk/models/space.rb +407 -0
  300. data/lib/postfinancecheckout-ruby-sdk/models/space_address.rb +416 -0
  301. data/lib/postfinancecheckout-ruby-sdk/models/space_address_create.rb +416 -0
  302. data/lib/postfinancecheckout-ruby-sdk/models/space_create.rb +302 -0
  303. data/lib/postfinancecheckout-ruby-sdk/models/space_update.rb +317 -0
  304. data/lib/postfinancecheckout-ruby-sdk/models/space_view.rb +275 -0
  305. data/lib/postfinancecheckout-ruby-sdk/models/static_value.rb +227 -0
  306. data/lib/postfinancecheckout-ruby-sdk/models/tax.rb +225 -0
  307. data/lib/postfinancecheckout-ruby-sdk/models/tax_create.rb +239 -0
  308. data/lib/postfinancecheckout-ruby-sdk/models/tenant_database.rb +226 -0
  309. data/lib/postfinancecheckout-ruby-sdk/models/terminal_receipt_fetch_request.rb +221 -0
  310. data/lib/postfinancecheckout-ruby-sdk/models/terminal_receipt_format.rb +35 -0
  311. data/lib/postfinancecheckout-ruby-sdk/models/token.rb +341 -0
  312. data/lib/postfinancecheckout-ruby-sdk/models/token_create.rb +296 -0
  313. data/lib/postfinancecheckout-ruby-sdk/models/token_update.rb +301 -0
  314. data/lib/postfinancecheckout-ruby-sdk/models/token_version.rb +445 -0
  315. data/lib/postfinancecheckout-ruby-sdk/models/token_version_state.rb +36 -0
  316. data/lib/postfinancecheckout-ruby-sdk/models/token_version_type.rb +225 -0
  317. data/lib/postfinancecheckout-ruby-sdk/models/tokenization_mode.rb +37 -0
  318. data/lib/postfinancecheckout-ruby-sdk/models/transaction.rb +1011 -0
  319. data/lib/postfinancecheckout-ruby-sdk/models/transaction_aware_entity.rb +211 -0
  320. data/lib/postfinancecheckout-ruby-sdk/models/transaction_comment.rb +296 -0
  321. data/lib/postfinancecheckout-ruby-sdk/models/transaction_comment_active.rb +236 -0
  322. data/lib/postfinancecheckout-ruby-sdk/models/transaction_comment_create.rb +221 -0
  323. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion.rb +528 -0
  324. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_behavior.rb +36 -0
  325. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_mode.rb +36 -0
  326. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_request.rb +291 -0
  327. data/lib/postfinancecheckout-ruby-sdk/models/transaction_completion_state.rb +38 -0
  328. data/lib/postfinancecheckout-ruby-sdk/models/transaction_create.rb +596 -0
  329. data/lib/postfinancecheckout-ruby-sdk/models/transaction_environment_selection_strategy.rb +36 -0
  330. data/lib/postfinancecheckout-ruby-sdk/models/transaction_group.rb +276 -0
  331. data/lib/postfinancecheckout-ruby-sdk/models/transaction_group_state.rb +36 -0
  332. data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice.rb +452 -0
  333. data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_comment.rb +296 -0
  334. data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_comment_active.rb +236 -0
  335. data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_comment_create.rb +221 -0
  336. data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_replacement.rb +296 -0
  337. data/lib/postfinancecheckout-ruby-sdk/models/transaction_invoice_state.rb +40 -0
  338. data/lib/postfinancecheckout-ruby-sdk/models/transaction_line_item_update_request.rb +208 -0
  339. data/lib/postfinancecheckout-ruby-sdk/models/transaction_line_item_version.rb +313 -0
  340. data/lib/postfinancecheckout-ruby-sdk/models/transaction_pending.rb +517 -0
  341. data/lib/postfinancecheckout-ruby-sdk/models/transaction_state.rb +43 -0
  342. data/lib/postfinancecheckout-ruby-sdk/models/transaction_user_interface_type.rb +38 -0
  343. data/lib/postfinancecheckout-ruby-sdk/models/transaction_void.rb +373 -0
  344. data/lib/postfinancecheckout-ruby-sdk/models/transaction_void_mode.rb +35 -0
  345. data/lib/postfinancecheckout-ruby-sdk/models/transaction_void_state.rb +37 -0
  346. data/lib/postfinancecheckout-ruby-sdk/models/two_factor_authentication_type.rb +235 -0
  347. data/lib/postfinancecheckout-ruby-sdk/models/user.rb +241 -0
  348. data/lib/postfinancecheckout-ruby-sdk/models/user_account_role.rb +241 -0
  349. data/lib/postfinancecheckout-ruby-sdk/models/user_space_role.rb +231 -0
  350. data/lib/postfinancecheckout-ruby-sdk/models/user_type.rb +38 -0
  351. data/lib/postfinancecheckout-ruby-sdk/models/webhook_identity.rb +256 -0
  352. data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener.rb +308 -0
  353. data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener_create.rb +278 -0
  354. data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener_entity.rb +213 -0
  355. data/lib/postfinancecheckout-ruby-sdk/models/webhook_listener_update.rb +268 -0
  356. data/lib/postfinancecheckout-ruby-sdk/models/webhook_url.rb +300 -0
  357. data/lib/postfinancecheckout-ruby-sdk/models/webhook_url_create.rb +250 -0
  358. data/lib/postfinancecheckout-ruby-sdk/models/webhook_url_update.rb +280 -0
  359. data/lib/postfinancecheckout-ruby-sdk/version.rb +20 -0
  360. data/postfinancecheckout-ruby-sdk.gemspec +44 -0
  361. data/test/condition_type_service_test.rb +22 -0
  362. data/test/transaction_create_service_test.rb +89 -0
  363. data/test/transaction_payment_page_service_test.rb +91 -0
  364. metadata +469 -0
@@ -0,0 +1,299 @@
1
+ =begin
2
+ The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout 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 PostFinanceCheckout
21
+ #
22
+ class Permission
23
+ #
24
+ attr_accessor :description
25
+
26
+ #
27
+ attr_accessor :feature
28
+
29
+ #
30
+ attr_accessor :group
31
+
32
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
33
+ attr_accessor :id
34
+
35
+ #
36
+ attr_accessor :leaf
37
+
38
+ #
39
+ attr_accessor :name
40
+
41
+ #
42
+ attr_accessor :parent
43
+
44
+ #
45
+ attr_accessor :path_to_root
46
+
47
+ #
48
+ attr_accessor :title
49
+
50
+ #
51
+ attr_accessor :two_factor_required
52
+
53
+ #
54
+ attr_accessor :web_app_enabled
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'description' => :'description',
60
+ :'feature' => :'feature',
61
+ :'group' => :'group',
62
+ :'id' => :'id',
63
+ :'leaf' => :'leaf',
64
+ :'name' => :'name',
65
+ :'parent' => :'parent',
66
+ :'path_to_root' => :'pathToRoot',
67
+ :'title' => :'title',
68
+ :'two_factor_required' => :'twoFactorRequired',
69
+ :'web_app_enabled' => :'webAppEnabled'
70
+ }
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.swagger_types
75
+ {
76
+ :'description' => :'Hash<String, String>',
77
+ :'feature' => :'Integer',
78
+ :'group' => :'BOOLEAN',
79
+ :'id' => :'Integer',
80
+ :'leaf' => :'BOOLEAN',
81
+ :'name' => :'Hash<String, String>',
82
+ :'parent' => :'Integer',
83
+ :'path_to_root' => :'Array<Integer>',
84
+ :'title' => :'Hash<String, String>',
85
+ :'two_factor_required' => :'BOOLEAN',
86
+ :'web_app_enabled' => :'BOOLEAN'
87
+ }
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ return unless attributes.is_a?(Hash)
94
+
95
+ # convert string to symbol for hash key
96
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
97
+
98
+ if attributes.has_key?(:'description')
99
+ if (value = attributes[:'description']).is_a?(Hash)
100
+ self.description = value
101
+ end
102
+ end
103
+
104
+ if attributes.has_key?(:'feature')
105
+ self.feature = attributes[:'feature']
106
+ end
107
+
108
+ if attributes.has_key?(:'group')
109
+ self.group = attributes[:'group']
110
+ end
111
+
112
+ if attributes.has_key?(:'id')
113
+ self.id = attributes[:'id']
114
+ end
115
+
116
+ if attributes.has_key?(:'leaf')
117
+ self.leaf = attributes[:'leaf']
118
+ end
119
+
120
+ if attributes.has_key?(:'name')
121
+ if (value = attributes[:'name']).is_a?(Hash)
122
+ self.name = value
123
+ end
124
+ end
125
+
126
+ if attributes.has_key?(:'parent')
127
+ self.parent = attributes[:'parent']
128
+ end
129
+
130
+ if attributes.has_key?(:'pathToRoot')
131
+ if (value = attributes[:'pathToRoot']).is_a?(Array)
132
+ self.path_to_root = value
133
+ end
134
+ end
135
+
136
+ if attributes.has_key?(:'title')
137
+ if (value = attributes[:'title']).is_a?(Hash)
138
+ self.title = value
139
+ end
140
+ end
141
+
142
+ if attributes.has_key?(:'twoFactorRequired')
143
+ self.two_factor_required = attributes[:'twoFactorRequired']
144
+ end
145
+
146
+ if attributes.has_key?(:'webAppEnabled')
147
+ self.web_app_enabled = attributes[:'webAppEnabled']
148
+ end
149
+ end
150
+
151
+ # Show invalid properties with the reasons. Usually used together with valid?
152
+ # @return Array for valid properties with the reasons
153
+ def list_invalid_properties
154
+ invalid_properties = Array.new
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ true
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ description == o.description &&
170
+ feature == o.feature &&
171
+ group == o.group &&
172
+ id == o.id &&
173
+ leaf == o.leaf &&
174
+ name == o.name &&
175
+ parent == o.parent &&
176
+ path_to_root == o.path_to_root &&
177
+ title == o.title &&
178
+ two_factor_required == o.two_factor_required &&
179
+ web_app_enabled == o.web_app_enabled
180
+ end
181
+
182
+ # @see the `==` method
183
+ # @param [Object] Object to be compared
184
+ def eql?(o)
185
+ self == o
186
+ end
187
+
188
+ # Calculates hash code according to all attributes.
189
+ # @return [Fixnum] Hash code
190
+ def hash
191
+ [description, feature, group, id, leaf, name, parent, path_to_root, title, two_factor_required, web_app_enabled].hash
192
+ end
193
+
194
+ # Builds the object from hash
195
+ # @param [Hash] attributes Model attributes in the form of hash
196
+ # @return [Object] Returns the model itself
197
+ def build_from_hash(attributes)
198
+ return nil unless attributes.is_a?(Hash)
199
+ self.class.swagger_types.each_pair do |key, type|
200
+ if type =~ /\AArray<(.*)>/i
201
+ # check to ensure the input is an array given that the attribute
202
+ # is documented as an array but the input is not
203
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
204
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
205
+ end
206
+ elsif !attributes[self.class.attribute_map[key]].nil?
207
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
208
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
209
+ end
210
+
211
+ self
212
+ end
213
+
214
+ # Deserializes the data based on type
215
+ # @param string type Data type
216
+ # @param string value Value to be deserialized
217
+ # @return [Object] Deserialized data
218
+ def _deserialize(type, value)
219
+ case type.to_sym
220
+ when :DateTime
221
+ DateTime.parse(value)
222
+ when :Date
223
+ Date.parse(value)
224
+ when :String
225
+ value.to_s
226
+ when :Integer
227
+ value.to_i
228
+ when :Float
229
+ value.to_f
230
+ when :BOOLEAN
231
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
232
+ true
233
+ else
234
+ false
235
+ end
236
+ when :Object
237
+ # generic object (usually a Hash), return directly
238
+ value
239
+ when /\AArray<(?<inner_type>.+)>\z/
240
+ inner_type = Regexp.last_match[:inner_type]
241
+ value.map { |v| _deserialize(inner_type, v) }
242
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
243
+ k_type = Regexp.last_match[:k_type]
244
+ v_type = Regexp.last_match[:v_type]
245
+ {}.tap do |hash|
246
+ value.each do |k, v|
247
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
248
+ end
249
+ end
250
+ else # model
251
+ temp_model = PostFinanceCheckout.const_get(type).new
252
+ temp_model.build_from_hash(value)
253
+ end
254
+ end
255
+
256
+ # Returns the string representation of the object
257
+ # @return [String] String presentation of the object
258
+ def to_s
259
+ to_hash.to_s
260
+ end
261
+
262
+ # to_body is an alias to to_hash (backward compatibility)
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_body
265
+ to_hash
266
+ end
267
+
268
+ # Returns the object in the form of hash
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_hash
271
+ hash = {}
272
+ self.class.attribute_map.each_pair do |attr, param|
273
+ value = self.send(attr)
274
+ next if value.nil?
275
+ hash[param] = _to_hash(value)
276
+ end
277
+ hash
278
+ end
279
+
280
+ # Outputs non-array value in the form of hash
281
+ # For object, use to_hash. Otherwise, just return the value
282
+ # @param [Object] value Any valid value
283
+ # @return [Hash] Returns the value in the form of hash
284
+ def _to_hash(value)
285
+ if value.is_a?(Array)
286
+ value.compact.map{ |v| _to_hash(v) }
287
+ elsif value.is_a?(Hash)
288
+ {}.tap do |hash|
289
+ value.each { |k, v| hash[k] = _to_hash(v) }
290
+ end
291
+ elsif value.respond_to? :to_hash
292
+ value.to_hash
293
+ else
294
+ value
295
+ end
296
+ end
297
+
298
+ end
299
+ end
@@ -0,0 +1,567 @@
1
+ =begin
2
+ The PostFinance Checkout API allows an easy interaction with the PostFinance Checkout 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 PostFinanceCheckout
21
+ # The refund represents a credit back to the customer. It can be issued by the merchant or by the customer (reversal).
22
+ class Refund
23
+ #
24
+ attr_accessor :amount
25
+
26
+ #
27
+ attr_accessor :base_line_items
28
+
29
+ #
30
+ attr_accessor :completion
31
+
32
+ #
33
+ attr_accessor :created_by
34
+
35
+ # The created on date indicates the date on which the entity was stored into the database.
36
+ attr_accessor :created_on
37
+
38
+ #
39
+ attr_accessor :environment
40
+
41
+ # The external id helps to identify duplicate calls to the refund service. As such the external ID has to be unique per transaction.
42
+ attr_accessor :external_id
43
+
44
+ #
45
+ attr_accessor :failed_on
46
+
47
+ #
48
+ attr_accessor :failure_reason
49
+
50
+ # The ID is the primary key of the entity. The ID identifies the entity uniquely.
51
+ attr_accessor :id
52
+
53
+ #
54
+ attr_accessor :labels
55
+
56
+ #
57
+ attr_accessor :language
58
+
59
+ #
60
+ attr_accessor :line_items
61
+
62
+ # The linked space id holds the ID of the space to which the entity belongs to.
63
+ attr_accessor :linked_space_id
64
+
65
+ #
66
+ attr_accessor :merchant_reference
67
+
68
+ #
69
+ attr_accessor :next_update_on
70
+
71
+ # The planned purge date indicates when the entity is permanently removed. When the date is null the entity is not planned to be removed.
72
+ attr_accessor :planned_purge_date
73
+
74
+ #
75
+ attr_accessor :processing_on
76
+
77
+ #
78
+ attr_accessor :processor_reference
79
+
80
+ #
81
+ attr_accessor :reduced_line_items
82
+
83
+ #
84
+ attr_accessor :reductions
85
+
86
+ #
87
+ attr_accessor :state
88
+
89
+ #
90
+ attr_accessor :succeeded_on
91
+
92
+ #
93
+ attr_accessor :taxes
94
+
95
+ #
96
+ attr_accessor :time_zone
97
+
98
+ #
99
+ attr_accessor :timeout_on
100
+
101
+ # The total applied fees is the sum of all fees that have been applied so far.
102
+ attr_accessor :total_applied_fees
103
+
104
+ # The total settled amount is the total amount which has been settled so far.
105
+ attr_accessor :total_settled_amount
106
+
107
+ #
108
+ attr_accessor :transaction
109
+
110
+ #
111
+ attr_accessor :type
112
+
113
+ #
114
+ attr_accessor :updated_invoice
115
+
116
+ # The version number indicates the version of the entity. The version is incremented whenever the entity is changed.
117
+ attr_accessor :version
118
+
119
+ # Attribute mapping from ruby-style variable name to JSON key.
120
+ def self.attribute_map
121
+ {
122
+ :'amount' => :'amount',
123
+ :'base_line_items' => :'baseLineItems',
124
+ :'completion' => :'completion',
125
+ :'created_by' => :'createdBy',
126
+ :'created_on' => :'createdOn',
127
+ :'environment' => :'environment',
128
+ :'external_id' => :'externalId',
129
+ :'failed_on' => :'failedOn',
130
+ :'failure_reason' => :'failureReason',
131
+ :'id' => :'id',
132
+ :'labels' => :'labels',
133
+ :'language' => :'language',
134
+ :'line_items' => :'lineItems',
135
+ :'linked_space_id' => :'linkedSpaceId',
136
+ :'merchant_reference' => :'merchantReference',
137
+ :'next_update_on' => :'nextUpdateOn',
138
+ :'planned_purge_date' => :'plannedPurgeDate',
139
+ :'processing_on' => :'processingOn',
140
+ :'processor_reference' => :'processorReference',
141
+ :'reduced_line_items' => :'reducedLineItems',
142
+ :'reductions' => :'reductions',
143
+ :'state' => :'state',
144
+ :'succeeded_on' => :'succeededOn',
145
+ :'taxes' => :'taxes',
146
+ :'time_zone' => :'timeZone',
147
+ :'timeout_on' => :'timeoutOn',
148
+ :'total_applied_fees' => :'totalAppliedFees',
149
+ :'total_settled_amount' => :'totalSettledAmount',
150
+ :'transaction' => :'transaction',
151
+ :'type' => :'type',
152
+ :'updated_invoice' => :'updatedInvoice',
153
+ :'version' => :'version'
154
+ }
155
+ end
156
+
157
+ # Attribute type mapping.
158
+ def self.swagger_types
159
+ {
160
+ :'amount' => :'Float',
161
+ :'base_line_items' => :'Array<LineItem>',
162
+ :'completion' => :'Integer',
163
+ :'created_by' => :'Integer',
164
+ :'created_on' => :'DateTime',
165
+ :'environment' => :'Environment',
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
+ :'merchant_reference' => :'String',
175
+ :'next_update_on' => :'DateTime',
176
+ :'planned_purge_date' => :'DateTime',
177
+ :'processing_on' => :'DateTime',
178
+ :'processor_reference' => :'String',
179
+ :'reduced_line_items' => :'Array<LineItem>',
180
+ :'reductions' => :'Array<LineItemReduction>',
181
+ :'state' => :'RefundState',
182
+ :'succeeded_on' => :'DateTime',
183
+ :'taxes' => :'Array<Tax>',
184
+ :'time_zone' => :'String',
185
+ :'timeout_on' => :'DateTime',
186
+ :'total_applied_fees' => :'Float',
187
+ :'total_settled_amount' => :'Float',
188
+ :'transaction' => :'Transaction',
189
+ :'type' => :'RefundType',
190
+ :'updated_invoice' => :'Integer',
191
+ :'version' => :'Integer'
192
+ }
193
+ end
194
+
195
+ # Initializes the object
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ def initialize(attributes = {})
198
+ return unless attributes.is_a?(Hash)
199
+
200
+ # convert string to symbol for hash key
201
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
202
+
203
+ if attributes.has_key?(:'amount')
204
+ self.amount = attributes[:'amount']
205
+ end
206
+
207
+ if attributes.has_key?(:'baseLineItems')
208
+ if (value = attributes[:'baseLineItems']).is_a?(Array)
209
+ self.base_line_items = value
210
+ end
211
+ end
212
+
213
+ if attributes.has_key?(:'completion')
214
+ self.completion = attributes[:'completion']
215
+ end
216
+
217
+ if attributes.has_key?(:'createdBy')
218
+ self.created_by = attributes[:'createdBy']
219
+ end
220
+
221
+ if attributes.has_key?(:'createdOn')
222
+ self.created_on = attributes[:'createdOn']
223
+ end
224
+
225
+ if attributes.has_key?(:'environment')
226
+ self.environment = attributes[:'environment']
227
+ end
228
+
229
+ if attributes.has_key?(:'externalId')
230
+ self.external_id = attributes[:'externalId']
231
+ end
232
+
233
+ if attributes.has_key?(:'failedOn')
234
+ self.failed_on = attributes[:'failedOn']
235
+ end
236
+
237
+ if attributes.has_key?(:'failureReason')
238
+ self.failure_reason = attributes[:'failureReason']
239
+ end
240
+
241
+ if attributes.has_key?(:'id')
242
+ self.id = attributes[:'id']
243
+ end
244
+
245
+ if attributes.has_key?(:'labels')
246
+ if (value = attributes[:'labels']).is_a?(Array)
247
+ self.labels = value
248
+ end
249
+ end
250
+
251
+ if attributes.has_key?(:'language')
252
+ self.language = attributes[:'language']
253
+ end
254
+
255
+ if attributes.has_key?(:'lineItems')
256
+ if (value = attributes[:'lineItems']).is_a?(Array)
257
+ self.line_items = value
258
+ end
259
+ end
260
+
261
+ if attributes.has_key?(:'linkedSpaceId')
262
+ self.linked_space_id = attributes[:'linkedSpaceId']
263
+ end
264
+
265
+ if attributes.has_key?(:'merchantReference')
266
+ self.merchant_reference = attributes[:'merchantReference']
267
+ end
268
+
269
+ if attributes.has_key?(:'nextUpdateOn')
270
+ self.next_update_on = attributes[:'nextUpdateOn']
271
+ end
272
+
273
+ if attributes.has_key?(:'plannedPurgeDate')
274
+ self.planned_purge_date = attributes[:'plannedPurgeDate']
275
+ end
276
+
277
+ if attributes.has_key?(:'processingOn')
278
+ self.processing_on = attributes[:'processingOn']
279
+ end
280
+
281
+ if attributes.has_key?(:'processorReference')
282
+ self.processor_reference = attributes[:'processorReference']
283
+ end
284
+
285
+ if attributes.has_key?(:'reducedLineItems')
286
+ if (value = attributes[:'reducedLineItems']).is_a?(Array)
287
+ self.reduced_line_items = value
288
+ end
289
+ end
290
+
291
+ if attributes.has_key?(:'reductions')
292
+ if (value = attributes[:'reductions']).is_a?(Array)
293
+ self.reductions = value
294
+ end
295
+ end
296
+
297
+ if attributes.has_key?(:'state')
298
+ self.state = attributes[:'state']
299
+ end
300
+
301
+ if attributes.has_key?(:'succeededOn')
302
+ self.succeeded_on = attributes[:'succeededOn']
303
+ end
304
+
305
+ if attributes.has_key?(:'taxes')
306
+ if (value = attributes[:'taxes']).is_a?(Array)
307
+ self.taxes = value
308
+ end
309
+ end
310
+
311
+ if attributes.has_key?(:'timeZone')
312
+ self.time_zone = attributes[:'timeZone']
313
+ end
314
+
315
+ if attributes.has_key?(:'timeoutOn')
316
+ self.timeout_on = attributes[:'timeoutOn']
317
+ end
318
+
319
+ if attributes.has_key?(:'totalAppliedFees')
320
+ self.total_applied_fees = attributes[:'totalAppliedFees']
321
+ end
322
+
323
+ if attributes.has_key?(:'totalSettledAmount')
324
+ self.total_settled_amount = attributes[:'totalSettledAmount']
325
+ end
326
+
327
+ if attributes.has_key?(:'transaction')
328
+ self.transaction = attributes[:'transaction']
329
+ end
330
+
331
+ if attributes.has_key?(:'type')
332
+ self.type = attributes[:'type']
333
+ end
334
+
335
+ if attributes.has_key?(:'updatedInvoice')
336
+ self.updated_invoice = attributes[:'updatedInvoice']
337
+ end
338
+
339
+ if attributes.has_key?(:'version')
340
+ self.version = attributes[:'version']
341
+ end
342
+ end
343
+
344
+ # Show invalid properties with the reasons. Usually used together with valid?
345
+ # @return Array for valid properties with the reasons
346
+ def list_invalid_properties
347
+ invalid_properties = Array.new
348
+ if !@external_id.nil? && @external_id.to_s.length > 100
349
+ invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
350
+ end
351
+
352
+ if !@external_id.nil? && @external_id.to_s.length < 1
353
+ invalid_properties.push('invalid value for "external_id", the character length must be great than or equal to 1.')
354
+ end
355
+
356
+ if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
357
+ invalid_properties.push('invalid value for "merchant_reference", the character length must be smaller than or equal to 100.')
358
+ end
359
+
360
+ if !@processor_reference.nil? && @processor_reference.to_s.length > 150
361
+ invalid_properties.push('invalid value for "processor_reference", the character length must be smaller than or equal to 150.')
362
+ end
363
+
364
+ invalid_properties
365
+ end
366
+
367
+ # Check to see if the all the properties in the model are valid
368
+ # @return true if the model is valid
369
+ def valid?
370
+ return false if !@external_id.nil? && @external_id.to_s.length > 100
371
+ return false if !@external_id.nil? && @external_id.to_s.length < 1
372
+ return false if !@merchant_reference.nil? && @merchant_reference.to_s.length > 100
373
+ return false if !@processor_reference.nil? && @processor_reference.to_s.length > 150
374
+ true
375
+ end
376
+
377
+ # Custom attribute writer method with validation
378
+ # @param [Object] external_id Value to be assigned
379
+ def external_id=(external_id)
380
+ if !external_id.nil? && external_id.to_s.length > 100
381
+ fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 100.'
382
+ end
383
+
384
+ if !external_id.nil? && external_id.to_s.length < 1
385
+ fail ArgumentError, 'invalid value for "external_id", the character length must be great than or equal to 1.'
386
+ end
387
+
388
+ @external_id = external_id
389
+ end
390
+
391
+ # Custom attribute writer method with validation
392
+ # @param [Object] merchant_reference Value to be assigned
393
+ def merchant_reference=(merchant_reference)
394
+ if !merchant_reference.nil? && merchant_reference.to_s.length > 100
395
+ fail ArgumentError, 'invalid value for "merchant_reference", the character length must be smaller than or equal to 100.'
396
+ end
397
+
398
+ @merchant_reference = merchant_reference
399
+ end
400
+
401
+ # Custom attribute writer method with validation
402
+ # @param [Object] processor_reference Value to be assigned
403
+ def processor_reference=(processor_reference)
404
+ if !processor_reference.nil? && processor_reference.to_s.length > 150
405
+ fail ArgumentError, 'invalid value for "processor_reference", the character length must be smaller than or equal to 150.'
406
+ end
407
+
408
+ @processor_reference = processor_reference
409
+ end
410
+
411
+ # Checks equality by comparing each attribute.
412
+ # @param [Object] Object to be compared
413
+ def ==(o)
414
+ return true if self.equal?(o)
415
+ self.class == o.class &&
416
+ amount == o.amount &&
417
+ base_line_items == o.base_line_items &&
418
+ completion == o.completion &&
419
+ created_by == o.created_by &&
420
+ created_on == o.created_on &&
421
+ environment == o.environment &&
422
+ external_id == o.external_id &&
423
+ failed_on == o.failed_on &&
424
+ failure_reason == o.failure_reason &&
425
+ id == o.id &&
426
+ labels == o.labels &&
427
+ language == o.language &&
428
+ line_items == o.line_items &&
429
+ linked_space_id == o.linked_space_id &&
430
+ merchant_reference == o.merchant_reference &&
431
+ next_update_on == o.next_update_on &&
432
+ planned_purge_date == o.planned_purge_date &&
433
+ processing_on == o.processing_on &&
434
+ processor_reference == o.processor_reference &&
435
+ reduced_line_items == o.reduced_line_items &&
436
+ reductions == o.reductions &&
437
+ state == o.state &&
438
+ succeeded_on == o.succeeded_on &&
439
+ taxes == o.taxes &&
440
+ time_zone == o.time_zone &&
441
+ timeout_on == o.timeout_on &&
442
+ total_applied_fees == o.total_applied_fees &&
443
+ total_settled_amount == o.total_settled_amount &&
444
+ transaction == o.transaction &&
445
+ type == o.type &&
446
+ updated_invoice == o.updated_invoice &&
447
+ version == o.version
448
+ end
449
+
450
+ # @see the `==` method
451
+ # @param [Object] Object to be compared
452
+ def eql?(o)
453
+ self == o
454
+ end
455
+
456
+ # Calculates hash code according to all attributes.
457
+ # @return [Fixnum] Hash code
458
+ def hash
459
+ [amount, base_line_items, completion, created_by, created_on, environment, external_id, failed_on, failure_reason, id, labels, language, line_items, linked_space_id, merchant_reference, next_update_on, planned_purge_date, processing_on, processor_reference, reduced_line_items, reductions, state, succeeded_on, taxes, time_zone, timeout_on, total_applied_fees, total_settled_amount, transaction, type, updated_invoice, version].hash
460
+ end
461
+
462
+ # Builds the object from hash
463
+ # @param [Hash] attributes Model attributes in the form of hash
464
+ # @return [Object] Returns the model itself
465
+ def build_from_hash(attributes)
466
+ return nil unless attributes.is_a?(Hash)
467
+ self.class.swagger_types.each_pair do |key, type|
468
+ if type =~ /\AArray<(.*)>/i
469
+ # check to ensure the input is an array given that the attribute
470
+ # is documented as an array but the input is not
471
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
472
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
473
+ end
474
+ elsif !attributes[self.class.attribute_map[key]].nil?
475
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
476
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
477
+ end
478
+
479
+ self
480
+ end
481
+
482
+ # Deserializes the data based on type
483
+ # @param string type Data type
484
+ # @param string value Value to be deserialized
485
+ # @return [Object] Deserialized data
486
+ def _deserialize(type, value)
487
+ case type.to_sym
488
+ when :DateTime
489
+ DateTime.parse(value)
490
+ when :Date
491
+ Date.parse(value)
492
+ when :String
493
+ value.to_s
494
+ when :Integer
495
+ value.to_i
496
+ when :Float
497
+ value.to_f
498
+ when :BOOLEAN
499
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
500
+ true
501
+ else
502
+ false
503
+ end
504
+ when :Object
505
+ # generic object (usually a Hash), return directly
506
+ value
507
+ when /\AArray<(?<inner_type>.+)>\z/
508
+ inner_type = Regexp.last_match[:inner_type]
509
+ value.map { |v| _deserialize(inner_type, v) }
510
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
511
+ k_type = Regexp.last_match[:k_type]
512
+ v_type = Regexp.last_match[:v_type]
513
+ {}.tap do |hash|
514
+ value.each do |k, v|
515
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
516
+ end
517
+ end
518
+ else # model
519
+ temp_model = PostFinanceCheckout.const_get(type).new
520
+ temp_model.build_from_hash(value)
521
+ end
522
+ end
523
+
524
+ # Returns the string representation of the object
525
+ # @return [String] String presentation of the object
526
+ def to_s
527
+ to_hash.to_s
528
+ end
529
+
530
+ # to_body is an alias to to_hash (backward compatibility)
531
+ # @return [Hash] Returns the object in the form of hash
532
+ def to_body
533
+ to_hash
534
+ end
535
+
536
+ # Returns the object in the form of hash
537
+ # @return [Hash] Returns the object in the form of hash
538
+ def to_hash
539
+ hash = {}
540
+ self.class.attribute_map.each_pair do |attr, param|
541
+ value = self.send(attr)
542
+ next if value.nil?
543
+ hash[param] = _to_hash(value)
544
+ end
545
+ hash
546
+ end
547
+
548
+ # Outputs non-array value in the form of hash
549
+ # For object, use to_hash. Otherwise, just return the value
550
+ # @param [Object] value Any valid value
551
+ # @return [Hash] Returns the value in the form of hash
552
+ def _to_hash(value)
553
+ if value.is_a?(Array)
554
+ value.compact.map{ |v| _to_hash(v) }
555
+ elsif value.is_a?(Hash)
556
+ {}.tap do |hash|
557
+ value.each { |k, v| hash[k] = _to_hash(v) }
558
+ end
559
+ elsif value.respond_to? :to_hash
560
+ value.to_hash
561
+ else
562
+ value
563
+ end
564
+ end
565
+
566
+ end
567
+ end