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