checkout_sdk 1.2.2 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. checksums.yaml +4 -4
  2. data/.overcommit.yml +30 -0
  3. data/.rubocop.yml +15 -1
  4. data/.ruby-version +1 -0
  5. data/Gemfile +3 -1
  6. data/README.md +38 -0
  7. data/Rakefile +2 -2
  8. data/lib/checkout_sdk/accounts/account_holder.rb +10 -2
  9. data/lib/checkout_sdk/accounts/account_holder_corporate.rb +15 -0
  10. data/lib/checkout_sdk/accounts/account_holder_individual.rb +18 -0
  11. data/lib/checkout_sdk/accounts/accounts.rb +34 -1
  12. data/lib/checkout_sdk/accounts/accounts_client.rb +134 -1
  13. data/lib/checkout_sdk/accounts/additional_document.rb +11 -0
  14. data/lib/checkout_sdk/accounts/additional_info.rb +17 -0
  15. data/lib/checkout_sdk/accounts/articles_of_association_type.rb +10 -0
  16. data/lib/checkout_sdk/accounts/bank_verification.rb +14 -0
  17. data/lib/checkout_sdk/accounts/bank_verification_type.rb +9 -0
  18. data/lib/checkout_sdk/accounts/company.rb +7 -1
  19. data/lib/checkout_sdk/accounts/contact_details.rb +4 -1
  20. data/lib/checkout_sdk/accounts/date_of_incorporation.rb +14 -0
  21. data/lib/checkout_sdk/accounts/entity_files_request.rb +13 -0
  22. data/lib/checkout_sdk/accounts/entity_requirement_priority.rb +12 -0
  23. data/lib/checkout_sdk/accounts/entity_requirement_reason.rb +11 -0
  24. data/lib/checkout_sdk/accounts/entity_requirement_update_request.rb +22 -0
  25. data/lib/checkout_sdk/accounts/entity_requirement_update_status.rb +12 -0
  26. data/lib/checkout_sdk/accounts/financial_verification.rb +14 -0
  27. data/lib/checkout_sdk/accounts/financial_verification_type.rb +9 -0
  28. data/lib/checkout_sdk/accounts/instrument_details_ach.rb +21 -0
  29. data/lib/checkout_sdk/accounts/{headers.rb → invitee.rb} +3 -3
  30. data/lib/checkout_sdk/accounts/onboard_entity.rb +21 -4
  31. data/lib/checkout_sdk/accounts/onboard_sub_entity_documents.rb +31 -4
  32. data/lib/checkout_sdk/accounts/processing_details.rb +26 -0
  33. data/lib/checkout_sdk/accounts/proof_of_legality.rb +14 -0
  34. data/lib/checkout_sdk/accounts/proof_of_legality_type.rb +9 -0
  35. data/lib/checkout_sdk/accounts/proof_of_principal_address.rb +14 -0
  36. data/lib/checkout_sdk/accounts/proof_of_principal_address_type.rb +9 -0
  37. data/lib/checkout_sdk/accounts/reserve_rule_create_request.rb +14 -0
  38. data/lib/checkout_sdk/accounts/reserve_rule_holding_duration.rb +13 -0
  39. data/lib/checkout_sdk/accounts/reserve_rule_update_request.rb +15 -0
  40. data/lib/checkout_sdk/accounts/rolling_reserve_rule.rb +15 -0
  41. data/lib/checkout_sdk/accounts/schedule_frequency_daily.rb +1 -1
  42. data/lib/checkout_sdk/accounts/schedule_frequency_monthly.rb +1 -1
  43. data/lib/checkout_sdk/accounts/schedule_frequency_weekly.rb +1 -1
  44. data/lib/checkout_sdk/accounts/shareholder_structure.rb +14 -0
  45. data/lib/checkout_sdk/accounts/shareholder_structure_type.rb +9 -0
  46. data/lib/checkout_sdk/accounts/submitter.rb +13 -0
  47. data/lib/checkout_sdk/agentic_commerce/agentic_commerce.rb +8 -0
  48. data/lib/checkout_sdk/agentic_commerce/agentic_commerce_client.rb +31 -0
  49. data/lib/checkout_sdk/agentic_commerce/delegated_payment_allowance.rb +28 -0
  50. data/lib/checkout_sdk/agentic_commerce/delegated_payment_billing_address.rb +33 -0
  51. data/lib/checkout_sdk/agentic_commerce/delegated_payment_method_card.rb +64 -0
  52. data/lib/checkout_sdk/agentic_commerce/delegated_payment_request.rb +25 -0
  53. data/lib/checkout_sdk/agentic_commerce/delegated_payment_risk_signal.rb +20 -0
  54. data/lib/checkout_sdk/api_client.rb +81 -62
  55. data/lib/checkout_sdk/apm/ideal/ideal_client.rb +1 -1
  56. data/lib/checkout_sdk/apm/previous/klarna/klarna_client.rb +1 -1
  57. data/lib/checkout_sdk/apm/previous/sepa/sepa_client.rb +1 -1
  58. data/lib/checkout_sdk/balances/balance_values.rb +28 -0
  59. data/lib/checkout_sdk/balances/balances.rb +4 -0
  60. data/lib/checkout_sdk/balances/balances_query.rb +32 -0
  61. data/lib/checkout_sdk/balances/collateral_breakdown.rb +16 -0
  62. data/lib/checkout_sdk/balances/currency_account_balance.rb +26 -0
  63. data/lib/checkout_sdk/checkout_api.rb +75 -1
  64. data/lib/checkout_sdk/checkout_oauth_sdk_builder.rb +12 -1
  65. data/lib/checkout_sdk/client.rb +2 -3
  66. data/lib/checkout_sdk/common/account_change_indicator_type.rb +12 -0
  67. data/lib/checkout_sdk/common/account_holder.rb +12 -9
  68. data/lib/checkout_sdk/common/account_password_change_indicator_type.rb +13 -0
  69. data/lib/checkout_sdk/common/account_type_card_product_type.rb +11 -0
  70. data/lib/checkout_sdk/common/cardholder_account_age_indicator_type.rb +13 -0
  71. data/lib/checkout_sdk/common/common.rb +7 -0
  72. data/lib/checkout_sdk/common/customer_retry.rb +11 -0
  73. data/lib/checkout_sdk/common/destination.rb +38 -0
  74. data/lib/checkout_sdk/common/headers.rb +16 -0
  75. data/lib/checkout_sdk/common/payment_source_type.rb +9 -0
  76. data/lib/checkout_sdk/common/product.rb +4 -1
  77. data/lib/checkout_sdk/compliance_requests/compliance_request_responded_field.rb +22 -0
  78. data/lib/checkout_sdk/compliance_requests/compliance_request_responded_fields.rb +15 -0
  79. data/lib/checkout_sdk/compliance_requests/compliance_requests.rb +6 -0
  80. data/lib/checkout_sdk/compliance_requests/compliance_requests_client.rb +34 -0
  81. data/lib/checkout_sdk/compliance_requests/compliance_response_request.rb +16 -0
  82. data/lib/checkout_sdk/customers/customers_client.rb +1 -1
  83. data/lib/checkout_sdk/disputes/dispute_status.rb +1 -0
  84. data/lib/checkout_sdk/disputes/disputes_client.rb +23 -2
  85. data/lib/checkout_sdk/disputes/disputes_query_filter.rb +49 -11
  86. data/lib/checkout_sdk/environment.rb +8 -1
  87. data/lib/checkout_sdk/environment_subdomain.rb +16 -12
  88. data/lib/checkout_sdk/error.rb +24 -8
  89. data/lib/checkout_sdk/financial/financial_client.rb +1 -1
  90. data/lib/checkout_sdk/forward/create_secret_request.rb +17 -0
  91. data/lib/checkout_sdk/forward/forward.rb +5 -0
  92. data/lib/checkout_sdk/forward/forward_client.rb +52 -0
  93. data/lib/checkout_sdk/forward/update_secret_request.rb +15 -0
  94. data/lib/checkout_sdk/identities/aml_screening/aml_screening_client.rb +29 -0
  95. data/lib/checkout_sdk/identities/aml_screening/aml_search_parameters.rb +15 -0
  96. data/lib/checkout_sdk/identities/aml_screening/aml_verification_request.rb +19 -0
  97. data/lib/checkout_sdk/identities/applicants/applicants_client.rb +43 -0
  98. data/lib/checkout_sdk/identities/applicants/create_applicant_request.rb +21 -0
  99. data/lib/checkout_sdk/identities/applicants/update_applicant_request.rb +18 -0
  100. data/lib/checkout_sdk/identities/face_authentication/face_authentication_attempt_request.rb +17 -0
  101. data/lib/checkout_sdk/identities/face_authentication/face_authentication_client.rb +82 -0
  102. data/lib/checkout_sdk/identities/face_authentication/face_authentication_request.rb +21 -0
  103. data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_client.rb +77 -0
  104. data/lib/checkout_sdk/identities/id_document_verification/id_document_verification_request.rb +27 -0
  105. data/lib/checkout_sdk/identities/identities.rb +27 -0
  106. data/lib/checkout_sdk/identities/identity_verification/identity_verification_attempt_request.rb +17 -0
  107. data/lib/checkout_sdk/identities/identity_verification/identity_verification_client.rb +99 -0
  108. data/lib/checkout_sdk/identities/identity_verification/identity_verification_request.rb +21 -0
  109. data/lib/checkout_sdk/identities/identity_verification/idv_client_information.rb +17 -0
  110. data/lib/checkout_sdk/identities/identity_verification/idv_declared_data.rb +15 -0
  111. data/lib/checkout_sdk/instruments/base_instruments_client.rb +9 -0
  112. data/lib/checkout_sdk/instruments/create/instrument_bank_account.rb +1 -1
  113. data/lib/checkout_sdk/instruments/create/instrument_sepa.rb +1 -1
  114. data/lib/checkout_sdk/instruments/create/instrument_token.rb +1 -1
  115. data/lib/checkout_sdk/instruments/instruments_client.rb +1 -1
  116. data/lib/checkout_sdk/instruments/previous/instruments_client.rb +1 -1
  117. data/lib/checkout_sdk/instruments/update/update_instrument_bank_account.rb +1 -1
  118. data/lib/checkout_sdk/instruments/update/update_instrument_card.rb +1 -1
  119. data/lib/checkout_sdk/instruments/update/update_instrument_token.rb +1 -1
  120. data/lib/checkout_sdk/issuing/add_control_group_request.rb +19 -0
  121. data/lib/checkout_sdk/issuing/add_control_profile_request.rb +13 -0
  122. data/lib/checkout_sdk/issuing/amend_dispute_request.rb +31 -0
  123. data/lib/checkout_sdk/issuing/cardholder_access_token_request.rb +26 -0
  124. data/lib/checkout_sdk/issuing/create_dispute_request.rb +27 -0
  125. data/lib/checkout_sdk/issuing/escalate_dispute_request.rb +23 -0
  126. data/lib/checkout_sdk/issuing/issuing.rb +27 -0
  127. data/lib/checkout_sdk/issuing/issuing_address.rb +25 -0
  128. data/lib/checkout_sdk/issuing/issuing_client.rb +274 -14
  129. data/lib/checkout_sdk/issuing/issuing_dispute_fraud_details.rb +18 -0
  130. data/lib/checkout_sdk/issuing/issuing_dispute_fraud_type.rb +21 -0
  131. data/lib/checkout_sdk/issuing/issuing_phone_number.rb +16 -0
  132. data/lib/checkout_sdk/issuing/oob_authentication_request.rb +15 -0
  133. data/lib/checkout_sdk/issuing/oob_simulate_transaction_details.rb +19 -0
  134. data/lib/checkout_sdk/issuing/simulate_refund_request.rb +13 -0
  135. data/lib/checkout_sdk/issuing/submit_dispute_request.rb +21 -0
  136. data/lib/checkout_sdk/issuing/update_card_request.rb +27 -0
  137. data/lib/checkout_sdk/issuing/update_cardholder_request.rb +29 -0
  138. data/lib/checkout_sdk/issuing/update_control_profile_request.rb +13 -0
  139. data/lib/checkout_sdk/metadata/metadata_client.rb +1 -1
  140. data/lib/checkout_sdk/metadata/source/bin_metadata_source.rb +1 -1
  141. data/lib/checkout_sdk/metadata/source/card_metadata_source.rb +1 -1
  142. data/lib/checkout_sdk/metadata/source/id_metadata_source.rb +1 -1
  143. data/lib/checkout_sdk/metadata/source/token_metadata_source.rb +1 -1
  144. data/lib/checkout_sdk/network_tokens/network_token_cryptogram_request.rb +13 -0
  145. data/lib/checkout_sdk/network_tokens/network_token_source_card.rb +25 -0
  146. data/lib/checkout_sdk/network_tokens/network_token_source_id.rb +19 -0
  147. data/lib/checkout_sdk/network_tokens/network_tokens.rb +7 -0
  148. data/lib/checkout_sdk/network_tokens/network_tokens_client.rb +51 -0
  149. data/lib/checkout_sdk/network_tokens/provision_network_token_request.rb +14 -0
  150. data/lib/checkout_sdk/oauth_access_token.rb +6 -1
  151. data/lib/checkout_sdk/oauth_scopes.rb +4 -0
  152. data/lib/checkout_sdk/oauth_sdk_credentials.rb +2 -1
  153. data/lib/checkout_sdk/onboarding_simulator/onboarding_simulator.rb +6 -0
  154. data/lib/checkout_sdk/onboarding_simulator/onboarding_simulator_client.rb +72 -0
  155. data/lib/checkout_sdk/onboarding_simulator/simulator_entity_status.rb +16 -0
  156. data/lib/checkout_sdk/onboarding_simulator/simulator_set_requirements_due_request.rb +14 -0
  157. data/lib/checkout_sdk/onboarding_simulator/simulator_set_status_request.rb +13 -0
  158. data/lib/checkout_sdk/payment_methods/payment_methods.rb +4 -0
  159. data/lib/checkout_sdk/payment_methods/payment_methods_client.rb +24 -0
  160. data/lib/checkout_sdk/payment_methods/payment_methods_query.rb +13 -0
  161. data/lib/checkout_sdk/payments/apple_pay/apple_pay_certificate_request.rb +13 -0
  162. data/lib/checkout_sdk/payments/apple_pay/apple_pay_client.rb +44 -0
  163. data/lib/checkout_sdk/payments/apple_pay/apple_pay_enrollment_request.rb +13 -0
  164. data/lib/checkout_sdk/payments/apple_pay/apple_pay_signing_request.rb +13 -0
  165. data/lib/checkout_sdk/payments/applepay.rb +14 -0
  166. data/lib/checkout_sdk/payments/base_payments_client.rb +19 -0
  167. data/lib/checkout_sdk/payments/cancellation_request.rb +13 -0
  168. data/lib/checkout_sdk/payments/{sessions/card.rb → card.rb} +4 -1
  169. data/lib/checkout_sdk/payments/contexts/payment_contexts_client.rb +1 -1
  170. data/lib/checkout_sdk/payments/destination/bank_account_destination.rb +1 -1
  171. data/lib/checkout_sdk/payments/destination/card_destination.rb +1 -1
  172. data/lib/checkout_sdk/payments/destination/id_destination.rb +1 -1
  173. data/lib/checkout_sdk/payments/destination/token_destination.rb +1 -1
  174. data/lib/checkout_sdk/payments/exemption.rb +2 -0
  175. data/lib/checkout_sdk/payments/flow/flow_client.rb +59 -0
  176. data/lib/checkout_sdk/payments/google_pay/google_pay_client.rb +48 -0
  177. data/lib/checkout_sdk/payments/google_pay/google_pay_domain_request.rb +13 -0
  178. data/lib/checkout_sdk/payments/google_pay/google_pay_enrollment_request.rb +17 -0
  179. data/lib/checkout_sdk/payments/googlepay.rb +14 -0
  180. data/lib/checkout_sdk/payments/hosted/hosted_payment_instruction.rb +11 -0
  181. data/lib/checkout_sdk/payments/hosted/hosted_payments_client.rb +1 -1
  182. data/lib/checkout_sdk/payments/hosted/hosted_payments_session.rb +51 -23
  183. data/lib/checkout_sdk/payments/hosted/payment_purpose_type.rb +27 -0
  184. data/lib/checkout_sdk/payments/links/payment_link.rb +26 -1
  185. data/lib/checkout_sdk/payments/links/payments_links_client.rb +1 -1
  186. data/lib/checkout_sdk/payments/locale_type.rb +31 -0
  187. data/lib/checkout_sdk/payments/partial_authorization.rb +11 -0
  188. data/lib/checkout_sdk/payments/passenger.rb +20 -6
  189. data/lib/checkout_sdk/payments/payment_method_configuration.rb +17 -0
  190. data/lib/checkout_sdk/payments/payment_plan.rb +43 -0
  191. data/lib/checkout_sdk/payments/payment_request.rb +5 -1
  192. data/lib/checkout_sdk/payments/payments.rb +48 -4
  193. data/lib/checkout_sdk/payments/payments_client.rb +1 -1
  194. data/lib/checkout_sdk/payments/payments_search_request.rb +20 -0
  195. data/lib/checkout_sdk/payments/previous/destination/card_destination.rb +1 -1
  196. data/lib/checkout_sdk/payments/previous/destination/id_destination.rb +1 -1
  197. data/lib/checkout_sdk/payments/previous/destination/token_destination.rb +1 -1
  198. data/lib/checkout_sdk/payments/previous/payments_client.rb +1 -1
  199. data/lib/checkout_sdk/payments/previous/source/apm/alipay_source.rb +1 -1
  200. data/lib/checkout_sdk/payments/previous/source/apm/alma_source.rb +1 -1
  201. data/lib/checkout_sdk/payments/previous/source/apm/bancontact_source.rb +1 -1
  202. data/lib/checkout_sdk/payments/previous/source/apm/benefit_pay_source.rb +1 -1
  203. data/lib/checkout_sdk/payments/previous/source/apm/boleto_source.rb +1 -1
  204. data/lib/checkout_sdk/payments/previous/source/apm/eps_source.rb +1 -1
  205. data/lib/checkout_sdk/payments/previous/source/apm/fawry_source.rb +1 -1
  206. data/lib/checkout_sdk/payments/previous/source/apm/giropay_source.rb +1 -1
  207. data/lib/checkout_sdk/payments/previous/source/apm/ideal_source.rb +1 -1
  208. data/lib/checkout_sdk/payments/previous/source/apm/klarna_source.rb +1 -1
  209. data/lib/checkout_sdk/payments/previous/source/apm/knet_source.rb +1 -1
  210. data/lib/checkout_sdk/payments/previous/source/apm/multi_banco_source.rb +1 -1
  211. data/lib/checkout_sdk/payments/previous/source/apm/oxxo_source.rb +1 -1
  212. data/lib/checkout_sdk/payments/previous/source/apm/p24_source.rb +1 -1
  213. data/lib/checkout_sdk/payments/previous/source/apm/pago_facil_source.rb +1 -1
  214. data/lib/checkout_sdk/payments/previous/source/apm/paypal_source.rb +1 -1
  215. data/lib/checkout_sdk/payments/previous/source/apm/poli_source.rb +1 -1
  216. data/lib/checkout_sdk/payments/previous/source/apm/qpay_source.rb +1 -1
  217. data/lib/checkout_sdk/payments/previous/source/apm/rapi_pago_source.rb +1 -1
  218. data/lib/checkout_sdk/payments/previous/source/apm/sofort_source.rb +1 -1
  219. data/lib/checkout_sdk/payments/previous/source/card_source.rb +1 -1
  220. data/lib/checkout_sdk/payments/previous/source/customer_source.rb +1 -1
  221. data/lib/checkout_sdk/payments/previous/source/d_local_source.rb +1 -1
  222. data/lib/checkout_sdk/payments/previous/source/id_source.rb +1 -1
  223. data/lib/checkout_sdk/payments/previous/source/network_token_source.rb +1 -1
  224. data/lib/checkout_sdk/payments/previous/source/token_source.rb +1 -1
  225. data/lib/checkout_sdk/payments/processing_data.rb +45 -0
  226. data/lib/checkout_sdk/payments/processing_settings.rb +14 -1
  227. data/lib/checkout_sdk/payments/product.rb +14 -1
  228. data/lib/checkout_sdk/payments/product_item_type.rb +11 -0
  229. data/lib/checkout_sdk/payments/product_sub_type.rb +13 -0
  230. data/lib/checkout_sdk/payments/refund_order.rb +53 -0
  231. data/lib/checkout_sdk/payments/refund_request.rb +11 -2
  232. data/lib/checkout_sdk/payments/sender/corporate_sender.rb +1 -1
  233. data/lib/checkout_sdk/payments/sender/government_sender.rb +4 -1
  234. data/lib/checkout_sdk/payments/sender/individual_sender.rb +4 -1
  235. data/lib/checkout_sdk/payments/sender/instrument_sender.rb +1 -1
  236. data/lib/checkout_sdk/payments/sessions/payment_sessions_client.rb +13 -1
  237. data/lib/checkout_sdk/payments/sessions/payment_sessions_request.rb +11 -1
  238. data/lib/checkout_sdk/payments/sessions/store_payment_details_type.rb +1 -0
  239. data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification.rb +17 -0
  240. data/lib/checkout_sdk/payments/setups/account_funding_transaction_identification_type.rb +15 -0
  241. data/lib/checkout_sdk/payments/setups/account_funding_transaction_purpose.rb +29 -0
  242. data/lib/checkout_sdk/payments/setups/account_funding_transaction_recipient.rb +26 -0
  243. data/lib/checkout_sdk/payments/setups/account_funding_transaction_sender.rb +29 -0
  244. data/lib/checkout_sdk/payments/setups/bacs_payment_method.rb +41 -0
  245. data/lib/checkout_sdk/payments/setups/blik_payment_method.rb +20 -0
  246. data/lib/checkout_sdk/payments/setups/card_present_payment_method.rb +35 -0
  247. data/lib/checkout_sdk/payments/setups/pay_by_bank_payment_method.rb +24 -0
  248. data/lib/checkout_sdk/payments/setups/payment_setup_account_funding_transaction.rb +20 -0
  249. data/lib/checkout_sdk/payments/setups/payment_setups_client.rb +75 -0
  250. data/lib/checkout_sdk/payments/setups/stablecoin_payment_method.rb +16 -0
  251. data/lib/checkout_sdk/payments/source/apm/ach_source.rb +27 -0
  252. data/lib/checkout_sdk/payments/source/apm/after_pay_source.rb +1 -1
  253. data/lib/checkout_sdk/payments/source/apm/alma_source.rb +1 -1
  254. data/lib/checkout_sdk/payments/source/apm/bancontact_source.rb +1 -1
  255. data/lib/checkout_sdk/payments/source/apm/benefit_source.rb +1 -1
  256. data/lib/checkout_sdk/payments/source/apm/bizum_source.rb +15 -0
  257. data/lib/checkout_sdk/payments/source/apm/blik_source.rb +31 -0
  258. data/lib/checkout_sdk/payments/source/apm/cv_connect_source.rb +1 -1
  259. data/lib/checkout_sdk/payments/source/apm/eps_source.rb +1 -1
  260. data/lib/checkout_sdk/payments/source/apm/fawry_source.rb +1 -1
  261. data/lib/checkout_sdk/payments/source/apm/giropay_source.rb +1 -1
  262. data/lib/checkout_sdk/payments/source/apm/ideal_source.rb +1 -1
  263. data/lib/checkout_sdk/payments/source/apm/illicado_source.rb +1 -1
  264. data/lib/checkout_sdk/payments/source/apm/klarna_source.rb +1 -1
  265. data/lib/checkout_sdk/payments/source/apm/knet_source.rb +1 -1
  266. data/lib/checkout_sdk/payments/source/apm/mbway_source.rb +1 -1
  267. data/lib/checkout_sdk/payments/source/apm/multi_banco_source.rb +1 -1
  268. data/lib/checkout_sdk/payments/source/apm/octopus_source.rb +11 -0
  269. data/lib/checkout_sdk/payments/source/apm/p24_source.rb +1 -1
  270. data/lib/checkout_sdk/payments/source/apm/paypal_source.rb +1 -1
  271. data/lib/checkout_sdk/payments/source/apm/plaid_source.rb +17 -0
  272. data/lib/checkout_sdk/payments/source/apm/post_finance_source.rb +1 -1
  273. data/lib/checkout_sdk/payments/source/apm/qpay_source.rb +1 -1
  274. data/lib/checkout_sdk/payments/source/apm/sepa_source.rb +1 -1
  275. data/lib/checkout_sdk/payments/source/apm/sequra_source.rb +15 -0
  276. data/lib/checkout_sdk/payments/source/apm/sofort_source.rb +1 -1
  277. data/lib/checkout_sdk/payments/source/apm/stcpay_source.rb +1 -1
  278. data/lib/checkout_sdk/payments/source/apm/tamara_source.rb +1 -1
  279. data/lib/checkout_sdk/payments/source/apm/trustly_source.rb +1 -1
  280. data/lib/checkout_sdk/payments/source/apm/we_chat_pay_source.rb +1 -1
  281. data/lib/checkout_sdk/payments/source/bank_account_source.rb +1 -1
  282. data/lib/checkout_sdk/payments/source/card_source.rb +5 -2
  283. data/lib/checkout_sdk/payments/source/currency_account_source.rb +1 -1
  284. data/lib/checkout_sdk/payments/source/customer_source.rb +5 -2
  285. data/lib/checkout_sdk/payments/source/entity_source.rb +1 -1
  286. data/lib/checkout_sdk/payments/source/id_source.rb +5 -2
  287. data/lib/checkout_sdk/payments/source/network_token_source.rb +8 -2
  288. data/lib/checkout_sdk/payments/source/provider_token_source.rb +1 -1
  289. data/lib/checkout_sdk/payments/source/token_source.rb +5 -2
  290. data/lib/checkout_sdk/reports/reports_client.rb +1 -1
  291. data/lib/checkout_sdk/risk/source/card_source.rb +1 -1
  292. data/lib/checkout_sdk/risk/source/customer_source.rb +1 -1
  293. data/lib/checkout_sdk/risk/source/id_source.rb +1 -1
  294. data/lib/checkout_sdk/risk/source/token_source.rb +1 -1
  295. data/lib/checkout_sdk/sessions/authentication_method.rb +3 -3
  296. data/lib/checkout_sdk/sessions/authentication_type.rb +3 -3
  297. data/lib/checkout_sdk/sessions/card_holder_account_info.rb +39 -3
  298. data/lib/checkout_sdk/sessions/channel/app_session.rb +1 -1
  299. data/lib/checkout_sdk/sessions/channel/browser_session.rb +5 -2
  300. data/lib/checkout_sdk/sessions/channel/channel_data_type.rb +1 -0
  301. data/lib/checkout_sdk/sessions/channel/merchant_initiated_session.rb +15 -0
  302. data/lib/checkout_sdk/sessions/channel/request_type.rb +19 -0
  303. data/lib/checkout_sdk/sessions/channel/sdk_interface_type.rb +2 -2
  304. data/lib/checkout_sdk/sessions/completion/hosted_completion_info.rb +1 -1
  305. data/lib/checkout_sdk/sessions/completion/non_hosted_completion_info.rb +1 -1
  306. data/lib/checkout_sdk/sessions/device_information.rb +17 -0
  307. data/lib/checkout_sdk/sessions/initial_transaction.rb +23 -0
  308. data/lib/checkout_sdk/sessions/installment.rb +5 -0
  309. data/lib/checkout_sdk/sessions/merchant_risk_info.rb +20 -2
  310. data/lib/checkout_sdk/sessions/optimization.rb +19 -0
  311. data/lib/checkout_sdk/sessions/optimized_properties.rb +17 -0
  312. data/lib/checkout_sdk/sessions/pre_order_purchase_indicator_type.rb +10 -0
  313. data/lib/checkout_sdk/sessions/recurring.rb +5 -0
  314. data/lib/checkout_sdk/sessions/reorder_items_indicator_type.rb +10 -0
  315. data/lib/checkout_sdk/sessions/session_request.rb +26 -2
  316. data/lib/checkout_sdk/sessions/sessions.rb +10 -0
  317. data/lib/checkout_sdk/sessions/sessions_client.rb +2 -2
  318. data/lib/checkout_sdk/sessions/source/card_source.rb +3 -2
  319. data/lib/checkout_sdk/sessions/source/id_source.rb +1 -1
  320. data/lib/checkout_sdk/sessions/source/network_token_source.rb +1 -1
  321. data/lib/checkout_sdk/sessions/source/token_source.rb +1 -1
  322. data/lib/checkout_sdk/sessions/three_ds_method_completion_request.rb +3 -1
  323. data/lib/checkout_sdk/sessions/three_ds_req_auth_method.rb +16 -0
  324. data/lib/checkout_sdk/sessions/three_ds_requestor_authentication_info.rb +17 -0
  325. data/lib/checkout_sdk/sessions/transaction_type.rb +3 -3
  326. data/lib/checkout_sdk/sources/sepa_source_request.rb +1 -1
  327. data/lib/checkout_sdk/sources/sources_client.rb +1 -1
  328. data/lib/checkout_sdk/standalone_account_updater/account_updater_card.rb +17 -0
  329. data/lib/checkout_sdk/standalone_account_updater/account_updater_instrument.rb +13 -0
  330. data/lib/checkout_sdk/standalone_account_updater/account_updater_request.rb +13 -0
  331. data/lib/checkout_sdk/standalone_account_updater/account_updater_source_options.rb +15 -0
  332. data/lib/checkout_sdk/standalone_account_updater/standalone_account_updater.rb +7 -0
  333. data/lib/checkout_sdk/standalone_account_updater/standalone_account_updater_client.rb +29 -0
  334. data/lib/checkout_sdk/tokens/apple_pay_token_request.rb +1 -1
  335. data/lib/checkout_sdk/tokens/google_pay_token_request.rb +1 -1
  336. data/lib/checkout_sdk/tokens/token_metadata_billing_address.rb +16 -0
  337. data/lib/checkout_sdk/tokens/token_metadata_response.rb +55 -0
  338. data/lib/checkout_sdk/tokens/tokens.rb +2 -0
  339. data/lib/checkout_sdk/tokens/tokens_client.rb +11 -0
  340. data/lib/checkout_sdk/transfers/create_transfer.rb +5 -5
  341. data/lib/checkout_sdk/transfers/transfer_source.rb +4 -1
  342. data/lib/checkout_sdk/transfers/transfers_client.rb +2 -2
  343. data/lib/checkout_sdk/version.rb +1 -1
  344. data/lib/checkout_sdk/workflows/entity_workflow_condition.rb +1 -1
  345. data/lib/checkout_sdk/workflows/event_workflow_condition.rb +1 -1
  346. data/lib/checkout_sdk/workflows/processing_channel_workflow_condition.rb +1 -1
  347. data/lib/checkout_sdk/workflows/webhook_workflow_action.rb +1 -1
  348. data/lib/checkout_sdk/workflows/workflows_client.rb +1 -1
  349. data/lib/checkout_sdk.rb +8 -0
  350. metadata +194 -19
  351. data/lib/checkout_sdk/payments/passenger_name.rb +0 -11
  352. data/lib/checkout_sdk/payments/sessions/payment_method_configuration.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8a5d0baf6cbae6fdd117f4d506da563edd5a4b0c34b3d3998502cd44173f06a
