komoju-sdk 1.0.0.beta.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 (826) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +78 -0
  3. data/Gemfile +9 -0
  4. data/README.md +448 -0
  5. data/Rakefile +10 -0
  6. data/docs/APIError.md +18 -0
  7. data/docs/APIErrorBody.md +24 -0
  8. data/docs/Address.md +30 -0
  9. data/docs/Auto.md +15 -0
  10. data/docs/AvailablePaymentMethod.md +30 -0
  11. data/docs/Balance.md +20 -0
  12. data/docs/BalanceSettings.md +22 -0
  13. data/docs/BalanceShow.md +34 -0
  14. data/docs/BalanceTransactionList.md +32 -0
  15. data/docs/BalanceTransferRequest.md +20 -0
  16. data/docs/BalanceTransferServiceRecord.md +28 -0
  17. data/docs/BarcodePendingResponse.md +20 -0
  18. data/docs/BarcodeReadyResponse.md +22 -0
  19. data/docs/BarcodesApi.md +80 -0
  20. data/docs/CancelDisbursementRequest.md +18 -0
  21. data/docs/CapturePaymentRequest.md +22 -0
  22. data/docs/CapturePaymentRequestTax.md +56 -0
  23. data/docs/CountryCode.md +15 -0
  24. data/docs/CreateCustomerRequest.md +24 -0
  25. data/docs/CreateDisbursementRequest.md +32 -0
  26. data/docs/CreateFileRequest.md +18 -0
  27. data/docs/CreateMerchantBalanceTransferRequest.md +24 -0
  28. data/docs/CreateMerchantRequest.md +20 -0
  29. data/docs/CreatePaymentRequest.md +56 -0
  30. data/docs/CreatePaymentRequestWithCustomer.md +46 -0
  31. data/docs/CreatePaymentRequestWithPaymentDetails.md +46 -0
  32. data/docs/CreatePaymentRequestWithPaymentDetailsTax.md +56 -0
  33. data/docs/CreateRefundRequestRequest.md +38 -0
  34. data/docs/CreateSecureTokenRequest.md +56 -0
  35. data/docs/CreateSecureTokenRequestWithCustomer.md +26 -0
  36. data/docs/CreateSecureTokenRequestWithPaymentDetails.md +26 -0
  37. data/docs/CreateSessionRequest.md +90 -0
  38. data/docs/CreateSessionRequestWithCustomerMode.md +40 -0
  39. data/docs/CreateSessionRequestWithCustomerPaymentMode.md +42 -0
  40. data/docs/CreateSessionRequestWithPaymentMode.md +40 -0
  41. data/docs/CreateSubscriptionRequest.md +26 -0
  42. data/docs/CreateTokenRequest.md +22 -0
  43. data/docs/Currency.md +15 -0
  44. data/docs/Customer.md +28 -0
  45. data/docs/CustomerList.md +32 -0
  46. data/docs/CustomerMetadata.md +18 -0
  47. data/docs/CustomerSource.md +26 -0
  48. data/docs/DeleteExternalCustomerResponse.md +18 -0
  49. data/docs/Disbursement.md +46 -0
  50. data/docs/DisbursementList.md +32 -0
  51. data/docs/DisbursementStatus.md +15 -0
  52. data/docs/DisbursementsApi.md +379 -0
  53. data/docs/EditMerchantBalanceSettingsRequest.md +24 -0
  54. data/docs/ErroredField.md +32 -0
  55. data/docs/Event.md +28 -0
  56. data/docs/EventList.md +32 -0
  57. data/docs/EventsApi.md +158 -0
  58. data/docs/Field.md +28 -0
  59. data/docs/FieldFieldProperties.md +20 -0
  60. data/docs/FinalizePaymentRequest.md +26 -0
  61. data/docs/FraudDetails.md +30 -0
  62. data/docs/IndustryType.md +15 -0
  63. data/docs/Installments.md +15 -0
  64. data/docs/Intent.md +15 -0
  65. data/docs/LineItem.md +26 -0
  66. data/docs/LiveApplication.md +30 -0
  67. data/docs/LiveApplicationRequest.md +208 -0
  68. data/docs/LiveApplicationStatus.md +15 -0
  69. data/docs/LiveApplicationWithSubmittedFields.md +32 -0
  70. data/docs/Locale.md +15 -0
  71. data/docs/MerchantBalance.md +22 -0
  72. data/docs/MerchantData.md +18 -0
  73. data/docs/MerchantFile.md +30 -0
  74. data/docs/MerchantRole.md +15 -0
  75. data/docs/MerchantSubmissionStatus.md +20 -0
  76. data/docs/OneClickApi.md +80 -0
  77. data/docs/PaySessionRequest.md +22 -0
  78. data/docs/PaySessionResponse.md +26 -0
  79. data/docs/Payment.md +68 -0
  80. data/docs/PaymentData.md +26 -0
  81. data/docs/PaymentDataRequest.md +40 -0
  82. data/docs/PaymentDetailsAU.md +46 -0
  83. data/docs/PaymentDetailsAlipay.md +46 -0
  84. data/docs/PaymentDetailsAlipayHK.md +46 -0
  85. data/docs/PaymentDetailsAll.md +322 -0
  86. data/docs/PaymentDetailsAupay.md +48 -0
  87. data/docs/PaymentDetailsBancontact.md +46 -0
  88. data/docs/PaymentDetailsBankTransfer.md +62 -0
  89. data/docs/PaymentDetailsBitCash.md +50 -0
  90. data/docs/PaymentDetailsBlik.md +46 -0
  91. data/docs/PaymentDetailsCVS.md +48 -0
  92. data/docs/PaymentDetailsCreditCard.md +74 -0
  93. data/docs/PaymentDetailsCreditCardBrazil.md +62 -0
  94. data/docs/PaymentDetailsCreditCardKorea.md +60 -0
  95. data/docs/PaymentDetailsCreditCardKoreaSocialId.md +53 -0
  96. data/docs/PaymentDetailsCreditCardTerminal.md +62 -0
  97. data/docs/PaymentDetailsCultureVoucher.md +50 -0
  98. data/docs/PaymentDetailsDana.md +46 -0
  99. data/docs/PaymentDetailsDocomo.md +46 -0
  100. data/docs/PaymentDetailsDokuWallet.md +48 -0
  101. data/docs/PaymentDetailsDospara.md +50 -0
  102. data/docs/PaymentDetailsDragonpay.md +50 -0
  103. data/docs/PaymentDetailsEnets.md +50 -0
  104. data/docs/PaymentDetailsEpospay.md +46 -0
  105. data/docs/PaymentDetailsEps.md +46 -0
  106. data/docs/PaymentDetailsFpx.md +50 -0
  107. data/docs/PaymentDetailsGCash.md +46 -0
  108. data/docs/PaymentDetailsGiropay.md +46 -0
  109. data/docs/PaymentDetailsHappyMoney.md +50 -0
  110. data/docs/PaymentDetailsIdeal.md +46 -0
  111. data/docs/PaymentDetailsKakaopay.md +46 -0
  112. data/docs/PaymentDetailsKonbini.md +58 -0
  113. data/docs/PaymentDetailsMerpay.md +46 -0
  114. data/docs/PaymentDetailsMobile.md +48 -0
  115. data/docs/PaymentDetailsMobileJapan.md +48 -0
  116. data/docs/PaymentDetailsMultibanco.md +46 -0
  117. data/docs/PaymentDetailsMybank.md +46 -0
  118. data/docs/PaymentDetailsNarvesen.md +46 -0
  119. data/docs/PaymentDetailsNaverpay.md +46 -0
  120. data/docs/PaymentDetailsNetCash.md +50 -0
  121. data/docs/PaymentDetailsOnlyCreditCards.md +94 -0
  122. data/docs/PaymentDetailsOvo.md +48 -0
  123. data/docs/PaymentDetailsPaidy.md +70 -0
  124. data/docs/PaymentDetailsPayEasy.md +60 -0
  125. data/docs/PaymentDetailsPayPay.md +50 -0
  126. data/docs/PaymentDetailsPayco.md +46 -0
  127. data/docs/PaymentDetailsPaypost.md +46 -0
  128. data/docs/PaymentDetailsPaysafeCard.md +48 -0
  129. data/docs/PaymentDetailsPaysafeCash.md +48 -0
  130. data/docs/PaymentDetailsPaysera.md +46 -0
  131. data/docs/PaymentDetailsPayu.md +46 -0
  132. data/docs/PaymentDetailsPerlas.md +46 -0
  133. data/docs/PaymentDetailsPix.md +54 -0
  134. data/docs/PaymentDetailsPoli.md +46 -0
  135. data/docs/PaymentDetailsPrzelewy24.md +46 -0
  136. data/docs/PaymentDetailsRakutenpay.md +46 -0
  137. data/docs/PaymentDetailsSepaTransfer.md +46 -0
  138. data/docs/PaymentDetailsSofortbanking.md +46 -0
  139. data/docs/PaymentDetailsSoftbank.md +46 -0
  140. data/docs/PaymentDetailsTNG.md +46 -0
  141. data/docs/PaymentDetailsToss.md +50 -0
  142. data/docs/PaymentDetailsTruemoney.md +46 -0
  143. data/docs/PaymentDetailsUnionpay.md +46 -0
  144. data/docs/PaymentDetailsWebMoney.md +50 -0
  145. data/docs/PaymentDetailsWechatpay.md +46 -0
  146. data/docs/PaymentList.md +32 -0
  147. data/docs/PaymentMethod.md +38 -0
  148. data/docs/PaymentMethodBrands.md +56 -0
  149. data/docs/PaymentMethodInstallmentsInner.md +20 -0
  150. data/docs/PaymentMethodStatus.md +20 -0
  151. data/docs/PaymentMethodsList.md +20 -0
  152. data/docs/PaymentStatus.md +15 -0
  153. data/docs/PaymentType.md +15 -0
  154. data/docs/PaymentsApi.md +738 -0
  155. data/docs/PlatformDetails.md +20 -0
  156. data/docs/PlatformMerchantPaymentList.md +28 -0
  157. data/docs/PlatformModelApi.md +1943 -0
  158. data/docs/PlatformPayment.md +68 -0
  159. data/docs/PrepaidCards.md +20 -0
  160. data/docs/ProcessingMerchant.md +18 -0
  161. data/docs/Refund.md +36 -0
  162. data/docs/RefundPaymentRequest.md +22 -0
  163. data/docs/RefundRequest.md +40 -0
  164. data/docs/RefundRequestStatus.md +15 -0
  165. data/docs/ResponsePaymentDetailsAU.md +54 -0
  166. data/docs/ResponsePaymentDetailsAlipay.md +52 -0
  167. data/docs/ResponsePaymentDetailsAlipayHK.md +50 -0
  168. data/docs/ResponsePaymentDetailsAll.md +322 -0
  169. data/docs/ResponsePaymentDetailsAupay.md +52 -0
  170. data/docs/ResponsePaymentDetailsBancontact.md +52 -0
  171. data/docs/ResponsePaymentDetailsBankTransfer.md +64 -0
  172. data/docs/ResponsePaymentDetailsBitCash.md +48 -0
  173. data/docs/ResponsePaymentDetailsBlik.md +52 -0
  174. data/docs/ResponsePaymentDetailsCVS.md +52 -0
  175. data/docs/ResponsePaymentDetailsCreditCard.md +76 -0
  176. data/docs/ResponsePaymentDetailsCreditCardBrazil.md +22 -0
  177. data/docs/ResponsePaymentDetailsCreditCardKorea.md +56 -0
  178. data/docs/ResponsePaymentDetailsCreditCardTerminal.md +60 -0
  179. data/docs/ResponsePaymentDetailsCultureVoucher.md +50 -0
  180. data/docs/ResponsePaymentDetailsDana.md +50 -0
  181. data/docs/ResponsePaymentDetailsDocomo.md +52 -0
  182. data/docs/ResponsePaymentDetailsDokuWallet.md +52 -0
  183. data/docs/ResponsePaymentDetailsDospara.md +50 -0
  184. data/docs/ResponsePaymentDetailsDragonpay.md +52 -0
  185. data/docs/ResponsePaymentDetailsEnets.md +52 -0
  186. data/docs/ResponsePaymentDetailsEpospay.md +68 -0
  187. data/docs/ResponsePaymentDetailsEps.md +52 -0
  188. data/docs/ResponsePaymentDetailsFpx.md +52 -0
  189. data/docs/ResponsePaymentDetailsGCash.md +50 -0
  190. data/docs/ResponsePaymentDetailsGiropay.md +52 -0
  191. data/docs/ResponsePaymentDetailsHappyMoney.md +50 -0
  192. data/docs/ResponsePaymentDetailsIdeal.md +52 -0
  193. data/docs/ResponsePaymentDetailsKakaopay.md +50 -0
  194. data/docs/ResponsePaymentDetailsKonbini.md +56 -0
  195. data/docs/ResponsePaymentDetailsMerpay.md +52 -0
  196. data/docs/ResponsePaymentDetailsMobile.md +52 -0
  197. data/docs/ResponsePaymentDetailsMobileJapan.md +52 -0
  198. data/docs/ResponsePaymentDetailsMultibanco.md +52 -0
  199. data/docs/ResponsePaymentDetailsMybank.md +52 -0
  200. data/docs/ResponsePaymentDetailsNarvesen.md +52 -0
  201. data/docs/ResponsePaymentDetailsNaverpay.md +60 -0
  202. data/docs/ResponsePaymentDetailsNetCash.md +52 -0
  203. data/docs/ResponsePaymentDetailsOvo.md +52 -0
  204. data/docs/ResponsePaymentDetailsPaidy.md +50 -0
  205. data/docs/ResponsePaymentDetailsPayEasy.md +60 -0
  206. data/docs/ResponsePaymentDetailsPayPay.md +52 -0
  207. data/docs/ResponsePaymentDetailsPayco.md +52 -0
  208. data/docs/ResponsePaymentDetailsPaypost.md +52 -0
  209. data/docs/ResponsePaymentDetailsPaysafeCard.md +50 -0
  210. data/docs/ResponsePaymentDetailsPaysafeCash.md +50 -0
  211. data/docs/ResponsePaymentDetailsPaysera.md +52 -0
  212. data/docs/ResponsePaymentDetailsPayu.md +52 -0
  213. data/docs/ResponsePaymentDetailsPerlas.md +52 -0
  214. data/docs/ResponsePaymentDetailsPix.md +56 -0
  215. data/docs/ResponsePaymentDetailsPoli.md +52 -0
  216. data/docs/ResponsePaymentDetailsPrzelewy24.md +52 -0
  217. data/docs/ResponsePaymentDetailsRakutenpay.md +52 -0
  218. data/docs/ResponsePaymentDetailsSepaTransfer.md +52 -0
  219. data/docs/ResponsePaymentDetailsSofortbanking.md +52 -0
  220. data/docs/ResponsePaymentDetailsSoftbank.md +50 -0
  221. data/docs/ResponsePaymentDetailsTNG.md +50 -0
  222. data/docs/ResponsePaymentDetailsToss.md +52 -0
  223. data/docs/ResponsePaymentDetailsTruemoney.md +50 -0
  224. data/docs/ResponsePaymentDetailsUnionpay.md +52 -0
  225. data/docs/ResponsePaymentDetailsWebMoney.md +52 -0
  226. data/docs/ResponsePaymentDetailsWechatpay.md +56 -0
  227. data/docs/SecureToken.md +26 -0
  228. data/docs/SecureTokensApi.md +151 -0
  229. data/docs/SerializedSubmerchant.md +50 -0
  230. data/docs/SerializedSubmerchantActivePaymentMethodsInner.md +28 -0
  231. data/docs/SerializedSubmerchantExpirySettingsInner.md +26 -0
  232. data/docs/Session.md +62 -0
  233. data/docs/SessionMode.md +15 -0
  234. data/docs/SessionStatus.md +15 -0
  235. data/docs/SessionsApi.md +294 -0
  236. data/docs/Settlement.md +56 -0
  237. data/docs/SettlementDownload.md +20 -0
  238. data/docs/SettlementFrequency.md +15 -0
  239. data/docs/SettlementList.md +32 -0
  240. data/docs/SettlementShow.md +70 -0
  241. data/docs/SettlementsApi.md +437 -0
  242. data/docs/SharedDetails.md +30 -0
  243. data/docs/SharedDetailsCorrections.md +18 -0
  244. data/docs/SharedDetailsDisbursements.md +22 -0
  245. data/docs/SharedDetailsMisc.md +26 -0
  246. data/docs/SharedDetailsPayments.md +22 -0
  247. data/docs/SharedDetailsPlatformModel.md +30 -0
  248. data/docs/SharedDetailsRefunds.md +24 -0
  249. data/docs/ShowBarcodeResponse.md +86 -0
  250. data/docs/SimulateLiveApplicationPaymentMethodStatusRequest.md +18 -0
  251. data/docs/StatementDescriptor.md +26 -0
  252. data/docs/Status.md +15 -0
  253. data/docs/Submerchant.md +22 -0
  254. data/docs/SubmerchantListItem.md +36 -0
  255. data/docs/SubmerchantsList.md +28 -0
  256. data/docs/SubmittedField.md +30 -0
  257. data/docs/SubmittedFieldAllOfValue.md +59 -0
  258. data/docs/Subscription.md +48 -0
  259. data/docs/SubscriptionCustomer.md +30 -0
  260. data/docs/SubscriptionList.md +32 -0
  261. data/docs/SubscriptionPaymentDetails.md +24 -0
  262. data/docs/SubscriptionPeriod.md +15 -0
  263. data/docs/SubscriptionsApi.md +663 -0
  264. data/docs/TerminalError.md +18 -0
  265. data/docs/TerminalErrorBody.md +26 -0
  266. data/docs/ThreeDsAuthResult.md +38 -0
  267. data/docs/Token.md +24 -0
  268. data/docs/TokenPaymentDetails.md +32 -0
  269. data/docs/TokensApi.md +81 -0
  270. data/docs/Transaction.md +24 -0
  271. data/docs/Transfer.md +28 -0
  272. data/docs/UpdateCustomerRequest.md +24 -0
  273. data/docs/UpdateMerchantRequest.md +32 -0
  274. data/docs/UpdateMerchantRequestExpirySettingsInner.md +22 -0
  275. data/docs/UpdatePaymentMethodRequest.md +134 -0
  276. data/docs/UpdatePaymentRequest.md +22 -0
  277. data/komoju-sdk.gemspec +41 -0
  278. data/lib/komoju-sdk/api/barcodes_api.rb +93 -0
  279. data/lib/komoju-sdk/api/disbursements_api.rb +400 -0
  280. data/lib/komoju-sdk/api/events_api.rb +162 -0
  281. data/lib/komoju-sdk/api/one_click_api.rb +93 -0
  282. data/lib/komoju-sdk/api/payments_api.rb +793 -0
  283. data/lib/komoju-sdk/api/platform_model_api.rb +2106 -0
  284. data/lib/komoju-sdk/api/secure_tokens_api.rb +161 -0
  285. data/lib/komoju-sdk/api/sessions_api.rb +290 -0
  286. data/lib/komoju-sdk/api/settlements_api.rb +446 -0
  287. data/lib/komoju-sdk/api/subscriptions_api.rb +665 -0
  288. data/lib/komoju-sdk/api/tokens_api.rb +90 -0
  289. data/lib/komoju-sdk/api_client.rb +441 -0
  290. data/lib/komoju-sdk/api_error.rb +58 -0
  291. data/lib/komoju-sdk/configuration.rb +409 -0
  292. data/lib/komoju-sdk/models/address.rb +281 -0
  293. data/lib/komoju-sdk/models/api_error.rb +227 -0
  294. data/lib/komoju-sdk/models/api_error_body.rb +279 -0
  295. data/lib/komoju-sdk/models/auto.rb +38 -0
  296. data/lib/komoju-sdk/models/available_payment_method.rb +320 -0
  297. data/lib/komoju-sdk/models/balance.rb +266 -0
  298. data/lib/komoju-sdk/models/balance_settings.rb +301 -0
  299. data/lib/komoju-sdk/models/balance_show.rb +379 -0
  300. data/lib/komoju-sdk/models/balance_transaction_list.rb +349 -0
  301. data/lib/komoju-sdk/models/balance_transfer_request.rb +263 -0
  302. data/lib/komoju-sdk/models/balance_transfer_service_record.rb +353 -0
  303. data/lib/komoju-sdk/models/barcode_pending_response.rb +279 -0
  304. data/lib/komoju-sdk/models/barcode_ready_response.rb +296 -0
  305. data/lib/komoju-sdk/models/cancel_disbursement_request.rb +227 -0
  306. data/lib/komoju-sdk/models/capture_payment_request.rb +258 -0
  307. data/lib/komoju-sdk/models/capture_payment_request_tax.rb +105 -0
  308. data/lib/komoju-sdk/models/country_code.rb +117 -0
  309. data/lib/komoju-sdk/models/create_customer_request.rb +271 -0
  310. data/lib/komoju-sdk/models/create_disbursement_request.rb +392 -0
  311. data/lib/komoju-sdk/models/create_file_request.rb +228 -0
  312. data/lib/komoju-sdk/models/create_merchant_balance_transfer_request.rb +339 -0
  313. data/lib/komoju-sdk/models/create_merchant_request.rb +266 -0
  314. data/lib/komoju-sdk/models/create_payment_request.rb +105 -0
  315. data/lib/komoju-sdk/models/create_payment_request_with_customer.rb +474 -0
  316. data/lib/komoju-sdk/models/create_payment_request_with_payment_details.rb +445 -0
  317. data/lib/komoju-sdk/models/create_payment_request_with_payment_details_tax.rb +106 -0
  318. data/lib/komoju-sdk/models/create_refund_request_request.rb +422 -0
  319. data/lib/komoju-sdk/models/create_secure_token_request.rb +105 -0
  320. data/lib/komoju-sdk/models/create_secure_token_request_with_customer.rb +356 -0
  321. data/lib/komoju-sdk/models/create_secure_token_request_with_payment_details.rb +327 -0
  322. data/lib/komoju-sdk/models/create_session_request.rb +57 -0
  323. data/lib/komoju-sdk/models/create_session_request_with_customer_mode.rb +417 -0
  324. data/lib/komoju-sdk/models/create_session_request_with_customer_payment_mode.rb +426 -0
  325. data/lib/komoju-sdk/models/create_session_request_with_payment_mode.rb +388 -0
  326. data/lib/komoju-sdk/models/create_subscription_request.rb +356 -0
  327. data/lib/komoju-sdk/models/create_token_request.rb +267 -0
  328. data/lib/komoju-sdk/models/currency.rb +57 -0
  329. data/lib/komoju-sdk/models/customer.rb +339 -0
  330. data/lib/komoju-sdk/models/customer_list.rb +349 -0
  331. data/lib/komoju-sdk/models/customer_metadata.rb +228 -0
  332. data/lib/komoju-sdk/models/customer_source.rb +296 -0
  333. data/lib/komoju-sdk/models/delete_external_customer_response.rb +256 -0
  334. data/lib/komoju-sdk/models/disbursement.rb +571 -0
  335. data/lib/komoju-sdk/models/disbursement_list.rb +349 -0
  336. data/lib/komoju-sdk/models/disbursement_status.rb +41 -0
  337. data/lib/komoju-sdk/models/edit_merchant_balance_settings_request.rb +339 -0
  338. data/lib/komoju-sdk/models/errored_field.rb +353 -0
  339. data/lib/komoju-sdk/models/event.rb +340 -0
  340. data/lib/komoju-sdk/models/event_list.rb +382 -0
  341. data/lib/komoju-sdk/models/field.rb +312 -0
  342. data/lib/komoju-sdk/models/field_field_properties.rb +247 -0
  343. data/lib/komoju-sdk/models/finalize_payment_request.rb +314 -0
  344. data/lib/komoju-sdk/models/fraud_details.rb +296 -0
  345. data/lib/komoju-sdk/models/industry_type.rb +204 -0
  346. data/lib/komoju-sdk/models/installments.rb +47 -0
  347. data/lib/komoju-sdk/models/intent.rb +41 -0
  348. data/lib/komoju-sdk/models/line_item.rb +280 -0
  349. data/lib/komoju-sdk/models/live_application.rb +385 -0
  350. data/lib/komoju-sdk/models/live_application_request.rb +1334 -0
  351. data/lib/komoju-sdk/models/live_application_status.rb +42 -0
  352. data/lib/komoju-sdk/models/live_application_with_submitted_fields.rb +410 -0
  353. data/lib/komoju-sdk/models/locale.rb +40 -0
  354. data/lib/komoju-sdk/models/merchant_balance.rb +301 -0
  355. data/lib/komoju-sdk/models/merchant_data.rb +228 -0
  356. data/lib/komoju-sdk/models/merchant_file.rb +330 -0
  357. data/lib/komoju-sdk/models/merchant_role.rb +39 -0
  358. data/lib/komoju-sdk/models/merchant_submission_status.rb +245 -0
  359. data/lib/komoju-sdk/models/pay_session_request.rb +280 -0
  360. data/lib/komoju-sdk/models/pay_session_response.rb +290 -0
  361. data/lib/komoju-sdk/models/payment.rb +797 -0
  362. data/lib/komoju-sdk/models/payment_data.rb +301 -0
  363. data/lib/komoju-sdk/models/payment_data_request.rb +378 -0
  364. data/lib/komoju-sdk/models/payment_details_alipay.rb +403 -0
  365. data/lib/komoju-sdk/models/payment_details_alipay_hk.rb +403 -0
  366. data/lib/komoju-sdk/models/payment_details_all.rb +174 -0
  367. data/lib/komoju-sdk/models/payment_details_au.rb +403 -0
  368. data/lib/komoju-sdk/models/payment_details_aupay.rb +441 -0
  369. data/lib/komoju-sdk/models/payment_details_bancontact.rb +403 -0
  370. data/lib/komoju-sdk/models/payment_details_bank_transfer.rb +627 -0
  371. data/lib/komoju-sdk/models/payment_details_bit_cash.rb +458 -0
  372. data/lib/komoju-sdk/models/payment_details_blik.rb +403 -0
  373. data/lib/komoju-sdk/models/payment_details_credit_card.rb +727 -0
  374. data/lib/komoju-sdk/models/payment_details_credit_card_brazil.rb +642 -0
  375. data/lib/komoju-sdk/models/payment_details_credit_card_korea.rb +612 -0
  376. data/lib/komoju-sdk/models/payment_details_credit_card_korea_social_id.rb +105 -0
  377. data/lib/komoju-sdk/models/payment_details_credit_card_terminal.rb +574 -0
  378. data/lib/komoju-sdk/models/payment_details_culture_voucher.rb +493 -0
  379. data/lib/komoju-sdk/models/payment_details_cvs.rb +420 -0
  380. data/lib/komoju-sdk/models/payment_details_dana.rb +403 -0
  381. data/lib/komoju-sdk/models/payment_details_docomo.rb +403 -0
  382. data/lib/komoju-sdk/models/payment_details_doku_wallet.rb +420 -0
  383. data/lib/komoju-sdk/models/payment_details_dospara.rb +475 -0
  384. data/lib/komoju-sdk/models/payment_details_dragonpay.rb +458 -0
  385. data/lib/komoju-sdk/models/payment_details_enets.rb +458 -0
  386. data/lib/komoju-sdk/models/payment_details_epospay.rb +403 -0
  387. data/lib/komoju-sdk/models/payment_details_eps.rb +403 -0
  388. data/lib/komoju-sdk/models/payment_details_fpx.rb +458 -0
  389. data/lib/komoju-sdk/models/payment_details_g_cash.rb +403 -0
  390. data/lib/komoju-sdk/models/payment_details_giropay.rb +403 -0
  391. data/lib/komoju-sdk/models/payment_details_happy_money.rb +493 -0
  392. data/lib/komoju-sdk/models/payment_details_ideal.rb +403 -0
  393. data/lib/komoju-sdk/models/payment_details_kakaopay.rb +403 -0
  394. data/lib/komoju-sdk/models/payment_details_konbini.rb +548 -0
  395. data/lib/komoju-sdk/models/payment_details_merpay.rb +403 -0
  396. data/lib/komoju-sdk/models/payment_details_mobile.rb +420 -0
  397. data/lib/komoju-sdk/models/payment_details_mobile_japan.rb +432 -0
  398. data/lib/komoju-sdk/models/payment_details_multibanco.rb +403 -0
  399. data/lib/komoju-sdk/models/payment_details_mybank.rb +403 -0
  400. data/lib/komoju-sdk/models/payment_details_narvesen.rb +403 -0
  401. data/lib/komoju-sdk/models/payment_details_naverpay.rb +403 -0
  402. data/lib/komoju-sdk/models/payment_details_net_cash.rb +458 -0
  403. data/lib/komoju-sdk/models/payment_details_only_credit_cards.rb +59 -0
  404. data/lib/komoju-sdk/models/payment_details_ovo.rb +420 -0
  405. data/lib/komoju-sdk/models/payment_details_paidy.rb +562 -0
  406. data/lib/komoju-sdk/models/payment_details_pay_easy.rb +612 -0
  407. data/lib/komoju-sdk/models/payment_details_pay_pay.rb +421 -0
  408. data/lib/komoju-sdk/models/payment_details_payco.rb +403 -0
  409. data/lib/komoju-sdk/models/payment_details_paypost.rb +403 -0
  410. data/lib/komoju-sdk/models/payment_details_paysafe_card.rb +420 -0
  411. data/lib/komoju-sdk/models/payment_details_paysafe_cash.rb +420 -0
  412. data/lib/komoju-sdk/models/payment_details_paysera.rb +403 -0
  413. data/lib/komoju-sdk/models/payment_details_payu.rb +403 -0
  414. data/lib/komoju-sdk/models/payment_details_perlas.rb +403 -0
  415. data/lib/komoju-sdk/models/payment_details_pix.rb +511 -0
  416. data/lib/komoju-sdk/models/payment_details_poli.rb +403 -0
  417. data/lib/komoju-sdk/models/payment_details_przelewy24.rb +403 -0
  418. data/lib/komoju-sdk/models/payment_details_rakutenpay.rb +403 -0
  419. data/lib/komoju-sdk/models/payment_details_sepa_transfer.rb +403 -0
  420. data/lib/komoju-sdk/models/payment_details_sofortbanking.rb +403 -0
  421. data/lib/komoju-sdk/models/payment_details_softbank.rb +403 -0
  422. data/lib/komoju-sdk/models/payment_details_tng.rb +403 -0
  423. data/lib/komoju-sdk/models/payment_details_toss.rb +486 -0
  424. data/lib/komoju-sdk/models/payment_details_truemoney.rb +403 -0
  425. data/lib/komoju-sdk/models/payment_details_unionpay.rb +403 -0
  426. data/lib/komoju-sdk/models/payment_details_web_money.rb +458 -0
  427. data/lib/komoju-sdk/models/payment_details_wechatpay.rb +403 -0
  428. data/lib/komoju-sdk/models/payment_list.rb +349 -0
  429. data/lib/komoju-sdk/models/payment_method.rb +372 -0
  430. data/lib/komoju-sdk/models/payment_method_brands.rb +106 -0
  431. data/lib/komoju-sdk/models/payment_method_installments_inner.rb +245 -0
  432. data/lib/komoju-sdk/models/payment_method_status.rb +266 -0
  433. data/lib/komoju-sdk/models/payment_methods_list.rb +249 -0
  434. data/lib/komoju-sdk/models/payment_status.rb +44 -0
  435. data/lib/komoju-sdk/models/payment_type.rb +99 -0
  436. data/lib/komoju-sdk/models/platform_details.rb +268 -0
  437. data/lib/komoju-sdk/models/platform_merchant_payment_list.rb +391 -0
  438. data/lib/komoju-sdk/models/platform_payment.rb +826 -0
  439. data/lib/komoju-sdk/models/prepaid_cards.rb +231 -0
  440. data/lib/komoju-sdk/models/processing_merchant.rb +249 -0
  441. data/lib/komoju-sdk/models/refund.rb +472 -0
  442. data/lib/komoju-sdk/models/refund_payment_request.rb +258 -0
  443. data/lib/komoju-sdk/models/refund_request.rb +561 -0
  444. data/lib/komoju-sdk/models/refund_request_status.rb +40 -0
  445. data/lib/komoju-sdk/models/response_payment_details_alipay.rb +440 -0
  446. data/lib/komoju-sdk/models/response_payment_details_alipay_hk.rb +430 -0
  447. data/lib/komoju-sdk/models/response_payment_details_all.rb +174 -0
  448. data/lib/komoju-sdk/models/response_payment_details_au.rb +450 -0
  449. data/lib/komoju-sdk/models/response_payment_details_aupay.rb +441 -0
  450. data/lib/komoju-sdk/models/response_payment_details_bancontact.rb +440 -0
  451. data/lib/komoju-sdk/models/response_payment_details_bank_transfer.rb +500 -0
  452. data/lib/komoju-sdk/models/response_payment_details_bit_cash.rb +413 -0
  453. data/lib/komoju-sdk/models/response_payment_details_blik.rb +440 -0
  454. data/lib/komoju-sdk/models/response_payment_details_credit_card.rb +742 -0
  455. data/lib/komoju-sdk/models/response_payment_details_credit_card_brazil.rb +297 -0
  456. data/lib/komoju-sdk/models/response_payment_details_credit_card_korea.rb +548 -0
  457. data/lib/komoju-sdk/models/response_payment_details_credit_card_terminal.rb +529 -0
  458. data/lib/komoju-sdk/models/response_payment_details_culture_voucher.rb +437 -0
  459. data/lib/komoju-sdk/models/response_payment_details_cvs.rb +440 -0
  460. data/lib/komoju-sdk/models/response_payment_details_dana.rb +430 -0
  461. data/lib/komoju-sdk/models/response_payment_details_docomo.rb +459 -0
  462. data/lib/komoju-sdk/models/response_payment_details_doku_wallet.rb +440 -0
  463. data/lib/komoju-sdk/models/response_payment_details_dospara.rb +437 -0
  464. data/lib/komoju-sdk/models/response_payment_details_dragonpay.rb +440 -0
  465. data/lib/komoju-sdk/models/response_payment_details_enets.rb +440 -0
  466. data/lib/komoju-sdk/models/response_payment_details_epospay.rb +520 -0
  467. data/lib/komoju-sdk/models/response_payment_details_eps.rb +440 -0
  468. data/lib/komoju-sdk/models/response_payment_details_fpx.rb +440 -0
  469. data/lib/komoju-sdk/models/response_payment_details_g_cash.rb +430 -0
  470. data/lib/komoju-sdk/models/response_payment_details_giropay.rb +440 -0
  471. data/lib/komoju-sdk/models/response_payment_details_happy_money.rb +437 -0
  472. data/lib/komoju-sdk/models/response_payment_details_ideal.rb +440 -0
  473. data/lib/komoju-sdk/models/response_payment_details_kakaopay.rb +430 -0
  474. data/lib/komoju-sdk/models/response_payment_details_konbini.rb +480 -0
  475. data/lib/komoju-sdk/models/response_payment_details_merpay.rb +440 -0
  476. data/lib/komoju-sdk/models/response_payment_details_mobile.rb +440 -0
  477. data/lib/komoju-sdk/models/response_payment_details_mobile_japan.rb +458 -0
  478. data/lib/komoju-sdk/models/response_payment_details_multibanco.rb +440 -0
  479. data/lib/komoju-sdk/models/response_payment_details_mybank.rb +440 -0
  480. data/lib/komoju-sdk/models/response_payment_details_narvesen.rb +440 -0
  481. data/lib/komoju-sdk/models/response_payment_details_naverpay.rb +492 -0
  482. data/lib/komoju-sdk/models/response_payment_details_net_cash.rb +435 -0
  483. data/lib/komoju-sdk/models/response_payment_details_ovo.rb +440 -0
  484. data/lib/komoju-sdk/models/response_payment_details_paidy.rb +451 -0
  485. data/lib/komoju-sdk/models/response_payment_details_pay_easy.rb +481 -0
  486. data/lib/komoju-sdk/models/response_payment_details_pay_pay.rb +441 -0
  487. data/lib/komoju-sdk/models/response_payment_details_payco.rb +440 -0
  488. data/lib/komoju-sdk/models/response_payment_details_paypost.rb +440 -0
  489. data/lib/komoju-sdk/models/response_payment_details_paysafe_card.rb +430 -0
  490. data/lib/komoju-sdk/models/response_payment_details_paysafe_cash.rb +430 -0
  491. data/lib/komoju-sdk/models/response_payment_details_paysera.rb +440 -0
  492. data/lib/komoju-sdk/models/response_payment_details_payu.rb +440 -0
  493. data/lib/komoju-sdk/models/response_payment_details_perlas.rb +440 -0
  494. data/lib/komoju-sdk/models/response_payment_details_pix.rb +460 -0
  495. data/lib/komoju-sdk/models/response_payment_details_poli.rb +440 -0
  496. data/lib/komoju-sdk/models/response_payment_details_przelewy24.rb +440 -0
  497. data/lib/komoju-sdk/models/response_payment_details_rakutenpay.rb +440 -0
  498. data/lib/komoju-sdk/models/response_payment_details_sepa_transfer.rb +440 -0
  499. data/lib/komoju-sdk/models/response_payment_details_sofortbanking.rb +440 -0
  500. data/lib/komoju-sdk/models/response_payment_details_softbank.rb +430 -0
  501. data/lib/komoju-sdk/models/response_payment_details_tng.rb +430 -0
  502. data/lib/komoju-sdk/models/response_payment_details_toss.rb +440 -0
  503. data/lib/komoju-sdk/models/response_payment_details_truemoney.rb +430 -0
  504. data/lib/komoju-sdk/models/response_payment_details_unionpay.rb +440 -0
  505. data/lib/komoju-sdk/models/response_payment_details_web_money.rb +435 -0
  506. data/lib/komoju-sdk/models/response_payment_details_wechatpay.rb +472 -0
  507. data/lib/komoju-sdk/models/secure_token.rb +316 -0
  508. data/lib/komoju-sdk/models/serialized_submerchant.rb +523 -0
  509. data/lib/komoju-sdk/models/serialized_submerchant_active_payment_methods_inner.rb +391 -0
  510. data/lib/komoju-sdk/models/serialized_submerchant_expiry_settings_inner.rb +355 -0
  511. data/lib/komoju-sdk/models/session.rb +618 -0
  512. data/lib/komoju-sdk/models/session_mode.rb +40 -0
  513. data/lib/komoju-sdk/models/session_status.rb +40 -0
  514. data/lib/komoju-sdk/models/settlement.rb +597 -0
  515. data/lib/komoju-sdk/models/settlement_download.rb +237 -0
  516. data/lib/komoju-sdk/models/settlement_frequency.rb +39 -0
  517. data/lib/komoju-sdk/models/settlement_list.rb +349 -0
  518. data/lib/komoju-sdk/models/settlement_show.rb +710 -0
  519. data/lib/komoju-sdk/models/shared_details.rb +316 -0
  520. data/lib/komoju-sdk/models/shared_details_corrections.rb +228 -0
  521. data/lib/komoju-sdk/models/shared_details_disbursements.rb +262 -0
  522. data/lib/komoju-sdk/models/shared_details_misc.rb +296 -0
  523. data/lib/komoju-sdk/models/shared_details_payments.rb +262 -0
  524. data/lib/komoju-sdk/models/shared_details_platform_model.rb +281 -0
  525. data/lib/komoju-sdk/models/shared_details_refunds.rb +279 -0
  526. data/lib/komoju-sdk/models/show_barcode_response.rb +55 -0
  527. data/lib/komoju-sdk/models/simulate_live_application_payment_method_status_request.rb +254 -0
  528. data/lib/komoju-sdk/models/statement_descriptor.rb +262 -0
  529. data/lib/komoju-sdk/models/status.rb +42 -0
  530. data/lib/komoju-sdk/models/submerchant.rb +328 -0
  531. data/lib/komoju-sdk/models/submerchant_list_item.rb +414 -0
  532. data/lib/komoju-sdk/models/submerchants_list.rb +391 -0
  533. data/lib/komoju-sdk/models/submitted_field.rb +335 -0
  534. data/lib/komoju-sdk/models/submitted_field_all_of_value.rb +106 -0
  535. data/lib/komoju-sdk/models/subscription.rb +550 -0
  536. data/lib/komoju-sdk/models/subscription_customer.rb +379 -0
  537. data/lib/komoju-sdk/models/subscription_list.rb +349 -0
  538. data/lib/komoju-sdk/models/subscription_payment_details.rb +279 -0
  539. data/lib/komoju-sdk/models/subscription_period.rb +40 -0
  540. data/lib/komoju-sdk/models/terminal_error.rb +227 -0
  541. data/lib/komoju-sdk/models/terminal_error_body.rb +296 -0
  542. data/lib/komoju-sdk/models/three_ds_auth_result.rb +398 -0
  543. data/lib/komoju-sdk/models/token.rb +306 -0
  544. data/lib/komoju-sdk/models/token_payment_details.rb +347 -0
  545. data/lib/komoju-sdk/models/transaction.rb +326 -0
  546. data/lib/komoju-sdk/models/transfer.rb +353 -0
  547. data/lib/komoju-sdk/models/update_customer_request.rb +271 -0
  548. data/lib/komoju-sdk/models/update_merchant_request.rb +285 -0
  549. data/lib/komoju-sdk/models/update_merchant_request_expiry_settings_inner.rb +279 -0
  550. data/lib/komoju-sdk/models/update_payment_method_request.rb +826 -0
  551. data/lib/komoju-sdk/models/update_payment_request.rb +238 -0
  552. data/lib/komoju-sdk/version.rb +15 -0
  553. data/lib/komoju-sdk.rb +310 -0
  554. data/spec/api/barcodes_api_spec.rb +47 -0
  555. data/spec/api/disbursements_api_spec.rb +103 -0
  556. data/spec/api/events_api_spec.rb +62 -0
  557. data/spec/api/one_click_api_spec.rb +47 -0
  558. data/spec/api/payments_api_spec.rb +166 -0
  559. data/spec/api/platform_model_api_spec.rb +394 -0
  560. data/spec/api/secure_tokens_api_spec.rb +59 -0
  561. data/spec/api/sessions_api_spec.rb +84 -0
  562. data/spec/api/settlements_api_spec.rb +111 -0
  563. data/spec/api/subscriptions_api_spec.rb +151 -0
  564. data/spec/api/tokens_api_spec.rb +47 -0
  565. data/spec/models/address_spec.rb +72 -0
  566. data/spec/models/api_error_body_spec.rb +54 -0
  567. data/spec/models/api_error_spec.rb +36 -0
  568. data/spec/models/auto_spec.rb +30 -0
  569. data/spec/models/available_payment_method_spec.rb +72 -0
  570. data/spec/models/balance_settings_spec.rb +48 -0
  571. data/spec/models/balance_show_spec.rb +84 -0
  572. data/spec/models/balance_spec.rb +42 -0
  573. data/spec/models/balance_transaction_list_spec.rb +78 -0
  574. data/spec/models/balance_transfer_request_spec.rb +42 -0
  575. data/spec/models/balance_transfer_service_record_spec.rb +66 -0
  576. data/spec/models/barcode_pending_response_spec.rb +46 -0
  577. data/spec/models/barcode_ready_response_spec.rb +52 -0
  578. data/spec/models/cancel_disbursement_request_spec.rb +36 -0
  579. data/spec/models/capture_payment_request_spec.rb +48 -0
  580. data/spec/models/capture_payment_request_tax_spec.rb +32 -0
  581. data/spec/models/country_code_spec.rb +30 -0
  582. data/spec/models/create_customer_request_spec.rb +54 -0
  583. data/spec/models/create_disbursement_request_spec.rb +82 -0
  584. data/spec/models/create_file_request_spec.rb +36 -0
  585. data/spec/models/create_merchant_balance_transfer_request_spec.rb +54 -0
  586. data/spec/models/create_merchant_request_spec.rb +42 -0
  587. data/spec/models/create_payment_request_spec.rb +32 -0
  588. data/spec/models/create_payment_request_with_customer_spec.rb +120 -0
  589. data/spec/models/create_payment_request_with_payment_details_spec.rb +120 -0
  590. data/spec/models/create_payment_request_with_payment_details_tax_spec.rb +32 -0
  591. data/spec/models/create_refund_request_request_spec.rb +100 -0
  592. data/spec/models/create_secure_token_request_spec.rb +32 -0
  593. data/spec/models/create_secure_token_request_with_customer_spec.rb +60 -0
  594. data/spec/models/create_secure_token_request_with_payment_details_spec.rb +60 -0
  595. data/spec/models/create_session_request_spec.rb +44 -0
  596. data/spec/models/create_session_request_with_customer_mode_spec.rb +106 -0
  597. data/spec/models/create_session_request_with_customer_payment_mode_spec.rb +112 -0
  598. data/spec/models/create_session_request_with_payment_mode_spec.rb +106 -0
  599. data/spec/models/create_subscription_request_spec.rb +60 -0
  600. data/spec/models/create_token_request_spec.rb +48 -0
  601. data/spec/models/currency_spec.rb +30 -0
  602. data/spec/models/customer_list_spec.rb +78 -0
  603. data/spec/models/customer_metadata_spec.rb +36 -0
  604. data/spec/models/customer_source_spec.rb +60 -0
  605. data/spec/models/customer_spec.rb +66 -0
  606. data/spec/models/delete_external_customer_response_spec.rb +36 -0
  607. data/spec/models/disbursement_list_spec.rb +78 -0
  608. data/spec/models/disbursement_spec.rb +120 -0
  609. data/spec/models/disbursement_status_spec.rb +30 -0
  610. data/spec/models/edit_merchant_balance_settings_request_spec.rb +54 -0
  611. data/spec/models/errored_field_spec.rb +78 -0
  612. data/spec/models/event_list_spec.rb +82 -0
  613. data/spec/models/event_spec.rb +66 -0
  614. data/spec/models/field_field_properties_spec.rb +42 -0
  615. data/spec/models/field_spec.rb +66 -0
  616. data/spec/models/finalize_payment_request_spec.rb +64 -0
  617. data/spec/models/fraud_details_spec.rb +72 -0
  618. data/spec/models/industry_type_spec.rb +30 -0
  619. data/spec/models/installments_spec.rb +30 -0
  620. data/spec/models/intent_spec.rb +30 -0
  621. data/spec/models/line_item_spec.rb +60 -0
  622. data/spec/models/live_application_request_spec.rb +630 -0
  623. data/spec/models/live_application_spec.rb +72 -0
  624. data/spec/models/live_application_status_spec.rb +30 -0
  625. data/spec/models/live_application_with_submitted_fields_spec.rb +78 -0
  626. data/spec/models/locale_spec.rb +30 -0
  627. data/spec/models/merchant_balance_spec.rb +48 -0
  628. data/spec/models/merchant_data_spec.rb +36 -0
  629. data/spec/models/merchant_file_spec.rb +72 -0
  630. data/spec/models/merchant_role_spec.rb +30 -0
  631. data/spec/models/merchant_submission_status_spec.rb +42 -0
  632. data/spec/models/pay_session_request_spec.rb +52 -0
  633. data/spec/models/pay_session_response_spec.rb +60 -0
  634. data/spec/models/payment_data_request_spec.rb +106 -0
  635. data/spec/models/payment_data_spec.rb +64 -0
  636. data/spec/models/payment_details_alipay_hk_spec.rb +124 -0
  637. data/spec/models/payment_details_alipay_spec.rb +124 -0
  638. data/spec/models/payment_details_all_spec.rb +44 -0
  639. data/spec/models/payment_details_au_spec.rb +124 -0
  640. data/spec/models/payment_details_aupay_spec.rb +130 -0
  641. data/spec/models/payment_details_bancontact_spec.rb +124 -0
  642. data/spec/models/payment_details_bank_transfer_spec.rb +172 -0
  643. data/spec/models/payment_details_bit_cash_spec.rb +136 -0
  644. data/spec/models/payment_details_blik_spec.rb +124 -0
  645. data/spec/models/payment_details_credit_card_brazil_spec.rb +172 -0
  646. data/spec/models/payment_details_credit_card_korea_social_id_spec.rb +32 -0
  647. data/spec/models/payment_details_credit_card_korea_spec.rb +166 -0
  648. data/spec/models/payment_details_credit_card_spec.rb +216 -0
  649. data/spec/models/payment_details_credit_card_terminal_spec.rb +172 -0
  650. data/spec/models/payment_details_culture_voucher_spec.rb +136 -0
  651. data/spec/models/payment_details_cvs_spec.rb +130 -0
  652. data/spec/models/payment_details_dana_spec.rb +124 -0
  653. data/spec/models/payment_details_docomo_spec.rb +124 -0
  654. data/spec/models/payment_details_doku_wallet_spec.rb +130 -0
  655. data/spec/models/payment_details_dospara_spec.rb +136 -0
  656. data/spec/models/payment_details_dragonpay_spec.rb +136 -0
  657. data/spec/models/payment_details_enets_spec.rb +136 -0
  658. data/spec/models/payment_details_epospay_spec.rb +124 -0
  659. data/spec/models/payment_details_eps_spec.rb +124 -0
  660. data/spec/models/payment_details_fpx_spec.rb +136 -0
  661. data/spec/models/payment_details_g_cash_spec.rb +124 -0
  662. data/spec/models/payment_details_giropay_spec.rb +124 -0
  663. data/spec/models/payment_details_happy_money_spec.rb +136 -0
  664. data/spec/models/payment_details_ideal_spec.rb +124 -0
  665. data/spec/models/payment_details_kakaopay_spec.rb +124 -0
  666. data/spec/models/payment_details_konbini_spec.rb +164 -0
  667. data/spec/models/payment_details_merpay_spec.rb +124 -0
  668. data/spec/models/payment_details_mobile_japan_spec.rb +134 -0
  669. data/spec/models/payment_details_mobile_spec.rb +130 -0
  670. data/spec/models/payment_details_multibanco_spec.rb +124 -0
  671. data/spec/models/payment_details_mybank_spec.rb +124 -0
  672. data/spec/models/payment_details_narvesen_spec.rb +124 -0
  673. data/spec/models/payment_details_naverpay_spec.rb +124 -0
  674. data/spec/models/payment_details_net_cash_spec.rb +136 -0
  675. data/spec/models/payment_details_only_credit_cards_spec.rb +44 -0
  676. data/spec/models/payment_details_ovo_spec.rb +130 -0
  677. data/spec/models/payment_details_paidy_spec.rb +196 -0
  678. data/spec/models/payment_details_pay_easy_spec.rb +166 -0
  679. data/spec/models/payment_details_pay_pay_spec.rb +136 -0
  680. data/spec/models/payment_details_payco_spec.rb +124 -0
  681. data/spec/models/payment_details_paypost_spec.rb +124 -0
  682. data/spec/models/payment_details_paysafe_card_spec.rb +130 -0
  683. data/spec/models/payment_details_paysafe_cash_spec.rb +130 -0
  684. data/spec/models/payment_details_paysera_spec.rb +124 -0
  685. data/spec/models/payment_details_payu_spec.rb +124 -0
  686. data/spec/models/payment_details_perlas_spec.rb +124 -0
  687. data/spec/models/payment_details_pix_spec.rb +148 -0
  688. data/spec/models/payment_details_poli_spec.rb +124 -0
  689. data/spec/models/payment_details_przelewy24_spec.rb +124 -0
  690. data/spec/models/payment_details_rakutenpay_spec.rb +124 -0
  691. data/spec/models/payment_details_sepa_transfer_spec.rb +124 -0
  692. data/spec/models/payment_details_sofortbanking_spec.rb +124 -0
  693. data/spec/models/payment_details_softbank_spec.rb +124 -0
  694. data/spec/models/payment_details_tng_spec.rb +124 -0
  695. data/spec/models/payment_details_toss_spec.rb +136 -0
  696. data/spec/models/payment_details_truemoney_spec.rb +124 -0
  697. data/spec/models/payment_details_unionpay_spec.rb +124 -0
  698. data/spec/models/payment_details_web_money_spec.rb +136 -0
  699. data/spec/models/payment_details_wechatpay_spec.rb +124 -0
  700. data/spec/models/payment_list_spec.rb +78 -0
  701. data/spec/models/payment_method_brands_spec.rb +32 -0
  702. data/spec/models/payment_method_installments_inner_spec.rb +42 -0
  703. data/spec/models/payment_method_spec.rb +96 -0
  704. data/spec/models/payment_method_status_spec.rb +42 -0
  705. data/spec/models/payment_methods_list_spec.rb +42 -0
  706. data/spec/models/payment_spec.rb +190 -0
  707. data/spec/models/payment_status_spec.rb +30 -0
  708. data/spec/models/payment_type_spec.rb +30 -0
  709. data/spec/models/platform_details_spec.rb +42 -0
  710. data/spec/models/platform_merchant_payment_list_spec.rb +66 -0
  711. data/spec/models/platform_payment_spec.rb +186 -0
  712. data/spec/models/prepaid_cards_spec.rb +42 -0
  713. data/spec/models/processing_merchant_spec.rb +36 -0
  714. data/spec/models/refund_payment_request_spec.rb +48 -0
  715. data/spec/models/refund_request_spec.rb +102 -0
  716. data/spec/models/refund_request_status_spec.rb +30 -0
  717. data/spec/models/refund_spec.rb +94 -0
  718. data/spec/models/response_payment_details_alipay_hk_spec.rb +136 -0
  719. data/spec/models/response_payment_details_alipay_spec.rb +142 -0
  720. data/spec/models/response_payment_details_all_spec.rb +44 -0
  721. data/spec/models/response_payment_details_au_spec.rb +148 -0
  722. data/spec/models/response_payment_details_aupay_spec.rb +142 -0
  723. data/spec/models/response_payment_details_bancontact_spec.rb +142 -0
  724. data/spec/models/response_payment_details_bank_transfer_spec.rb +178 -0
  725. data/spec/models/response_payment_details_bit_cash_spec.rb +130 -0
  726. data/spec/models/response_payment_details_blik_spec.rb +142 -0
  727. data/spec/models/response_payment_details_credit_card_brazil_spec.rb +52 -0
  728. data/spec/models/response_payment_details_credit_card_korea_spec.rb +158 -0
  729. data/spec/models/response_payment_details_credit_card_spec.rb +230 -0
  730. data/spec/models/response_payment_details_credit_card_terminal_spec.rb +166 -0
  731. data/spec/models/response_payment_details_culture_voucher_spec.rb +136 -0
  732. data/spec/models/response_payment_details_cvs_spec.rb +142 -0
  733. data/spec/models/response_payment_details_dana_spec.rb +136 -0
  734. data/spec/models/response_payment_details_docomo_spec.rb +142 -0
  735. data/spec/models/response_payment_details_doku_wallet_spec.rb +142 -0
  736. data/spec/models/response_payment_details_dospara_spec.rb +136 -0
  737. data/spec/models/response_payment_details_dragonpay_spec.rb +142 -0
  738. data/spec/models/response_payment_details_enets_spec.rb +142 -0
  739. data/spec/models/response_payment_details_epospay_spec.rb +190 -0
  740. data/spec/models/response_payment_details_eps_spec.rb +142 -0
  741. data/spec/models/response_payment_details_fpx_spec.rb +142 -0
  742. data/spec/models/response_payment_details_g_cash_spec.rb +136 -0
  743. data/spec/models/response_payment_details_giropay_spec.rb +142 -0
  744. data/spec/models/response_payment_details_happy_money_spec.rb +136 -0
  745. data/spec/models/response_payment_details_ideal_spec.rb +142 -0
  746. data/spec/models/response_payment_details_kakaopay_spec.rb +136 -0
  747. data/spec/models/response_payment_details_konbini_spec.rb +158 -0
  748. data/spec/models/response_payment_details_merpay_spec.rb +142 -0
  749. data/spec/models/response_payment_details_mobile_japan_spec.rb +146 -0
  750. data/spec/models/response_payment_details_mobile_spec.rb +142 -0
  751. data/spec/models/response_payment_details_multibanco_spec.rb +142 -0
  752. data/spec/models/response_payment_details_mybank_spec.rb +142 -0
  753. data/spec/models/response_payment_details_narvesen_spec.rb +142 -0
  754. data/spec/models/response_payment_details_naverpay_spec.rb +170 -0
  755. data/spec/models/response_payment_details_net_cash_spec.rb +142 -0
  756. data/spec/models/response_payment_details_ovo_spec.rb +142 -0
  757. data/spec/models/response_payment_details_paidy_spec.rb +136 -0
  758. data/spec/models/response_payment_details_pay_easy_spec.rb +166 -0
  759. data/spec/models/response_payment_details_pay_pay_spec.rb +142 -0
  760. data/spec/models/response_payment_details_payco_spec.rb +142 -0
  761. data/spec/models/response_payment_details_paypost_spec.rb +142 -0
  762. data/spec/models/response_payment_details_paysafe_card_spec.rb +136 -0
  763. data/spec/models/response_payment_details_paysafe_cash_spec.rb +136 -0
  764. data/spec/models/response_payment_details_paysera_spec.rb +142 -0
  765. data/spec/models/response_payment_details_payu_spec.rb +142 -0
  766. data/spec/models/response_payment_details_perlas_spec.rb +142 -0
  767. data/spec/models/response_payment_details_pix_spec.rb +154 -0
  768. data/spec/models/response_payment_details_poli_spec.rb +142 -0
  769. data/spec/models/response_payment_details_przelewy24_spec.rb +142 -0
  770. data/spec/models/response_payment_details_rakutenpay_spec.rb +142 -0
  771. data/spec/models/response_payment_details_sepa_transfer_spec.rb +142 -0
  772. data/spec/models/response_payment_details_sofortbanking_spec.rb +142 -0
  773. data/spec/models/response_payment_details_softbank_spec.rb +136 -0
  774. data/spec/models/response_payment_details_tng_spec.rb +136 -0
  775. data/spec/models/response_payment_details_toss_spec.rb +142 -0
  776. data/spec/models/response_payment_details_truemoney_spec.rb +136 -0
  777. data/spec/models/response_payment_details_unionpay_spec.rb +142 -0
  778. data/spec/models/response_payment_details_web_money_spec.rb +142 -0
  779. data/spec/models/response_payment_details_wechatpay_spec.rb +158 -0
  780. data/spec/models/secure_token_spec.rb +60 -0
  781. data/spec/models/serialized_submerchant_active_payment_methods_inner_spec.rb +66 -0
  782. data/spec/models/serialized_submerchant_expiry_settings_inner_spec.rb +60 -0
  783. data/spec/models/serialized_submerchant_spec.rb +132 -0
  784. data/spec/models/session_mode_spec.rb +30 -0
  785. data/spec/models/session_spec.rb +172 -0
  786. data/spec/models/session_status_spec.rb +30 -0
  787. data/spec/models/settlement_download_spec.rb +42 -0
  788. data/spec/models/settlement_frequency_spec.rb +30 -0
  789. data/spec/models/settlement_list_spec.rb +78 -0
  790. data/spec/models/settlement_show_spec.rb +192 -0
  791. data/spec/models/settlement_spec.rb +150 -0
  792. data/spec/models/shared_details_corrections_spec.rb +36 -0
  793. data/spec/models/shared_details_disbursements_spec.rb +48 -0
  794. data/spec/models/shared_details_misc_spec.rb +60 -0
  795. data/spec/models/shared_details_payments_spec.rb +48 -0
  796. data/spec/models/shared_details_platform_model_spec.rb +72 -0
  797. data/spec/models/shared_details_refunds_spec.rb +54 -0
  798. data/spec/models/shared_details_spec.rb +72 -0
  799. data/spec/models/show_barcode_response_spec.rb +44 -0
  800. data/spec/models/simulate_live_application_payment_method_status_request_spec.rb +40 -0
  801. data/spec/models/statement_descriptor_spec.rb +60 -0
  802. data/spec/models/status_spec.rb +30 -0
  803. data/spec/models/submerchant_list_item_spec.rb +94 -0
  804. data/spec/models/submerchant_spec.rb +48 -0
  805. data/spec/models/submerchants_list_spec.rb +66 -0
  806. data/spec/models/submitted_field_all_of_value_spec.rb +32 -0
  807. data/spec/models/submitted_field_spec.rb +72 -0
  808. data/spec/models/subscription_customer_spec.rb +72 -0
  809. data/spec/models/subscription_list_spec.rb +78 -0
  810. data/spec/models/subscription_payment_details_spec.rb +54 -0
  811. data/spec/models/subscription_period_spec.rb +30 -0
  812. data/spec/models/subscription_spec.rb +126 -0
  813. data/spec/models/terminal_error_body_spec.rb +60 -0
  814. data/spec/models/terminal_error_spec.rb +36 -0
  815. data/spec/models/three_ds_auth_result_spec.rb +96 -0
  816. data/spec/models/token_payment_details_spec.rb +78 -0
  817. data/spec/models/token_spec.rb +54 -0
  818. data/spec/models/transaction_spec.rb +54 -0
  819. data/spec/models/transfer_spec.rb +66 -0
  820. data/spec/models/update_customer_request_spec.rb +54 -0
  821. data/spec/models/update_merchant_request_expiry_settings_inner_spec.rb +52 -0
  822. data/spec/models/update_merchant_request_spec.rb +78 -0
  823. data/spec/models/update_payment_method_request_spec.rb +384 -0
  824. data/spec/models/update_payment_request_spec.rb +48 -0
  825. data/spec/spec_helper.rb +111 -0
  826. metadata +1207 -0
