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,335 @@
|
|
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 an Account's configuration as a seller, along with its additional data and options.
|
18
|
+
class Merchant
|
19
|
+
# Identifier of the entity.
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :history
|
23
|
+
|
24
|
+
attr_accessor :address
|
25
|
+
|
26
|
+
# Identifier of the entity.
|
27
|
+
attr_accessor :logo_file_id
|
28
|
+
|
29
|
+
attr_accessor :display_name
|
30
|
+
|
31
|
+
# Holds a phone number - the format is flexible as is determined according to usage. For testing you can use `123123122`.
|
32
|
+
attr_accessor :phone_number
|
33
|
+
|
34
|
+
attr_accessor :email
|
35
|
+
|
36
|
+
attr_accessor :net_terms
|
37
|
+
|
38
|
+
attr_accessor :website_url
|
39
|
+
|
40
|
+
attr_accessor :tos_url
|
41
|
+
|
42
|
+
attr_accessor :mcc_code
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'id' => :'id',
|
48
|
+
:'history' => :'history',
|
49
|
+
:'address' => :'address',
|
50
|
+
:'logo_file_id' => :'logoFileId',
|
51
|
+
:'display_name' => :'displayName',
|
52
|
+
:'phone_number' => :'phoneNumber',
|
53
|
+
:'email' => :'email',
|
54
|
+
:'net_terms' => :'netTerms',
|
55
|
+
:'website_url' => :'websiteUrl',
|
56
|
+
:'tos_url' => :'tosUrl',
|
57
|
+
:'mcc_code' => :'mccCode'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Returns all the JSON keys this model knows about
|
62
|
+
def self.acceptable_attributes
|
63
|
+
attribute_map.values
|
64
|
+
end
|
65
|
+
|
66
|
+
# Attribute type mapping.
|
67
|
+
def self.openapi_types
|
68
|
+
{
|
69
|
+
:'id' => :'String',
|
70
|
+
:'history' => :'ShortHistory',
|
71
|
+
:'address' => :'PartialAddress',
|
72
|
+
:'logo_file_id' => :'String',
|
73
|
+
:'display_name' => :'String',
|
74
|
+
:'phone_number' => :'String',
|
75
|
+
:'email' => :'String',
|
76
|
+
:'net_terms' => :'Integer',
|
77
|
+
:'website_url' => :'String',
|
78
|
+
:'tos_url' => :'String',
|
79
|
+
:'mcc_code' => :'String'
|
80
|
+
}
|
81
|
+
end
|
82
|
+
|
83
|
+
# List of attributes with nullable: true
|
84
|
+
def self.openapi_nullable
|
85
|
+
Set.new([
|
86
|
+
])
|
87
|
+
end
|
88
|
+
|
89
|
+
# List of class defined in allOf (OpenAPI v3)
|
90
|
+
def self.openapi_all_of
|
91
|
+
[
|
92
|
+
:'MerchantAllOf',
|
93
|
+
:'Object'
|
94
|
+
]
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
if (!attributes.is_a?(Hash))
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MelioPlatformApiClient::Merchant` initialize method"
|
102
|
+
end
|
103
|
+
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MelioPlatformApiClient::Merchant`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
|
+
end
|
109
|
+
h[k.to_sym] = v
|
110
|
+
}
|
111
|
+
|
112
|
+
if attributes.key?(:'id')
|
113
|
+
self.id = attributes[:'id']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'history')
|
117
|
+
self.history = attributes[:'history']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'address')
|
121
|
+
self.address = attributes[:'address']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'logo_file_id')
|
125
|
+
self.logo_file_id = attributes[:'logo_file_id']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'display_name')
|
129
|
+
self.display_name = attributes[:'display_name']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'phone_number')
|
133
|
+
self.phone_number = attributes[:'phone_number']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'email')
|
137
|
+
self.email = attributes[:'email']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'net_terms')
|
141
|
+
self.net_terms = attributes[:'net_terms']
|
142
|
+
end
|
143
|
+
|
144
|
+
if attributes.key?(:'website_url')
|
145
|
+
self.website_url = attributes[:'website_url']
|
146
|
+
end
|
147
|
+
|
148
|
+
if attributes.key?(:'tos_url')
|
149
|
+
self.tos_url = attributes[:'tos_url']
|
150
|
+
end
|
151
|
+
|
152
|
+
if attributes.key?(:'mcc_code')
|
153
|
+
self.mcc_code = attributes[:'mcc_code']
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
158
|
+
# @return Array for valid properties with the reasons
|
159
|
+
def list_invalid_properties
|
160
|
+
invalid_properties = Array.new
|
161
|
+
if @id.nil?
|
162
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
163
|
+
end
|
164
|
+
|
165
|
+
if @history.nil?
|
166
|
+
invalid_properties.push('invalid value for "history", history cannot be nil.')
|
167
|
+
end
|
168
|
+
|
169
|
+
if @net_terms.nil?
|
170
|
+
invalid_properties.push('invalid value for "net_terms", net_terms cannot be nil.')
|
171
|
+
end
|
172
|
+
|
173
|
+
invalid_properties
|
174
|
+
end
|
175
|
+
|
176
|
+
# Check to see if the all the properties in the model are valid
|
177
|
+
# @return true if the model is valid
|
178
|
+
def valid?
|
179
|
+
return false if @id.nil?
|
180
|
+
return false if @history.nil?
|
181
|
+
return false if @net_terms.nil?
|
182
|
+
true
|
183
|
+
end
|
184
|
+
|
185
|
+
# Checks equality by comparing each attribute.
|
186
|
+
# @param [Object] Object to be compared
|
187
|
+
def ==(o)
|
188
|
+
return true if self.equal?(o)
|
189
|
+
self.class == o.class &&
|
190
|
+
id == o.id &&
|
191
|
+
history == o.history &&
|
192
|
+
address == o.address &&
|
193
|
+
logo_file_id == o.logo_file_id &&
|
194
|
+
display_name == o.display_name &&
|
195
|
+
phone_number == o.phone_number &&
|
196
|
+
email == o.email &&
|
197
|
+
net_terms == o.net_terms &&
|
198
|
+
website_url == o.website_url &&
|
199
|
+
tos_url == o.tos_url &&
|
200
|
+
mcc_code == o.mcc_code
|
201
|
+
end
|
202
|
+
|
203
|
+
# @see the `==` method
|
204
|
+
# @param [Object] Object to be compared
|
205
|
+
def eql?(o)
|
206
|
+
self == o
|
207
|
+
end
|
208
|
+
|
209
|
+
# Calculates hash code according to all attributes.
|
210
|
+
# @return [Integer] Hash code
|
211
|
+
def hash
|
212
|
+
[id, history, address, logo_file_id, display_name, phone_number, email, net_terms, website_url, tos_url, mcc_code].hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Builds the object from hash
|
216
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
+
# @return [Object] Returns the model itself
|
218
|
+
def self.build_from_hash(attributes)
|
219
|
+
new.build_from_hash(attributes)
|
220
|
+
end
|
221
|
+
|
222
|
+
# Builds the object from hash
|
223
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
224
|
+
# @return [Object] Returns the model itself
|
225
|
+
def build_from_hash(attributes)
|
226
|
+
return nil unless attributes.is_a?(Hash)
|
227
|
+
self.class.openapi_types.each_pair do |key, type|
|
228
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
229
|
+
self.send("#{key}=", nil)
|
230
|
+
elsif type =~ /\AArray<(.*)>/i
|
231
|
+
# check to ensure the input is an array given that the attribute
|
232
|
+
# is documented as an array but the input is not
|
233
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
235
|
+
end
|
236
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
self
|
242
|
+
end
|
243
|
+
|
244
|
+
# Deserializes the data based on type
|
245
|
+
# @param string type Data type
|
246
|
+
# @param string value Value to be deserialized
|
247
|
+
# @return [Object] Deserialized data
|
248
|
+
def _deserialize(type, value)
|
249
|
+
case type.to_sym
|
250
|
+
when :Time
|
251
|
+
Time.parse(value)
|
252
|
+
when :Date
|
253
|
+
Date.parse(value)
|
254
|
+
when :String
|
255
|
+
value.to_s
|
256
|
+
when :Integer
|
257
|
+
value.to_i
|
258
|
+
when :Float
|
259
|
+
value.to_f
|
260
|
+
when :Boolean
|
261
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
262
|
+
true
|
263
|
+
else
|
264
|
+
false
|
265
|
+
end
|
266
|
+
when :Object
|
267
|
+
# generic object (usually a Hash), return directly
|
268
|
+
value
|
269
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
270
|
+
inner_type = Regexp.last_match[:inner_type]
|
271
|
+
value.map { |v| _deserialize(inner_type, v) }
|
272
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
273
|
+
k_type = Regexp.last_match[:k_type]
|
274
|
+
v_type = Regexp.last_match[:v_type]
|
275
|
+
{}.tap do |hash|
|
276
|
+
value.each do |k, v|
|
277
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
278
|
+
end
|
279
|
+
end
|
280
|
+
else # model
|
281
|
+
# models (e.g. Pet) or oneOf
|
282
|
+
klass = MelioPlatformApiClient.const_get(type)
|
283
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
# Returns the string representation of the object
|
288
|
+
# @return [String] String presentation of the object
|
289
|
+
def to_s
|
290
|
+
to_hash.to_s
|
291
|
+
end
|
292
|
+
|
293
|
+
# to_body is an alias to to_hash (backward compatibility)
|
294
|
+
# @return [Hash] Returns the object in the form of hash
|
295
|
+
def to_body
|
296
|
+
to_hash
|
297
|
+
end
|
298
|
+
|
299
|
+
# Returns the object in the form of hash
|
300
|
+
# @return [Hash] Returns the object in the form of hash
|
301
|
+
def to_hash
|
302
|
+
hash = {}
|
303
|
+
self.class.attribute_map.each_pair do |attr, param|
|
304
|
+
value = self.send(attr)
|
305
|
+
if value.nil?
|
306
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
307
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
308
|
+
end
|
309
|
+
|
310
|
+
hash[param] = _to_hash(value)
|
311
|
+
end
|
312
|
+
hash
|
313
|
+
end
|
314
|
+
|
315
|
+
# Outputs non-array value in the form of hash
|
316
|
+
# For object, use to_hash. Otherwise, just return the value
|
317
|
+
# @param [Object] value Any valid value
|
318
|
+
# @return [Hash] Returns the value in the form of hash
|
319
|
+
def _to_hash(value)
|
320
|
+
if value.is_a?(Array)
|
321
|
+
value.compact.map { |v| _to_hash(v) }
|
322
|
+
elsif value.is_a?(Hash)
|
323
|
+
{}.tap do |hash|
|
324
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
325
|
+
end
|
326
|
+
elsif value.respond_to? :to_hash
|
327
|
+
value.to_hash
|
328
|
+
else
|
329
|
+
value
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
end
|
334
|
+
|
335
|
+
end
|
@@ -0,0 +1,297 @@
|
|
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 MerchantAllOf
|
18
|
+
attr_accessor :address
|
19
|
+
|
20
|
+
# Identifier of the entity.
|
21
|
+
attr_accessor :logo_file_id
|
22
|
+
|
23
|
+
attr_accessor :display_name
|
24
|
+
|
25
|
+
# Holds a phone number - the format is flexible as is determined according to usage. For testing you can use `123123122`.
|
26
|
+
attr_accessor :phone_number
|
27
|
+
|
28
|
+
attr_accessor :email
|
29
|
+
|
30
|
+
attr_accessor :net_terms
|
31
|
+
|
32
|
+
attr_accessor :website_url
|
33
|
+
|
34
|
+
attr_accessor :tos_url
|
35
|
+
|
36
|
+
attr_accessor :mcc_code
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'address' => :'address',
|
42
|
+
:'logo_file_id' => :'logoFileId',
|
43
|
+
:'display_name' => :'displayName',
|
44
|
+
:'phone_number' => :'phoneNumber',
|
45
|
+
:'email' => :'email',
|
46
|
+
:'net_terms' => :'netTerms',
|
47
|
+
:'website_url' => :'websiteUrl',
|
48
|
+
:'tos_url' => :'tosUrl',
|
49
|
+
:'mcc_code' => :'mccCode'
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
# Returns all the JSON keys this model knows about
|
54
|
+
def self.acceptable_attributes
|
55
|
+
attribute_map.values
|
56
|
+
end
|
57
|
+
|
58
|
+
# Attribute type mapping.
|
59
|
+
def self.openapi_types
|
60
|
+
{
|
61
|
+
:'address' => :'PartialAddress',
|
62
|
+
:'logo_file_id' => :'String',
|
63
|
+
:'display_name' => :'String',
|
64
|
+
:'phone_number' => :'String',
|
65
|
+
:'email' => :'String',
|
66
|
+
:'net_terms' => :'Integer',
|
67
|
+
:'website_url' => :'String',
|
68
|
+
:'tos_url' => :'String',
|
69
|
+
:'mcc_code' => :'String'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# List of attributes with nullable: true
|
74
|
+
def self.openapi_nullable
|
75
|
+
Set.new([
|
76
|
+
])
|
77
|
+
end
|
78
|
+
|
79
|
+
# Initializes the object
|
80
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
81
|
+
def initialize(attributes = {})
|
82
|
+
if (!attributes.is_a?(Hash))
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MelioPlatformApiClient::MerchantAllOf` initialize method"
|
84
|
+
end
|
85
|
+
|
86
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
88
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MelioPlatformApiClient::MerchantAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
90
|
+
end
|
91
|
+
h[k.to_sym] = v
|
92
|
+
}
|
93
|
+
|
94
|
+
if attributes.key?(:'address')
|
95
|
+
self.address = attributes[:'address']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'logo_file_id')
|
99
|
+
self.logo_file_id = attributes[:'logo_file_id']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'display_name')
|
103
|
+
self.display_name = attributes[:'display_name']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.key?(:'phone_number')
|
107
|
+
self.phone_number = attributes[:'phone_number']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'email')
|
111
|
+
self.email = attributes[:'email']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'net_terms')
|
115
|
+
self.net_terms = attributes[:'net_terms']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'website_url')
|
119
|
+
self.website_url = attributes[:'website_url']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'tos_url')
|
123
|
+
self.tos_url = attributes[:'tos_url']
|
124
|
+
end
|
125
|
+
|
126
|
+
if attributes.key?(:'mcc_code')
|
127
|
+
self.mcc_code = attributes[:'mcc_code']
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
132
|
+
# @return Array for valid properties with the reasons
|
133
|
+
def list_invalid_properties
|
134
|
+
invalid_properties = Array.new
|
135
|
+
if @net_terms.nil?
|
136
|
+
invalid_properties.push('invalid value for "net_terms", net_terms cannot be nil.')
|
137
|
+
end
|
138
|
+
|
139
|
+
invalid_properties
|
140
|
+
end
|
141
|
+
|
142
|
+
# Check to see if the all the properties in the model are valid
|
143
|
+
# @return true if the model is valid
|
144
|
+
def valid?
|
145
|
+
return false if @net_terms.nil?
|
146
|
+
true
|
147
|
+
end
|
148
|
+
|
149
|
+
# Checks equality by comparing each attribute.
|
150
|
+
# @param [Object] Object to be compared
|
151
|
+
def ==(o)
|
152
|
+
return true if self.equal?(o)
|
153
|
+
self.class == o.class &&
|
154
|
+
address == o.address &&
|
155
|
+
logo_file_id == o.logo_file_id &&
|
156
|
+
display_name == o.display_name &&
|
157
|
+
phone_number == o.phone_number &&
|
158
|
+
email == o.email &&
|
159
|
+
net_terms == o.net_terms &&
|
160
|
+
website_url == o.website_url &&
|
161
|
+
tos_url == o.tos_url &&
|
162
|
+
mcc_code == o.mcc_code
|
163
|
+
end
|
164
|
+
|
165
|
+
# @see the `==` method
|
166
|
+
# @param [Object] Object to be compared
|
167
|
+
def eql?(o)
|
168
|
+
self == o
|
169
|
+
end
|
170
|
+
|
171
|
+
# Calculates hash code according to all attributes.
|
172
|
+
# @return [Integer] Hash code
|
173
|
+
def hash
|
174
|
+
[address, logo_file_id, display_name, phone_number, email, net_terms, website_url, tos_url, mcc_code].hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Builds the object from hash
|
178
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
179
|
+
# @return [Object] Returns the model itself
|
180
|
+
def self.build_from_hash(attributes)
|
181
|
+
new.build_from_hash(attributes)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Builds the object from hash
|
185
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
186
|
+
# @return [Object] Returns the model itself
|
187
|
+
def build_from_hash(attributes)
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
189
|
+
self.class.openapi_types.each_pair do |key, type|
|
190
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
191
|
+
self.send("#{key}=", nil)
|
192
|
+
elsif type =~ /\AArray<(.*)>/i
|
193
|
+
# check to ensure the input is an array given that the attribute
|
194
|
+
# is documented as an array but the input is not
|
195
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
196
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
197
|
+
end
|
198
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
199
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
self
|
204
|
+
end
|
205
|
+
|
206
|
+
# Deserializes the data based on type
|
207
|
+
# @param string type Data type
|
208
|
+
# @param string value Value to be deserialized
|
209
|
+
# @return [Object] Deserialized data
|
210
|
+
def _deserialize(type, value)
|
211
|
+
case type.to_sym
|
212
|
+
when :Time
|
213
|
+
Time.parse(value)
|
214
|
+
when :Date
|
215
|
+
Date.parse(value)
|
216
|
+
when :String
|
217
|
+
value.to_s
|
218
|
+
when :Integer
|
219
|
+
value.to_i
|
220
|
+
when :Float
|
221
|
+
value.to_f
|
222
|
+
when :Boolean
|
223
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
224
|
+
true
|
225
|
+
else
|
226
|
+
false
|
227
|
+
end
|
228
|
+
when :Object
|
229
|
+
# generic object (usually a Hash), return directly
|
230
|
+
value
|
231
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
232
|
+
inner_type = Regexp.last_match[:inner_type]
|
233
|
+
value.map { |v| _deserialize(inner_type, v) }
|
234
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
235
|
+
k_type = Regexp.last_match[:k_type]
|
236
|
+
v_type = Regexp.last_match[:v_type]
|
237
|
+
{}.tap do |hash|
|
238
|
+
value.each do |k, v|
|
239
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
else # model
|
243
|
+
# models (e.g. Pet) or oneOf
|
244
|
+
klass = MelioPlatformApiClient.const_get(type)
|
245
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
# Returns the string representation of the object
|
250
|
+
# @return [String] String presentation of the object
|
251
|
+
def to_s
|
252
|
+
to_hash.to_s
|
253
|
+
end
|
254
|
+
|
255
|
+
# to_body is an alias to to_hash (backward compatibility)
|
256
|
+
# @return [Hash] Returns the object in the form of hash
|
257
|
+
def to_body
|
258
|
+
to_hash
|
259
|
+
end
|
260
|
+
|
261
|
+
# Returns the object in the form of hash
|
262
|
+
# @return [Hash] Returns the object in the form of hash
|
263
|
+
def to_hash
|
264
|
+
hash = {}
|
265
|
+
self.class.attribute_map.each_pair do |attr, param|
|
266
|
+
value = self.send(attr)
|
267
|
+
if value.nil?
|
268
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
269
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
270
|
+
end
|
271
|
+
|
272
|
+
hash[param] = _to_hash(value)
|
273
|
+
end
|
274
|
+
hash
|
275
|
+
end
|
276
|
+
|
277
|
+
# Outputs non-array value in the form of hash
|
278
|
+
# For object, use to_hash. Otherwise, just return the value
|
279
|
+
# @param [Object] value Any valid value
|
280
|
+
# @return [Hash] Returns the value in the form of hash
|
281
|
+
def _to_hash(value)
|
282
|
+
if value.is_a?(Array)
|
283
|
+
value.compact.map { |v| _to_hash(v) }
|
284
|
+
elsif value.is_a?(Hash)
|
285
|
+
{}.tap do |hash|
|
286
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
287
|
+
end
|
288
|
+
elsif value.respond_to? :to_hash
|
289
|
+
value.to_hash
|
290
|
+
else
|
291
|
+
value
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
end
|
296
|
+
|
297
|
+
end
|