4
- data.tar.gz: a692c66bed6a04a4c01e33b0e358814ffbc678bb358047fc427fbc53c7398c9a
3
+ metadata.gz: 6fe0b38907019a7e5de79c5bef1cd96bcd3486b9bdb2097a5577fb9a57f009cd
4
+ data.tar.gz: 6d9f5b05f436e8025b4381157c096cb31e9d141fa4f43e0d87cb69b9da705c5e
5
5
  SHA512:
6
- metadata.gz: a78beb178c7ecfc877df410cee8a1090a02bde9883a706d3a47a11a26fb49ca4cbd4a8821074530d3a81bc07a9d3fa8cab32d383e6db9668ee5c0b8fe4e7929a
7
- data.tar.gz: ce1b9b18e3132c57d9a2e2c520b11c45610e2a5749d53a961f2f41f722396ea6fc2c578ee31ba5f8cfd47b86df397ea97ed04a04fb466985510eaaaa31d70484
6
+ metadata.gz: 62c16a1f6cb31ba02338f4ac7cfae9dbd2f2b34a571b810bb66a8399e9a959c25f07c5ec8482ec0d0ccd5e6f2e3f3a61d816348b680881e935e1c31a072d9fc8
7
+ data.tar.gz: f128bee96ea6ca4593f82d871b61d74577760ed036e76b298a881bc7af9fded0e8eb7e4049606117127eb1c9a25ec8017409c37c505c8c917c1f8ce0c575cbcc
data/.overcommit.yml ADDED
@@ -0,0 +1,30 @@
1
+ # Overcommit configuration
2
+ # See https://github.com/sds/overcommit for more information
3
+
4
+ PreCommit:
5
+ RuboCop:
6
+ enabled: true
7
+ on_warn: fail
8
+ command: ['bundle', 'exec', 'rubocop']
9
+ flags: ['--format', 'emacs', '--force-exclusion', '--display-cop-names']
10
+ include:
11
+ - 'lib/**/*.rb'
12
+ - '**/Gemfile'
13
+ - '**/Rakefile'
14
+
15
+ ALL:
16
+ problem_on_unmodified_line: ignore
17
+ requires_stash: true
18
+ quiet: false
19
+
20
+ PostCheckout:
21
+ ALL:
22
+ enabled: false
23
+
24
+ PostMerge:
25
+ ALL:
26
+ enabled: false
27
+
28
+ PostRewrite:
29
+ ALL:
30
+ enabled: false
data/.rubocop.yml CHANGED
@@ -18,12 +18,21 @@ Metrics/ModuleLength:
18
18
 
