melio-platform-api-client 3.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of melio-platform-api-client might be problematic. Click here for more details.

Files changed (515) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +132 -0
  4. data/Rakefile +10 -0
  5. data/docs/Account.md +26 -0
  6. data/docs/AccountAllOf.md +22 -0
  7. data/docs/AccountsApi.md +224 -0
  8. data/docs/AddToMyVendorParameters.md +18 -0
  9. data/docs/AddToMyVendorParametersDeliveryMethod.md +20 -0
  10. data/docs/AddToMyVendorParametersDeliveryMethodBillerAccount.md +18 -0
  11. data/docs/Address.md +26 -0
  12. data/docs/Adjustment.md +20 -0
  13. data/docs/AuthApi.md +83 -0
  14. data/docs/BankAccount.md +22 -0
  15. data/docs/BankAccountType.md +15 -0
  16. data/docs/BillerAccount.md +18 -0
  17. data/docs/Card.md +24 -0
  18. data/docs/Charge.md +32 -0
  19. data/docs/ChargeAllOf.md +28 -0
  20. data/docs/ChargesApi.md +317 -0
  21. data/docs/Checkout.md +66 -0
  22. data/docs/CheckoutAllOf.md +62 -0
  23. data/docs/CheckoutAllOfBuyer.md +26 -0
  24. data/docs/CheckoutsApi.md +327 -0
  25. data/docs/Company.md +28 -0
  26. data/docs/ConfirmPaymentIntentsResponse.md +18 -0
  27. data/docs/Currency.md +15 -0
  28. data/docs/DeletedResponse.md +18 -0
  29. data/docs/DeliveryMethod.md +24 -0
  30. data/docs/DeliveryMethodAllOf.md +20 -0
  31. data/docs/DeliveryMethodDetails.md +55 -0
  32. data/docs/DeliveryMethodType.md +15 -0
  33. data/docs/DeliveryMethodsApi.md +485 -0
  34. data/docs/DeliveryPreference.md +28 -0
  35. data/docs/DeliveryPreferenceType.md +15 -0
  36. data/docs/DomesticWireAccount.md +22 -0
  37. data/docs/DomesticWireAccountAddress.md +22 -0
  38. data/docs/ErrorResponse.md +18 -0
  39. data/docs/FileInfo.md +22 -0
  40. data/docs/FileInfoAllOf.md +18 -0
  41. data/docs/FilesApi.md +317 -0
  42. data/docs/Financing.md +24 -0
  43. data/docs/FinancingApi.md +246 -0
  44. data/docs/FinancingDropdownOptions.md +20 -0
  45. data/docs/FinancingFields.md +28 -0
  46. data/docs/FundingSource.md +26 -0
  47. data/docs/FundingSourceAllOf.md +22 -0
  48. data/docs/FundingSourceDetails.md +49 -0
  49. data/docs/FundingSourceType.md +15 -0
  50. data/docs/FundingSourcesApi.md +325 -0
  51. data/docs/GetAccountsAccountIdResponse.md +18 -0
  52. data/docs/GetAccountsResponse.md +18 -0
  53. data/docs/GetChargesChargeIdResponse.md +18 -0
  54. data/docs/GetChargesResponse.md +18 -0
  55. data/docs/GetCheckoutsCheckoutIdResponse.md +18 -0
  56. data/docs/GetDeliveryMethodsDeliveryMethodIdResponse.md +18 -0
  57. data/docs/GetDeliveryMethodsResponse.md +18 -0
  58. data/docs/GetFilesFileIdDataResponse.md +18 -0
  59. data/docs/GetFilesFileIdDataResponseData.md +26 -0
  60. data/docs/GetFilesFileIdDataResponseDataCustomerInfo.md +18 -0
  61. data/docs/GetFilesFileIdDataResponseDataInvoiceInfo.md +20 -0
  62. data/docs/GetFilesFileIdDataResponseDataVendorInfo.md +20 -0
  63. data/docs/GetFilesFileIdResponse.md +18 -0
  64. data/docs/GetFilesResponse.md +18 -0
  65. data/docs/GetFinancingResponse.md +18 -0
  66. data/docs/GetFundingSourcesFundingSourceIdResponse.md +18 -0
  67. data/docs/GetFundingSourcesResponse.md +18 -0
  68. data/docs/GetPaymentIntentsPaymentIntentIdResponse.md +18 -0
  69. data/docs/GetPaymentIntentsResponse.md +18 -0
  70. data/docs/GetPaymentsPaymentIdResponse.md +18 -0
  71. data/docs/GetPaymentsResponse.md +18 -0
  72. data/docs/GetVendorDirectoryResponse.md +18 -0
  73. data/docs/GetVendorsResponse.md +18 -0
  74. data/docs/GetVendorsVendorIdDeliveryMethodsResponse.md +18 -0
  75. data/docs/GetVendorsVendorIdResponse.md +18 -0
  76. data/docs/GetWebhooksCheckoutsResponse.md +18 -0
  77. data/docs/GetWebhooksPaymentsResponse.md +18 -0
  78. data/docs/GetWebhooksResponse.md +18 -0
  79. data/docs/Invoice.md +20 -0
  80. data/docs/LineItem.md +30 -0
  81. data/docs/Merchant.md +38 -0
  82. data/docs/MerchantAllOf.md +34 -0
  83. data/docs/MerchantsApi.md +85 -0
  84. data/docs/ModelError.md +22 -0
  85. data/docs/ModelErrorAllOf.md +20 -0
  86. data/docs/Object.md +20 -0
  87. data/docs/PaperCheck.md +20 -0
  88. data/docs/PartialAddress.md +26 -0
  89. data/docs/PatchChargesChargeIdRequest.md +18 -0
  90. data/docs/PatchChargesChargeIdResponse.md +18 -0
  91. data/docs/PatchPaymentIntentsPaymentIntentIdRequest.md +30 -0
  92. data/docs/PatchPaymentIntentsPaymentIntentIdRequestBillInfo.md +26 -0
  93. data/docs/PatchPaymentIntentsPaymentIntentIdResponse.md +18 -0
  94. data/docs/PatchVendorsVendorIdRequest.md +20 -0
  95. data/docs/PatchVendorsVendorIdRequestContact.md +22 -0
  96. data/docs/PatchVendorsVendorIdResponse.md +18 -0
  97. data/docs/Payment.md +48 -0
  98. data/docs/PaymentAllOf.md +44 -0
  99. data/docs/PaymentFee.md +20 -0
  100. data/docs/PaymentIntent.md +46 -0
  101. data/docs/PaymentIntentAllOf.md +42 -0
  102. data/docs/PaymentIntentAllOfBillInfo.md +30 -0
  103. data/docs/PaymentIntentsApi.md +483 -0
  104. data/docs/PaymentsApi.md +325 -0
  105. data/docs/Person.md +22 -0
  106. data/docs/PlaidDetails.md +20 -0
  107. data/docs/PostAccountsRequest.md +22 -0
  108. data/docs/PostAccountsResponse.md +18 -0
  109. data/docs/PostAuthResponse.md +18 -0
  110. data/docs/PostAuthResponseData.md +22 -0
  111. data/docs/PostCheckoutsCheckoutIdCaptureRequest.md +22 -0
  112. data/docs/PostCheckoutsCheckoutIdCaptureRequestInvoice.md +20 -0
  113. data/docs/PostCheckoutsCheckoutIdCompleteRequest.md +24 -0
  114. data/docs/PostCheckoutsRequest.md +48 -0
  115. data/docs/PostCheckoutsResponse.md +18 -0
  116. data/docs/PostDeliveryMethodsRequest.md +20 -0
  117. data/docs/PostDeliveryMethodsRequestDetails.md +53 -0
  118. data/docs/PostDeliveryMethodsResponse.md +18 -0
  119. data/docs/PostFilesResponse.md +18 -0
  120. data/docs/PostFinancingRequest.md +18 -0
  121. data/docs/PostFinancingRequestFields.md +20 -0
  122. data/docs/PostFinancingResponse.md +18 -0
  123. data/docs/PostFinancingTransactionalRequest.md +20 -0
  124. data/docs/PostFinancingTransactionalResponse.md +18 -0
  125. data/docs/PostFinancingTransactionalResponseData.md +20 -0
  126. data/docs/PostFundingSourcesRequest.md +22 -0
  127. data/docs/PostFundingSourcesRequestDetails.md +51 -0
  128. data/docs/PostFundingSourcesResponse.md +18 -0
  129. data/docs/PostMerchantsRequest.md +32 -0
  130. data/docs/PostMerchantsResponse.md +18 -0
  131. data/docs/PostPaymentIntentsBulkRequest.md +18 -0
  132. data/docs/PostPaymentIntentsBulkResponse.md +18 -0
  133. data/docs/PostPaymentIntentsPaymentIntentIdPaymentResponse.md +18 -0
  134. data/docs/PostPaymentIntentsRequest.md +30 -0
  135. data/docs/PostPaymentIntentsRequestBillInfo.md +26 -0
  136. data/docs/PostPaymentIntentsResponse.md +18 -0
  137. data/docs/PostPaymentsPaymentIdRecoverRequest.md +26 -0
  138. data/docs/PostPaymentsPaymentIdRecoverResponse.md +18 -0
  139. data/docs/PostVendorsBulkRequest.md +18 -0
  140. data/docs/PostVendorsBulkResponse.md +18 -0
  141. data/docs/PostVendorsFromVendorDirectoryRequest.md +20 -0
  142. data/docs/PostVendorsFromVendorDirectoryRequestDeliveryMethod.md +20 -0
  143. data/docs/PostVendorsFromVendorDirectoryResponse.md +18 -0
  144. data/docs/PostVendorsRequest.md +20 -0
  145. data/docs/PostVendorsResponse.md +18 -0
  146. data/docs/PostVendorsVendorIdDeliveryMethodsResponse.md +18 -0
  147. data/docs/PostWebhooksCheckoutsRequest.md +18 -0
  148. data/docs/PostWebhooksCheckoutsResponse.md +18 -0
  149. data/docs/PostWebhooksPaymentsRequest.md +18 -0
  150. data/docs/PostWebhooksPaymentsResponse.md +18 -0
  151. data/docs/PutPaymentIntentsRequest.md +36 -0
  152. data/docs/PutPaymentIntentsResponse.md +18 -0
  153. data/docs/RecoverPaymentRequest.md +36 -0
  154. data/docs/RecoverPaymentResponse.md +18 -0
  155. data/docs/ShortHistory.md +22 -0
  156. data/docs/TabaPayDetails.md +30 -0
  157. data/docs/TabaPayDetailsCardOwner.md +20 -0
  158. data/docs/TaxInfo.md +20 -0
  159. data/docs/Vendor.md +26 -0
  160. data/docs/VendorAllOf.md +22 -0
  161. data/docs/VendorAllOfContact.md +22 -0
  162. data/docs/VendorDirectory.md +26 -0
  163. data/docs/VendorDirectoryApi.md +169 -0
  164. data/docs/VendorDirectoryContact.md +24 -0
  165. data/docs/VendorDirectoryDeliveryMethod.md +18 -0
  166. data/docs/VendorDirectoryNotFoundResponse.md +18 -0
  167. data/docs/VendorsApi.md +806 -0
  168. data/docs/VirtualAccount.md +22 -0
  169. data/docs/Webhook.md +20 -0
  170. data/docs/WebhooksApi.md +510 -0
  171. data/docs/WithUnknownData.md +18 -0
  172. data/lib/melio-platform-api-client/api/accounts_api.rb +213 -0
  173. data/lib/melio-platform-api-client/api/auth_api.rb +89 -0
  174. data/lib/melio-platform-api-client/api/charges_api.rb +307 -0
  175. data/lib/melio-platform-api-client/api/checkouts_api.rb +328 -0
  176. data/lib/melio-platform-api-client/api/delivery_methods_api.rb +439 -0
  177. data/lib/melio-platform-api-client/api/files_api.rb +284 -0
  178. data/lib/melio-platform-api-client/api/financing_api.rb +230 -0
  179. data/lib/melio-platform-api-client/api/funding_sources_api.rb +295 -0
  180. data/lib/melio-platform-api-client/api/merchants_api.rb +96 -0
  181. data/lib/melio-platform-api-client/api/payment_intents_api.rb +443 -0
  182. data/lib/melio-platform-api-client/api/payments_api.rb +294 -0
  183. data/lib/melio-platform-api-client/api/vendor_directory_api.rb +170 -0
  184. data/lib/melio-platform-api-client/api/vendors_api.rb +738 -0
  185. data/lib/melio-platform-api-client/api/webhooks_api.rb +463 -0
  186. data/lib/melio-platform-api-client/api_client.rb +419 -0
  187. data/lib/melio-platform-api-client/api_error.rb +57 -0
  188. data/lib/melio-platform-api-client/configuration.rb +289 -0
  189. data/lib/melio-platform-api-client/models/account.rb +324 -0
  190. data/lib/melio-platform-api-client/models/account_all_of.rb +286 -0
  191. data/lib/melio-platform-api-client/models/add_to_my_vendor_parameters.rb +218 -0
  192. data/lib/melio-platform-api-client/models/add_to_my_vendor_parameters_delivery_method.rb +232 -0
  193. data/lib/melio-platform-api-client/models/add_to_my_vendor_parameters_delivery_method_biller_account.rb +224 -0
  194. data/lib/melio-platform-api-client/models/address.rb +277 -0
  195. data/lib/melio-platform-api-client/models/adjustment.rb +239 -0
  196. data/lib/melio-platform-api-client/models/bank_account.rb +254 -0
  197. data/lib/melio-platform-api-client/models/bank_account_type.rb +37 -0
  198. data/lib/melio-platform-api-client/models/biller_account.rb +223 -0
  199. data/lib/melio-platform-api-client/models/card.rb +339 -0
  200. data/lib/melio-platform-api-client/models/charge.rb +368 -0
  201. data/lib/melio-platform-api-client/models/charge_all_of.rb +330 -0
  202. data/lib/melio-platform-api-client/models/checkout.rb +588 -0
  203. data/lib/melio-platform-api-client/models/checkout_all_of.rb +550 -0
  204. data/lib/melio-platform-api-client/models/checkout_all_of_buyer.rb +265 -0
  205. data/lib/melio-platform-api-client/models/company.rb +295 -0
  206. data/lib/melio-platform-api-client/models/confirm_payment_intents_response.rb +223 -0
  207. data/lib/melio-platform-api-client/models/currency.rb +36 -0
  208. data/lib/melio-platform-api-client/models/deleted_response.rb +224 -0
  209. data/lib/melio-platform-api-client/models/delivery_method.rb +275 -0
  210. data/lib/melio-platform-api-client/models/delivery_method_all_of.rb +237 -0
  211. data/lib/melio-platform-api-client/models/delivery_method_details.rb +108 -0
  212. data/lib/melio-platform-api-client/models/delivery_method_type.rb +40 -0
  213. data/lib/melio-platform-api-client/models/delivery_preference.rb +283 -0
  214. data/lib/melio-platform-api-client/models/delivery_preference_type.rb +42 -0
  215. data/lib/melio-platform-api-client/models/domestic_wire_account.rb +252 -0
  216. data/lib/melio-platform-api-client/models/domestic_wire_account_address.rb +253 -0
  217. data/lib/melio-platform-api-client/models/error_response.rb +224 -0
  218. data/lib/melio-platform-api-client/models/file_info.rb +261 -0
  219. data/lib/melio-platform-api-client/models/file_info_all_of.rb +223 -0
  220. data/lib/melio-platform-api-client/models/financing.rb +293 -0
  221. data/lib/melio-platform-api-client/models/financing_dropdown_options.rb +227 -0
  222. data/lib/melio-platform-api-client/models/financing_fields.rb +265 -0
  223. data/lib/melio-platform-api-client/models/funding_source.rb +280 -0
  224. data/lib/melio-platform-api-client/models/funding_source_all_of.rb +242 -0
  225. data/lib/melio-platform-api-client/models/funding_source_details.rb +105 -0
  226. data/lib/melio-platform-api-client/models/funding_source_type.rb +37 -0
  227. data/lib/melio-platform-api-client/models/get_accounts_account_id_response.rb +223 -0
  228. data/lib/melio-platform-api-client/models/get_accounts_response.rb +225 -0
  229. data/lib/melio-platform-api-client/models/get_charges_charge_id_response.rb +223 -0
  230. data/lib/melio-platform-api-client/models/get_charges_response.rb +225 -0
  231. data/lib/melio-platform-api-client/models/get_checkouts_checkout_id_response.rb +223 -0
  232. data/lib/melio-platform-api-client/models/get_delivery_methods_delivery_method_id_response.rb +223 -0
  233. data/lib/melio-platform-api-client/models/get_delivery_methods_response.rb +225 -0
  234. data/lib/melio-platform-api-client/models/get_files_file_id_data_response.rb +218 -0
  235. data/lib/melio-platform-api-client/models/get_files_file_id_data_response_data.rb +254 -0
  236. data/lib/melio-platform-api-client/models/get_files_file_id_data_response_data_customer_info.rb +218 -0
  237. data/lib/melio-platform-api-client/models/get_files_file_id_data_response_data_invoice_info.rb +227 -0
  238. data/lib/melio-platform-api-client/models/get_files_file_id_data_response_data_vendor_info.rb +227 -0
  239. data/lib/melio-platform-api-client/models/get_files_file_id_response.rb +223 -0
  240. data/lib/melio-platform-api-client/models/get_files_response.rb +225 -0
  241. data/lib/melio-platform-api-client/models/get_financing_response.rb +223 -0
  242. data/lib/melio-platform-api-client/models/get_funding_sources_funding_source_id_response.rb +223 -0
  243. data/lib/melio-platform-api-client/models/get_funding_sources_response.rb +225 -0
  244. data/lib/melio-platform-api-client/models/get_payment_intents_payment_intent_id_response.rb +223 -0
  245. data/lib/melio-platform-api-client/models/get_payment_intents_response.rb +225 -0
  246. data/lib/melio-platform-api-client/models/get_payments_payment_id_response.rb +223 -0
  247. data/lib/melio-platform-api-client/models/get_payments_response.rb +225 -0
  248. data/lib/melio-platform-api-client/models/get_vendor_directory_response.rb +225 -0
  249. data/lib/melio-platform-api-client/models/get_vendors_response.rb +225 -0
  250. data/lib/melio-platform-api-client/models/get_vendors_vendor_id_delivery_methods_response.rb +225 -0
  251. data/lib/melio-platform-api-client/models/get_vendors_vendor_id_response.rb +223 -0
  252. data/lib/melio-platform-api-client/models/get_webhooks_checkouts_response.rb +223 -0
  253. data/lib/melio-platform-api-client/models/get_webhooks_payments_response.rb +223 -0
  254. data/lib/melio-platform-api-client/models/get_webhooks_response.rb +225 -0
  255. data/lib/melio-platform-api-client/models/invoice.rb +234 -0
  256. data/lib/melio-platform-api-client/models/line_item.rb +316 -0
  257. data/lib/melio-platform-api-client/models/merchant.rb +335 -0
  258. data/lib/melio-platform-api-client/models/merchant_all_of.rb +297 -0
  259. data/lib/melio-platform-api-client/models/model_error.rb +256 -0
  260. data/lib/melio-platform-api-client/models/model_error_all_of.rb +237 -0
  261. data/lib/melio-platform-api-client/models/object.rb +238 -0
  262. data/lib/melio-platform-api-client/models/paper_check.rb +239 -0
  263. data/lib/melio-platform-api-client/models/partial_address.rb +258 -0
  264. data/lib/melio-platform-api-client/models/patch_charges_charge_id_request.rb +218 -0
  265. data/lib/melio-platform-api-client/models/patch_charges_charge_id_response.rb +223 -0
  266. data/lib/melio-platform-api-client/models/patch_payment_intents_payment_intent_id_request.rb +275 -0
  267. data/lib/melio-platform-api-client/models/patch_payment_intents_payment_intent_id_request_bill_info.rb +257 -0
  268. data/lib/melio-platform-api-client/models/patch_payment_intents_payment_intent_id_response.rb +223 -0
  269. data/lib/melio-platform-api-client/models/patch_vendors_vendor_id_request.rb +227 -0
  270. data/lib/melio-platform-api-client/models/patch_vendors_vendor_id_request_contact.rb +237 -0
  271. data/lib/melio-platform-api-client/models/patch_vendors_vendor_id_response.rb +223 -0
  272. data/lib/melio-platform-api-client/models/payment.rb +469 -0
  273. data/lib/melio-platform-api-client/models/payment_all_of.rb +431 -0
  274. data/lib/melio-platform-api-client/models/payment_fee.rb +237 -0
  275. data/lib/melio-platform-api-client/models/payment_intent.rb +450 -0
  276. data/lib/melio-platform-api-client/models/payment_intent_all_of.rb +412 -0
  277. data/lib/melio-platform-api-client/models/payment_intent_all_of_bill_info.rb +301 -0
  278. data/lib/melio-platform-api-client/models/person.rb +252 -0
  279. data/lib/melio-platform-api-client/models/plaid_details.rb +239 -0
  280. data/lib/melio-platform-api-client/models/post_accounts_request.rb +248 -0
  281. data/lib/melio-platform-api-client/models/post_accounts_response.rb +223 -0
  282. data/lib/melio-platform-api-client/models/post_auth_response.rb +223 -0
  283. data/lib/melio-platform-api-client/models/post_auth_response_data.rb +251 -0
  284. data/lib/melio-platform-api-client/models/post_checkouts_checkout_id_capture_request.rb +271 -0
  285. data/lib/melio-platform-api-client/models/post_checkouts_checkout_id_capture_request_invoice.rb +234 -0
  286. data/lib/melio-platform-api-client/models/post_checkouts_checkout_id_complete_request.rb +253 -0
  287. data/lib/melio-platform-api-client/models/post_checkouts_request.rb +438 -0
  288. data/lib/melio-platform-api-client/models/post_checkouts_response.rb +223 -0
  289. data/lib/melio-platform-api-client/models/post_delivery_methods_request.rb +237 -0
  290. data/lib/melio-platform-api-client/models/post_delivery_methods_request_details.rb +107 -0
  291. data/lib/melio-platform-api-client/models/post_delivery_methods_response.rb +223 -0
  292. data/lib/melio-platform-api-client/models/post_files_response.rb +223 -0
  293. data/lib/melio-platform-api-client/models/post_financing_request.rb +220 -0
  294. data/lib/melio-platform-api-client/models/post_financing_request_fields.rb +237 -0
  295. data/lib/melio-platform-api-client/models/post_financing_response.rb +223 -0
  296. data/lib/melio-platform-api-client/models/post_financing_transactional_request.rb +239 -0
  297. data/lib/melio-platform-api-client/models/post_financing_transactional_response.rb +224 -0
  298. data/lib/melio-platform-api-client/models/post_financing_transactional_response_data.rb +271 -0
  299. data/lib/melio-platform-api-client/models/post_funding_sources_request.rb +280 -0
  300. data/lib/melio-platform-api-client/models/post_funding_sources_request_details.rb +106 -0
  301. data/lib/melio-platform-api-client/models/post_funding_sources_response.rb +223 -0
  302. data/lib/melio-platform-api-client/models/post_merchants_request.rb +283 -0
  303. data/lib/melio-platform-api-client/models/post_merchants_response.rb +223 -0
  304. data/lib/melio-platform-api-client/models/post_payment_intents_bulk_request.rb +225 -0
  305. data/lib/melio-platform-api-client/models/post_payment_intents_bulk_response.rb +225 -0
  306. data/lib/melio-platform-api-client/models/post_payment_intents_payment_intent_id_payment_response.rb +223 -0
  307. data/lib/melio-platform-api-client/models/post_payment_intents_request.rb +285 -0
  308. data/lib/melio-platform-api-client/models/post_payment_intents_request_bill_info.rb +277 -0
  309. data/lib/melio-platform-api-client/models/post_payment_intents_response.rb +223 -0
  310. data/lib/melio-platform-api-client/models/post_payments_payment_id_recover_request.rb +276 -0
  311. data/lib/melio-platform-api-client/models/post_payments_payment_id_recover_response.rb +223 -0
  312. data/lib/melio-platform-api-client/models/post_vendors_bulk_request.rb +225 -0
  313. data/lib/melio-platform-api-client/models/post_vendors_bulk_response.rb +225 -0
  314. data/lib/melio-platform-api-client/models/post_vendors_from_vendor_directory_request.rb +232 -0
  315. data/lib/melio-platform-api-client/models/post_vendors_from_vendor_directory_request_delivery_method.rb +233 -0
  316. data/lib/melio-platform-api-client/models/post_vendors_from_vendor_directory_response.rb +223 -0
  317. data/lib/melio-platform-api-client/models/post_vendors_request.rb +238 -0
  318. data/lib/melio-platform-api-client/models/post_vendors_response.rb +223 -0
  319. data/lib/melio-platform-api-client/models/post_vendors_vendor_id_delivery_methods_response.rb +223 -0
  320. data/lib/melio-platform-api-client/models/post_webhooks_checkouts_request.rb +223 -0
  321. data/lib/melio-platform-api-client/models/post_webhooks_checkouts_response.rb +223 -0
  322. data/lib/melio-platform-api-client/models/post_webhooks_payments_request.rb +223 -0
  323. data/lib/melio-platform-api-client/models/post_webhooks_payments_response.rb +223 -0
  324. data/lib/melio-platform-api-client/models/put_payment_intents_request.rb +305 -0
  325. data/lib/melio-platform-api-client/models/put_payment_intents_response.rb +223 -0
  326. data/lib/melio-platform-api-client/models/recover_payment_request.rb +304 -0
  327. data/lib/melio-platform-api-client/models/recover_payment_response.rb +223 -0
  328. data/lib/melio-platform-api-client/models/short_history.rb +247 -0
  329. data/lib/melio-platform-api-client/models/taba_pay_details.rb +380 -0
  330. data/lib/melio-platform-api-client/models/taba_pay_details_card_owner.rb +237 -0
  331. data/lib/melio-platform-api-client/models/tax_info.rb +273 -0
  332. data/lib/melio-platform-api-client/models/vendor.rb +292 -0
  333. data/lib/melio-platform-api-client/models/vendor_all_of.rb +254 -0
  334. data/lib/melio-platform-api-client/models/vendor_all_of_contact.rb +254 -0
  335. data/lib/melio-platform-api-client/models/vendor_directory.rb +283 -0
  336. data/lib/melio-platform-api-client/models/vendor_directory_contact.rb +261 -0
  337. data/lib/melio-platform-api-client/models/vendor_directory_delivery_method.rb +223 -0
  338. data/lib/melio-platform-api-client/models/vendor_directory_not_found_response.rb +219 -0
  339. data/lib/melio-platform-api-client/models/virtual_account.rb +243 -0
  340. data/lib/melio-platform-api-client/models/webhook.rb +227 -0
  341. data/lib/melio-platform-api-client/models/with_unknown_data.rb +219 -0
  342. data/lib/melio-platform-api-client/version.rb +15 -0
  343. data/lib/melio-platform-api-client.rb +206 -0
  344. data/melio-platform-api-client.gemspec +38 -0
  345. data/spec/api/accounts_api_spec.rb +71 -0
  346. data/spec/api/auth_api_spec.rb +48 -0
  347. data/spec/api/charges_api_spec.rb +90 -0
  348. data/spec/api/checkouts_api_spec.rb +93 -0
  349. data/spec/api/delivery_methods_api_spec.rb +115 -0
  350. data/spec/api/files_api_spec.rb +85 -0
  351. data/spec/api/financing_api_spec.rb +75 -0
  352. data/spec/api/funding_sources_api_spec.rb +88 -0
  353. data/spec/api/merchants_api_spec.rb +49 -0
  354. data/spec/api/payment_intents_api_spec.rb +114 -0
  355. data/spec/api/payments_api_spec.rb +88 -0
  356. data/spec/api/vendor_directory_api_spec.rb +62 -0
  357. data/spec/api/vendors_api_spec.rb +170 -0
  358. data/spec/api/webhooks_api_spec.rb +118 -0
  359. data/spec/api_client_spec.rb +226 -0
  360. data/spec/configuration_spec.rb +42 -0
  361. data/spec/models/account_all_of_spec.rb +50 -0
  362. data/spec/models/account_spec.rb +62 -0
  363. data/spec/models/add_to_my_vendor_parameters_delivery_method_biller_account_spec.rb +34 -0
  364. data/spec/models/add_to_my_vendor_parameters_delivery_method_spec.rb +40 -0
  365. data/spec/models/add_to_my_vendor_parameters_spec.rb +34 -0
  366. data/spec/models/address_spec.rb +58 -0
  367. data/spec/models/adjustment_spec.rb +40 -0
  368. data/spec/models/bank_account_spec.rb +46 -0
  369. data/spec/models/bank_account_type_spec.rb +28 -0
  370. data/spec/models/biller_account_spec.rb +34 -0
  371. data/spec/models/card_spec.rb +52 -0
  372. data/spec/models/charge_all_of_spec.rb +68 -0
  373. data/spec/models/charge_spec.rb +80 -0
  374. data/spec/models/checkout_all_of_buyer_spec.rb +58 -0
  375. data/spec/models/checkout_all_of_spec.rb +170 -0
  376. data/spec/models/checkout_spec.rb +182 -0
  377. data/spec/models/company_spec.rb +64 -0
  378. data/spec/models/confirm_payment_intents_response_spec.rb +34 -0
  379. data/spec/models/currency_spec.rb +28 -0
  380. data/spec/models/deleted_response_spec.rb +34 -0
  381. data/spec/models/delivery_method_all_of_spec.rb +40 -0
  382. data/spec/models/delivery_method_details_spec.rb +31 -0
  383. data/spec/models/delivery_method_spec.rb +52 -0
  384. data/spec/models/delivery_method_type_spec.rb +28 -0
  385. data/spec/models/delivery_preference_spec.rb +64 -0
  386. data/spec/models/delivery_preference_type_spec.rb +28 -0
  387. data/spec/models/domestic_wire_account_address_spec.rb +46 -0
  388. data/spec/models/domestic_wire_account_spec.rb +46 -0
  389. data/spec/models/error_response_spec.rb +34 -0
  390. data/spec/models/file_info_all_of_spec.rb +34 -0
  391. data/spec/models/file_info_spec.rb +46 -0
  392. data/spec/models/financing_dropdown_options_spec.rb +40 -0
  393. data/spec/models/financing_fields_spec.rb +64 -0
  394. data/spec/models/financing_spec.rb +56 -0
  395. data/spec/models/funding_source_all_of_spec.rb +46 -0
  396. data/spec/models/funding_source_details_spec.rb +31 -0
  397. data/spec/models/funding_source_spec.rb +58 -0
  398. data/spec/models/funding_source_type_spec.rb +28 -0
  399. data/spec/models/get_accounts_account_id_response_spec.rb +34 -0
  400. data/spec/models/get_accounts_response_spec.rb +34 -0
  401. data/spec/models/get_charges_charge_id_response_spec.rb +34 -0
  402. data/spec/models/get_charges_response_spec.rb +34 -0
  403. data/spec/models/get_checkouts_checkout_id_response_spec.rb +34 -0
  404. data/spec/models/get_delivery_methods_delivery_method_id_response_spec.rb +34 -0
  405. data/spec/models/get_delivery_methods_response_spec.rb +34 -0
  406. data/spec/models/get_files_file_id_data_response_data_customer_info_spec.rb +34 -0
  407. data/spec/models/get_files_file_id_data_response_data_invoice_info_spec.rb +40 -0
  408. data/spec/models/get_files_file_id_data_response_data_spec.rb +58 -0
  409. data/spec/models/get_files_file_id_data_response_data_vendor_info_spec.rb +40 -0
  410. data/spec/models/get_files_file_id_data_response_spec.rb +34 -0
  411. data/spec/models/get_files_file_id_response_spec.rb +34 -0
  412. data/spec/models/get_files_response_spec.rb +34 -0
  413. data/spec/models/get_financing_response_spec.rb +34 -0
  414. data/spec/models/get_funding_sources_funding_source_id_response_spec.rb +34 -0
  415. data/spec/models/get_funding_sources_response_spec.rb +34 -0
  416. data/spec/models/get_payment_intents_payment_intent_id_response_spec.rb +34 -0
  417. data/spec/models/get_payment_intents_response_spec.rb +34 -0
  418. data/spec/models/get_payments_payment_id_response_spec.rb +34 -0
  419. data/spec/models/get_payments_response_spec.rb +34 -0
  420. data/spec/models/get_vendor_directory_response_spec.rb +34 -0
  421. data/spec/models/get_vendors_response_spec.rb +34 -0
  422. data/spec/models/get_vendors_vendor_id_delivery_methods_response_spec.rb +34 -0
  423. data/spec/models/get_vendors_vendor_id_response_spec.rb +34 -0
  424. data/spec/models/get_webhooks_checkouts_response_spec.rb +34 -0
  425. data/spec/models/get_webhooks_payments_response_spec.rb +34 -0
  426. data/spec/models/get_webhooks_response_spec.rb +34 -0
  427. data/spec/models/invoice_spec.rb +40 -0
  428. data/spec/models/line_item_spec.rb +70 -0
  429. data/spec/models/merchant_all_of_spec.rb +82 -0
  430. data/spec/models/merchant_spec.rb +94 -0
  431. data/spec/models/model_error_all_of_spec.rb +40 -0
  432. data/spec/models/model_error_spec.rb +46 -0
  433. data/spec/models/object_spec.rb +40 -0
  434. data/spec/models/paper_check_spec.rb +40 -0
  435. data/spec/models/partial_address_spec.rb +58 -0
  436. data/spec/models/patch_charges_charge_id_request_spec.rb +34 -0
  437. data/spec/models/patch_charges_charge_id_response_spec.rb +34 -0
  438. data/spec/models/patch_payment_intents_payment_intent_id_request_bill_info_spec.rb +58 -0
  439. data/spec/models/patch_payment_intents_payment_intent_id_request_spec.rb +70 -0
  440. data/spec/models/patch_payment_intents_payment_intent_id_response_spec.rb +34 -0
  441. data/spec/models/patch_vendors_vendor_id_request_contact_spec.rb +46 -0
  442. data/spec/models/patch_vendors_vendor_id_request_spec.rb +40 -0
  443. data/spec/models/patch_vendors_vendor_id_response_spec.rb +34 -0
  444. data/spec/models/payment_all_of_spec.rb +116 -0
  445. data/spec/models/payment_fee_spec.rb +40 -0
  446. data/spec/models/payment_intent_all_of_bill_info_spec.rb +70 -0
  447. data/spec/models/payment_intent_all_of_spec.rb +110 -0
  448. data/spec/models/payment_intent_spec.rb +122 -0
  449. data/spec/models/payment_spec.rb +128 -0
  450. data/spec/models/person_spec.rb +46 -0
  451. data/spec/models/plaid_details_spec.rb +40 -0
  452. data/spec/models/post_accounts_request_spec.rb +46 -0
  453. data/spec/models/post_accounts_response_spec.rb +34 -0
  454. data/spec/models/post_auth_response_data_spec.rb +46 -0
  455. data/spec/models/post_auth_response_spec.rb +34 -0
  456. data/spec/models/post_checkouts_checkout_id_capture_request_invoice_spec.rb +40 -0
  457. data/spec/models/post_checkouts_checkout_id_capture_request_spec.rb +46 -0
  458. data/spec/models/post_checkouts_checkout_id_complete_request_spec.rb +52 -0
  459. data/spec/models/post_checkouts_request_spec.rb +124 -0
  460. data/spec/models/post_checkouts_response_spec.rb +34 -0
  461. data/spec/models/post_delivery_methods_request_details_spec.rb +31 -0
  462. data/spec/models/post_delivery_methods_request_spec.rb +40 -0
  463. data/spec/models/post_delivery_methods_response_spec.rb +34 -0
  464. data/spec/models/post_files_response_spec.rb +34 -0
  465. data/spec/models/post_financing_request_fields_spec.rb +40 -0
  466. data/spec/models/post_financing_request_spec.rb +34 -0
  467. data/spec/models/post_financing_response_spec.rb +34 -0
  468. data/spec/models/post_financing_transactional_request_spec.rb +40 -0
  469. data/spec/models/post_financing_transactional_response_data_spec.rb +44 -0
  470. data/spec/models/post_financing_transactional_response_spec.rb +34 -0
  471. data/spec/models/post_funding_sources_request_details_spec.rb +31 -0
  472. data/spec/models/post_funding_sources_request_spec.rb +50 -0
  473. data/spec/models/post_funding_sources_response_spec.rb +34 -0
  474. data/spec/models/post_merchants_request_spec.rb +76 -0
  475. data/spec/models/post_merchants_response_spec.rb +34 -0
  476. data/spec/models/post_payment_intents_bulk_request_spec.rb +34 -0
  477. data/spec/models/post_payment_intents_bulk_response_spec.rb +34 -0
  478. data/spec/models/post_payment_intents_payment_intent_id_payment_response_spec.rb +34 -0
  479. data/spec/models/post_payment_intents_request_bill_info_spec.rb +58 -0
  480. data/spec/models/post_payment_intents_request_spec.rb +70 -0
  481. data/spec/models/post_payment_intents_response_spec.rb +34 -0
  482. data/spec/models/post_payments_payment_id_recover_request_spec.rb +58 -0
  483. data/spec/models/post_payments_payment_id_recover_response_spec.rb +34 -0
  484. data/spec/models/post_vendors_bulk_request_spec.rb +34 -0
  485. data/spec/models/post_vendors_bulk_response_spec.rb +34 -0
  486. data/spec/models/post_vendors_from_vendor_directory_request_delivery_method_spec.rb +40 -0
  487. data/spec/models/post_vendors_from_vendor_directory_request_spec.rb +40 -0
  488. data/spec/models/post_vendors_from_vendor_directory_response_spec.rb +34 -0
  489. data/spec/models/post_vendors_request_spec.rb +40 -0
  490. data/spec/models/post_vendors_response_spec.rb +34 -0
  491. data/spec/models/post_vendors_vendor_id_delivery_methods_response_spec.rb +34 -0
  492. data/spec/models/post_webhooks_checkouts_request_spec.rb +34 -0
  493. data/spec/models/post_webhooks_checkouts_response_spec.rb +34 -0
  494. data/spec/models/post_webhooks_payments_request_spec.rb +34 -0
  495. data/spec/models/post_webhooks_payments_response_spec.rb +34 -0
  496. data/spec/models/put_payment_intents_request_spec.rb +88 -0
  497. data/spec/models/put_payment_intents_response_spec.rb +34 -0
  498. data/spec/models/recover_payment_request_spec.rb +88 -0
  499. data/spec/models/recover_payment_response_spec.rb +34 -0
  500. data/spec/models/short_history_spec.rb +46 -0
  501. data/spec/models/taba_pay_details_card_owner_spec.rb +40 -0
  502. data/spec/models/taba_pay_details_spec.rb +70 -0
  503. data/spec/models/tax_info_spec.rb +44 -0
  504. data/spec/models/vendor_all_of_contact_spec.rb +46 -0
  505. data/spec/models/vendor_all_of_spec.rb +46 -0
  506. data/spec/models/vendor_directory_contact_spec.rb +52 -0
  507. data/spec/models/vendor_directory_delivery_method_spec.rb +34 -0
  508. data/spec/models/vendor_directory_not_found_response_spec.rb +34 -0
  509. data/spec/models/vendor_directory_spec.rb +58 -0
  510. data/spec/models/vendor_spec.rb +58 -0
  511. data/spec/models/virtual_account_spec.rb +46 -0
  512. data/spec/models/webhook_spec.rb +40 -0
  513. data/spec/models/with_unknown_data_spec.rb +34 -0
  514. data/spec/spec_helper.rb +111 -0
  515. metadata +766 -0
