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,320 @@
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
+ class AbstractShopifySubscriptionProductUpdate
22
+ #
23
+ attr_accessor :absolute_price_adjustment
24
+
25
+ # Define the day of the month on which the recurring orders should be created.
26
+ attr_accessor :billing_day_of_month
27
+
28
+ #
29
+ attr_accessor :billing_interval_amount
30
+
31
+ # Define how frequently recurring orders should be created.
32
+ attr_accessor :billing_interval_unit
33
+
34
+ # Define the weekday on which the recurring orders should be created.
35
+ attr_accessor :billing_weekday
36
+
37
+ #
38
+ attr_accessor :fixed_price
39
+
40
+ # Define the maximum number of orders the subscription will run for.
41
+ attr_accessor :maximal_billing_cycles
42
+
43
+ # Define the maximum number of orders the subscription can be suspended for at a time.
44
+ attr_accessor :maximal_suspendable_cycles
45
+
46
+ # Define the minimal number of orders the subscription will run for.
47
+ attr_accessor :minimal_billing_cycles
48
+
49
+ #
50
+ attr_accessor :pricing_option
51
+
52
+ #
53
+ attr_accessor :relative_price_adjustment
54
+
55
+ # Define whether the order confirmation email of the Shopify shop is sent to the customer for recurring orders.
56
+ attr_accessor :store_order_confirmation_email_enabled
57
+
58
+ # Define whether the customer is allowed to suspend subscriptions.
59
+ attr_accessor :subscriber_suspension_allowed
60
+
61
+ # Define the number of orders the subscription will keep running for after its termination has been requested.
62
+ attr_accessor :termination_billing_cycles
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'absolute_price_adjustment' => :'absolutePriceAdjustment',
68
+ :'billing_day_of_month' => :'billingDayOfMonth',
69
+ :'billing_interval_amount' => :'billingIntervalAmount',
70
+ :'billing_interval_unit' => :'billingIntervalUnit',
71
+ :'billing_weekday' => :'billingWeekday',
72
+ :'fixed_price' => :'fixedPrice',
73
+ :'maximal_billing_cycles' => :'maximalBillingCycles',
74
+ :'maximal_suspendable_cycles' => :'maximalSuspendableCycles',
75
+ :'minimal_billing_cycles' => :'minimalBillingCycles',
76
+ :'pricing_option' => :'pricingOption',
77
+ :'relative_price_adjustment' => :'relativePriceAdjustment',
78
+ :'store_order_confirmation_email_enabled' => :'storeOrderConfirmationEmailEnabled',
79
+ :'subscriber_suspension_allowed' => :'subscriberSuspensionAllowed',
80
+ :'termination_billing_cycles' => :'terminationBillingCycles'
81
+ }
82
+ end
83
+
84
+ # Attribute type mapping.
85
+ def self.swagger_types
86
+ {
87
+ :'absolute_price_adjustment' => :'Float',
88
+ :'billing_day_of_month' => :'Integer',
89
+ :'billing_interval_amount' => :'Integer',
90
+ :'billing_interval_unit' => :'ShopifySubscriptionBillingIntervalUnit',
91
+ :'billing_weekday' => :'ShopifySubscriptionWeekday',
92
+ :'fixed_price' => :'Float',
93
+ :'maximal_billing_cycles' => :'Integer',
94
+ :'maximal_suspendable_cycles' => :'Integer',
95
+ :'minimal_billing_cycles' => :'Integer',
96
+ :'pricing_option' => :'ShopifySubscriptionProductPricingOption',
97
+ :'relative_price_adjustment' => :'Float',
98
+ :'store_order_confirmation_email_enabled' => :'BOOLEAN',
99
+ :'subscriber_suspension_allowed' => :'BOOLEAN',
100
+ :'termination_billing_cycles' => :'Integer'
101
+ }
102
+ end
103
+
104
+ # Initializes the object
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ def initialize(attributes = {})
107
+ return unless attributes.is_a?(Hash)
108
+
109
+ # convert string to symbol for hash key
110
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
111
+
112
+ if attributes.has_key?(:'absolutePriceAdjustment')
113
+ self.absolute_price_adjustment = attributes[:'absolutePriceAdjustment']
114
+ end
115
+
116
+ if attributes.has_key?(:'billingDayOfMonth')
117
+ self.billing_day_of_month = attributes[:'billingDayOfMonth']
118
+ end
119
+
120
+ if attributes.has_key?(:'billingIntervalAmount')
121
+ self.billing_interval_amount = attributes[:'billingIntervalAmount']
122
+ end
123
+
124
+ if attributes.has_key?(:'billingIntervalUnit')
125
+ self.billing_interval_unit = attributes[:'billingIntervalUnit']
126
+ end
127
+
128
+ if attributes.has_key?(:'billingWeekday')
129
+ self.billing_weekday = attributes[:'billingWeekday']
130
+ end
131
+
132
+ if attributes.has_key?(:'fixedPrice')
133
+ self.fixed_price = attributes[:'fixedPrice']
134
+ end
135
+
136
+ if attributes.has_key?(:'maximalBillingCycles')
137
+ self.maximal_billing_cycles = attributes[:'maximalBillingCycles']
138
+ end
139
+
140
+ if attributes.has_key?(:'maximalSuspendableCycles')
141
+ self.maximal_suspendable_cycles = attributes[:'maximalSuspendableCycles']
142
+ end
143
+
144
+ if attributes.has_key?(:'minimalBillingCycles')
145
+ self.minimal_billing_cycles = attributes[:'minimalBillingCycles']
146
+ end
147
+
148
+ if attributes.has_key?(:'pricingOption')
149
+ self.pricing_option = attributes[:'pricingOption']
150
+ end
151
+
152
+ if attributes.has_key?(:'relativePriceAdjustment')
153
+ self.relative_price_adjustment = attributes[:'relativePriceAdjustment']
154
+ end
155
+
156
+ if attributes.has_key?(:'storeOrderConfirmationEmailEnabled')
157
+ self.store_order_confirmation_email_enabled = attributes[:'storeOrderConfirmationEmailEnabled']
158
+ end
159
+
160
+ if attributes.has_key?(:'subscriberSuspensionAllowed')
161
+ self.subscriber_suspension_allowed = attributes[:'subscriberSuspensionAllowed']
162
+ end
163
+
164
+ if attributes.has_key?(:'terminationBillingCycles')
165
+ self.termination_billing_cycles = attributes[:'terminationBillingCycles']
166
+ end
167
+ end
168
+
169
+ # Show invalid properties with the reasons. Usually used together with valid?
170
+ # @return Array for valid properties with the reasons
171
+ def list_invalid_properties
172
+ invalid_properties = Array.new
173
+ invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ true
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(o)
185
+ return true if self.equal?(o)
186
+ self.class == o.class &&
187
+ absolute_price_adjustment == o.absolute_price_adjustment &&
188
+ billing_day_of_month == o.billing_day_of_month &&
189
+ billing_interval_amount == o.billing_interval_amount &&
190
+ billing_interval_unit == o.billing_interval_unit &&
191
+ billing_weekday == o.billing_weekday &&
192
+ fixed_price == o.fixed_price &&
193
+ maximal_billing_cycles == o.maximal_billing_cycles &&
194
+ maximal_suspendable_cycles == o.maximal_suspendable_cycles &&
195
+ minimal_billing_cycles == o.minimal_billing_cycles &&
196
+ pricing_option == o.pricing_option &&
197
+ relative_price_adjustment == o.relative_price_adjustment &&
198
+ store_order_confirmation_email_enabled == o.store_order_confirmation_email_enabled &&
199
+ subscriber_suspension_allowed == o.subscriber_suspension_allowed &&
200
+ termination_billing_cycles == o.termination_billing_cycles
201
+ end
202
+
203
+ # @see the `==` method
204
+ # @param [Object] Object to be compared
205
+ def eql?(o)
206
+ self == o
207
+ end
208
+
209
+ # Calculates hash code according to all attributes.
210
+ # @return [Fixnum] Hash code
211
+ def hash
212
+ [absolute_price_adjustment, billing_day_of_month, billing_interval_amount, billing_interval_unit, billing_weekday, fixed_price, maximal_billing_cycles, maximal_suspendable_cycles, minimal_billing_cycles, pricing_option, relative_price_adjustment, store_order_confirmation_email_enabled, subscriber_suspension_allowed, termination_billing_cycles].hash
213
+ end
214
+
215
+ # Builds the object from hash
216
+ # @param [Hash] attributes Model attributes in the form of hash
217
+ # @return [Object] Returns the model itself
218
+ def build_from_hash(attributes)
219
+ return nil unless attributes.is_a?(Hash)
220
+ self.class.swagger_types.each_pair do |key, type|
221
+ if type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
225
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
226
+ end
227
+ elsif !attributes[self.class.attribute_map[key]].nil?
228
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
229
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
230
+ end
231
+
232
+ self
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def _deserialize(type, value)
240
+ case type.to_sym
241
+ when :DateTime
242
+ DateTime.parse(value)
243
+ when :Date
244
+ Date.parse(value)
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :BOOLEAN
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else # model
272
+ temp_model = PostFinanceCheckout.const_get(type).new
273
+ temp_model.build_from_hash(value)
274
+ end
275
+ end
276
+
277
+ # Returns the string representation of the object
278
+ # @return [String] String presentation of the object
279
+ def to_s
280
+ to_hash.to_s
281
+ end
282
+
283
+ # to_body is an alias to to_hash (backward compatibility)
284
+ # @return [Hash] Returns the object in the form of hash
285
+ def to_body
286
+ to_hash
287
+ end
288
+
289
+ # Returns the object in the form of hash
290
+ # @return [Hash] Returns the object in the form of hash
291
+ def to_hash
292
+ hash = {}
293
+ self.class.attribute_map.each_pair do |attr, param|
294
+ value = self.send(attr)
295
+ next if value.nil?
296
+ hash[param] = _to_hash(value)
297
+ end
298
+ hash
299
+ end
300
+
301
+ # Outputs non-array value in the form of hash
302
+ # For object, use to_hash. Otherwise, just return the value
303
+ # @param [Object] value Any valid value
304
+ # @return [Hash] Returns the value in the form of hash
305
+ def _to_hash(value)
306
+ if value.is_a?(Array)
307
+ value.compact.map{ |v| _to_hash(v) }
308
+ elsif value.is_a?(Hash)
309
+ {}.tap do |hash|
310
+ value.each { |k, v| hash[k] = _to_hash(v) }
311
+ end
312
+ elsif value.respond_to? :to_hash
313
+ value.to_hash
314
+ else
315
+ value
316
+ end
317
+ end
318
+
319
+ end
320
+ end
@@ -0,0 +1,286 @@
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
+ class AbstractSpaceUpdate
22
+ #
23
+ attr_accessor :last_modified_date
24
+
25
+ # The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive.
26
+ attr_accessor :name
27
+
28
+ # The address to use in communication with clients for example in email, documents etc.
29
+ attr_accessor :postal_address
30
+
31
+ # This is the currency that is used to display aggregated amounts in the space.
32
+ attr_accessor :primary_currency
33
+
34
+ # The request limit defines the maximum number of API request accepted within 2 minutes for this space. This limit can only be changed with special privileges.
35
+ attr_accessor :request_limit
36
+
37
+ #
38
+ attr_accessor :state
39
+
40
+ # The email address provided as contact addresses will be informed about technical issues or errors triggered by the space.
41
+ attr_accessor :technical_contact_addresses
42
+
43
+ # The time zone assigned to the space determines the time offset for calculating dates within the space. This is typically used for background processed which needs to be triggered on a specific hour within the day. Changing the space time zone will not change the display of dates.
44
+ attr_accessor :time_zone
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'last_modified_date' => :'lastModifiedDate',
50
+ :'name' => :'name',
51
+ :'postal_address' => :'postalAddress',
52
+ :'primary_currency' => :'primaryCurrency',
53
+ :'request_limit' => :'requestLimit',
54
+ :'state' => :'state',
55
+ :'technical_contact_addresses' => :'technicalContactAddresses',
56
+ :'time_zone' => :'timeZone'
57
+ }
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.swagger_types
62
+ {
63
+ :'last_modified_date' => :'DateTime',
64
+ :'name' => :'String',
65
+ :'postal_address' => :'SpaceAddressCreate',
66
+ :'primary_currency' => :'String',
67
+ :'request_limit' => :'Integer',
68
+ :'state' => :'CreationEntityState',
69
+ :'technical_contact_addresses' => :'Array<String>',
70
+ :'time_zone' => :'String'
71
+ }
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ return unless attributes.is_a?(Hash)
78
+
79
+ # convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
81
+
82
+ if attributes.has_key?(:'lastModifiedDate')
83
+ self.last_modified_date = attributes[:'lastModifiedDate']
84
+ end
85
+
86
+ if attributes.has_key?(:'name')
87
+ self.name = attributes[:'name']
88
+ end
89
+
90
+ if attributes.has_key?(:'postalAddress')
91
+ self.postal_address = attributes[:'postalAddress']
92
+ end
93
+
94
+ if attributes.has_key?(:'primaryCurrency')
95
+ self.primary_currency = attributes[:'primaryCurrency']
96
+ end
97
+
98
+ if attributes.has_key?(:'requestLimit')
99
+ self.request_limit = attributes[:'requestLimit']
100
+ end
101
+
102
+ if attributes.has_key?(:'state')
103
+ self.state = attributes[:'state']
104
+ end
105
+
106
+ if attributes.has_key?(:'technicalContactAddresses')
107
+ if (value = attributes[:'technicalContactAddresses']).is_a?(Array)
108
+ self.technical_contact_addresses = value
109
+ end
110
+ end
111
+
112
+ if attributes.has_key?(:'timeZone')
113
+ self.time_zone = attributes[:'timeZone']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ if !@name.nil? && @name.to_s.length > 200
122
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
123
+ end
124
+
125
+ if !@name.nil? && @name.to_s.length < 3
126
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 3.')
127
+ end
128
+
129
+ invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+ return false if !@name.nil? && @name.to_s.length > 200
136
+ return false if !@name.nil? && @name.to_s.length < 3
137
+ true
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] name Value to be assigned
142
+ def name=(name)
143
+ if !name.nil? && name.to_s.length > 200
144
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
145
+ end
146
+
147
+ if !name.nil? && name.to_s.length < 3
148
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 3.'
149
+ end
150
+
151
+ @name = name
152
+ end
153
+
154
+ # Checks equality by comparing each attribute.
155
+ # @param [Object] Object to be compared
156
+ def ==(o)
157
+ return true if self.equal?(o)
158
+ self.class == o.class &&
159
+ last_modified_date == o.last_modified_date &&
160
+ name == o.name &&
161
+ postal_address == o.postal_address &&
162
+ primary_currency == o.primary_currency &&
163
+ request_limit == o.request_limit &&
164
+ state == o.state &&
165
+ technical_contact_addresses == o.technical_contact_addresses &&
166
+ time_zone == o.time_zone
167
+ end
168
+
169
+ # @see the `==` method
170
+ # @param [Object] Object to be compared
171
+ def eql?(o)
172
+ self == o
173
+ end
174
+
175
+ # Calculates hash code according to all attributes.
176
+ # @return [Fixnum] Hash code
177
+ def hash
178
+ [last_modified_date, name, postal_address, primary_currency, request_limit, state, technical_contact_addresses, time_zone].hash
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def build_from_hash(attributes)
185
+ return nil unless attributes.is_a?(Hash)
186
+ self.class.swagger_types.each_pair do |key, type|
187
+ if type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
191
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
192
+ end
193
+ elsif !attributes[self.class.attribute_map[key]].nil?
194
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
195
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
196
+ end
197
+
198
+ self
199
+ end
200
+
201
+ # Deserializes the data based on type
202
+ # @param string type Data type
203
+ # @param string value Value to be deserialized
204
+ # @return [Object] Deserialized data
205
+ def _deserialize(type, value)
206
+ case type.to_sym
207
+ when :DateTime
208
+ DateTime.parse(value)
209
+ when :Date
210
+ Date.parse(value)
211
+ when :String
212
+ value.to_s
213
+ when :Integer
214
+ value.to_i
215
+ when :Float
216
+ value.to_f
217
+ when :BOOLEAN
218
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
+ true
220
+ else
221
+ false
222
+ end
223
+ when :Object
224
+ # generic object (usually a Hash), return directly
225
+ value
226
+ when /\AArray<(?<inner_type>.+)>\z/
227
+ inner_type = Regexp.last_match[:inner_type]
228
+ value.map { |v| _deserialize(inner_type, v) }
229
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
+ k_type = Regexp.last_match[:k_type]
231
+ v_type = Regexp.last_match[:v_type]
232
+ {}.tap do |hash|
233
+ value.each do |k, v|
234
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
+ end
236
+ end
237
+ else # model
238
+ temp_model = PostFinanceCheckout.const_get(type).new
239
+ temp_model.build_from_hash(value)
240
+ end
241
+ end
242
+
243
+ # Returns the string representation of the object
244
+ # @return [String] String presentation of the object
245
+ def to_s
246
+ to_hash.to_s
247
+ end
248
+
249
+ # to_body is an alias to to_hash (backward compatibility)
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_body
252
+ to_hash
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ next if value.nil?
262
+ hash[param] = _to_hash(value)
263
+ end
264
+ hash
265
+ end
266
+
267
+ # Outputs non-array value in the form of hash
268
+ # For object, use to_hash. Otherwise, just return the value
269
+ # @param [Object] value Any valid value
270
+ # @return [Hash] Returns the value in the form of hash
271
+ def _to_hash(value)
272
+ if value.is_a?(Array)
273
+ value.compact.map{ |v| _to_hash(v) }
274
+ elsif value.is_a?(Hash)
275
+ {}.tap do |hash|
276
+ value.each { |k, v| hash[k] = _to_hash(v) }
277
+ end
278
+ elsif value.respond_to? :to_hash
279
+ value.to_hash
280
+ else
281
+ value
282
+ end
283
+ end
284
+
285
+ end
286
+ end