19
19
  Metrics/MethodLength:
20
20
  Max: 25
21
+ Exclude:
22
+ # Aggregator that wires up every product client; grows with each new product.
23
+ - "**/checkout_api.rb"
21
24
 
22
25
  Metrics/ParameterLists:
23
26
  Max: 10
24
27
 
25
28
  Metrics/ClassLength:
26
- Max: 120
29
+ # Raised from 120: SDK classes (e.g. ApiClient, response DTOs) grow as new
30
+ # API conventions and fields are adopted upstream.
31
+ Max: 150
32
+ Exclude:
33
+ # Endpoint-collection clients: one method per REST endpoint, grow with the API.
34
+ - "**/issuing_client.rb"
35
+ - "**/accounts_client.rb"
27
36
 
28
37
  Metrics/CyclomaticComplexity:
29
38
  Max: 10
@@ -37,6 +46,11 @@ Style/Documentation:
37
46
  Style/OpenStructUse:
38
47
  Enabled: false
39
48
 
49
+ Naming/AccessorMethodName:
50
+ # The SDK consistently prefixes read endpoints with get_ to mirror the REST API
51
+ # (e.g. get_cardholder, get_card_details). Zero-arg variants would otherwise flag.
52
+ Enabled: false
53
+
40
54
  Naming/MethodName:
41
55
  Exclude:
42
56
  - "**/google_pay_token_data*"
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.1.0
data/Gemfile CHANGED
@@ -3,4 +3,6 @@
3
3
  source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in checkout_sdk.gemspec
6
- gemspec
6
+ gemspec
7
+
8
+ gem 'overcommit', '~> 0.60'
data/README.md CHANGED
@@ -15,6 +15,13 @@
15
15
  > We improved the initialization of SDK making it easier to understand the available options. <br/>
16
16
  > Now `NAS` accounts are the default instance for the SDK and `ABC` structure was moved to a `previous` prefixes. <br/>
17
17
 
18
+ ## Requirements
19
+
20
+ - **Ruby**: 2.7.0 or higher
21
+ - **Tested on**: Ruby 2.7, 3.1, and 3.3
22
+
23
+ > **Note**: Ruby 2.6 reached end-of-life in March 2022 and is no longer supported. Please upgrade to Ruby 2.7 or later for security and compatibility.
24
+
18
25
  ### Gem installer
19
26
 
20
27
  ```sh
@@ -229,6 +236,37 @@ The execution of integration tests require the following environment variables s
229
236
  * For default account systems (OAuth): `CHECKOUT_DEFAULT_OAUTH_CLIENT_ID` & `CHECKOUT_DEFAULT_OAUTH_CLIENT_SECRET`
230
237
  * For Previous account systems (ABC): `CHECKOUT_PREVIOUS_PUBLIC_KEY` & `CHECKOUT_PREVIOUS_SECRET_KEY`
231
238
 
239
+ ## Development Setup
240
+
241
+ ### Git Hooks with Overcommit
242
+
243
+ This project uses [Overcommit](https://github.com/sds/overcommit) to manage Git hooks and ensure code quality.
244
+
245
+ After cloning the repository, install the hooks:
246
+
247
+ ```bash
248
+ bundle install
249
+ bundle exec overcommit --install
250
+ ```
251
+
252
+ This will automatically run RuboCop on staged Ruby files before each commit. If there are any offenses, the commit will be blocked.
253
+
254
+ #### Auto-fixing issues
255
+
256
+ To automatically fix some RuboCop offenses:
257
+
258
+ ```bash
259
+ bundle exec rubocop -a
260
+ ```
261
+
262
+ #### Skipping hooks (not recommended)
263
+
264
+ If you absolutely need to skip the pre-commit hooks:
265
+
266
+ ```bash
267
+ OVERCOMMIT_DISABLE=1 git commit -m "your message"
268
+ ```
269
+
232
270
  ## Code of Conduct
233
271
 
234
272
  Please refer to [Code of Conduct](CODE_OF_CONDUCT.md)
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
@@ -21,8 +21,8 @@ module CheckoutSdk
21
21
  # @!attribute email
22
22
  # @return [String]
23
23
  class AccountHolder
24
- attr_accessor :type,
25
- :tax_id,
24
+ attr_reader :type
25
+ attr_accessor :tax_id,
26
26
  :date_of_birth,
27
27
  :country_of_birth,
28
28
  :residential_status,
@@ -30,6 +30,14 @@ module CheckoutSdk
30
30
  :phone,
31
31
  :identification,
32
32
  :email
33
+
34
+ protected
35
+
36
+ # @abstract
37
+ # @param [String] type {MetadataSourceType}
38
+ def initialize(type)
39
+ @type = type
40
+ end
33
41
  end
34
42
  end
35
43
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute company_name
6
+ # @return [String]
7
+ class AccountHolderCorporate < AccountHolder
8
+ attr_accessor :company_name
9
+
10
+ def initialize
11
+ super(AccountHolderType::CORPORATE)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute first_name
6
+ # @return [String]
7
+ # @!attribute last_name
8
+ # @return [String]
9
+ class AccountHolderIndividual < AccountHolder
10
+ attr_accessor :first_name,
11
+ :last_name
12
+
13
+ def initialize
14
+ super(AccountHolderType::INDIVIDUAL)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -8,6 +8,8 @@ require 'checkout_sdk/accounts/document'
8
8
  require 'checkout_sdk/accounts/individual'
9
9
  require 'checkout_sdk/accounts/business_type'
10
10
  require 'checkout_sdk/accounts/account_holder'
11
+ require 'checkout_sdk/accounts/account_holder_corporate'
12
+ require 'checkout_sdk/accounts/account_holder_individual'
11
13
  require 'checkout_sdk/accounts/entity_financial_details'
12
14
  require 'checkout_sdk/accounts/file_request'
13
15
  require 'checkout_sdk/accounts/date_of_birth'
@@ -32,7 +34,38 @@ require 'checkout_sdk/accounts/instrument_details'
32
34
  require 'checkout_sdk/accounts/instrument_details_faster_payments'
33
35
  require 'checkout_sdk/accounts/instrument_details_sepa'
34
36
  require 'checkout_sdk/accounts/instrument_details_card_token'
37
+ require 'checkout_sdk/accounts/instrument_details_ach'
35
38
  require 'checkout_sdk/accounts/payment_instrument_request'
36
39
  require 'checkout_sdk/accounts/payment_instruments_query'
37
- require 'checkout_sdk/accounts/headers'
38
40
  require 'checkout_sdk/accounts/update_payment_instrument_request'
41
+ require 'checkout_sdk/accounts/additional_document'
42
+ require 'checkout_sdk/accounts/additional_info'
43
+ require 'checkout_sdk/accounts/articles_of_association_type'
44
+ require 'checkout_sdk/accounts/bank_verification'
45
+ require 'checkout_sdk/accounts/bank_verification_type'
46
+ require 'checkout_sdk/accounts/company_verification'
47
+ require 'checkout_sdk/accounts/company_verification_type'
48
+ require 'checkout_sdk/accounts/date_of_incorporation'
49
+ require 'checkout_sdk/accounts/financial_verification'
50
+ require 'checkout_sdk/accounts/financial_verification_type'
51
+ require 'checkout_sdk/accounts/invitee'
52
+ require 'checkout_sdk/accounts/onboard_sub_entity_documents'
53
+ require 'checkout_sdk/accounts/processing_details'
54
+ require 'checkout_sdk/accounts/proof_of_legality'
55
+ require 'checkout_sdk/accounts/proof_of_legality_type'
56
+ require 'checkout_sdk/accounts/proof_of_principal_address'
57
+ require 'checkout_sdk/accounts/proof_of_principal_address_type'
58
+ require 'checkout_sdk/accounts/shareholder_structure'
59
+ require 'checkout_sdk/accounts/shareholder_structure_type'
60
+ require 'checkout_sdk/accounts/tax_verification'
61
+ require 'checkout_sdk/accounts/tax_verification_type'
62
+ require 'checkout_sdk/accounts/submitter'
63
+ require 'checkout_sdk/accounts/entity_requirement_reason'
64
+ require 'checkout_sdk/accounts/entity_requirement_priority'
65
+ require 'checkout_sdk/accounts/entity_requirement_update_status'
66
+ require 'checkout_sdk/accounts/entity_requirement_update_request'
67
+ require 'checkout_sdk/accounts/reserve_rule_holding_duration'
68
+ require 'checkout_sdk/accounts/rolling_reserve_rule'
69
+ require 'checkout_sdk/accounts/reserve_rule_update_request'
70
+ require 'checkout_sdk/accounts/reserve_rule_create_request'
71
+ require 'checkout_sdk/accounts/entity_files_request'
@@ -11,7 +11,11 @@ module CheckoutSdk
11
11
  PAYOUT_SCHEDULE = 'payout-schedules'
12
12
  FILES = 'files'
13
13
  PAYMENT_INSTRUMENTS = 'payment-instruments'
14
- private_constant :ACCOUNTS, :ENTITIES, :INSTRUMENT, :PAYOUT_SCHEDULE, :FILES, :PAYMENT_INSTRUMENTS
14
+ REQUIREMENTS = 'requirements'
15
+ RESERVE_RULES = 'reserve-rules'
16
+ MEMBERS = 'members'
17
+ private_constant :ACCOUNTS, :ENTITIES, :INSTRUMENT, :PAYOUT_SCHEDULE, :FILES, :PAYMENT_INSTRUMENTS,
18
+ :REQUIREMENTS, :RESERVE_RULES, :MEMBERS
15
19
 
16
20
  # @param [ApiClient] api_client
17
21
  # @param [ApiClient] files_client
@@ -93,6 +97,135 @@ module CheckoutSdk
93
97
  def upload_file(file_request)
94
98
  files_client.submit_file(FILES, sdk_authorization, file_request)
95
99
  end
100
+
101
+ # Retrieve the list of pending requirements that a sub-entity must resolve.
102
+ # @param [String] entity_id
103
+ def get_entity_requirements(entity_id)
104
+ api_client.invoke_get(
105
+ build_path(ACCOUNTS, ENTITIES, entity_id, REQUIREMENTS),
106
+ sdk_authorization
107
+ )
108
+ end
109
+
110
+ # Retrieve detailed information for a single requirement.
111
+ # @param [String] entity_id
112
+ # @param [String] requirement_id
113
+ def get_entity_requirement_details(entity_id, requirement_id)
114
+ api_client.invoke_get(
115
+ build_path(ACCOUNTS, ENTITIES, entity_id, REQUIREMENTS, requirement_id),
116
+ sdk_authorization
117
+ )
118
+ end
119
+
120
+ # Submit a response to resolve a requirement.
121
+ # @param [String] entity_id
122
+ # @param [String] requirement_id
123
+ # @param [Hash, EntityRequirementUpdateRequest] update_request
124
+ def resolve_entity_requirement(entity_id, requirement_id, update_request)
125
+ api_client.invoke_put(
126
+ build_path(ACCOUNTS, ENTITIES, entity_id, REQUIREMENTS, requirement_id),
127
+ sdk_authorization,
128
+ update_request
129
+ )
130
+ end
131
+
132
+ # Add a reserve rule for a sub-entity.
133
+ # @param [String] entity_id
134
+ # @param [Hash, ReserveRuleCreateRequest] reserve_rule_request
135
+ def add_reserve_rule(entity_id, reserve_rule_request)
136
+ api_client.invoke_post(
137
+ build_path(ACCOUNTS, ENTITIES, entity_id, RESERVE_RULES),
138
+ sdk_authorization,
139
+ reserve_rule_request
140
+ )
141
+ end
142
+
143
+ # Query reserve rules for a sub-entity.
144
+ # @param [String] entity_id
145
+ def query_reserve_rules(entity_id)
146
+ api_client.invoke_get(
147
+ build_path(ACCOUNTS, ENTITIES, entity_id, RESERVE_RULES),
148
+ sdk_authorization
149
+ )
150
+ end
151
+
152
+ # Retrieve a reserve rule by id.
153
+ # @param [String] entity_id
154
+ # @param [String] reserve_rule_id
155
+ def get_reserve_rule(entity_id, reserve_rule_id)
156
+ api_client.invoke_get(
157
+ build_path(ACCOUNTS, ENTITIES, entity_id, RESERVE_RULES, reserve_rule_id),
158
+ sdk_authorization
159
+ )
160
+ end
161
+
162
+ # Update a reserve rule.
163
+ # The API enforces optimistic concurrency: the ETag returned by GET must be
164
+ # echoed back via {CheckoutSdk::Common::Headers#if_match}, otherwise the
165
+ # API responds 428 Precondition Required.
166
+ # @param [String] entity_id
167
+ # @param [String] reserve_rule_id
168
+ # @param [String] etag ETag value to forward as the `If-Match` HTTP header.
169
+ # @param [Hash, ReserveRuleUpdateRequest] reserve_rule_request
170
+ def update_reserve_rule(entity_id, reserve_rule_id, etag, reserve_rule_request)
171
+ headers = nil
172
+ if !etag.nil? && !etag.empty?
173
+ headers = CheckoutSdk::Common::Headers.new
174
+ headers.if_match = etag
175
+ end
176
+
177
+ api_client.invoke_put(
178
+ build_path(ACCOUNTS, ENTITIES, entity_id, RESERVE_RULES, reserve_rule_id),
179
+ sdk_authorization,
180
+ reserve_rule_request,
181
+ headers
182
+ )
183
+ end
184
+
185
+ # List sub-entity members.
186
+ # @param [String] entity_id
187
+ def get_sub_entity_members(entity_id)
188
+ api_client.invoke_get(
189
+ build_path(ACCOUNTS, ENTITIES, entity_id, MEMBERS),
190
+ sdk_authorization
191
+ )
192
+ end
193
+
194
+ # Reinvite a sub-entity member.
195
+ # The API marks the request body as required; callers must provide a Hash
196
+ # (or `PlatformsHostedOnboardReinviteRequest`-shaped object), even if it
197
+ # is empty `{}` per the current swagger contract.
198
+ # @param [String] entity_id
199
+ # @param [String] user_id
200
+ # @param [Hash] reinvite_request Required body per swagger; pass `{}` if no fields are needed.
201
+ def reinvite_sub_entity_member(entity_id, user_id, reinvite_request)
202
+ api_client.invoke_put(
203
+ build_path(ACCOUNTS, ENTITIES, entity_id, MEMBERS, user_id),
204
+ sdk_authorization,
205
+ reinvite_request
206
+ )
207
+ end
208
+
209
+ # Upload a file scoped to a sub-entity. Hits POST /entities/{entityId}/files.
210
+ # @param [String] entity_id
211
+ # @param [Hash, EntityFilesRequest] file_request
212
+ def upload_entity_file(entity_id, file_request)
213
+ files_client.submit_file(
214
+ build_path(ENTITIES, entity_id, FILES),
215
+ sdk_authorization,
216
+ file_request
217
+ )
218
+ end
219
+
220
+ # Retrieve a file scoped to a sub-entity. Hits GET /entities/{entityId}/files/{fileId}.
221
+ # @param [String] entity_id
222
+ # @param [String] file_id
223
+ def get_entity_file(entity_id, file_id)
224
+ files_client.invoke_get(
225
+ build_path(ENTITIES, entity_id, FILES, file_id),
226
+ sdk_authorization
227
+ )
228
+ end
96
229
  end
97
230
  end
98
231
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute front
6
+ # @return [String]
7
+ class AdditionalDocument
8
+ attr_accessor :front
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute field1
6
+ # @return [String]
7
+ # @!attribute field2
8
+ # @return [String]
9
+ # @!attribute field3
10
+ # @return [String]
11
+ class AdditionalInfo
12
+ attr_accessor :field1,
13
+ :field2,
14
+ :field3
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ module ArticlesOfAssociationType
6
+ MEMORANDUM_OF_ASSOCIATION = 'memorandum_of_association'
7
+ ARTICLES_OF_ASSOCIATION = 'articles_of_association'
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [BankVerificationType]
7
+ # @!attribute front
8
+ # @return [String]
9
+ class BankVerification
10
+ attr_accessor :type,
11
+ :front
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ module BankVerificationType
6
+ BANK_STATEMENT = 'bank_statement'
7
+ end
8
+ end
9
+ end
@@ -10,12 +10,16 @@ module CheckoutSdk
10
10
  # @return [String]
11
11
  # @!attribute trading_name
12
12
  # @return [String]
13
+ # @!attribute date_of_incorporation
14
+ # @return [DateOfIncorporation]
15
+ # @!attribute regulatory_licence_number
16
+ # @return [String]
13
17
  # @!attribute principal_address
14
18
  # @return [CheckoutSdk::Common::Address]
15
19
  # @!attribute registered_address
16
20
  # @return [CheckoutSdk::Common::Address]
17
21
  # @!attribute representatives
18
- # @return [Array(Representative)]
22
+ # @return [Array(EntityRepresentative)]
19
23
  # @!attribute document
20
24
  # @return [EntityDocument]
21
25
  # @!attribute financial_details
@@ -25,6 +29,8 @@ module CheckoutSdk
25
29
  :business_type,
26
30
  :legal_name,
27
31
  :trading_name,
32
+ :date_of_incorporation,
33
+ :regulatory_licence_number,
28
34
  :principal_address,
29
35
  :registered_address,
30
36
  :representatives,
@@ -6,9 +6,12 @@ module CheckoutSdk
6
6
  # @return [Phone]
7
7
  # @!attribute email_addresses
8
8
  # @return [EntityEmailAddresses]
9
+ # @!attribute invitee
10
+ # @return [Invitee]
9
11
  class ContactDetails
10
12
  attr_accessor :phone,
11
- :email_addresses
13
+ :email_addresses,
14
+ :invitee
12
15
  end
13
16
  end
14
17
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute month
6
+ # @return [Integer]
7
+ # @!attribute year
8
+ # @return [Integer]
9
+ class DateOfIncorporation
10
+ attr_reader :month,
11
+ :year
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # Request body for POST /entities/{entityId}/files.
6
+ #
7
+ # @!attribute purpose
8
+ # @return [String] Purpose of the file (e.g. "bank_verification").
9
+ class EntityFilesRequest
10
+ attr_accessor :purpose
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # Priority of a sub-entity requirement. "critical" if the deadline is within 7 days,
6
+ # otherwise "high" by default.
7
+ module EntityRequirementPriority
8
+ HIGH = 'high'
9
+ CRITICAL = 'critical'
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # Reasons why a requirement was raised on a sub-entity.
6
+ module EntityRequirementReason
7
+ PERIODIC_REVIEW = 'periodic_review'
8
+ ATTESTATION = 'attestation'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # Request body for PUT /accounts/entities/{id}/requirements/{requirementId}.
6
+ #
7
+ # The expected shape of `value` is defined by the JSON Schema returned in
8
+ # the requirement details response. Common shapes include a file reference
9
+ # (e.g. { "file_id": "file_..." }), a primitive value, or a structured object.
10
+ #
11
+ # @!attribute value
12
+ # The response to the requirement. Polymorphic per swagger
13
+ # (`oneOf [object, array, string, number, boolean]`), so the only valid
14
+ # Ruby annotation is `Object`. The concrete shape is dictated at runtime
15
+ # by the requirement's `_schema` returned from
16
+ # `GET /accounts/entities/{id}/requirements/{requirementId}`.
17
+ # @return [Object]
18
+ class EntityRequirementUpdateRequest
19
+ attr_accessor :value
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # Status returned after submitting a requirement response.
6
+ # While processing, the requirement is no longer retrievable via GET endpoints;
7
+ # if validation fails downstream the requirement may reappear.
8
+ module EntityRequirementUpdateStatus
9
+ PROCESSING = 'processing'
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # @!attribute type
6
+ # @return [FinancialVerificationType]
7
+ # @!attribute front
8
+ # @return [String]
9
+ class FinancialVerification
10
+ attr_reader :type,
11
+ :front
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ module FinancialVerificationType
6
+ FINANCIAL_STATEMENT = 'financial_statement'
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Accounts
5
+ # ACH bank-account instrument details. Maps swagger `PlatformsInstrumentDetailsAch`.
6
+ # All three attributes are required.
7
+ #
8
+ # @!attribute account_number
9
+ # @return [String] The alphanumeric value that identifies the account.
10
+ # @!attribute routing_number
11
+ # @return [String] The 9-digit American Bankers Association (ABA) routing number that
12
+ # identifies the financial institution.
13
+ # @!attribute account_type
14
+ # @return [String] The type of bank account. One of `savings`, `checking`.
15
+ class InstrumentDetailsAch < InstrumentDetails
16
+ attr_accessor :account_number,
17
+ :routing_number,
18
+ :account_type
19
+ end
20
+ end
21
+ end