@@ -0,0 +1,588 @@
1
+ =begin
2
+ #Platform API
3
+
4
+ #Melio Platform API enables partners to perform partner-related operations in Melio's system, for themselves, and on behalf of their system's users.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: platform@melio.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module MelioPlatformApiClient
17
+ # Represents a checkout session that is performed by the buyer, along with the cart and additional required details.
18
+ class Checkout
19
+ # Identifier of the entity.
20
+ attr_accessor :id
21
+
22
+ attr_accessor :history
23
+
24
+ # Identifier of the entity.
25
+ attr_accessor :merchant_id
26
+
27
+ # Payment terms in integer (net 15/30/60/etc)
28
+ attr_accessor :net_terms
29
+
30
+ # Line items composing the buyer's cart
31
+ attr_accessor :line_items
32
+
33
+ attr_accessor :tax_items
34
+
35
+ attr_accessor :shipping_address
36
+
37
+ attr_accessor :billing_address
38
+
39
+ attr_accessor :currency
40
+
41
+ attr_accessor :tax_total
42
+
43
+ attr_accessor :coupon_items
44
+
45
+ attr_accessor :subtotal
46
+
47
+ attr_accessor :shipping_cost_total
48
+
49
+ attr_accessor :grand_total
50
+
51
+ attr_accessor :store_credit
52
+
53
+ attr_accessor :gift_certificates
54
+
55
+ attr_accessor :outstanding_balance
56
+
57
+ attr_accessor :buyer
58
+
59
+ attr_accessor :company_name
60
+
61
+ attr_accessor :status
62
+
63
+ # Equals `true` if billing contact's details were collected
64
+ attr_accessor :has_contact_details
65
+
66
+ # Equals `true` if payment details were collected
67
+ attr_accessor :has_payment_details
68
+
69
+ attr_accessor :due_date
70
+
71
+ attr_accessor :checkout_url
72
+
73
+ # Identifier of the entity.
74
+ attr_accessor :charge_id
75
+
76
+ class EnumAttributeValidator
77
+ attr_reader :datatype
78
+ attr_reader :allowable_values
79
+
80
+ def initialize(datatype, allowable_values)
81
+ @allowable_values = allowable_values.map do |value|
82
+ case datatype.to_s
83
+ when /Integer/i
84
+ value.to_i
85
+ when /Float/i
86
+ value.to_f
87
+ else
88
+ value
89
+ end
90
+ end
91
+ end
92
+
93
+ def valid?(value)
94
+ !value || allowable_values.include?(value)
95
+ end
96
+ end
97
+
98
+ # Attribute mapping from ruby-style variable name to JSON key.
99
+ def self.attribute_map
100
+ {
101
+ :'id' => :'id',
102
+ :'history' => :'history',
103
+ :'merchant_id' => :'merchantId',
104
+ :'net_terms' => :'netTerms',
105
+ :'line_items' => :'lineItems',
106
+ :'tax_items' => :'taxItems',
107
+ :'shipping_address' => :'shippingAddress',
108
+ :'billing_address' => :'billingAddress',
109
+ :'currency' => :'currency',
110
+ :'tax_total' => :'taxTotal',
111
+ :'coupon_items' => :'couponItems',
112
+ :'subtotal' => :'subtotal',
113
+ :'shipping_cost_total' => :'shippingCostTotal',
114
+ :'grand_total' => :'grandTotal',
115
+ :'store_credit' => :'storeCredit',
116
+ :'gift_certificates' => :'giftCertificates',
117
+ :'outstanding_balance' => :'outstandingBalance',
118
+ :'buyer' => :'buyer',
119
+ :'company_name' => :'companyName',
120
+ :'status' => :'status',
121
+ :'has_contact_details' => :'hasContactDetails',
122
+ :'has_payment_details' => :'hasPaymentDetails',
123
+ :'due_date' => :'dueDate',
124
+ :'checkout_url' => :'checkoutUrl',
125
+ :'charge_id' => :'chargeId'
126
+ }
127
+ end
128
+
129
+ # Returns all the JSON keys this model knows about
130
+ def self.acceptable_attributes
131
+ attribute_map.values
132
+ end
133
+
134
+ # Attribute type mapping.
135
+ def self.openapi_types
136
+ {
137
+ :'id' => :'String',
138
+ :'history' => :'ShortHistory',
139
+ :'merchant_id' => :'String',
140
+ :'net_terms' => :'Integer',
141
+ :'line_items' => :'Array<LineItem>',
142
+ :'tax_items' => :'Array<Adjustment>',
143
+ :'shipping_address' => :'Address',
144
+ :'billing_address' => :'Address',
145
+ :'currency' => :'Currency',
146
+ :'tax_total' => :'Integer',
147
+ :'coupon_items' => :'Array<Adjustment>',
148
+ :'subtotal' => :'Integer',
149
+ :'shipping_cost_total' => :'Integer',
150
+ :'grand_total' => :'Integer',
151
+ :'store_credit' => :'Integer',
152
+ :'gift_certificates' => :'Array<Adjustment>',
153
+ :'outstanding_balance' => :'Integer',
154
+ :'buyer' => :'CheckoutAllOfBuyer',
155
+ :'company_name' => :'String',
156
+ :'status' => :'String',
157
+ :'has_contact_details' => :'Boolean',
158
+ :'has_payment_details' => :'Boolean',
159
+ :'due_date' => :'Date',
160
+ :'checkout_url' => :'String',
161
+ :'charge_id' => :'String'
162
+ }
163
+ end
164
+
165
+ # List of attributes with nullable: true
166
+ def self.openapi_nullable
167
+ Set.new([
168
+ ])
169
+ end
170
+
171
+ # List of class defined in allOf (OpenAPI v3)
172
+ def self.openapi_all_of
173
+ [
174
+ :'CheckoutAllOf',
175
+ :'Object'
176
+ ]
177
+ end
178
+
179
+ # Initializes the object
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ def initialize(attributes = {})
182
+ if (!attributes.is_a?(Hash))
183
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MelioPlatformApiClient::Checkout` initialize method"
184
+ end
185
+
186
+ # check to see if the attribute exists and convert string to symbol for hash key
187
+ attributes = attributes.each_with_object({}) { |(k, v), h|
188
+ if (!self.class.attribute_map.key?(k.to_sym))
189
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MelioPlatformApiClient::Checkout`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
190
+ end
191
+ h[k.to_sym] = v
192
+ }
193
+
194
+ if attributes.key?(:'id')
195
+ self.id = attributes[:'id']
196
+ end
197
+
198
+ if attributes.key?(:'history')
199
+ self.history = attributes[:'history']
200
+ end
201
+
202
+ if attributes.key?(:'merchant_id')
203
+ self.merchant_id = attributes[:'merchant_id']
204
+ end
205
+
206
+ if attributes.key?(:'net_terms')
207
+ self.net_terms = attributes[:'net_terms']
208
+ end
209
+
210
+ if attributes.key?(:'line_items')
211
+ if (value = attributes[:'line_items']).is_a?(Array)
212
+ self.line_items = value
213
+ end
214
+ end
215
+
216
+ if attributes.key?(:'tax_items')
217
+ if (value = attributes[:'tax_items']).is_a?(Array)
218
+ self.tax_items = value
219
+ end
220
+ end
221
+
222
+ if attributes.key?(:'shipping_address')
223
+ self.shipping_address = attributes[:'shipping_address']
224
+ end
225
+
226
+ if attributes.key?(:'billing_address')
227
+ self.billing_address = attributes[:'billing_address']
228
+ end
229
+
230
+ if attributes.key?(:'currency')
231
+ self.currency = attributes[:'currency']
232
+ else
233
+ self.currency = 'USD'
234
+ end
235
+
236
+ if attributes.key?(:'tax_total')
237
+ self.tax_total = attributes[:'tax_total']
238
+ end
239
+
240
+ if attributes.key?(:'coupon_items')
241
+ if (value = attributes[:'coupon_items']).is_a?(Array)
242
+ self.coupon_items = value
243
+ end
244
+ end
245
+
246
+ if attributes.key?(:'subtotal')
247
+ self.subtotal = attributes[:'subtotal']
248
+ end
249
+
250
+ if attributes.key?(:'shipping_cost_total')
251
+ self.shipping_cost_total = attributes[:'shipping_cost_total']
252
+ end
253
+
254
+ if attributes.key?(:'grand_total')
255
+ self.grand_total = attributes[:'grand_total']
256
+ end
257
+
258
+ if attributes.key?(:'store_credit')
259
+ self.store_credit = attributes[:'store_credit']
260
+ end
261
+
262
+ if attributes.key?(:'gift_certificates')
263
+ if (value = attributes[:'gift_certificates']).is_a?(Array)
264
+ self.gift_certificates = value
265
+ end
266
+ end
267
+
268
+ if attributes.key?(:'outstanding_balance')
269
+ self.outstanding_balance = attributes[:'outstanding_balance']
270
+ end
271
+
272
+ if attributes.key?(:'buyer')
273
+ self.buyer = attributes[:'buyer']
274
+ end
275
+
276
+ if attributes.key?(:'company_name')
277
+ self.company_name = attributes[:'company_name']
278
+ end
279
+
280
+ if attributes.key?(:'status')
281
+ self.status = attributes[:'status']
282
+ end
283
+
284
+ if attributes.key?(:'has_contact_details')
285
+ self.has_contact_details = attributes[:'has_contact_details']
286
+ end
287
+
288
+ if attributes.key?(:'has_payment_details')
289
+ self.has_payment_details = attributes[:'has_payment_details']
290
+ end
291
+
292
+ if attributes.key?(:'due_date')
293
+ self.due_date = attributes[:'due_date']
294
+ end
295
+
296
+ if attributes.key?(:'checkout_url')
297
+ self.checkout_url = attributes[:'checkout_url']
298
+ end
299
+
300
+ if attributes.key?(:'charge_id')
301
+ self.charge_id = attributes[:'charge_id']
302
+ end
303
+ end
304
+
305
+ # Show invalid properties with the reasons. Usually used together with valid?
306
+ # @return Array for valid properties with the reasons
307
+ def list_invalid_properties
308
+ invalid_properties = Array.new
309
+ if @id.nil?
310
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
311
+ end
312
+
313
+ if @history.nil?
314
+ invalid_properties.push('invalid value for "history", history cannot be nil.')
315
+ end
316
+
317
+ if @merchant_id.nil?
318
+ invalid_properties.push('invalid value for "merchant_id", merchant_id cannot be nil.')
319
+ end
320
+
321
+ if @net_terms.nil?
322
+ invalid_properties.push('invalid value for "net_terms", net_terms cannot be nil.')
323
+ end
324
+
325
+ if @net_terms < 1
326
+ invalid_properties.push('invalid value for "net_terms", must be greater than or equal to 1.')
327
+ end
328
+
329
+ if @line_items.nil?
330
+ invalid_properties.push('invalid value for "line_items", line_items cannot be nil.')
331
+ end
332
+
333
+ if @shipping_address.nil?
334
+ invalid_properties.push('invalid value for "shipping_address", shipping_address cannot be nil.')
335
+ end
336
+
337
+ if @billing_address.nil?
338
+ invalid_properties.push('invalid value for "billing_address", billing_address cannot be nil.')
339
+ end
340
+
341
+ if @tax_total.nil?
342
+ invalid_properties.push('invalid value for "tax_total", tax_total cannot be nil.')
343
+ end
344
+
345
+ if @subtotal.nil?
346
+ invalid_properties.push('invalid value for "subtotal", subtotal cannot be nil.')
347
+ end
348
+
349
+ if @grand_total.nil?
350
+ invalid_properties.push('invalid value for "grand_total", grand_total cannot be nil.')
351
+ end
352
+
353
+ if @outstanding_balance.nil?
354
+ invalid_properties.push('invalid value for "outstanding_balance", outstanding_balance cannot be nil.')
355
+ end
356
+
357
+ if @company_name.nil?
358
+ invalid_properties.push('invalid value for "company_name", company_name cannot be nil.')
359
+ end
360
+
361
+ if @status.nil?
362
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
363
+ end
364
+
365
+ if @has_contact_details.nil?
366
+ invalid_properties.push('invalid value for "has_contact_details", has_contact_details cannot be nil.')
367
+ end
368
+
369
+ if @has_payment_details.nil?
370
+ invalid_properties.push('invalid value for "has_payment_details", has_payment_details cannot be nil.')
371
+ end
372
+
373
+ invalid_properties
374
+ end
375
+
376
+ # Check to see if the all the properties in the model are valid
377
+ # @return true if the model is valid
378
+ def valid?
379
+ return false if @id.nil?
380
+ return false if @history.nil?
381
+ return false if @merchant_id.nil?
382
+ return false if @net_terms.nil?
383
+ return false if @net_terms < 1
384
+ return false if @line_items.nil?
385
+ return false if @shipping_address.nil?
386
+ return false if @billing_address.nil?
387
+ return false if @tax_total.nil?
388
+ return false if @subtotal.nil?
389
+ return false if @grand_total.nil?
390
+ return false if @outstanding_balance.nil?
391
+ return false if @company_name.nil?
392
+ return false if @status.nil?
393
+ status_validator = EnumAttributeValidator.new('String', ["created", "filled", "captured", "completed", "expired", "unpaid"])
394
+ return false unless status_validator.valid?(@status)
395
+ return false if @has_contact_details.nil?
396
+ return false if @has_payment_details.nil?
397
+ true
398
+ end
399
+
400
+ # Custom attribute writer method with validation
401
+ # @param [Object] net_terms Value to be assigned
402
+ def net_terms=(net_terms)
403
+ if net_terms.nil?
404
+ fail ArgumentError, 'net_terms cannot be nil'
405
+ end
406
+
407
+ if net_terms < 1
408
+ fail ArgumentError, 'invalid value for "net_terms", must be greater than or equal to 1.'
409
+ end
410
+
411
+ @net_terms = net_terms
412
+ end
413
+
414
+ # Custom attribute writer method checking allowed values (enum).
415
+ # @param [Object] status Object to be assigned
416
+ def status=(status)
417
+ validator = EnumAttributeValidator.new('String', ["created", "filled", "captured", "completed", "expired", "unpaid"])
418
+ unless validator.valid?(status)
419
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
420
+ end
421
+ @status = status
422
+ end
423
+
424
+ # Checks equality by comparing each attribute.
425
+ # @param [Object] Object to be compared
426
+ def ==(o)
427
+ return true if self.equal?(o)
428
+ self.class == o.class &&
429
+ id == o.id &&
430
+ history == o.history &&
431
+ merchant_id == o.merchant_id &&
432
+ net_terms == o.net_terms &&
433
+ line_items == o.line_items &&
434
+ tax_items == o.tax_items &&
435
+ shipping_address == o.shipping_address &&
436
+ billing_address == o.billing_address &&
437
+ currency == o.currency &&
438
+ tax_total == o.tax_total &&
439
+ coupon_items == o.coupon_items &&
440
+ subtotal == o.subtotal &&
441
+ shipping_cost_total == o.shipping_cost_total &&
442
+ grand_total == o.grand_total &&
443
+ store_credit == o.store_credit &&
444
+ gift_certificates == o.gift_certificates &&
445
+ outstanding_balance == o.outstanding_balance &&
446
+ buyer == o.buyer &&
447
+ company_name == o.company_name &&
448
+ status == o.status &&
449
+ has_contact_details == o.has_contact_details &&
450
+ has_payment_details == o.has_payment_details &&
451
+ due_date == o.due_date &&
452
+ checkout_url == o.checkout_url &&
453
+ charge_id == o.charge_id
454
+ end
455
+
456
+ # @see the `==` method
457
+ # @param [Object] Object to be compared
458
+ def eql?(o)
459
+ self == o
460
+ end
461
+
462
+ # Calculates hash code according to all attributes.
463
+ # @return [Integer] Hash code
464
+ def hash
465
+ [id, history, merchant_id, net_terms, line_items, tax_items, shipping_address, billing_address, currency, tax_total, coupon_items, subtotal, shipping_cost_total, grand_total, store_credit, gift_certificates, outstanding_balance, buyer, company_name, status, has_contact_details, has_payment_details, due_date, checkout_url, charge_id].hash
466
+ end
467
+
468
+ # Builds the object from hash
469
+ # @param [Hash] attributes Model attributes in the form of hash
470
+ # @return [Object] Returns the model itself
471
+ def self.build_from_hash(attributes)
472
+ new.build_from_hash(attributes)
473
+ end
474
+
475
+ # Builds the object from hash
476
+ # @param [Hash] attributes Model attributes in the form of hash
477
+ # @return [Object] Returns the model itself
478
+ def build_from_hash(attributes)
479
+ return nil unless attributes.is_a?(Hash)
480
+ self.class.openapi_types.each_pair do |key, type|
481
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
482
+ self.send("#{key}=", nil)
483
+ elsif type =~ /\AArray<(.*)>/i
484
+ # check to ensure the input is an array given that the attribute
485
+ # is documented as an array but the input is not
486
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
487
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
488
+ end
489
+ elsif !attributes[self.class.attribute_map[key]].nil?
490
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
491
+ end
492
+ end
493
+
494
+ self
495
+ end
496
+
497
+ # Deserializes the data based on type
498
+ # @param string type Data type
499
+ # @param string value Value to be deserialized
500
+ # @return [Object] Deserialized data
501
+ def _deserialize(type, value)
502
+ case type.to_sym
503
+ when :Time
504
+ Time.parse(value)
505
+ when :Date
506
+ Date.parse(value)
507
+ when :String
508
+ value.to_s
509
+ when :Integer
510
+ value.to_i
511
+ when :Float
512
+ value.to_f
513
+ when :Boolean
514
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
515
+ true
516
+ else
517
+ false
518
+ end
519
+ when :Object
520
+ # generic object (usually a Hash), return directly
521
+ value
522
+ when /\AArray<(?<inner_type>.+)>\z/
523
+ inner_type = Regexp.last_match[:inner_type]
524
+ value.map { |v| _deserialize(inner_type, v) }
525
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
526
+ k_type = Regexp.last_match[:k_type]
527
+ v_type = Regexp.last_match[:v_type]
528
+ {}.tap do |hash|
529
+ value.each do |k, v|
530
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
531
+ end
532
+ end
533
+ else # model
534
+ # models (e.g. Pet) or oneOf
535
+ klass = MelioPlatformApiClient.const_get(type)
536
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
537
+ end
538
+ end
539
+
540
+ # Returns the string representation of the object
541
+ # @return [String] String presentation of the object
542
+ def to_s
543
+ to_hash.to_s
544
+ end
545
+
546
+ # to_body is an alias to to_hash (backward compatibility)
547
+ # @return [Hash] Returns the object in the form of hash
548
+ def to_body
549
+ to_hash
550
+ end
551
+
552
+ # Returns the object in the form of hash
553
+ # @return [Hash] Returns the object in the form of hash
554
+ def to_hash
555
+ hash = {}
556
+ self.class.attribute_map.each_pair do |attr, param|
557
+ value = self.send(attr)
558
+ if value.nil?
559
+ is_nullable = self.class.openapi_nullable.include?(attr)
560
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
561
+ end
562
+
563
+ hash[param] = _to_hash(value)
564
+ end
565
+ hash
566
+ end
567
+
568
+ # Outputs non-array value in the form of hash
569
+ # For object, use to_hash. Otherwise, just return the value
570
+ # @param [Object] value Any valid value
571
+ # @return [Hash] Returns the value in the form of hash
572
+ def _to_hash(value)
573
+ if value.is_a?(Array)
574
+ value.compact.map { |v| _to_hash(v) }
575
+ elsif value.is_a?(Hash)
576
+ {}.tap do |hash|
577
+ value.each { |k, v| hash[k] = _to_hash(v) }
578
+ end
579
+ elsif value.respond_to? :to_hash
580
+ value.to_hash
581
+ else
582
+ value
583
+ end
584
+ end
585
+
586
+ end
587
+
588
+ end