@@ -0,0 +1,2106 @@
1
+ =begin
2
+ #KOMOJU API
3
+
4
+ #Full featured access to the KOMOJU payments system.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.9.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Komoju
16
+ class PlatformModelApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Balance: Transfer
23
+ # Transfers funds from the currently authenticated merchant's balance to another associated merchant for the given `currency`.
24
+ # @param currency [Currency]
25
+ # @param balance_transfer_request [BalanceTransferRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Transfer]
28
+ def balance_transfer(currency, balance_transfer_request, opts = {})
29
+ data, _status_code, _headers = balance_transfer_with_http_info(currency, balance_transfer_request, opts)
30
+ data
31
+ end
32
+
33
+ # Balance: Transfer
34
+ # Transfers funds from the currently authenticated merchant's balance to another associated merchant for the given `currency`.
35
+ # @param currency [Currency]
36
+ # @param balance_transfer_request [BalanceTransferRequest]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(Transfer, Integer, Hash)>] Transfer data, response status code and response headers
39
+ def balance_transfer_with_http_info(currency, balance_transfer_request, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.balance_transfer ...'
42
+ end
43
+ # verify the required parameter 'currency' is set
44
+ if @api_client.config.client_side_validation && currency.nil?
45
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.balance_transfer"
46
+ end
47
+ # verify the required parameter 'balance_transfer_request' is set
48
+ if @api_client.config.client_side_validation && balance_transfer_request.nil?
49
+ fail ArgumentError, "Missing the required parameter 'balance_transfer_request' when calling PlatformModelApi.balance_transfer"
50
+ end
51
+ # resource path
52
+ local_var_path = '/balances/{currency}/transfer'.sub('{' + 'currency' + '}', CGI.escape(currency.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
61
+ # HTTP header 'Content-Type'
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
66
+
67
+ # form parameters
68
+ form_params = opts[:form_params] || {}
69
+
70
+ # http body (model)
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(balance_transfer_request)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'Transfer'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['api_key']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"PlatformModelApi.balance_transfer",
81
+ :header_params => header_params,
82
+ :query_params => query_params,
83
+ :form_params => form_params,
84
+ :body => post_body,
85
+ :auth_names => auth_names,
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug "API called: PlatformModelApi#balance_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
92
+ end
93
+ return data, status_code, headers
94
+ end
95
+
96
+ # File: Create
97
+ # Creates a new file for the current merchant.
98
+ # @param merchant_id [String]
99
+ # @param create_file_request [CreateFileRequest]
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [MerchantFile]
102
+ def create_file(merchant_id, create_file_request, opts = {})
103
+ data, _status_code, _headers = create_file_with_http_info(merchant_id, create_file_request, opts)
104
+ data
105
+ end
106
+
107
+ # File: Create
108
+ # Creates a new file for the current merchant.
109
+ # @param merchant_id [String]
110
+ # @param create_file_request [CreateFileRequest]
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [Array<(MerchantFile, Integer, Hash)>] MerchantFile data, response status code and response headers
113
+ def create_file_with_http_info(merchant_id, create_file_request, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.create_file ...'
116
+ end
117
+ # verify the required parameter 'merchant_id' is set
118
+ if @api_client.config.client_side_validation && merchant_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.create_file"
120
+ end
121
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
122
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_file, the character length must be smaller than or equal to 25.'
123
+ end
124
+
125
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
126
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_file, the character length must be great than or equal to 25.'
127
+ end
128
+
129
+ # verify the required parameter 'create_file_request' is set
130
+ if @api_client.config.client_side_validation && create_file_request.nil?
131
+ fail ArgumentError, "Missing the required parameter 'create_file_request' when calling PlatformModelApi.create_file"
132
+ end
133
+ # resource path
134
+ local_var_path = '/merchants/{merchant_id}/files'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
135
+
136
+ # query parameters
137
+ query_params = opts[:query_params] || {}
138
+
139
+ # header parameters
140
+ header_params = opts[:header_params] || {}
141
+ # HTTP header 'Accept' (if needed)
142
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
143
+ # HTTP header 'Content-Type'
144
+ content_type = @api_client.select_header_content_type(['application/json'])
145
+ if !content_type.nil?
146
+ header_params['Content-Type'] = content_type
147
+ end
148
+
149
+ # form parameters
150
+ form_params = opts[:form_params] || {}
151
+
152
+ # http body (model)
153
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_file_request)
154
+
155
+ # return_type
156
+ return_type = opts[:debug_return_type] || 'MerchantFile'
157
+
158
+ # auth_names
159
+ auth_names = opts[:debug_auth_names] || ['api_key']
160
+
161
+ new_options = opts.merge(
162
+ :operation => :"PlatformModelApi.create_file",
163
+ :header_params => header_params,
164
+ :query_params => query_params,
165
+ :form_params => form_params,
166
+ :body => post_body,
167
+ :auth_names => auth_names,
168
+ :return_type => return_type
169
+ )
170
+
171
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "API called: PlatformModelApi#create_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
+ end
175
+ return data, status_code, headers
176
+ end
177
+
178
+ # Merchant: Create
179
+ # Creates a new merchant.
180
+ # @param create_merchant_request [CreateMerchantRequest]
181
+ # @param [Hash] opts the optional parameters
182
+ # @return [SerializedSubmerchant]
183
+ def create_merchant(create_merchant_request, opts = {})
184
+ data, _status_code, _headers = create_merchant_with_http_info(create_merchant_request, opts)
185
+ data
186
+ end
187
+
188
+ # Merchant: Create
189
+ # Creates a new merchant.
190
+ # @param create_merchant_request [CreateMerchantRequest]
191
+ # @param [Hash] opts the optional parameters
192
+ # @return [Array<(SerializedSubmerchant, Integer, Hash)>] SerializedSubmerchant data, response status code and response headers
193
+ def create_merchant_with_http_info(create_merchant_request, opts = {})
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.create_merchant ...'
196
+ end
197
+ # verify the required parameter 'create_merchant_request' is set
198
+ if @api_client.config.client_side_validation && create_merchant_request.nil?
199
+ fail ArgumentError, "Missing the required parameter 'create_merchant_request' when calling PlatformModelApi.create_merchant"
200
+ end
201
+ # resource path
202
+ local_var_path = '/merchants'
203
+
204
+ # query parameters
205
+ query_params = opts[:query_params] || {}
206
+
207
+ # header parameters
208
+ header_params = opts[:header_params] || {}
209
+ # HTTP header 'Accept' (if needed)
210
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
211
+ # HTTP header 'Content-Type'
212
+ content_type = @api_client.select_header_content_type(['application/json'])
213
+ if !content_type.nil?
214
+ header_params['Content-Type'] = content_type
215
+ end
216
+
217
+ # form parameters
218
+ form_params = opts[:form_params] || {}
219
+
220
+ # http body (model)
221
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_merchant_request)
222
+
223
+ # return_type
224
+ return_type = opts[:debug_return_type] || 'SerializedSubmerchant'
225
+
226
+ # auth_names
227
+ auth_names = opts[:debug_auth_names] || ['api_key']
228
+
229
+ new_options = opts.merge(
230
+ :operation => :"PlatformModelApi.create_merchant",
231
+ :header_params => header_params,
232
+ :query_params => query_params,
233
+ :form_params => form_params,
234
+ :body => post_body,
235
+ :auth_names => auth_names,
236
+ :return_type => return_type
237
+ )
238
+
239
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug "API called: PlatformModelApi#create_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
+ end
243
+ return data, status_code, headers
244
+ end
245
+
246
+ # Balance: Transfer
247
+ # Creates a balance transfer between associated merchants for a given `amount` and `currency`.
248
+ # @param merchant_id [String]
249
+ # @param currency [Currency]
250
+ # @param create_merchant_balance_transfer_request [CreateMerchantBalanceTransferRequest]
251
+ # @param [Hash] opts the optional parameters
252
+ # @return [BalanceTransferServiceRecord]
253
+ def create_merchant_balance_transfer(merchant_id, currency, create_merchant_balance_transfer_request, opts = {})
254
+ data, _status_code, _headers = create_merchant_balance_transfer_with_http_info(merchant_id, currency, create_merchant_balance_transfer_request, opts)
255
+ data
256
+ end
257
+
258
+ # Balance: Transfer
259
+ # Creates a balance transfer between associated merchants for a given &#x60;amount&#x60; and &#x60;currency&#x60;.
260
+ # @param merchant_id [String]
261
+ # @param currency [Currency]
262
+ # @param create_merchant_balance_transfer_request [CreateMerchantBalanceTransferRequest]
263
+ # @param [Hash] opts the optional parameters
264
+ # @return [Array<(BalanceTransferServiceRecord, Integer, Hash)>] BalanceTransferServiceRecord data, response status code and response headers
265
+ def create_merchant_balance_transfer_with_http_info(merchant_id, currency, create_merchant_balance_transfer_request, opts = {})
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.create_merchant_balance_transfer ...'
268
+ end
269
+ # verify the required parameter 'merchant_id' is set
270
+ if @api_client.config.client_side_validation && merchant_id.nil?
271
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.create_merchant_balance_transfer"
272
+ end
273
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
274
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_merchant_balance_transfer, the character length must be smaller than or equal to 25.'
275
+ end
276
+
277
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
278
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.create_merchant_balance_transfer, the character length must be great than or equal to 25.'
279
+ end
280
+
281
+ # verify the required parameter 'currency' is set
282
+ if @api_client.config.client_side_validation && currency.nil?
283
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.create_merchant_balance_transfer"
284
+ end
285
+ # verify the required parameter 'create_merchant_balance_transfer_request' is set
286
+ if @api_client.config.client_side_validation && create_merchant_balance_transfer_request.nil?
287
+ fail ArgumentError, "Missing the required parameter 'create_merchant_balance_transfer_request' when calling PlatformModelApi.create_merchant_balance_transfer"
288
+ end
289
+ # resource path
290
+ local_var_path = '/merchants/{merchant_id}/balances/{currency}/transfer'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))
291
+
292
+ # query parameters
293
+ query_params = opts[:query_params] || {}
294
+
295
+ # header parameters
296
+ header_params = opts[:header_params] || {}
297
+ # HTTP header 'Accept' (if needed)
298
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
299
+ # HTTP header 'Content-Type'
300
+ content_type = @api_client.select_header_content_type(['application/json'])
301
+ if !content_type.nil?
302
+ header_params['Content-Type'] = content_type
303
+ end
304
+
305
+ # form parameters
306
+ form_params = opts[:form_params] || {}
307
+
308
+ # http body (model)
309
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_merchant_balance_transfer_request)
310
+
311
+ # return_type
312
+ return_type = opts[:debug_return_type] || 'BalanceTransferServiceRecord'
313
+
314
+ # auth_names
315
+ auth_names = opts[:debug_auth_names] || ['api_key']
316
+
317
+ new_options = opts.merge(
318
+ :operation => :"PlatformModelApi.create_merchant_balance_transfer",
319
+ :header_params => header_params,
320
+ :query_params => query_params,
321
+ :form_params => form_params,
322
+ :body => post_body,
323
+ :auth_names => auth_names,
324
+ :return_type => return_type
325
+ )
326
+
327
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
328
+ if @api_client.config.debugging
329
+ @api_client.config.logger.debug "API called: PlatformModelApi#create_merchant_balance_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ return data, status_code, headers
332
+ end
333
+
334
+ # Balances: Edit Settings
335
+ # Given a currency, edit the payout settings of the currently authenticated merchant or one of its sub-merchants.
336
+ # @param merchant_id [String]
337
+ # @param currency [Currency]
338
+ # @param edit_merchant_balance_settings_request [EditMerchantBalanceSettingsRequest]
339
+ # @param [Hash] opts the optional parameters
340
+ # @return [MerchantBalance]
341
+ def edit_merchant_balance_settings(merchant_id, currency, edit_merchant_balance_settings_request, opts = {})
342
+ data, _status_code, _headers = edit_merchant_balance_settings_with_http_info(merchant_id, currency, edit_merchant_balance_settings_request, opts)
343
+ data
344
+ end
345
+
346
+ # Balances: Edit Settings
347
+ # Given a currency, edit the payout settings of the currently authenticated merchant or one of its sub-merchants.
348
+ # @param merchant_id [String]
349
+ # @param currency [Currency]
350
+ # @param edit_merchant_balance_settings_request [EditMerchantBalanceSettingsRequest]
351
+ # @param [Hash] opts the optional parameters
352
+ # @return [Array<(MerchantBalance, Integer, Hash)>] MerchantBalance data, response status code and response headers
353
+ def edit_merchant_balance_settings_with_http_info(merchant_id, currency, edit_merchant_balance_settings_request, opts = {})
354
+ if @api_client.config.debugging
355
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.edit_merchant_balance_settings ...'
356
+ end
357
+ # verify the required parameter 'merchant_id' is set
358
+ if @api_client.config.client_side_validation && merchant_id.nil?
359
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.edit_merchant_balance_settings"
360
+ end
361
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
362
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.edit_merchant_balance_settings, the character length must be smaller than or equal to 25.'
363
+ end
364
+
365
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
366
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.edit_merchant_balance_settings, the character length must be great than or equal to 25.'
367
+ end
368
+
369
+ # verify the required parameter 'currency' is set
370
+ if @api_client.config.client_side_validation && currency.nil?
371
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.edit_merchant_balance_settings"
372
+ end
373
+ # verify the required parameter 'edit_merchant_balance_settings_request' is set
374
+ if @api_client.config.client_side_validation && edit_merchant_balance_settings_request.nil?
375
+ fail ArgumentError, "Missing the required parameter 'edit_merchant_balance_settings_request' when calling PlatformModelApi.edit_merchant_balance_settings"
376
+ end
377
+ # resource path
378
+ local_var_path = '/merchants/{merchant_id}/balances/{currency}/settings'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))
379
+
380
+ # query parameters
381
+ query_params = opts[:query_params] || {}
382
+
383
+ # header parameters
384
+ header_params = opts[:header_params] || {}
385
+ # HTTP header 'Accept' (if needed)
386
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
387
+ # HTTP header 'Content-Type'
388
+ content_type = @api_client.select_header_content_type(['application/json'])
389
+ if !content_type.nil?
390
+ header_params['Content-Type'] = content_type
391
+ end
392
+
393
+ # form parameters
394
+ form_params = opts[:form_params] || {}
395
+
396
+ # http body (model)
397
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_merchant_balance_settings_request)
398
+
399
+ # return_type
400
+ return_type = opts[:debug_return_type] || 'MerchantBalance'
401
+
402
+ # auth_names
403
+ auth_names = opts[:debug_auth_names] || ['api_key']
404
+
405
+ new_options = opts.merge(
406
+ :operation => :"PlatformModelApi.edit_merchant_balance_settings",
407
+ :header_params => header_params,
408
+ :query_params => query_params,
409
+ :form_params => form_params,
410
+ :body => post_body,
411
+ :auth_names => auth_names,
412
+ :return_type => return_type
413
+ )
414
+
415
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
416
+ if @api_client.config.debugging
417
+ @api_client.config.logger.debug "API called: PlatformModelApi#edit_merchant_balance_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
418
+ end
419
+ return data, status_code, headers
420
+ end
421
+
422
+ # Live Application: Payment Methods
423
+ # List submitted/unsubmitted payment methods
424
+ # @param merchant_id [String]
425
+ # @param [Hash] opts the optional parameters
426
+ # @option opts [Locale] :locale
427
+ # @return [PaymentMethodsList]
428
+ def list_live_application_payment_methods(merchant_id, opts = {})
429
+ data, _status_code, _headers = list_live_application_payment_methods_with_http_info(merchant_id, opts)
430
+ data
431
+ end
432
+
433
+ # Live Application: Payment Methods
434
+ # List submitted/unsubmitted payment methods
435
+ # @param merchant_id [String]
436
+ # @param [Hash] opts the optional parameters
437
+ # @option opts [Locale] :locale
438
+ # @return [Array<(PaymentMethodsList, Integer, Hash)>] PaymentMethodsList data, response status code and response headers
439
+ def list_live_application_payment_methods_with_http_info(merchant_id, opts = {})
440
+ if @api_client.config.debugging
441
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_live_application_payment_methods ...'
442
+ end
443
+ # verify the required parameter 'merchant_id' is set
444
+ if @api_client.config.client_side_validation && merchant_id.nil?
445
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.list_live_application_payment_methods"
446
+ end
447
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
448
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_live_application_payment_methods, the character length must be smaller than or equal to 25.'
449
+ end
450
+
451
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
452
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_live_application_payment_methods, the character length must be great than or equal to 25.'
453
+ end
454
+
455
+ # resource path
456
+ local_var_path = '/live_application/{merchant_id}/payment_methods'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
457
+
458
+ # query parameters
459
+ query_params = opts[:query_params] || {}
460
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
461
+
462
+ # header parameters
463
+ header_params = opts[:header_params] || {}
464
+ # HTTP header 'Accept' (if needed)
465
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
466
+
467
+ # form parameters
468
+ form_params = opts[:form_params] || {}
469
+
470
+ # http body (model)
471
+ post_body = opts[:debug_body]
472
+
473
+ # return_type
474
+ return_type = opts[:debug_return_type] || 'PaymentMethodsList'
475
+
476
+ # auth_names
477
+ auth_names = opts[:debug_auth_names] || ['api_key']
478
+
479
+ new_options = opts.merge(
480
+ :operation => :"PlatformModelApi.list_live_application_payment_methods",
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => return_type
487
+ )
488
+
489
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug "API called: PlatformModelApi#list_live_application_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
+ end
493
+ return data, status_code, headers
494
+ end
495
+
496
+ # Merchant: List
497
+ # Retrieves a paginated list of sub-merchants. Results can be filtered by `live` status, `platform_role`, account `status`, and whether payments or payouts are enabled.
498
+ # @param [Hash] opts the optional parameters
499
+ # @option opts [Time] :start_time Query for records created after this time.
500
+ # @option opts [Time] :end_time Query for records created before this time.
501
+ # @option opts [Integer] :per_page How many objects per page.
502
+ # @option opts [Integer] :page Page number to query for.
503
+ # @option opts [Boolean] :live
504
+ # @option opts [MerchantRole] :platform_role
505
+ # @option opts [String] :status
506
+ # @option opts [Boolean] :payments_enabled
507
+ # @option opts [Boolean] :payouts_enabled
508
+ # @return [SubmerchantsList]
509
+ def list_merchants(opts = {})
510
+ data, _status_code, _headers = list_merchants_with_http_info(opts)
511
+ data
512
+ end
513
+
514
+ # Merchant: List
515
+ # Retrieves a paginated list of sub-merchants. Results can be filtered by &#x60;live&#x60; status, &#x60;platform_role&#x60;, account &#x60;status&#x60;, and whether payments or payouts are enabled.
516
+ # @param [Hash] opts the optional parameters
517
+ # @option opts [Time] :start_time Query for records created after this time.
518
+ # @option opts [Time] :end_time Query for records created before this time.
519
+ # @option opts [Integer] :per_page How many objects per page.
520
+ # @option opts [Integer] :page Page number to query for.
521
+ # @option opts [Boolean] :live
522
+ # @option opts [MerchantRole] :platform_role
523
+ # @option opts [String] :status
524
+ # @option opts [Boolean] :payments_enabled
525
+ # @option opts [Boolean] :payouts_enabled
526
+ # @return [Array<(SubmerchantsList, Integer, Hash)>] SubmerchantsList data, response status code and response headers
527
+ def list_merchants_with_http_info(opts = {})
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_merchants ...'
530
+ end
531
+ # resource path
532
+ local_var_path = '/merchants'
533
+
534
+ # query parameters
535
+ query_params = opts[:query_params] || {}
536
+ query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
537
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
538
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
539
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
540
+ query_params[:'live'] = opts[:'live'] if !opts[:'live'].nil?
541
+ query_params[:'platform_role'] = opts[:'platform_role'] if !opts[:'platform_role'].nil?
542
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
543
+ query_params[:'payments_enabled'] = opts[:'payments_enabled'] if !opts[:'payments_enabled'].nil?
544
+ query_params[:'payouts_enabled'] = opts[:'payouts_enabled'] if !opts[:'payouts_enabled'].nil?
545
+
546
+ # header parameters
547
+ header_params = opts[:header_params] || {}
548
+ # HTTP header 'Accept' (if needed)
549
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
550
+
551
+ # form parameters
552
+ form_params = opts[:form_params] || {}
553
+
554
+ # http body (model)
555
+ post_body = opts[:debug_body]
556
+
557
+ # return_type
558
+ return_type = opts[:debug_return_type] || 'SubmerchantsList'
559
+
560
+ # auth_names
561
+ auth_names = opts[:debug_auth_names] || ['api_key']
562
+
563
+ new_options = opts.merge(
564
+ :operation => :"PlatformModelApi.list_merchants",
565
+ :header_params => header_params,
566
+ :query_params => query_params,
567
+ :form_params => form_params,
568
+ :body => post_body,
569
+ :auth_names => auth_names,
570
+ :return_type => return_type
571
+ )
572
+
573
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
574
+ if @api_client.config.debugging
575
+ @api_client.config.logger.debug "API called: PlatformModelApi#list_merchants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
576
+ end
577
+ return data, status_code, headers
578
+ end
579
+
580
+ # Payment: List for Merchant
581
+ # Retrieves a paginated list of payments. Pagination can be configured with `page` and `per_page` parameters. Payments can be filtered by `currency`, `external_order_num`, and `status`. A time range can be specified with `start_time`, and `end_time`.
582
+ # @param merchant_id [String]
583
+ # @param [Hash] opts the optional parameters
584
+ # @option opts [Time] :start_time Query for records created after this time.
585
+ # @option opts [Time] :end_time Query for records created before this time.
586
+ # @option opts [Integer] :per_page How many objects per page.
587
+ # @option opts [Integer] :page Page number to query for.
588
+ # @option opts [Currency] :currency
589
+ # @option opts [String] :external_order_num
590
+ # @option opts [PaymentStatus] :status
591
+ # @return [PlatformMerchantPaymentList]
592
+ def list_submerchant_payments(merchant_id, opts = {})
593
+ data, _status_code, _headers = list_submerchant_payments_with_http_info(merchant_id, opts)
594
+ data
595
+ end
596
+
597
+ # Payment: List for Merchant
598
+ # Retrieves a paginated list of payments. Pagination can be configured with &#x60;page&#x60; and &#x60;per_page&#x60; parameters. Payments can be filtered by &#x60;currency&#x60;, &#x60;external_order_num&#x60;, and &#x60;status&#x60;. A time range can be specified with &#x60;start_time&#x60;, and &#x60;end_time&#x60;.
599
+ # @param merchant_id [String]
600
+ # @param [Hash] opts the optional parameters
601
+ # @option opts [Time] :start_time Query for records created after this time.
602
+ # @option opts [Time] :end_time Query for records created before this time.
603
+ # @option opts [Integer] :per_page How many objects per page.
604
+ # @option opts [Integer] :page Page number to query for.
605
+ # @option opts [Currency] :currency
606
+ # @option opts [String] :external_order_num
607
+ # @option opts [PaymentStatus] :status
608
+ # @return [Array<(PlatformMerchantPaymentList, Integer, Hash)>] PlatformMerchantPaymentList data, response status code and response headers
609
+ def list_submerchant_payments_with_http_info(merchant_id, opts = {})
610
+ if @api_client.config.debugging
611
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_submerchant_payments ...'
612
+ end
613
+ # verify the required parameter 'merchant_id' is set
614
+ if @api_client.config.client_side_validation && merchant_id.nil?
615
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.list_submerchant_payments"
616
+ end
617
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
618
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_payments, the character length must be smaller than or equal to 25.'
619
+ end
620
+
621
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
622
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_payments, the character length must be great than or equal to 25.'
623
+ end
624
+
625
+ # resource path
626
+ local_var_path = '/merchants/{merchant_id}/payments'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
627
+
628
+ # query parameters
629
+ query_params = opts[:query_params] || {}
630
+ query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
631
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
632
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
633
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
634
+ query_params[:'currency'] = opts[:'currency'] if !opts[:'currency'].nil?
635
+ query_params[:'external_order_num'] = opts[:'external_order_num'] if !opts[:'external_order_num'].nil?
636
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
637
+
638
+ # header parameters
639
+ header_params = opts[:header_params] || {}
640
+ # HTTP header 'Accept' (if needed)
641
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
642
+
643
+ # form parameters
644
+ form_params = opts[:form_params] || {}
645
+
646
+ # http body (model)
647
+ post_body = opts[:debug_body]
648
+
649
+ # return_type
650
+ return_type = opts[:debug_return_type] || 'PlatformMerchantPaymentList'
651
+
652
+ # auth_names
653
+ auth_names = opts[:debug_auth_names] || ['api_key']
654
+
655
+ new_options = opts.merge(
656
+ :operation => :"PlatformModelApi.list_submerchant_payments",
657
+ :header_params => header_params,
658
+ :query_params => query_params,
659
+ :form_params => form_params,
660
+ :body => post_body,
661
+ :auth_names => auth_names,
662
+ :return_type => return_type
663
+ )
664
+
665
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
666
+ if @api_client.config.debugging
667
+ @api_client.config.logger.debug "API called: PlatformModelApi#list_submerchant_payments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
668
+ end
669
+ return data, status_code, headers
670
+ end
671
+
672
+ # Settlement: List
673
+ # Lists out past settlements from most-recent to least-recent.
674
+ # @param merchant_id [String]
675
+ # @param [Hash] opts the optional parameters
676
+ # @return [SettlementList]
677
+ def list_submerchant_settlements(merchant_id, opts = {})
678
+ data, _status_code, _headers = list_submerchant_settlements_with_http_info(merchant_id, opts)
679
+ data
680
+ end
681
+
682
+ # Settlement: List
683
+ # Lists out past settlements from most-recent to least-recent.
684
+ # @param merchant_id [String]
685
+ # @param [Hash] opts the optional parameters
686
+ # @return [Array<(SettlementList, Integer, Hash)>] SettlementList data, response status code and response headers
687
+ def list_submerchant_settlements_with_http_info(merchant_id, opts = {})
688
+ if @api_client.config.debugging
689
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.list_submerchant_settlements ...'
690
+ end
691
+ # verify the required parameter 'merchant_id' is set
692
+ if @api_client.config.client_side_validation && merchant_id.nil?
693
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.list_submerchant_settlements"
694
+ end
695
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
696
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_settlements, the character length must be smaller than or equal to 25.'
697
+ end
698
+
699
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
700
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.list_submerchant_settlements, the character length must be great than or equal to 25.'
701
+ end
702
+
703
+ # resource path
704
+ local_var_path = '/merchants/{merchant_id}/settlements'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
705
+
706
+ # query parameters
707
+ query_params = opts[:query_params] || {}
708
+
709
+ # header parameters
710
+ header_params = opts[:header_params] || {}
711
+ # HTTP header 'Accept' (if needed)
712
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
713
+
714
+ # form parameters
715
+ form_params = opts[:form_params] || {}
716
+
717
+ # http body (model)
718
+ post_body = opts[:debug_body]
719
+
720
+ # return_type
721
+ return_type = opts[:debug_return_type] || 'SettlementList'
722
+
723
+ # auth_names
724
+ auth_names = opts[:debug_auth_names] || ['api_key']
725
+
726
+ new_options = opts.merge(
727
+ :operation => :"PlatformModelApi.list_submerchant_settlements",
728
+ :header_params => header_params,
729
+ :query_params => query_params,
730
+ :form_params => form_params,
731
+ :body => post_body,
732
+ :auth_names => auth_names,
733
+ :return_type => return_type
734
+ )
735
+
736
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
737
+ if @api_client.config.debugging
738
+ @api_client.config.logger.debug "API called: PlatformModelApi#list_submerchant_settlements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
739
+ end
740
+ return data, status_code, headers
741
+ end
742
+
743
+ # Balance: Transactions
744
+ # Given a currency, view the ledger transactions of the currently authenticated merchant or one of its sub-merchants. Will split ledger transactions into line items when appropriate.
745
+ # @param merchant_id [String]
746
+ # @param currency [Currency]
747
+ # @param [Hash] opts the optional parameters
748
+ # @option opts [Time] :start_time Query for records created after this time.
749
+ # @option opts [Time] :end_time Query for records created before this time.
750
+ # @option opts [Integer] :per_page How many objects per page.
751
+ # @option opts [Integer] :page Page number to query for.
752
+ # @option opts [String] :type
753
+ # @return [BalanceTransactionList]
754
+ def merchant_balance_transactions(merchant_id, currency, opts = {})
755
+ data, _status_code, _headers = merchant_balance_transactions_with_http_info(merchant_id, currency, opts)
756
+ data
757
+ end
758
+
759
+ # Balance: Transactions
760
+ # Given a currency, view the ledger transactions of the currently authenticated merchant or one of its sub-merchants. Will split ledger transactions into line items when appropriate.
761
+ # @param merchant_id [String]
762
+ # @param currency [Currency]
763
+ # @param [Hash] opts the optional parameters
764
+ # @option opts [Time] :start_time Query for records created after this time.
765
+ # @option opts [Time] :end_time Query for records created before this time.
766
+ # @option opts [Integer] :per_page How many objects per page.
767
+ # @option opts [Integer] :page Page number to query for.
768
+ # @option opts [String] :type
769
+ # @return [Array<(BalanceTransactionList, Integer, Hash)>] BalanceTransactionList data, response status code and response headers
770
+ def merchant_balance_transactions_with_http_info(merchant_id, currency, opts = {})
771
+ if @api_client.config.debugging
772
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.merchant_balance_transactions ...'
773
+ end
774
+ # verify the required parameter 'merchant_id' is set
775
+ if @api_client.config.client_side_validation && merchant_id.nil?
776
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.merchant_balance_transactions"
777
+ end
778
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
779
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.merchant_balance_transactions, the character length must be smaller than or equal to 25.'
780
+ end
781
+
782
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
783
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.merchant_balance_transactions, the character length must be great than or equal to 25.'
784
+ end
785
+
786
+ # verify the required parameter 'currency' is set
787
+ if @api_client.config.client_side_validation && currency.nil?
788
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.merchant_balance_transactions"
789
+ end
790
+ # resource path
791
+ local_var_path = '/merchants/{merchant_id}/balances/{currency}/transactions'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))
792
+
793
+ # query parameters
794
+ query_params = opts[:query_params] || {}
795
+ query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil?
796
+ query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
797
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
798
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
799
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
800
+
801
+ # header parameters
802
+ header_params = opts[:header_params] || {}
803
+ # HTTP header 'Accept' (if needed)
804
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
805
+
806
+ # form parameters
807
+ form_params = opts[:form_params] || {}
808
+
809
+ # http body (model)
810
+ post_body = opts[:debug_body]
811
+
812
+ # return_type
813
+ return_type = opts[:debug_return_type] || 'BalanceTransactionList'
814
+
815
+ # auth_names
816
+ auth_names = opts[:debug_auth_names] || ['api_key']
817
+
818
+ new_options = opts.merge(
819
+ :operation => :"PlatformModelApi.merchant_balance_transactions",
820
+ :header_params => header_params,
821
+ :query_params => query_params,
822
+ :form_params => form_params,
823
+ :body => post_body,
824
+ :auth_names => auth_names,
825
+ :return_type => return_type
826
+ )
827
+
828
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
829
+ if @api_client.config.debugging
830
+ @api_client.config.logger.debug "API called: PlatformModelApi#merchant_balance_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
831
+ end
832
+ return data, status_code, headers
833
+ end
834
+
835
+ # File: Show
836
+ # Retrieves an existing file of the current merchant.
837
+ # @param merchant_id [String]
838
+ # @param id [String]
839
+ # @param [Hash] opts the optional parameters
840
+ # @return [MerchantFile]
841
+ def show_file(merchant_id, id, opts = {})
842
+ data, _status_code, _headers = show_file_with_http_info(merchant_id, id, opts)
843
+ data
844
+ end
845
+
846
+ # File: Show
847
+ # Retrieves an existing file of the current merchant.
848
+ # @param merchant_id [String]
849
+ # @param id [String]
850
+ # @param [Hash] opts the optional parameters
851
+ # @return [Array<(MerchantFile, Integer, Hash)>] MerchantFile data, response status code and response headers
852
+ def show_file_with_http_info(merchant_id, id, opts = {})
853
+ if @api_client.config.debugging
854
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_file ...'
855
+ end
856
+ # verify the required parameter 'merchant_id' is set
857
+ if @api_client.config.client_side_validation && merchant_id.nil?
858
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_file"
859
+ end
860
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
861
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_file, the character length must be smaller than or equal to 25.'
862
+ end
863
+
864
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
865
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_file, the character length must be great than or equal to 25.'
866
+ end
867
+
868
+ # verify the required parameter 'id' is set
869
+ if @api_client.config.client_side_validation && id.nil?
870
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.show_file"
871
+ end
872
+ # resource path
873
+ local_var_path = '/merchants/{merchant_id}/files/{id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
874
+
875
+ # query parameters
876
+ query_params = opts[:query_params] || {}
877
+
878
+ # header parameters
879
+ header_params = opts[:header_params] || {}
880
+ # HTTP header 'Accept' (if needed)
881
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
882
+
883
+ # form parameters
884
+ form_params = opts[:form_params] || {}
885
+
886
+ # http body (model)
887
+ post_body = opts[:debug_body]
888
+
889
+ # return_type
890
+ return_type = opts[:debug_return_type] || 'MerchantFile'
891
+
892
+ # auth_names
893
+ auth_names = opts[:debug_auth_names] || ['api_key']
894
+
895
+ new_options = opts.merge(
896
+ :operation => :"PlatformModelApi.show_file",
897
+ :header_params => header_params,
898
+ :query_params => query_params,
899
+ :form_params => form_params,
900
+ :body => post_body,
901
+ :auth_names => auth_names,
902
+ :return_type => return_type
903
+ )
904
+
905
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
906
+ if @api_client.config.debugging
907
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
908
+ end
909
+ return data, status_code, headers
910
+ end
911
+
912
+ # Live Application: Show
913
+ # Shows the live application status of the applicant merchant
914
+ # @param merchant_id [String]
915
+ # @param [Hash] opts the optional parameters
916
+ # @option opts [Locale] :locale
917
+ # @return [LiveApplicationWithSubmittedFields]
918
+ def show_live_application(merchant_id, opts = {})
919
+ data, _status_code, _headers = show_live_application_with_http_info(merchant_id, opts)
920
+ data
921
+ end
922
+
923
+ # Live Application: Show
924
+ # Shows the live application status of the applicant merchant
925
+ # @param merchant_id [String]
926
+ # @param [Hash] opts the optional parameters
927
+ # @option opts [Locale] :locale
928
+ # @return [Array<(LiveApplicationWithSubmittedFields, Integer, Hash)>] LiveApplicationWithSubmittedFields data, response status code and response headers
929
+ def show_live_application_with_http_info(merchant_id, opts = {})
930
+ if @api_client.config.debugging
931
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_live_application ...'
932
+ end
933
+ # verify the required parameter 'merchant_id' is set
934
+ if @api_client.config.client_side_validation && merchant_id.nil?
935
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_live_application"
936
+ end
937
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
938
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application, the character length must be smaller than or equal to 25.'
939
+ end
940
+
941
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
942
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application, the character length must be great than or equal to 25.'
943
+ end
944
+
945
+ # resource path
946
+ local_var_path = '/live_application/{merchant_id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
947
+
948
+ # query parameters
949
+ query_params = opts[:query_params] || {}
950
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
951
+
952
+ # header parameters
953
+ header_params = opts[:header_params] || {}
954
+ # HTTP header 'Accept' (if needed)
955
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
956
+
957
+ # form parameters
958
+ form_params = opts[:form_params] || {}
959
+
960
+ # http body (model)
961
+ post_body = opts[:debug_body]
962
+
963
+ # return_type
964
+ return_type = opts[:debug_return_type] || 'LiveApplicationWithSubmittedFields'
965
+
966
+ # auth_names
967
+ auth_names = opts[:debug_auth_names] || ['api_key']
968
+
969
+ new_options = opts.merge(
970
+ :operation => :"PlatformModelApi.show_live_application",
971
+ :header_params => header_params,
972
+ :query_params => query_params,
973
+ :form_params => form_params,
974
+ :body => post_body,
975
+ :auth_names => auth_names,
976
+ :return_type => return_type
977
+ )
978
+
979
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
980
+ if @api_client.config.debugging
981
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_live_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
982
+ end
983
+ return data, status_code, headers
984
+ end
985
+
986
+ # Live Application: Show Payment Method
987
+ # Shows the payment method status of the applicant merchant
988
+ # @param merchant_id [String]
989
+ # @param payment_method [String]
990
+ # @param [Hash] opts the optional parameters
991
+ # @option opts [Locale] :locale
992
+ # @return [LiveApplicationWithSubmittedFields]
993
+ def show_live_application_payment_method(merchant_id, payment_method, opts = {})
994
+ data, _status_code, _headers = show_live_application_payment_method_with_http_info(merchant_id, payment_method, opts)
995
+ data
996
+ end
997
+
998
+ # Live Application: Show Payment Method
999
+ # Shows the payment method status of the applicant merchant
1000
+ # @param merchant_id [String]
1001
+ # @param payment_method [String]
1002
+ # @param [Hash] opts the optional parameters
1003
+ # @option opts [Locale] :locale
1004
+ # @return [Array<(LiveApplicationWithSubmittedFields, Integer, Hash)>] LiveApplicationWithSubmittedFields data, response status code and response headers
1005
+ def show_live_application_payment_method_with_http_info(merchant_id, payment_method, opts = {})
1006
+ if @api_client.config.debugging
1007
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_live_application_payment_method ...'
1008
+ end
1009
+ # verify the required parameter 'merchant_id' is set
1010
+ if @api_client.config.client_side_validation && merchant_id.nil?
1011
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_live_application_payment_method"
1012
+ end
1013
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1014
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application_payment_method, the character length must be smaller than or equal to 25.'
1015
+ end
1016
+
1017
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1018
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_live_application_payment_method, the character length must be great than or equal to 25.'
1019
+ end
1020
+
1021
+ # verify the required parameter 'payment_method' is set
1022
+ if @api_client.config.client_side_validation && payment_method.nil?
1023
+ fail ArgumentError, "Missing the required parameter 'payment_method' when calling PlatformModelApi.show_live_application_payment_method"
1024
+ end
1025
+ # resource path
1026
+ local_var_path = '/live_application/{merchant_id}/payment_methods/{payment_method}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'payment_method' + '}', CGI.escape(payment_method.to_s))
1027
+
1028
+ # query parameters
1029
+ query_params = opts[:query_params] || {}
1030
+ query_params[:'locale'] = opts[:'locale'] if !opts[:'locale'].nil?
1031
+
1032
+ # header parameters
1033
+ header_params = opts[:header_params] || {}
1034
+ # HTTP header 'Accept' (if needed)
1035
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1036
+
1037
+ # form parameters
1038
+ form_params = opts[:form_params] || {}
1039
+
1040
+ # http body (model)
1041
+ post_body = opts[:debug_body]
1042
+
1043
+ # return_type
1044
+ return_type = opts[:debug_return_type] || 'LiveApplicationWithSubmittedFields'
1045
+
1046
+ # auth_names
1047
+ auth_names = opts[:debug_auth_names] || ['api_key']
1048
+
1049
+ new_options = opts.merge(
1050
+ :operation => :"PlatformModelApi.show_live_application_payment_method",
1051
+ :header_params => header_params,
1052
+ :query_params => query_params,
1053
+ :form_params => form_params,
1054
+ :body => post_body,
1055
+ :auth_names => auth_names,
1056
+ :return_type => return_type
1057
+ )
1058
+
1059
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1060
+ if @api_client.config.debugging
1061
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_live_application_payment_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1062
+ end
1063
+ return data, status_code, headers
1064
+ end
1065
+
1066
+ # Merchant: Show
1067
+ # Retrieves the details of a sub-merchant by its `id`, including account settings, payout configuration, and live status.
1068
+ # @param id [String]
1069
+ # @param [Hash] opts the optional parameters
1070
+ # @return [SerializedSubmerchant]
1071
+ def show_merchant(id, opts = {})
1072
+ data, _status_code, _headers = show_merchant_with_http_info(id, opts)
1073
+ data
1074
+ end
1075
+
1076
+ # Merchant: Show
1077
+ # Retrieves the details of a sub-merchant by its &#x60;id&#x60;, including account settings, payout configuration, and live status.
1078
+ # @param id [String]
1079
+ # @param [Hash] opts the optional parameters
1080
+ # @return [Array<(SerializedSubmerchant, Integer, Hash)>] SerializedSubmerchant data, response status code and response headers
1081
+ def show_merchant_with_http_info(id, opts = {})
1082
+ if @api_client.config.debugging
1083
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant ...'
1084
+ end
1085
+ # verify the required parameter 'id' is set
1086
+ if @api_client.config.client_side_validation && id.nil?
1087
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.show_merchant"
1088
+ end
1089
+ if @api_client.config.client_side_validation && id.to_s.length > 25
1090
+ fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.show_merchant, the character length must be smaller than or equal to 25.'
1091
+ end
1092
+
1093
+ if @api_client.config.client_side_validation && id.to_s.length < 25
1094
+ fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.show_merchant, the character length must be great than or equal to 25.'
1095
+ end
1096
+
1097
+ # resource path
1098
+ local_var_path = '/merchants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1099
+
1100
+ # query parameters
1101
+ query_params = opts[:query_params] || {}
1102
+
1103
+ # header parameters
1104
+ header_params = opts[:header_params] || {}
1105
+ # HTTP header 'Accept' (if needed)
1106
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1107
+
1108
+ # form parameters
1109
+ form_params = opts[:form_params] || {}
1110
+
1111
+ # http body (model)
1112
+ post_body = opts[:debug_body]
1113
+
1114
+ # return_type
1115
+ return_type = opts[:debug_return_type] || 'SerializedSubmerchant'
1116
+
1117
+ # auth_names
1118
+ auth_names = opts[:debug_auth_names] || ['api_key']
1119
+
1120
+ new_options = opts.merge(
1121
+ :operation => :"PlatformModelApi.show_merchant",
1122
+ :header_params => header_params,
1123
+ :query_params => query_params,
1124
+ :form_params => form_params,
1125
+ :body => post_body,
1126
+ :auth_names => auth_names,
1127
+ :return_type => return_type
1128
+ )
1129
+
1130
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1131
+ if @api_client.config.debugging
1132
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1133
+ end
1134
+ return data, status_code, headers
1135
+ end
1136
+
1137
+ # Balance: Show
1138
+ # Given a currency, view the unsettled balance of the currently authenticated merchant or one of its sub-merchants.
1139
+ # @param merchant_id [String]
1140
+ # @param currency [Currency]
1141
+ # @param [Hash] opts the optional parameters
1142
+ # @return [BalanceShow]
1143
+ def show_merchant_balance(merchant_id, currency, opts = {})
1144
+ data, _status_code, _headers = show_merchant_balance_with_http_info(merchant_id, currency, opts)
1145
+ data
1146
+ end
1147
+
1148
+ # Balance: Show
1149
+ # Given a currency, view the unsettled balance of the currently authenticated merchant or one of its sub-merchants.
1150
+ # @param merchant_id [String]
1151
+ # @param currency [Currency]
1152
+ # @param [Hash] opts the optional parameters
1153
+ # @return [Array<(BalanceShow, Integer, Hash)>] BalanceShow data, response status code and response headers
1154
+ def show_merchant_balance_with_http_info(merchant_id, currency, opts = {})
1155
+ if @api_client.config.debugging
1156
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant_balance ...'
1157
+ end
1158
+ # verify the required parameter 'merchant_id' is set
1159
+ if @api_client.config.client_side_validation && merchant_id.nil?
1160
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_merchant_balance"
1161
+ end
1162
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1163
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance, the character length must be smaller than or equal to 25.'
1164
+ end
1165
+
1166
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1167
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance, the character length must be great than or equal to 25.'
1168
+ end
1169
+
1170
+ # verify the required parameter 'currency' is set
1171
+ if @api_client.config.client_side_validation && currency.nil?
1172
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.show_merchant_balance"
1173
+ end
1174
+ # resource path
1175
+ local_var_path = '/merchants/{merchant_id}/balances/{currency}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))
1176
+
1177
+ # query parameters
1178
+ query_params = opts[:query_params] || {}
1179
+
1180
+ # header parameters
1181
+ header_params = opts[:header_params] || {}
1182
+ # HTTP header 'Accept' (if needed)
1183
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1184
+
1185
+ # form parameters
1186
+ form_params = opts[:form_params] || {}
1187
+
1188
+ # http body (model)
1189
+ post_body = opts[:debug_body]
1190
+
1191
+ # return_type
1192
+ return_type = opts[:debug_return_type] || 'BalanceShow'
1193
+
1194
+ # auth_names
1195
+ auth_names = opts[:debug_auth_names] || ['api_key']
1196
+
1197
+ new_options = opts.merge(
1198
+ :operation => :"PlatformModelApi.show_merchant_balance",
1199
+ :header_params => header_params,
1200
+ :query_params => query_params,
1201
+ :form_params => form_params,
1202
+ :body => post_body,
1203
+ :auth_names => auth_names,
1204
+ :return_type => return_type
1205
+ )
1206
+
1207
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1208
+ if @api_client.config.debugging
1209
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1210
+ end
1211
+ return data, status_code, headers
1212
+ end
1213
+
1214
+ # Balance: Show Settings
1215
+ # Given a currency, view the payout settings of the currently authenticated merchant or one of its sub-merchants.
1216
+ # @param merchant_id [String]
1217
+ # @param currency [Currency]
1218
+ # @param [Hash] opts the optional parameters
1219
+ # @return [BalanceSettings]
1220
+ def show_merchant_balance_settings(merchant_id, currency, opts = {})
1221
+ data, _status_code, _headers = show_merchant_balance_settings_with_http_info(merchant_id, currency, opts)
1222
+ data
1223
+ end
1224
+
1225
+ # Balance: Show Settings
1226
+ # Given a currency, view the payout settings of the currently authenticated merchant or one of its sub-merchants.
1227
+ # @param merchant_id [String]
1228
+ # @param currency [Currency]
1229
+ # @param [Hash] opts the optional parameters
1230
+ # @return [Array<(BalanceSettings, Integer, Hash)>] BalanceSettings data, response status code and response headers
1231
+ def show_merchant_balance_settings_with_http_info(merchant_id, currency, opts = {})
1232
+ if @api_client.config.debugging
1233
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant_balance_settings ...'
1234
+ end
1235
+ # verify the required parameter 'merchant_id' is set
1236
+ if @api_client.config.client_side_validation && merchant_id.nil?
1237
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_merchant_balance_settings"
1238
+ end
1239
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1240
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_settings, the character length must be smaller than or equal to 25.'
1241
+ end
1242
+
1243
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1244
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_settings, the character length must be great than or equal to 25.'
1245
+ end
1246
+
1247
+ # verify the required parameter 'currency' is set
1248
+ if @api_client.config.client_side_validation && currency.nil?
1249
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.show_merchant_balance_settings"
1250
+ end
1251
+ # resource path
1252
+ local_var_path = '/merchants/{merchant_id}/balances/{currency}/settings'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s))
1253
+
1254
+ # query parameters
1255
+ query_params = opts[:query_params] || {}
1256
+
1257
+ # header parameters
1258
+ header_params = opts[:header_params] || {}
1259
+ # HTTP header 'Accept' (if needed)
1260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1261
+
1262
+ # form parameters
1263
+ form_params = opts[:form_params] || {}
1264
+
1265
+ # http body (model)
1266
+ post_body = opts[:debug_body]
1267
+
1268
+ # return_type
1269
+ return_type = opts[:debug_return_type] || 'BalanceSettings'
1270
+
1271
+ # auth_names
1272
+ auth_names = opts[:debug_auth_names] || ['api_key']
1273
+
1274
+ new_options = opts.merge(
1275
+ :operation => :"PlatformModelApi.show_merchant_balance_settings",
1276
+ :header_params => header_params,
1277
+ :query_params => query_params,
1278
+ :form_params => form_params,
1279
+ :body => post_body,
1280
+ :auth_names => auth_names,
1281
+ :return_type => return_type
1282
+ )
1283
+
1284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1285
+ if @api_client.config.debugging
1286
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant_balance_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1287
+ end
1288
+ return data, status_code, headers
1289
+ end
1290
+
1291
+ # Balance: Transaction
1292
+ # Given a currency and a transaction UUID, view the corresponding ledger transaction of the currently authenticated merchant or one of its sub-merchants. Will return one entry per line item of the transaction.
1293
+ # @param merchant_id [String]
1294
+ # @param currency [Currency]
1295
+ # @param transaction_uuid [String]
1296
+ # @param [Hash] opts the optional parameters
1297
+ # @return [Array<Transaction>]
1298
+ def show_merchant_balance_transaction(merchant_id, currency, transaction_uuid, opts = {})
1299
+ data, _status_code, _headers = show_merchant_balance_transaction_with_http_info(merchant_id, currency, transaction_uuid, opts)
1300
+ data
1301
+ end
1302
+
1303
+ # Balance: Transaction
1304
+ # Given a currency and a transaction UUID, view the corresponding ledger transaction of the currently authenticated merchant or one of its sub-merchants. Will return one entry per line item of the transaction.
1305
+ # @param merchant_id [String]
1306
+ # @param currency [Currency]
1307
+ # @param transaction_uuid [String]
1308
+ # @param [Hash] opts the optional parameters
1309
+ # @return [Array<(Array<Transaction>, Integer, Hash)>] Array<Transaction> data, response status code and response headers
1310
+ def show_merchant_balance_transaction_with_http_info(merchant_id, currency, transaction_uuid, opts = {})
1311
+ if @api_client.config.debugging
1312
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_merchant_balance_transaction ...'
1313
+ end
1314
+ # verify the required parameter 'merchant_id' is set
1315
+ if @api_client.config.client_side_validation && merchant_id.nil?
1316
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_merchant_balance_transaction"
1317
+ end
1318
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1319
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be smaller than or equal to 25.'
1320
+ end
1321
+
1322
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1323
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be great than or equal to 25.'
1324
+ end
1325
+
1326
+ # verify the required parameter 'currency' is set
1327
+ if @api_client.config.client_side_validation && currency.nil?
1328
+ fail ArgumentError, "Missing the required parameter 'currency' when calling PlatformModelApi.show_merchant_balance_transaction"
1329
+ end
1330
+ # verify the required parameter 'transaction_uuid' is set
1331
+ if @api_client.config.client_side_validation && transaction_uuid.nil?
1332
+ fail ArgumentError, "Missing the required parameter 'transaction_uuid' when calling PlatformModelApi.show_merchant_balance_transaction"
1333
+ end
1334
+ if @api_client.config.client_side_validation && transaction_uuid.to_s.length > 25
1335
+ fail ArgumentError, 'invalid value for "transaction_uuid" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be smaller than or equal to 25.'
1336
+ end
1337
+
1338
+ if @api_client.config.client_side_validation && transaction_uuid.to_s.length < 25
1339
+ fail ArgumentError, 'invalid value for "transaction_uuid" when calling PlatformModelApi.show_merchant_balance_transaction, the character length must be great than or equal to 25.'
1340
+ end
1341
+
1342
+ # resource path
1343
+ local_var_path = '/merchants/{merchant_id}/balances/{currency}/transactions/{transaction_uuid}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'currency' + '}', CGI.escape(currency.to_s)).sub('{' + 'transaction_uuid' + '}', CGI.escape(transaction_uuid.to_s))
1344
+
1345
+ # query parameters
1346
+ query_params = opts[:query_params] || {}
1347
+
1348
+ # header parameters
1349
+ header_params = opts[:header_params] || {}
1350
+ # HTTP header 'Accept' (if needed)
1351
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1352
+
1353
+ # form parameters
1354
+ form_params = opts[:form_params] || {}
1355
+
1356
+ # http body (model)
1357
+ post_body = opts[:debug_body]
1358
+
1359
+ # return_type
1360
+ return_type = opts[:debug_return_type] || 'Array<Transaction>'
1361
+
1362
+ # auth_names
1363
+ auth_names = opts[:debug_auth_names] || ['api_key']
1364
+
1365
+ new_options = opts.merge(
1366
+ :operation => :"PlatformModelApi.show_merchant_balance_transaction",
1367
+ :header_params => header_params,
1368
+ :query_params => query_params,
1369
+ :form_params => form_params,
1370
+ :body => post_body,
1371
+ :auth_names => auth_names,
1372
+ :return_type => return_type
1373
+ )
1374
+
1375
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1376
+ if @api_client.config.debugging
1377
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_merchant_balance_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1378
+ end
1379
+ return data, status_code, headers
1380
+ end
1381
+
1382
+ # Settlement: Show
1383
+ # View a settlement given an `id`.
1384
+ # @param merchant_id [String]
1385
+ # @param id [String]
1386
+ # @param [Hash] opts the optional parameters
1387
+ # @return [SettlementShow]
1388
+ def show_submerchant_settlement(merchant_id, id, opts = {})
1389
+ data, _status_code, _headers = show_submerchant_settlement_with_http_info(merchant_id, id, opts)
1390
+ data
1391
+ end
1392
+
1393
+ # Settlement: Show
1394
+ # View a settlement given an &#x60;id&#x60;.
1395
+ # @param merchant_id [String]
1396
+ # @param id [String]
1397
+ # @param [Hash] opts the optional parameters
1398
+ # @return [Array<(SettlementShow, Integer, Hash)>] SettlementShow data, response status code and response headers
1399
+ def show_submerchant_settlement_with_http_info(merchant_id, id, opts = {})
1400
+ if @api_client.config.debugging
1401
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.show_submerchant_settlement ...'
1402
+ end
1403
+ # verify the required parameter 'merchant_id' is set
1404
+ if @api_client.config.client_side_validation && merchant_id.nil?
1405
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.show_submerchant_settlement"
1406
+ end
1407
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1408
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_submerchant_settlement, the character length must be smaller than or equal to 25.'
1409
+ end
1410
+
1411
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1412
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.show_submerchant_settlement, the character length must be great than or equal to 25.'
1413
+ end
1414
+
1415
+ # verify the required parameter 'id' is set
1416
+ if @api_client.config.client_side_validation && id.nil?
1417
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.show_submerchant_settlement"
1418
+ end
1419
+ # resource path
1420
+ local_var_path = '/merchants/{merchant_id}/settlements/{id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1421
+
1422
+ # query parameters
1423
+ query_params = opts[:query_params] || {}
1424
+
1425
+ # header parameters
1426
+ header_params = opts[:header_params] || {}
1427
+ # HTTP header 'Accept' (if needed)
1428
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1429
+
1430
+ # form parameters
1431
+ form_params = opts[:form_params] || {}
1432
+
1433
+ # http body (model)
1434
+ post_body = opts[:debug_body]
1435
+
1436
+ # return_type
1437
+ return_type = opts[:debug_return_type] || 'SettlementShow'
1438
+
1439
+ # auth_names
1440
+ auth_names = opts[:debug_auth_names] || ['api_key']
1441
+
1442
+ new_options = opts.merge(
1443
+ :operation => :"PlatformModelApi.show_submerchant_settlement",
1444
+ :header_params => header_params,
1445
+ :query_params => query_params,
1446
+ :form_params => form_params,
1447
+ :body => post_body,
1448
+ :auth_names => auth_names,
1449
+ :return_type => return_type
1450
+ )
1451
+
1452
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1453
+ if @api_client.config.debugging
1454
+ @api_client.config.logger.debug "API called: PlatformModelApi#show_submerchant_settlement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1455
+ end
1456
+ return data, status_code, headers
1457
+ end
1458
+
1459
+ # Live Application: Simulate Payment Method Status
1460
+ # Simulate status change on payment method for test merchants
1461
+ # @param merchant_id [String]
1462
+ # @param payment_method [String]
1463
+ # @param simulate_live_application_payment_method_status_request [SimulateLiveApplicationPaymentMethodStatusRequest]
1464
+ # @param [Hash] opts the optional parameters
1465
+ # @return [PaymentMethodStatus]
1466
+ def simulate_live_application_payment_method_status(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts = {})
1467
+ data, _status_code, _headers = simulate_live_application_payment_method_status_with_http_info(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts)
1468
+ data
1469
+ end
1470
+
1471
+ # Live Application: Simulate Payment Method Status
1472
+ # Simulate status change on payment method for test merchants
1473
+ # @param merchant_id [String]
1474
+ # @param payment_method [String]
1475
+ # @param simulate_live_application_payment_method_status_request [SimulateLiveApplicationPaymentMethodStatusRequest]
1476
+ # @param [Hash] opts the optional parameters
1477
+ # @return [Array<(PaymentMethodStatus, Integer, Hash)>] PaymentMethodStatus data, response status code and response headers
1478
+ def simulate_live_application_payment_method_status_with_http_info(merchant_id, payment_method, simulate_live_application_payment_method_status_request, opts = {})
1479
+ if @api_client.config.debugging
1480
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.simulate_live_application_payment_method_status ...'
1481
+ end
1482
+ # verify the required parameter 'merchant_id' is set
1483
+ if @api_client.config.client_side_validation && merchant_id.nil?
1484
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.simulate_live_application_payment_method_status"
1485
+ end
1486
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1487
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_payment_method_status, the character length must be smaller than or equal to 25.'
1488
+ end
1489
+
1490
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1491
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_payment_method_status, the character length must be great than or equal to 25.'
1492
+ end
1493
+
1494
+ # verify the required parameter 'payment_method' is set
1495
+ if @api_client.config.client_side_validation && payment_method.nil?
1496
+ fail ArgumentError, "Missing the required parameter 'payment_method' when calling PlatformModelApi.simulate_live_application_payment_method_status"
1497
+ end
1498
+ # verify the required parameter 'simulate_live_application_payment_method_status_request' is set
1499
+ if @api_client.config.client_side_validation && simulate_live_application_payment_method_status_request.nil?
1500
+ fail ArgumentError, "Missing the required parameter 'simulate_live_application_payment_method_status_request' when calling PlatformModelApi.simulate_live_application_payment_method_status"
1501
+ end
1502
+ # resource path
1503
+ local_var_path = '/live_application/{merchant_id}/payment_methods/{payment_method}/simulate_status'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'payment_method' + '}', CGI.escape(payment_method.to_s))
1504
+
1505
+ # query parameters
1506
+ query_params = opts[:query_params] || {}
1507
+
1508
+ # header parameters
1509
+ header_params = opts[:header_params] || {}
1510
+ # HTTP header 'Accept' (if needed)
1511
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1512
+ # HTTP header 'Content-Type'
1513
+ content_type = @api_client.select_header_content_type(['application/json'])
1514
+ if !content_type.nil?
1515
+ header_params['Content-Type'] = content_type
1516
+ end
1517
+
1518
+ # form parameters
1519
+ form_params = opts[:form_params] || {}
1520
+
1521
+ # http body (model)
1522
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(simulate_live_application_payment_method_status_request)
1523
+
1524
+ # return_type
1525
+ return_type = opts[:debug_return_type] || 'PaymentMethodStatus'
1526
+
1527
+ # auth_names
1528
+ auth_names = opts[:debug_auth_names] || ['api_key']
1529
+
1530
+ new_options = opts.merge(
1531
+ :operation => :"PlatformModelApi.simulate_live_application_payment_method_status",
1532
+ :header_params => header_params,
1533
+ :query_params => query_params,
1534
+ :form_params => form_params,
1535
+ :body => post_body,
1536
+ :auth_names => auth_names,
1537
+ :return_type => return_type
1538
+ )
1539
+
1540
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1541
+ if @api_client.config.debugging
1542
+ @api_client.config.logger.debug "API called: PlatformModelApi#simulate_live_application_payment_method_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1543
+ end
1544
+ return data, status_code, headers
1545
+ end
1546
+
1547
+ # Live Application: Simulate Status
1548
+ # Simulate status change on applications for test merchants. In order for status to be changed to \"accepted,\" at least one payment method must be approved.
1549
+ # @param merchant_id [String]
1550
+ # @param simulate_live_application_payment_method_status_request [SimulateLiveApplicationPaymentMethodStatusRequest]
1551
+ # @param [Hash] opts the optional parameters
1552
+ # @return [MerchantSubmissionStatus]
1553
+ def simulate_live_application_status(merchant_id, simulate_live_application_payment_method_status_request, opts = {})
1554
+ data, _status_code, _headers = simulate_live_application_status_with_http_info(merchant_id, simulate_live_application_payment_method_status_request, opts)
1555
+ data
1556
+ end
1557
+
1558
+ # Live Application: Simulate Status
1559
+ # Simulate status change on applications for test merchants. In order for status to be changed to \&quot;accepted,\&quot; at least one payment method must be approved.
1560
+ # @param merchant_id [String]
1561
+ # @param simulate_live_application_payment_method_status_request [SimulateLiveApplicationPaymentMethodStatusRequest]
1562
+ # @param [Hash] opts the optional parameters
1563
+ # @return [Array<(MerchantSubmissionStatus, Integer, Hash)>] MerchantSubmissionStatus data, response status code and response headers
1564
+ def simulate_live_application_status_with_http_info(merchant_id, simulate_live_application_payment_method_status_request, opts = {})
1565
+ if @api_client.config.debugging
1566
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.simulate_live_application_status ...'
1567
+ end
1568
+ # verify the required parameter 'merchant_id' is set
1569
+ if @api_client.config.client_side_validation && merchant_id.nil?
1570
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.simulate_live_application_status"
1571
+ end
1572
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1573
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_status, the character length must be smaller than or equal to 25.'
1574
+ end
1575
+
1576
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1577
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.simulate_live_application_status, the character length must be great than or equal to 25.'
1578
+ end
1579
+
1580
+ # verify the required parameter 'simulate_live_application_payment_method_status_request' is set
1581
+ if @api_client.config.client_side_validation && simulate_live_application_payment_method_status_request.nil?
1582
+ fail ArgumentError, "Missing the required parameter 'simulate_live_application_payment_method_status_request' when calling PlatformModelApi.simulate_live_application_status"
1583
+ end
1584
+ # resource path
1585
+ local_var_path = '/live_application/{merchant_id}/simulate_status'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
1586
+
1587
+ # query parameters
1588
+ query_params = opts[:query_params] || {}
1589
+
1590
+ # header parameters
1591
+ header_params = opts[:header_params] || {}
1592
+ # HTTP header 'Accept' (if needed)
1593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1594
+ # HTTP header 'Content-Type'
1595
+ content_type = @api_client.select_header_content_type(['application/json'])
1596
+ if !content_type.nil?
1597
+ header_params['Content-Type'] = content_type
1598
+ end
1599
+
1600
+ # form parameters
1601
+ form_params = opts[:form_params] || {}
1602
+
1603
+ # http body (model)
1604
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(simulate_live_application_payment_method_status_request)
1605
+
1606
+ # return_type
1607
+ return_type = opts[:debug_return_type] || 'MerchantSubmissionStatus'
1608
+
1609
+ # auth_names
1610
+ auth_names = opts[:debug_auth_names] || ['api_key']
1611
+
1612
+ new_options = opts.merge(
1613
+ :operation => :"PlatformModelApi.simulate_live_application_status",
1614
+ :header_params => header_params,
1615
+ :query_params => query_params,
1616
+ :form_params => form_params,
1617
+ :body => post_body,
1618
+ :auth_names => auth_names,
1619
+ :return_type => return_type
1620
+ )
1621
+
1622
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1623
+ if @api_client.config.debugging
1624
+ @api_client.config.logger.debug "API called: PlatformModelApi#simulate_live_application_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1625
+ end
1626
+ return data, status_code, headers
1627
+ end
1628
+
1629
+ # Settlement: CSV
1630
+ # View a settlement in CSV format given an `id`.
1631
+ # @param merchant_id [String]
1632
+ # @param id [String]
1633
+ # @param [Hash] opts the optional parameters
1634
+ # @return [nil]
1635
+ def submerchant_settlement_csv(merchant_id, id, opts = {})
1636
+ submerchant_settlement_csv_with_http_info(merchant_id, id, opts)
1637
+ nil
1638
+ end
1639
+
1640
+ # Settlement: CSV
1641
+ # View a settlement in CSV format given an &#x60;id&#x60;.
1642
+ # @param merchant_id [String]
1643
+ # @param id [String]
1644
+ # @param [Hash] opts the optional parameters
1645
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1646
+ def submerchant_settlement_csv_with_http_info(merchant_id, id, opts = {})
1647
+ if @api_client.config.debugging
1648
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.submerchant_settlement_csv ...'
1649
+ end
1650
+ # verify the required parameter 'merchant_id' is set
1651
+ if @api_client.config.client_side_validation && merchant_id.nil?
1652
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.submerchant_settlement_csv"
1653
+ end
1654
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1655
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_csv, the character length must be smaller than or equal to 25.'
1656
+ end
1657
+
1658
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1659
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_csv, the character length must be great than or equal to 25.'
1660
+ end
1661
+
1662
+ # verify the required parameter 'id' is set
1663
+ if @api_client.config.client_side_validation && id.nil?
1664
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.submerchant_settlement_csv"
1665
+ end
1666
+ # resource path
1667
+ local_var_path = '/merchants/{merchant_id}/settlements/{id}/csv'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1668
+
1669
+ # query parameters
1670
+ query_params = opts[:query_params] || {}
1671
+
1672
+ # header parameters
1673
+ header_params = opts[:header_params] || {}
1674
+
1675
+ # form parameters
1676
+ form_params = opts[:form_params] || {}
1677
+
1678
+ # http body (model)
1679
+ post_body = opts[:debug_body]
1680
+
1681
+ # return_type
1682
+ return_type = opts[:debug_return_type]
1683
+
1684
+ # auth_names
1685
+ auth_names = opts[:debug_auth_names] || ['api_key']
1686
+
1687
+ new_options = opts.merge(
1688
+ :operation => :"PlatformModelApi.submerchant_settlement_csv",
1689
+ :header_params => header_params,
1690
+ :query_params => query_params,
1691
+ :form_params => form_params,
1692
+ :body => post_body,
1693
+ :auth_names => auth_names,
1694
+ :return_type => return_type
1695
+ )
1696
+
1697
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1698
+ if @api_client.config.debugging
1699
+ @api_client.config.logger.debug "API called: PlatformModelApi#submerchant_settlement_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1700
+ end
1701
+ return data, status_code, headers
1702
+ end
1703
+
1704
+ # Settlement: PDF
1705
+ # View a settlement in PDF format given an `id`.
1706
+ # @param merchant_id [String]
1707
+ # @param id [String]
1708
+ # @param [Hash] opts the optional parameters
1709
+ # @return [nil]
1710
+ def submerchant_settlement_pdf(merchant_id, id, opts = {})
1711
+ submerchant_settlement_pdf_with_http_info(merchant_id, id, opts)
1712
+ nil
1713
+ end
1714
+
1715
+ # Settlement: PDF
1716
+ # View a settlement in PDF format given an &#x60;id&#x60;.
1717
+ # @param merchant_id [String]
1718
+ # @param id [String]
1719
+ # @param [Hash] opts the optional parameters
1720
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1721
+ def submerchant_settlement_pdf_with_http_info(merchant_id, id, opts = {})
1722
+ if @api_client.config.debugging
1723
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.submerchant_settlement_pdf ...'
1724
+ end
1725
+ # verify the required parameter 'merchant_id' is set
1726
+ if @api_client.config.client_side_validation && merchant_id.nil?
1727
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.submerchant_settlement_pdf"
1728
+ end
1729
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1730
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_pdf, the character length must be smaller than or equal to 25.'
1731
+ end
1732
+
1733
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1734
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_pdf, the character length must be great than or equal to 25.'
1735
+ end
1736
+
1737
+ # verify the required parameter 'id' is set
1738
+ if @api_client.config.client_side_validation && id.nil?
1739
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.submerchant_settlement_pdf"
1740
+ end
1741
+ # resource path
1742
+ local_var_path = '/merchants/{merchant_id}/settlements/{id}/pdf'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1743
+
1744
+ # query parameters
1745
+ query_params = opts[:query_params] || {}
1746
+
1747
+ # header parameters
1748
+ header_params = opts[:header_params] || {}
1749
+
1750
+ # form parameters
1751
+ form_params = opts[:form_params] || {}
1752
+
1753
+ # http body (model)
1754
+ post_body = opts[:debug_body]
1755
+
1756
+ # return_type
1757
+ return_type = opts[:debug_return_type]
1758
+
1759
+ # auth_names
1760
+ auth_names = opts[:debug_auth_names] || ['api_key']
1761
+
1762
+ new_options = opts.merge(
1763
+ :operation => :"PlatformModelApi.submerchant_settlement_pdf",
1764
+ :header_params => header_params,
1765
+ :query_params => query_params,
1766
+ :form_params => form_params,
1767
+ :body => post_body,
1768
+ :auth_names => auth_names,
1769
+ :return_type => return_type
1770
+ )
1771
+
1772
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1773
+ if @api_client.config.debugging
1774
+ @api_client.config.logger.debug "API called: PlatformModelApi#submerchant_settlement_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1775
+ end
1776
+ return data, status_code, headers
1777
+ end
1778
+
1779
+ # Settlement: XLS
1780
+ # View a settlement in XLS format given an `id`.
1781
+ # @param merchant_id [String]
1782
+ # @param id [String]
1783
+ # @param [Hash] opts the optional parameters
1784
+ # @return [nil]
1785
+ def submerchant_settlement_xls(merchant_id, id, opts = {})
1786
+ submerchant_settlement_xls_with_http_info(merchant_id, id, opts)
1787
+ nil
1788
+ end
1789
+
1790
+ # Settlement: XLS
1791
+ # View a settlement in XLS format given an &#x60;id&#x60;.
1792
+ # @param merchant_id [String]
1793
+ # @param id [String]
1794
+ # @param [Hash] opts the optional parameters
1795
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1796
+ def submerchant_settlement_xls_with_http_info(merchant_id, id, opts = {})
1797
+ if @api_client.config.debugging
1798
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.submerchant_settlement_xls ...'
1799
+ end
1800
+ # verify the required parameter 'merchant_id' is set
1801
+ if @api_client.config.client_side_validation && merchant_id.nil?
1802
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.submerchant_settlement_xls"
1803
+ end
1804
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1805
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_xls, the character length must be smaller than or equal to 25.'
1806
+ end
1807
+
1808
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1809
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.submerchant_settlement_xls, the character length must be great than or equal to 25.'
1810
+ end
1811
+
1812
+ # verify the required parameter 'id' is set
1813
+ if @api_client.config.client_side_validation && id.nil?
1814
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.submerchant_settlement_xls"
1815
+ end
1816
+ # resource path
1817
+ local_var_path = '/merchants/{merchant_id}/settlements/{id}/xls'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
1818
+
1819
+ # query parameters
1820
+ query_params = opts[:query_params] || {}
1821
+
1822
+ # header parameters
1823
+ header_params = opts[:header_params] || {}
1824
+
1825
+ # form parameters
1826
+ form_params = opts[:form_params] || {}
1827
+
1828
+ # http body (model)
1829
+ post_body = opts[:debug_body]
1830
+
1831
+ # return_type
1832
+ return_type = opts[:debug_return_type]
1833
+
1834
+ # auth_names
1835
+ auth_names = opts[:debug_auth_names] || ['api_key']
1836
+
1837
+ new_options = opts.merge(
1838
+ :operation => :"PlatformModelApi.submerchant_settlement_xls",
1839
+ :header_params => header_params,
1840
+ :query_params => query_params,
1841
+ :form_params => form_params,
1842
+ :body => post_body,
1843
+ :auth_names => auth_names,
1844
+ :return_type => return_type
1845
+ )
1846
+
1847
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1848
+ if @api_client.config.debugging
1849
+ @api_client.config.logger.debug "API called: PlatformModelApi#submerchant_settlement_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1850
+ end
1851
+ return data, status_code, headers
1852
+ end
1853
+
1854
+ # Live Application: Update
1855
+ # Updates the live application for the applicant merchant
1856
+ # @param merchant_id [String]
1857
+ # @param live_application_request [LiveApplicationRequest]
1858
+ # @param [Hash] opts the optional parameters
1859
+ # @return [LiveApplication]
1860
+ def update_live_application(merchant_id, live_application_request, opts = {})
1861
+ data, _status_code, _headers = update_live_application_with_http_info(merchant_id, live_application_request, opts)
1862
+ data
1863
+ end
1864
+
1865
+ # Live Application: Update
1866
+ # Updates the live application for the applicant merchant
1867
+ # @param merchant_id [String]
1868
+ # @param live_application_request [LiveApplicationRequest]
1869
+ # @param [Hash] opts the optional parameters
1870
+ # @return [Array<(LiveApplication, Integer, Hash)>] LiveApplication data, response status code and response headers
1871
+ def update_live_application_with_http_info(merchant_id, live_application_request, opts = {})
1872
+ if @api_client.config.debugging
1873
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.update_live_application ...'
1874
+ end
1875
+ # verify the required parameter 'merchant_id' is set
1876
+ if @api_client.config.client_side_validation && merchant_id.nil?
1877
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.update_live_application"
1878
+ end
1879
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1880
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application, the character length must be smaller than or equal to 25.'
1881
+ end
1882
+
1883
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1884
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application, the character length must be great than or equal to 25.'
1885
+ end
1886
+
1887
+ # verify the required parameter 'live_application_request' is set
1888
+ if @api_client.config.client_side_validation && live_application_request.nil?
1889
+ fail ArgumentError, "Missing the required parameter 'live_application_request' when calling PlatformModelApi.update_live_application"
1890
+ end
1891
+ # resource path
1892
+ local_var_path = '/live_application/{merchant_id}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
1893
+
1894
+ # query parameters
1895
+ query_params = opts[:query_params] || {}
1896
+
1897
+ # header parameters
1898
+ header_params = opts[:header_params] || {}
1899
+ # HTTP header 'Accept' (if needed)
1900
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1901
+ # HTTP header 'Content-Type'
1902
+ content_type = @api_client.select_header_content_type(['application/json'])
1903
+ if !content_type.nil?
1904
+ header_params['Content-Type'] = content_type
1905
+ end
1906
+
1907
+ # form parameters
1908
+ form_params = opts[:form_params] || {}
1909
+
1910
+ # http body (model)
1911
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(live_application_request)
1912
+
1913
+ # return_type
1914
+ return_type = opts[:debug_return_type] || 'LiveApplication'
1915
+
1916
+ # auth_names
1917
+ auth_names = opts[:debug_auth_names] || ['api_key']
1918
+
1919
+ new_options = opts.merge(
1920
+ :operation => :"PlatformModelApi.update_live_application",
1921
+ :header_params => header_params,
1922
+ :query_params => query_params,
1923
+ :form_params => form_params,
1924
+ :body => post_body,
1925
+ :auth_names => auth_names,
1926
+ :return_type => return_type
1927
+ )
1928
+
1929
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1930
+ if @api_client.config.debugging
1931
+ @api_client.config.logger.debug "API called: PlatformModelApi#update_live_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1932
+ end
1933
+ return data, status_code, headers
1934
+ end
1935
+
1936
+ # Live Application: Update Payment Method
1937
+ # Update the payment method application of the applicant merchant
1938
+ # @param merchant_id [String]
1939
+ # @param payment_method [String]
1940
+ # @param update_payment_method_request [UpdatePaymentMethodRequest]
1941
+ # @param [Hash] opts the optional parameters
1942
+ # @return [LiveApplication]
1943
+ def update_live_application_payment_method(merchant_id, payment_method, update_payment_method_request, opts = {})
1944
+ data, _status_code, _headers = update_live_application_payment_method_with_http_info(merchant_id, payment_method, update_payment_method_request, opts)
1945
+ data
1946
+ end
1947
+
1948
+ # Live Application: Update Payment Method
1949
+ # Update the payment method application of the applicant merchant
1950
+ # @param merchant_id [String]
1951
+ # @param payment_method [String]
1952
+ # @param update_payment_method_request [UpdatePaymentMethodRequest]
1953
+ # @param [Hash] opts the optional parameters
1954
+ # @return [Array<(LiveApplication, Integer, Hash)>] LiveApplication data, response status code and response headers
1955
+ def update_live_application_payment_method_with_http_info(merchant_id, payment_method, update_payment_method_request, opts = {})
1956
+ if @api_client.config.debugging
1957
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.update_live_application_payment_method ...'
1958
+ end
1959
+ # verify the required parameter 'merchant_id' is set
1960
+ if @api_client.config.client_side_validation && merchant_id.nil?
1961
+ fail ArgumentError, "Missing the required parameter 'merchant_id' when calling PlatformModelApi.update_live_application_payment_method"
1962
+ end
1963
+ if @api_client.config.client_side_validation && merchant_id.to_s.length > 25
1964
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application_payment_method, the character length must be smaller than or equal to 25.'
1965
+ end
1966
+
1967
+ if @api_client.config.client_side_validation && merchant_id.to_s.length < 25
1968
+ fail ArgumentError, 'invalid value for "merchant_id" when calling PlatformModelApi.update_live_application_payment_method, the character length must be great than or equal to 25.'
1969
+ end
1970
+
1971
+ # verify the required parameter 'payment_method' is set
1972
+ if @api_client.config.client_side_validation && payment_method.nil?
1973
+ fail ArgumentError, "Missing the required parameter 'payment_method' when calling PlatformModelApi.update_live_application_payment_method"
1974
+ end
1975
+ # verify the required parameter 'update_payment_method_request' is set
1976
+ if @api_client.config.client_side_validation && update_payment_method_request.nil?
1977
+ fail ArgumentError, "Missing the required parameter 'update_payment_method_request' when calling PlatformModelApi.update_live_application_payment_method"
1978
+ end
1979
+ # resource path
1980
+ local_var_path = '/live_application/{merchant_id}/payment_methods/{payment_method}'.sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s)).sub('{' + 'payment_method' + '}', CGI.escape(payment_method.to_s))
1981
+
1982
+ # query parameters
1983
+ query_params = opts[:query_params] || {}
1984
+
1985
+ # header parameters
1986
+ header_params = opts[:header_params] || {}
1987
+ # HTTP header 'Accept' (if needed)
1988
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1989
+ # HTTP header 'Content-Type'
1990
+ content_type = @api_client.select_header_content_type(['application/json'])
1991
+ if !content_type.nil?
1992
+ header_params['Content-Type'] = content_type
1993
+ end
1994
+
1995
+ # form parameters
1996
+ form_params = opts[:form_params] || {}
1997
+
1998
+ # http body (model)
1999
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_payment_method_request)
2000
+
2001
+ # return_type
2002
+ return_type = opts[:debug_return_type] || 'LiveApplication'
2003
+
2004
+ # auth_names
2005
+ auth_names = opts[:debug_auth_names] || ['api_key']
2006
+
2007
+ new_options = opts.merge(
2008
+ :operation => :"PlatformModelApi.update_live_application_payment_method",
2009
+ :header_params => header_params,
2010
+ :query_params => query_params,
2011
+ :form_params => form_params,
2012
+ :body => post_body,
2013
+ :auth_names => auth_names,
2014
+ :return_type => return_type
2015
+ )
2016
+
2017
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2018
+ if @api_client.config.debugging
2019
+ @api_client.config.logger.debug "API called: PlatformModelApi#update_live_application_payment_method\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2020
+ end
2021
+ return data, status_code, headers
2022
+ end
2023
+
2024
+ # Merchant: Update
2025
+ # Updates a sub-merchant's settings, including payment and payout toggles, email notification preferences, and payment method expiry settings.
2026
+ # @param id [String]
2027
+ # @param update_merchant_request [UpdateMerchantRequest]
2028
+ # @param [Hash] opts the optional parameters
2029
+ # @return [SerializedSubmerchant]
2030
+ def update_merchant(id, update_merchant_request, opts = {})
2031
+ data, _status_code, _headers = update_merchant_with_http_info(id, update_merchant_request, opts)
2032
+ data
2033
+ end
2034
+
2035
+ # Merchant: Update
2036
+ # Updates a sub-merchant&#39;s settings, including payment and payout toggles, email notification preferences, and payment method expiry settings.
2037
+ # @param id [String]
2038
+ # @param update_merchant_request [UpdateMerchantRequest]
2039
+ # @param [Hash] opts the optional parameters
2040
+ # @return [Array<(SerializedSubmerchant, Integer, Hash)>] SerializedSubmerchant data, response status code and response headers
2041
+ def update_merchant_with_http_info(id, update_merchant_request, opts = {})
2042
+ if @api_client.config.debugging
2043
+ @api_client.config.logger.debug 'Calling API: PlatformModelApi.update_merchant ...'
2044
+ end
2045
+ # verify the required parameter 'id' is set
2046
+ if @api_client.config.client_side_validation && id.nil?
2047
+ fail ArgumentError, "Missing the required parameter 'id' when calling PlatformModelApi.update_merchant"
2048
+ end
2049
+ if @api_client.config.client_side_validation && id.to_s.length > 25
2050
+ fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.update_merchant, the character length must be smaller than or equal to 25.'
2051
+ end
2052
+
2053
+ if @api_client.config.client_side_validation && id.to_s.length < 25
2054
+ fail ArgumentError, 'invalid value for "id" when calling PlatformModelApi.update_merchant, the character length must be great than or equal to 25.'
2055
+ end
2056
+
2057
+ # verify the required parameter 'update_merchant_request' is set
2058
+ if @api_client.config.client_side_validation && update_merchant_request.nil?
2059
+ fail ArgumentError, "Missing the required parameter 'update_merchant_request' when calling PlatformModelApi.update_merchant"
2060
+ end
2061
+ # resource path
2062
+ local_var_path = '/merchants/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2063
+
2064
+ # query parameters
2065
+ query_params = opts[:query_params] || {}
2066
+
2067
+ # header parameters
2068
+ header_params = opts[:header_params] || {}
2069
+ # HTTP header 'Accept' (if needed)
2070
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2071
+ # HTTP header 'Content-Type'
2072
+ content_type = @api_client.select_header_content_type(['application/json'])
2073
+ if !content_type.nil?
2074
+ header_params['Content-Type'] = content_type
2075
+ end
2076
+
2077
+ # form parameters
2078
+ form_params = opts[:form_params] || {}
2079
+
2080
+ # http body (model)
2081
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_merchant_request)
2082
+
2083
+ # return_type
2084
+ return_type = opts[:debug_return_type] || 'SerializedSubmerchant'
2085
+
2086
+ # auth_names
2087
+ auth_names = opts[:debug_auth_names] || ['api_key']
2088
+
2089
+ new_options = opts.merge(
2090
+ :operation => :"PlatformModelApi.update_merchant",
2091
+ :header_params => header_params,
2092
+ :query_params => query_params,
2093
+ :form_params => form_params,
2094
+ :body => post_body,
2095
+ :auth_names => auth_names,
2096
+ :return_type => return_type
2097
+ )
2098
+
2099
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2100
+ if @api_client.config.debugging
2101
+ @api_client.config.logger.debug "API called: PlatformModelApi#update_merchant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2102
+ end
2103
+ return data, status_code, headers
2104
+ end
2105
+ end
2106
+ end