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.
- 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,289 @@
|
|
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
|
+
module MelioPlatformApiClient
|
14
|
+
class Configuration
|
15
|
+
# Defines url scheme
|
16
|
+
attr_accessor :scheme
|
17
|
+
|
18
|
+
# Defines url host
|
19
|
+
attr_accessor :host
|
20
|
+
|
21
|
+
# Defines url base path
|
22
|
+
attr_accessor :base_path
|
23
|
+
|
24
|
+
# Define server configuration index
|
25
|
+
attr_accessor :server_index
|
26
|
+
|
27
|
+
# Define server operation configuration index
|
28
|
+
attr_accessor :server_operation_index
|
29
|
+
|
30
|
+
# Default server variables
|
31
|
+
attr_accessor :server_variables
|
32
|
+
|
33
|
+
# Default server operation variables
|
34
|
+
attr_accessor :server_operation_variables
|
35
|
+
|
36
|
+
# Defines API keys used with API Key authentications.
|
37
|
+
#
|
38
|
+
# @return [Hash] key: parameter name, value: parameter value (API key)
|
39
|
+
#
|
40
|
+
# @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
|
41
|
+
# config.api_key['api_key'] = 'xxx'
|
42
|
+
attr_accessor :api_key
|
43
|
+
|
44
|
+
# Defines API key prefixes used with API Key authentications.
|
45
|
+
#
|
46
|
+
# @return [Hash] key: parameter name, value: API key prefix
|
47
|
+
#
|
48
|
+
# @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
|
49
|
+
# config.api_key_prefix['api_key'] = 'Token'
|
50
|
+
attr_accessor :api_key_prefix
|
51
|
+
|
52
|
+
# Defines the username used with HTTP basic authentication.
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
attr_accessor :username
|
56
|
+
|
57
|
+
# Defines the password used with HTTP basic authentication.
|
58
|
+
#
|
59
|
+
# @return [String]
|
60
|
+
attr_accessor :password
|
61
|
+
|
62
|
+
# Defines the access token (Bearer) used with OAuth2.
|
63
|
+
attr_accessor :access_token
|
64
|
+
|
65
|
+
# Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
|
66
|
+
# details will be logged with `logger.debug` (see the `logger` attribute).
|
67
|
+
# Default to false.
|
68
|
+
#
|
69
|
+
# @return [true, false]
|
70
|
+
attr_accessor :debugging
|
71
|
+
|
72
|
+
# Defines the logger used for debugging.
|
73
|
+
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
74
|
+
#
|
75
|
+
# @return [#debug]
|
76
|
+
attr_accessor :logger
|
77
|
+
|
78
|
+
# Defines the temporary folder to store downloaded files
|
79
|
+
# (for API endpoints that have file response).
|
80
|
+
# Default to use `Tempfile`.
|
81
|
+
#
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :temp_folder_path
|
84
|
+
|
85
|
+
# The time limit for HTTP request in seconds.
|
86
|
+
# Default to 0 (never times out).
|
87
|
+
attr_accessor :timeout
|
88
|
+
|
89
|
+
# Set this to false to skip client side validation in the operation.
|
90
|
+
# Default to true.
|
91
|
+
# @return [true, false]
|
92
|
+
attr_accessor :client_side_validation
|
93
|
+
|
94
|
+
### TLS/SSL setting
|
95
|
+
# Set this to false to skip verifying SSL certificate when calling API from https server.
|
96
|
+
# Default to true.
|
97
|
+
#
|
98
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
99
|
+
#
|
100
|
+
# @return [true, false]
|
101
|
+
attr_accessor :verify_ssl
|
102
|
+
|
103
|
+
### TLS/SSL setting
|
104
|
+
# Set this to false to skip verifying SSL host name
|
105
|
+
# Default to true.
|
106
|
+
#
|
107
|
+
# @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
|
108
|
+
#
|
109
|
+
# @return [true, false]
|
110
|
+
attr_accessor :verify_ssl_host
|
111
|
+
|
112
|
+
### TLS/SSL setting
|
113
|
+
# Set this to customize the certificate file to verify the peer.
|
114
|
+
#
|
115
|
+
# @return [String] the path to the certificate file
|
116
|
+
#
|
117
|
+
# @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
|
118
|
+
# https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
|
119
|
+
attr_accessor :ssl_ca_cert
|
120
|
+
|
121
|
+
### TLS/SSL setting
|
122
|
+
# Client certificate file (for client certificate)
|
123
|
+
attr_accessor :cert_file
|
124
|
+
|
125
|
+
### TLS/SSL setting
|
126
|
+
# Client private key file (for client certificate)
|
127
|
+
attr_accessor :key_file
|
128
|
+
|
129
|
+
# Set this to customize parameters encoding of array parameter with multi collectionFormat.
|
130
|
+
# Default to nil.
|
131
|
+
#
|
132
|
+
# @see The params_encoding option of Ethon. Related source code:
|
133
|
+
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
134
|
+
attr_accessor :params_encoding
|
135
|
+
|
136
|
+
attr_accessor :inject_format
|
137
|
+
|
138
|
+
attr_accessor :force_ending_format
|
139
|
+
|
140
|
+
def initialize
|
141
|
+
@scheme = 'https'
|
142
|
+
@host = 'api.melio.com'
|
143
|
+
@base_path = '/v1'
|
144
|
+
@server_index = nil
|
145
|
+
@server_operation_index = {}
|
146
|
+
@server_variables = {}
|
147
|
+
@server_operation_variables = {}
|
148
|
+
@api_key = {}
|
149
|
+
@api_key_prefix = {}
|
150
|
+
@client_side_validation = true
|
151
|
+
@verify_ssl = true
|
152
|
+
@verify_ssl_host = true
|
153
|
+
@params_encoding = nil
|
154
|
+
@cert_file = nil
|
155
|
+
@key_file = nil
|
156
|
+
@timeout = 0
|
157
|
+
@debugging = false
|
158
|
+
@inject_format = false
|
159
|
+
@force_ending_format = false
|
160
|
+
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
161
|
+
|
162
|
+
yield(self) if block_given?
|
163
|
+
end
|
164
|
+
|
165
|
+
# The default Configuration object.
|
166
|
+
def self.default
|
167
|
+
@@default ||= Configuration.new
|
168
|
+
end
|
169
|
+
|
170
|
+
def configure
|
171
|
+
yield(self) if block_given?
|
172
|
+
end
|
173
|
+
|
174
|
+
def scheme=(scheme)
|
175
|
+
# remove :// from scheme
|
176
|
+
@scheme = scheme.sub(/:\/\//, '')
|
177
|
+
end
|
178
|
+
|
179
|
+
def host=(host)
|
180
|
+
# remove http(s):// and anything after a slash
|
181
|
+
@host = host.sub(/https?:\/\//, '').split('/').first
|
182
|
+
end
|
183
|
+
|
184
|
+
def base_path=(base_path)
|
185
|
+
# Add leading and trailing slashes to base_path
|
186
|
+
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
187
|
+
@base_path = '' if @base_path == '/'
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns base URL for specified operation based on server settings
|
191
|
+
def base_url(operation = nil)
|
192
|
+
index = server_operation_index.fetch(operation, server_index)
|
193
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
194
|
+
|
195
|
+
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
196
|
+
end
|
197
|
+
|
198
|
+
# Gets API key (with prefix if set).
|
199
|
+
# @param [String] param_name the parameter name of API key auth
|
200
|
+
def api_key_with_prefix(param_name, param_alias = nil)
|
201
|
+
key = @api_key[param_name]
|
202
|
+
key = @api_key.fetch(param_alias, key) unless param_alias.nil?
|
203
|
+
if @api_key_prefix[param_name]
|
204
|
+
"#{@api_key_prefix[param_name]} #{key}"
|
205
|
+
else
|
206
|
+
key
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
# Gets Basic Auth token string
|
211
|
+
def basic_auth_token
|
212
|
+
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns Auth Settings hash for api client.
|
216
|
+
def auth_settings
|
217
|
+
{
|
218
|
+
'AccessToken' =>
|
219
|
+
{
|
220
|
+
type: 'bearer',
|
221
|
+
in: 'header',
|
222
|
+
key: 'Authorization',
|
223
|
+
value: "Bearer #{access_token}"
|
224
|
+
},
|
225
|
+
'ApiKey' =>
|
226
|
+
{
|
227
|
+
type: 'api_key',
|
228
|
+
in: 'header',
|
229
|
+
key: 'API-Key',
|
230
|
+
value: api_key_with_prefix('ApiKey')
|
231
|
+
},
|
232
|
+
}
|
233
|
+
end
|
234
|
+
|
235
|
+
# Returns an array of Server setting
|
236
|
+
def server_settings
|
237
|
+
[
|
238
|
+
{
|
239
|
+
url: "https://api.melio.com/v1",
|
240
|
+
description: "Production Environment",
|
241
|
+
},
|
242
|
+
{
|
243
|
+
url: "https://api-sandbox.melio.com/v1",
|
244
|
+
description: "Sandbox environment",
|
245
|
+
}
|
246
|
+
]
|
247
|
+
end
|
248
|
+
|
249
|
+
def operation_server_settings
|
250
|
+
{
|
251
|
+
}
|
252
|
+
end
|
253
|
+
|
254
|
+
# Returns URL based on server settings
|
255
|
+
#
|
256
|
+
# @param index array index of the server settings
|
257
|
+
# @param variables hash of variable and the corresponding value
|
258
|
+
def server_url(index, variables = {}, servers = nil)
|
259
|
+
servers = server_settings if servers == nil
|
260
|
+
|
261
|
+
# check array index out of bound
|
262
|
+
if (index < 0 || index >= servers.size)
|
263
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
264
|
+
end
|
265
|
+
|
266
|
+
server = servers[index]
|
267
|
+
url = server[:url]
|
268
|
+
|
269
|
+
return url unless server.key? :variables
|
270
|
+
|
271
|
+
# go through variable and assign a value
|
272
|
+
server[:variables].each do |name, variable|
|
273
|
+
if variables.key?(name)
|
274
|
+
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
275
|
+
url.gsub! "{" + name.to_s + "}", variables[name]
|
276
|
+
else
|
277
|
+
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
278
|
+
end
|
279
|
+
else
|
280
|
+
# use default value
|
281
|
+
url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
url
|
286
|
+
end
|
287
|
+
|
288
|
+
end
|
289
|
+
end
|
@@ -0,0 +1,324 @@
|
|
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 business entity associated with a Partner.
|
18
|
+
class Account
|
19
|
+
# Identifier of the entity.
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :history
|
23
|
+
|
24
|
+
attr_accessor :company
|
25
|
+
|
26
|
+
attr_accessor :user
|
27
|
+
|
28
|
+
# Holds the eligibility of the account to make payments
|
29
|
+
attr_accessor :status
|
30
|
+
|
31
|
+
class EnumAttributeValidator
|
32
|
+
attr_reader :datatype
|
33
|
+
attr_reader :allowable_values
|
34
|
+
|
35
|
+
def initialize(datatype, allowable_values)
|
36
|
+
@allowable_values = allowable_values.map do |value|
|
37
|
+
case datatype.to_s
|
38
|
+
when /Integer/i
|
39
|
+
value.to_i
|
40
|
+
when /Float/i
|
41
|
+
value.to_f
|
42
|
+
else
|
43
|
+
value
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
def valid?(value)
|
49
|
+
!value || allowable_values.include?(value)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
54
|
+
def self.attribute_map
|
55
|
+
{
|
56
|
+
:'id' => :'id',
|
57
|
+
:'history' => :'history',
|
58
|
+
:'company' => :'company',
|
59
|
+
:'user' => :'user',
|
60
|
+
:'status' => :'status'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Returns all the JSON keys this model knows about
|
65
|
+
def self.acceptable_attributes
|
66
|
+
attribute_map.values
|
67
|
+
end
|
68
|
+
|
69
|
+
# Attribute type mapping.
|
70
|
+
def self.openapi_types
|
71
|
+
{
|
72
|
+
:'id' => :'String',
|
73
|
+
:'history' => :'ShortHistory',
|
74
|
+
:'company' => :'Company',
|
75
|
+
:'user' => :'Person',
|
76
|
+
:'status' => :'String'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# List of attributes with nullable: true
|
81
|
+
def self.openapi_nullable
|
82
|
+
Set.new([
|
83
|
+
])
|
84
|
+
end
|
85
|
+
|
86
|
+
# List of class defined in allOf (OpenAPI v3)
|
87
|
+
def self.openapi_all_of
|
88
|
+
[
|
89
|
+
:'AccountAllOf',
|
90
|
+
:'Object'
|
91
|
+
]
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
if (!attributes.is_a?(Hash))
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MelioPlatformApiClient::Account` initialize method"
|
99
|
+
end
|
100
|
+
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
103
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
104
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MelioPlatformApiClient::Account`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
105
|
+
end
|
106
|
+
h[k.to_sym] = v
|
107
|
+
}
|
108
|
+
|
109
|
+
if attributes.key?(:'id')
|
110
|
+
self.id = attributes[:'id']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'history')
|
114
|
+
self.history = attributes[:'history']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'company')
|
118
|
+
self.company = attributes[:'company']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'user')
|
122
|
+
self.user = attributes[:'user']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'status')
|
126
|
+
self.status = attributes[:'status']
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
131
|
+
# @return Array for valid properties with the reasons
|
132
|
+
def list_invalid_properties
|
133
|
+
invalid_properties = Array.new
|
134
|
+
if @id.nil?
|
135
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
136
|
+
end
|
137
|
+
|
138
|
+
if @history.nil?
|
139
|
+
invalid_properties.push('invalid value for "history", history cannot be nil.')
|
140
|
+
end
|
141
|
+
|
142
|
+
if @company.nil?
|
143
|
+
invalid_properties.push('invalid value for "company", company cannot be nil.')
|
144
|
+
end
|
145
|
+
|
146
|
+
if @user.nil?
|
147
|
+
invalid_properties.push('invalid value for "user", user cannot be nil.')
|
148
|
+
end
|
149
|
+
|
150
|
+
if @status.nil?
|
151
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
152
|
+
end
|
153
|
+
|
154
|
+
invalid_properties
|
155
|
+
end
|
156
|
+
|
157
|
+
# Check to see if the all the properties in the model are valid
|
158
|
+
# @return true if the model is valid
|
159
|
+
def valid?
|
160
|
+
return false if @id.nil?
|
161
|
+
return false if @history.nil?
|
162
|
+
return false if @company.nil?
|
163
|
+
return false if @user.nil?
|
164
|
+
return false if @status.nil?
|
165
|
+
status_validator = EnumAttributeValidator.new('String', ["pending", "approved", "declined", "suspended"])
|
166
|
+
return false unless status_validator.valid?(@status)
|
167
|
+
true
|
168
|
+
end
|
169
|
+
|
170
|
+
# Custom attribute writer method checking allowed values (enum).
|
171
|
+
# @param [Object] status Object to be assigned
|
172
|
+
def status=(status)
|
173
|
+
validator = EnumAttributeValidator.new('String', ["pending", "approved", "declined", "suspended"])
|
174
|
+
unless validator.valid?(status)
|
175
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
176
|
+
end
|
177
|
+
@status = status
|
178
|
+
end
|
179
|
+
|
180
|
+
# Checks equality by comparing each attribute.
|
181
|
+
# @param [Object] Object to be compared
|
182
|
+
def ==(o)
|
183
|
+
return true if self.equal?(o)
|
184
|
+
self.class == o.class &&
|
185
|
+
id == o.id &&
|
186
|
+
history == o.history &&
|
187
|
+
company == o.company &&
|
188
|
+
user == o.user &&
|
189
|
+
status == o.status
|
190
|
+
end
|
191
|
+
|
192
|
+
# @see the `==` method
|
193
|
+
# @param [Object] Object to be compared
|
194
|
+
def eql?(o)
|
195
|
+
self == o
|
196
|
+
end
|
197
|
+
|
198
|
+
# Calculates hash code according to all attributes.
|
199
|
+
# @return [Integer] Hash code
|
200
|
+
def hash
|
201
|
+
[id, history, company, user, status].hash
|
202
|
+
end
|
203
|
+
|
204
|
+
# Builds the object from hash
|
205
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
206
|
+
# @return [Object] Returns the model itself
|
207
|
+
def self.build_from_hash(attributes)
|
208
|
+
new.build_from_hash(attributes)
|
209
|
+
end
|
210
|
+
|
211
|
+
# Builds the object from hash
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
+
# @return [Object] Returns the model itself
|
214
|
+
def build_from_hash(attributes)
|
215
|
+
return nil unless attributes.is_a?(Hash)
|
216
|
+
self.class.openapi_types.each_pair do |key, type|
|
217
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
218
|
+
self.send("#{key}=", nil)
|
219
|
+
elsif type =~ /\AArray<(.*)>/i
|
220
|
+
# check to ensure the input is an array given that the attribute
|
221
|
+
# is documented as an array but the input is not
|
222
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
223
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
224
|
+
end
|
225
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
226
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
self
|
231
|
+
end
|
232
|
+
|
233
|
+
# Deserializes the data based on type
|
234
|
+
# @param string type Data type
|
235
|
+
# @param string value Value to be deserialized
|
236
|
+
# @return [Object] Deserialized data
|
237
|
+
def _deserialize(type, value)
|
238
|
+
case type.to_sym
|
239
|
+
when :Time
|
240
|
+
Time.parse(value)
|
241
|
+
when :Date
|
242
|
+
Date.parse(value)
|
243
|
+
when :String
|
244
|
+
value.to_s
|
245
|
+
when :Integer
|
246
|
+
value.to_i
|
247
|
+
when :Float
|
248
|
+
value.to_f
|
249
|
+
when :Boolean
|
250
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
251
|
+
true
|
252
|
+
else
|
253
|
+
false
|
254
|
+
end
|
255
|
+
when :Object
|
256
|
+
# generic object (usually a Hash), return directly
|
257
|
+
value
|
258
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
259
|
+
inner_type = Regexp.last_match[:inner_type]
|
260
|
+
value.map { |v| _deserialize(inner_type, v) }
|
261
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
262
|
+
k_type = Regexp.last_match[:k_type]
|
263
|
+
v_type = Regexp.last_match[:v_type]
|
264
|
+
{}.tap do |hash|
|
265
|
+
value.each do |k, v|
|
266
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
267
|
+
end
|
268
|
+
end
|
269
|
+
else # model
|
270
|
+
# models (e.g. Pet) or oneOf
|
271
|
+
klass = MelioPlatformApiClient.const_get(type)
|
272
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
# Returns the string representation of the object
|
277
|
+
# @return [String] String presentation of the object
|
278
|
+
def to_s
|
279
|
+
to_hash.to_s
|
280
|
+
end
|
281
|
+
|
282
|
+
# to_body is an alias to to_hash (backward compatibility)
|
283
|
+
# @return [Hash] Returns the object in the form of hash
|
284
|
+
def to_body
|
285
|
+
to_hash
|
286
|
+
end
|
287
|
+
|
288
|
+
# Returns the object in the form of hash
|
289
|
+
# @return [Hash] Returns the object in the form of hash
|
290
|
+
def to_hash
|
291
|
+
hash = {}
|
292
|
+
self.class.attribute_map.each_pair do |attr, param|
|
293
|
+
value = self.send(attr)
|
294
|
+
if value.nil?
|
295
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
296
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
297
|
+
end
|
298
|
+
|
299
|
+
hash[param] = _to_hash(value)
|
300
|
+
end
|
301
|
+
hash
|
302
|
+
end
|
303
|
+
|
304
|
+
# Outputs non-array value in the form of hash
|
305
|
+
# For object, use to_hash. Otherwise, just return the value
|
306
|
+
# @param [Object] value Any valid value
|
307
|
+
# @return [Hash] Returns the value in the form of hash
|
308
|
+
def _to_hash(value)
|
309
|
+
if value.is_a?(Array)
|
310
|
+
value.compact.map { |v| _to_hash(v) }
|
311
|
+
elsif value.is_a?(Hash)
|
312
|
+
{}.tap do |hash|
|
313
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
314
|
+
end
|
315
|
+
elsif value.respond_to? :to_hash
|
316
|
+
value.to_hash
|
317
|
+
else
|
318
|
+
value
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
end
|
323
|
+
|
324
|
+
end
|