From f509171579acbd077d6bb2ee55cfcd253469cdb2 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 18 Apr 2024 08:52:41 -0500 Subject: [PATCH] Update version numbers and dependencies --- .github/workflows/python.yml | 2 +- .openapi-generator/FILES | 104 +- .openapi-generator/VERSION | 2 +- Makefile | 2 +- README.md | 57 +- VERSION | 2 +- conekta/__init__.py | 54 +- conekta/api/__init__.py | 1 + conekta/api/antifraud_api.py | 102 +- conekta/api/api_keys_api.py | 88 +- conekta/api/balances_api.py | 32 +- conekta/api/charges_api.py | 60 +- conekta/api/companies_api.py | 46 +- conekta/api/customers_api.py | 116 +-- conekta/api/discounts_api.py | 88 +- conekta/api/events_api.py | 60 +- conekta/api/logs_api.py | 46 +- conekta/api/orders_api.py | 130 +-- conekta/api/payment_link_api.py | 102 +- conekta/api/payment_methods_api.py | 74 +- conekta/api/payout_orders_api.py | 957 ++++++++++++++++++ conekta/api/plans_api.py | 88 +- conekta/api/products_api.py | 60 +- conekta/api/shipping_contacts_api.py | 60 +- conekta/api/shippings_api.py | 60 +- conekta/api/subscriptions_api.py | 116 +-- conekta/api/taxes_api.py | 60 +- conekta/api/tokens_api.py | 32 +- conekta/api/transactions_api.py | 46 +- conekta/api/transfers_api.py | 46 +- conekta/api/webhook_keys_api.py | 88 +- conekta/api/webhooks_api.py | 119 +-- conekta/api_client.py | 173 ++-- conekta/api_response.py | 6 +- conekta/configuration.py | 16 +- conekta/exceptions.py | 83 +- conekta/models/__init__.py | 51 +- conekta/models/api_key_create_response.py | 37 +- .../models/api_key_create_response_all_of.py | 89 -- conekta/models/api_key_request.py | 29 +- conekta/models/api_key_response.py | 29 +- conekta/models/api_key_response_on_delete.py | 29 +- conekta/models/api_key_update_request.py | 29 +- conekta/models/balance_common_field.py | 29 +- conekta/models/balance_response.py | 51 +- conekta/models/blacklist_rule_response.py | 31 +- ...a_payment_method_bank_transfer_response.py | 168 --- ...harge_data_payment_method_card_response.py | 109 -- ...harge_data_payment_method_cash_response.py | 117 --- conekta/models/charge_order_response.py | 37 +- .../charge_order_response_payment_method.py | 32 +- conekta/models/charge_request.py | 31 +- .../models/charge_request_payment_method.py | 29 +- conekta/models/charge_response.py | 35 +- conekta/models/charge_response_channel.py | 28 +- .../models/charge_response_payment_method.py | 32 +- conekta/models/charge_response_refunds.py | 31 +- .../models/charge_response_refunds_all_of.py | 97 -- .../models/charge_response_refunds_data.py | 29 +- conekta/models/charge_update_request.py | 29 +- conekta/models/charges_data_response.py | 35 +- conekta/models/checkout.py | 31 +- conekta/models/checkout_order_template.py | 33 +- .../checkout_order_template_customer_info.py | 32 +- conekta/models/checkout_request.py | 33 +- conekta/models/checkout_response.py | 33 +- conekta/models/checkouts_response.py | 31 +- conekta/models/checkouts_response_all_of.py | 96 -- .../company_fiscal_info_address_response.py | 31 +- .../models/company_fiscal_info_response.py | 33 +- .../company_payout_destination_response.py | 33 +- conekta/models/company_response.py | 35 +- ...reate_customer_fiscal_entities_response.py | 38 +- ...ustomer_fiscal_entities_response_all_of.py | 96 -- ...create_customer_payment_methods_request.py | 32 +- ...reate_customer_payment_methods_response.py | 32 +- conekta/models/create_risk_rules_data.py | 31 +- conekta/models/customer.py | 39 +- conekta/models/customer_address.py | 29 +- conekta/models/customer_antifraud_info.py | 28 +- .../customer_antifraud_info_response.py | 28 +- .../customer_fiscal_entities_data_response.py | 38 +- .../customer_fiscal_entities_request.py | 38 +- ...ustomer_fiscal_entities_request_address.py | 103 -- .../customer_fiscal_entities_response.py | 31 +- ...ustomer_fiscal_entities_response_all_of.py | 96 -- conekta/models/customer_info.py | 28 +- .../models/customer_info_just_customer_id.py | 28 +- ...customer_info_just_customer_id_response.py | 28 +- .../models/customer_payment_method_request.py | 29 +- conekta/models/customer_payment_methods.py | 96 -- .../models/customer_payment_methods_data.py | 32 +- .../customer_payment_methods_request.py | 32 +- .../customer_payment_methods_response.py | 31 +- conekta/models/customer_response.py | 39 +- .../customer_response_shipping_contacts.py | 31 +- ...tomer_response_shipping_contacts_all_of.py | 96 -- conekta/models/customer_shipping_contacts.py | 31 +- .../customer_shipping_contacts_address.py | 29 +- ...ustomer_shipping_contacts_data_response.py | 31 +- ..._shipping_contacts_data_response_all_of.py | 92 -- .../customer_shipping_contacts_response.py | 31 +- ...omer_shipping_contacts_response_address.py | 28 +- ...customer_update_fiscal_entities_request.py | 38 +- .../customer_update_shipping_contacts.py | 31 +- conekta/models/customers_response.py | 37 +- conekta/models/customers_response_all_of.py | 96 -- conekta/models/delete_api_keys_response.py | 29 +- .../models/delete_api_keys_response_all_of.py | 88 -- .../models/deleted_blacklist_rule_response.py | 31 +- .../models/deleted_whitelist_rule_response.py | 31 +- conekta/models/details.py | 30 +- conekta/models/details_error.py | 28 +- .../models/discount_lines_data_response.py | 29 +- conekta/models/discount_lines_response.py | 29 +- .../models/discount_lines_response_all_of.py | 93 -- conekta/models/email_checkout_request.py | 28 +- conekta/models/error.py | 31 +- conekta/models/error_all_of.py | 98 -- conekta/models/event_response.py | 30 +- conekta/models/event_types.py | 41 + conekta/models/events_resend_response.py | 28 +- conekta/models/fiscal_entity_address.py | 29 +- conekta/models/get_api_keys_response.py | 31 +- .../models/get_api_keys_response_all_of.py | 96 -- conekta/models/get_charges_response.py | 31 +- conekta/models/get_charges_response_all_of.py | 96 -- conekta/models/get_companies_response.py | 31 +- .../models/get_companies_response_all_of.py | 96 -- ...t_customer_payment_method_data_response.py | 32 +- conekta/models/get_events_response.py | 31 +- conekta/models/get_events_response_all_of.py | 96 -- .../get_order_discount_lines_response.py | 31 +- ...et_order_discount_lines_response_all_of.py | 96 -- conekta/models/get_orders_response.py | 31 +- conekta/models/get_payment_method_response.py | 31 +- .../get_payment_method_response_all_of.py | 96 -- conekta/models/get_plans_response.py | 31 +- conekta/models/get_plans_response_all_of.py | 96 -- conekta/models/get_transactions_response.py | 31 +- .../get_transactions_response_all_of.py | 97 -- conekta/models/get_transfers_response.py | 31 +- .../models/get_transfers_response_all_of.py | 97 -- conekta/models/get_webhook_keys_response.py | 31 +- .../get_webhook_keys_response_all_of.py | 96 -- conekta/models/get_webhooks_response.py | 31 +- .../models/get_webhooks_response_all_of.py | 96 -- conekta/models/log_response.py | 34 +- conekta/models/logs_response.py | 35 +- conekta/models/logs_response_data.py | 34 +- conekta/models/order_capture_request.py | 29 +- .../models/order_customer_info_response.py | 29 +- .../models/order_discount_lines_request.py | 29 +- .../order_fiscal_entity_address_response.py | 29 +- conekta/models/order_fiscal_entity_request.py | 31 +- .../models/order_fiscal_entity_response.py | 31 +- conekta/models/order_next_action_response.py | 31 +- ...er_next_action_response_redirect_to_url.py | 29 +- conekta/models/order_refund_request.py | 28 +- conekta/models/order_request.py | 47 +- conekta/models/order_request_customer_info.py | 32 +- conekta/models/order_response.py | 47 +- conekta/models/order_response_charges.py | 31 +- .../models/order_response_charges_all_of.py | 96 -- conekta/models/order_response_checkout.py | 41 +- .../models/order_response_customer_info.py | 35 +- .../order_response_customer_info_all_of.py | 88 -- .../models/order_response_discount_lines.py | 31 +- .../order_response_discount_lines_all_of.py | 96 -- conekta/models/order_response_products.py | 31 +- .../models/order_response_products_all_of.py | 96 -- .../models/order_response_shipping_contact.py | 45 +- .../order_response_shipping_contact_all_of.py | 92 -- conekta/models/order_tax_request.py | 29 +- .../order_update_fiscal_entity_request.py | 31 +- conekta/models/order_update_request.py | 47 +- .../order_update_request_customer_info.py | 32 +- conekta/models/orders_response.py | 30 +- conekta/models/page.py | 29 +- conekta/models/pagination.py | 29 +- conekta/models/payment_method.py | 28 +- .../models/payment_method_bank_transfer.py | 32 +- conekta/models/payment_method_card.py | 33 +- conekta/models/payment_method_card_request.py | 29 +- .../payment_method_card_request_all_of.py | 89 -- .../models/payment_method_card_response.py | 28 +- .../payment_method_card_response_all_of.py | 106 -- conekta/models/payment_method_cash.py | 28 +- conekta/models/payment_method_cash_request.py | 29 +- .../payment_method_cash_request_all_of.py | 88 -- .../models/payment_method_cash_response.py | 28 +- .../payment_method_cash_response_all_of.py | 96 -- conekta/models/payment_method_response.py | 28 +- .../models/payment_method_spei_recurrent.py | 28 +- .../payment_method_spei_recurrent_all_of.py | 90 -- conekta/models/payment_method_spei_request.py | 29 +- conekta/models/{risk_rules.py => payout.py} | 56 +- ...ss_response_all_of.py => payout_method.py} | 44 +- conekta/models/payout_order.py | 108 ++ conekta/models/payout_order_payouts_item.py | 102 ++ conekta/models/payout_order_response.py | 127 +++ .../payout_order_response_customer_info.py | 105 ++ conekta/models/payout_orders_response.py | 114 +++ conekta/models/plan_request.py | 31 +- conekta/models/plan_response.py | 29 +- conekta/models/plan_update_request.py | 29 +- conekta/models/product.py | 29 +- conekta/models/product_data_response.py | 29 +- .../models/product_data_response_all_of.py | 92 -- conekta/models/product_order_response.py | 29 +- .../models/product_order_response_all_of.py | 92 -- conekta/models/risk_rules_data.py | 31 +- conekta/models/risk_rules_list.py | 31 +- conekta/models/shipping_order_response.py | 29 +- conekta/models/shipping_request.py | 29 +- conekta/models/sms_checkout_request.py | 28 +- .../models/subscription_events_response.py | 31 +- conekta/models/subscription_request.py | 28 +- conekta/models/subscription_response.py | 28 +- conekta/models/subscription_update_request.py | 28 +- conekta/models/token.py | 32 +- conekta/models/token_card.py | 29 +- conekta/models/token_checkout.py | 29 +- conekta/models/token_response.py | 31 +- conekta/models/token_response_checkout.py | 29 +- conekta/models/transaction_response.py | 29 +- .../models/transfer_destination_response.py | 29 +- conekta/models/transfer_method_response.py | 29 +- conekta/models/transfer_response.py | 31 +- conekta/models/transfers_response.py | 31 +- conekta/models/update_customer.py | 39 +- .../models/update_customer_antifraud_info.py | 28 +- ...pdate_customer_fiscal_entities_response.py | 38 +- ...ustomer_fiscal_entities_response_all_of.py | 96 -- ...pdate_customer_payment_methods_response.py | 32 +- .../update_order_discount_lines_request.py | 29 +- conekta/models/update_order_tax_request.py | 33 +- conekta/models/update_order_tax_response.py | 29 +- .../update_order_tax_response_all_of.py | 92 -- conekta/models/update_payment_methods.py | 28 +- conekta/models/update_product.py | 33 +- conekta/models/webhook_key_create_response.py | 29 +- conekta/models/webhook_key_delete_response.py | 29 +- conekta/models/webhook_key_request.py | 29 +- conekta/models/webhook_key_response.py | 29 +- conekta/models/webhook_key_update_request.py | 29 +- conekta/models/webhook_log.py | 28 +- conekta/models/webhook_request.py | 29 +- conekta/models/webhook_response.py | 28 +- conekta/models/webhook_update_request.py | 29 +- conekta/models/whitelistlist_rule_response.py | 31 +- conekta/rest.py | 76 +- config-python.json | 4 +- docs/AntifraudApi.md | 30 +- docs/ApiKeyCreateResponse.md | 7 +- docs/ApiKeyCreateResponseAllOf.md | 28 - docs/ApiKeyRequest.md | 5 +- docs/ApiKeyResponse.md | 5 +- docs/ApiKeyResponseOnDelete.md | 5 +- docs/ApiKeyUpdateRequest.md | 5 +- docs/ApiKeysApi.md | 25 +- docs/BalanceCommonField.md | 5 +- docs/BalanceResponse.md | 5 +- docs/BalancesApi.md | 5 +- docs/BlacklistRuleResponse.md | 7 +- ...geDataPaymentMethodBankTransferResponse.md | 44 - docs/ChargeDataPaymentMethodCardResponse.md | 39 - docs/ChargeDataPaymentMethodCashResponse.md | 36 - docs/ChargeOrderResponse.md | 5 +- docs/ChargeOrderResponsePaymentMethod.md | 5 +- docs/ChargeRequest.md | 5 +- docs/ChargeRequestPaymentMethod.md | 5 +- docs/ChargeResponse.md | 5 +- docs/ChargeResponseChannel.md | 5 +- docs/ChargeResponsePaymentMethod.md | 5 +- docs/ChargeResponseRefunds.md | 5 +- docs/ChargeResponseRefundsAllOf.md | 28 - docs/ChargeResponseRefundsData.md | 5 +- docs/ChargeUpdateRequest.md | 5 +- docs/ChargesApi.md | 15 +- docs/ChargesDataResponse.md | 5 +- docs/Checkout.md | 5 +- docs/CheckoutOrderTemplate.md | 5 +- docs/CheckoutOrderTemplateCustomerInfo.md | 5 +- docs/CheckoutRequest.md | 6 +- docs/CheckoutResponse.md | 5 +- docs/CheckoutsResponse.md | 5 +- docs/CheckoutsResponseAllOf.md | 28 - docs/CompaniesApi.md | 10 +- docs/CompanyFiscalInfoAddressResponse.md | 5 +- docs/CompanyFiscalInfoResponse.md | 5 +- docs/CompanyPayoutDestinationResponse.md | 5 +- docs/CompanyResponse.md | 5 +- docs/CreateCustomerFiscalEntitiesResponse.md | 7 +- ...eateCustomerFiscalEntitiesResponseAllOf.md | 32 - docs/CreateCustomerPaymentMethodsRequest.md | 5 +- docs/CreateCustomerPaymentMethodsResponse.md | 5 +- docs/CreateRiskRulesData.md | 7 +- docs/Customer.md | 5 +- docs/CustomerAddress.md | 5 +- docs/CustomerAntifraudInfo.md | 5 +- docs/CustomerAntifraudInfoResponse.md | 5 +- docs/CustomerFiscalEntitiesDataResponse.md | 7 +- docs/CustomerFiscalEntitiesRequest.md | 7 +- docs/CustomerFiscalEntitiesRequestAddress.md | 35 - docs/CustomerFiscalEntitiesResponse.md | 5 +- docs/CustomerFiscalEntitiesResponseAllOf.md | 28 - docs/CustomerInfo.md | 5 +- docs/CustomerInfoJustCustomerId.md | 5 +- docs/CustomerInfoJustCustomerIdResponse.md | 5 +- docs/CustomerPaymentMethodRequest.md | 5 +- docs/CustomerPaymentMethods.md | 28 - docs/CustomerPaymentMethodsData.md | 5 +- docs/CustomerPaymentMethodsRequest.md | 5 +- docs/CustomerPaymentMethodsResponse.md | 5 +- docs/CustomerResponse.md | 5 +- docs/CustomerResponseShippingContacts.md | 5 +- docs/CustomerResponseShippingContactsAllOf.md | 28 - docs/CustomerShippingContacts.md | 5 +- docs/CustomerShippingContactsAddress.md | 5 +- docs/CustomerShippingContactsDataResponse.md | 5 +- ...stomerShippingContactsDataResponseAllOf.md | 30 - docs/CustomerShippingContactsResponse.md | 5 +- ...CustomerShippingContactsResponseAddress.md | 5 +- docs/CustomerUpdateFiscalEntitiesRequest.md | 7 +- docs/CustomerUpdateShippingContacts.md | 5 +- docs/CustomersApi.md | 35 +- docs/CustomersResponse.md | 7 +- docs/CustomersResponseAllOf.md | 28 - docs/DeleteApiKeysResponse.md | 5 +- docs/DeleteApiKeysResponseAllOf.md | 28 - docs/DeletedBlacklistRuleResponse.md | 7 +- docs/DeletedWhitelistRuleResponse.md | 7 +- docs/Details.md | 5 +- docs/DetailsError.md | 5 +- docs/DiscountLinesDataResponse.md | 5 +- docs/DiscountLinesResponse.md | 5 +- docs/DiscountLinesResponseAllOf.md | 30 - docs/DiscountsApi.md | 25 +- docs/EmailCheckoutRequest.md | 5 +- docs/Error.md | 5 +- docs/ErrorAllOf.md | 30 - docs/EventResponse.md | 5 +- docs/EventTypes.md | 12 + docs/EventsApi.md | 15 +- docs/EventsResendResponse.md | 5 +- docs/FiscalEntityAddress.md | 5 +- docs/GetApiKeysResponse.md | 5 +- docs/GetApiKeysResponseAllOf.md | 28 - docs/GetChargesResponse.md | 5 +- docs/GetChargesResponseAllOf.md | 28 - docs/GetCompaniesResponse.md | 5 +- docs/GetCompaniesResponseAllOf.md | 28 - docs/GetCustomerPaymentMethodDataResponse.md | 5 +- docs/GetEventsResponse.md | 5 +- docs/GetEventsResponseAllOf.md | 28 - docs/GetOrderDiscountLinesResponse.md | 5 +- docs/GetOrderDiscountLinesResponseAllOf.md | 28 - docs/GetOrdersResponse.md | 5 +- docs/GetPaymentMethodResponse.md | 5 +- docs/GetPaymentMethodResponseAllOf.md | 28 - docs/GetPlansResponse.md | 5 +- docs/GetPlansResponseAllOf.md | 28 - docs/GetTransactionsResponse.md | 5 +- docs/GetTransactionsResponseAllOf.md | 28 - docs/GetTransfersResponse.md | 5 +- docs/GetTransfersResponseAllOf.md | 28 - docs/GetWebhookKeysResponse.md | 5 +- docs/GetWebhookKeysResponseAllOf.md | 28 - docs/GetWebhooksResponse.md | 5 +- docs/GetWebhooksResponseAllOf.md | 28 - docs/LogResponse.md | 5 +- docs/LogsApi.md | 10 +- docs/LogsResponse.md | 5 +- docs/LogsResponseData.md | 5 +- docs/OrderCaptureRequest.md | 5 +- docs/OrderCustomerInfoResponse.md | 5 +- docs/OrderDiscountLinesRequest.md | 5 +- docs/OrderFiscalEntityAddressResponse.md | 5 +- docs/OrderFiscalEntityAddressResponseAllOf.md | 28 - docs/OrderFiscalEntityRequest.md | 5 +- docs/OrderFiscalEntityResponse.md | 5 +- docs/OrderNextActionResponse.md | 5 +- docs/OrderNextActionResponseRedirectToUrl.md | 5 +- docs/OrderRefundRequest.md | 5 +- docs/OrderRequest.md | 5 +- docs/OrderRequestCustomerInfo.md | 5 +- docs/OrderResponse.md | 5 +- docs/OrderResponseCharges.md | 5 +- docs/OrderResponseChargesAllOf.md | 28 - docs/OrderResponseCheckout.md | 6 +- docs/OrderResponseCustomerInfo.md | 7 +- docs/OrderResponseCustomerInfoAllOf.md | 28 - docs/OrderResponseDiscountLines.md | 5 +- docs/OrderResponseDiscountLinesAllOf.md | 28 - docs/OrderResponseProducts.md | 5 +- docs/OrderResponseProductsAllOf.md | 28 - docs/OrderResponseShippingContact.md | 11 +- docs/OrderResponseShippingContactAllOf.md | 30 - docs/OrderTaxRequest.md | 5 +- docs/OrderUpdateFiscalEntityRequest.md | 5 +- docs/OrderUpdateRequest.md | 5 +- docs/OrderUpdateRequestCustomerInfo.md | 5 +- docs/OrdersApi.md | 40 +- docs/OrdersResponse.md | 5 +- docs/Page.md | 5 +- docs/Pagination.md | 5 +- docs/PaymentLinkApi.md | 30 +- docs/PaymentMethod.md | 5 +- docs/PaymentMethodBankTransfer.md | 5 +- docs/PaymentMethodCard.md | 5 +- docs/PaymentMethodCardRequest.md | 5 +- docs/PaymentMethodCardRequestAllOf.md | 28 - docs/PaymentMethodCardResponse.md | 5 +- docs/PaymentMethodCardResponseAllOf.md | 38 - docs/PaymentMethodCash.md | 5 +- docs/PaymentMethodCashRequest.md | 5 +- docs/PaymentMethodCashRequestAllOf.md | 28 - docs/PaymentMethodCashResponse.md | 5 +- docs/PaymentMethodCashResponseAllOf.md | 33 - docs/PaymentMethodResponse.md | 5 +- docs/PaymentMethodSpeiRecurrent.md | 5 +- docs/PaymentMethodSpeiRecurrentAllOf.md | 30 - docs/PaymentMethodSpeiRequest.md | 5 +- docs/PaymentMethodsApi.md | 20 +- docs/{RiskRules.md => Payout.md} | 20 +- docs/PayoutMethod.md | 30 + docs/PayoutOrder.md | 36 + docs/PayoutOrderPayoutsItem.md | 36 + docs/PayoutOrderResponse.md | 43 + docs/PayoutOrderResponseCustomerInfo.md | 36 + docs/PayoutOrdersApi.md | 268 +++++ docs/PayoutOrdersResponse.md | 33 + docs/PlanRequest.md | 5 +- docs/PlanResponse.md | 5 +- docs/PlanUpdateRequest.md | 5 +- docs/PlansApi.md | 25 +- docs/Product.md | 5 +- docs/ProductDataResponse.md | 5 +- docs/ProductDataResponseAllOf.md | 30 - docs/ProductOrderResponse.md | 5 +- docs/ProductOrderResponseAllOf.md | 30 - docs/ProductsApi.md | 15 +- docs/RiskRulesData.md | 7 +- docs/RiskRulesList.md | 5 +- docs/ShippingContactsApi.md | 15 +- docs/ShippingOrderResponse.md | 5 +- docs/ShippingRequest.md | 5 +- docs/ShippingsApi.md | 15 +- docs/SmsCheckoutRequest.md | 5 +- docs/SubscriptionEventsResponse.md | 5 +- docs/SubscriptionRequest.md | 5 +- docs/SubscriptionResponse.md | 5 +- docs/SubscriptionUpdateRequest.md | 5 +- docs/SubscriptionsApi.md | 35 +- docs/TaxesApi.md | 15 +- docs/Token.md | 5 +- docs/TokenCard.md | 5 +- docs/TokenCheckout.md | 5 +- docs/TokenResponse.md | 5 +- docs/TokenResponseCheckout.md | 5 +- docs/TokensApi.md | 5 +- docs/TransactionResponse.md | 5 +- docs/TransactionsApi.md | 10 +- docs/TransferDestinationResponse.md | 5 +- docs/TransferMethodResponse.md | 5 +- docs/TransferResponse.md | 5 +- docs/TransfersApi.md | 10 +- docs/TransfersResponse.md | 5 +- docs/UpdateCustomer.md | 5 +- docs/UpdateCustomerAntifraudInfo.md | 5 +- docs/UpdateCustomerFiscalEntitiesResponse.md | 7 +- ...dateCustomerFiscalEntitiesResponseAllOf.md | 32 - docs/UpdateCustomerPaymentMethodsResponse.md | 5 +- docs/UpdateOrderDiscountLinesRequest.md | 5 +- docs/UpdateOrderTaxRequest.md | 5 +- docs/UpdateOrderTaxResponse.md | 5 +- docs/UpdateOrderTaxResponseAllOf.md | 30 - docs/UpdatePaymentMethods.md | 5 +- docs/UpdateProduct.md | 5 +- docs/WebhookKeyCreateResponse.md | 5 +- docs/WebhookKeyDeleteResponse.md | 5 +- docs/WebhookKeyRequest.md | 5 +- docs/WebhookKeyResponse.md | 5 +- docs/WebhookKeyUpdateRequest.md | 5 +- docs/WebhookKeysApi.md | 25 +- docs/WebhookLog.md | 5 +- docs/WebhookRequest.md | 5 +- docs/WebhookResponse.md | 5 +- docs/WebhookUpdateRequest.md | 5 +- docs/WebhooksApi.md | 36 +- docs/WhitelistlistRuleResponse.md | 7 +- pyproject.toml | 43 +- setup.py | 2 +- templates/python/api_client.mustache | 169 ++-- test-requirements.txt | 2 + test/test_api_keys_api.py | 17 +- test/test_customers_api.py | 2 +- test/test_orders_api.py | 18 +- test/test_payout_orders_api.py | 53 + test/test_webhooks_api.py | 6 +- 501 files changed, 6465 insertions(+), 10113 deletions(-) create mode 100644 conekta/api/payout_orders_api.py delete mode 100644 conekta/models/api_key_create_response_all_of.py delete mode 100644 conekta/models/charge_data_payment_method_bank_transfer_response.py delete mode 100644 conekta/models/charge_data_payment_method_card_response.py delete mode 100644 conekta/models/charge_data_payment_method_cash_response.py delete mode 100644 conekta/models/charge_response_refunds_all_of.py delete mode 100644 conekta/models/checkouts_response_all_of.py delete mode 100644 conekta/models/create_customer_fiscal_entities_response_all_of.py delete mode 100644 conekta/models/customer_fiscal_entities_request_address.py delete mode 100644 conekta/models/customer_fiscal_entities_response_all_of.py delete mode 100644 conekta/models/customer_payment_methods.py delete mode 100644 conekta/models/customer_response_shipping_contacts_all_of.py delete mode 100644 conekta/models/customer_shipping_contacts_data_response_all_of.py delete mode 100644 conekta/models/customers_response_all_of.py delete mode 100644 conekta/models/delete_api_keys_response_all_of.py delete mode 100644 conekta/models/discount_lines_response_all_of.py delete mode 100644 conekta/models/error_all_of.py create mode 100644 conekta/models/event_types.py delete mode 100644 conekta/models/get_api_keys_response_all_of.py delete mode 100644 conekta/models/get_charges_response_all_of.py delete mode 100644 conekta/models/get_companies_response_all_of.py delete mode 100644 conekta/models/get_events_response_all_of.py delete mode 100644 conekta/models/get_order_discount_lines_response_all_of.py delete mode 100644 conekta/models/get_payment_method_response_all_of.py delete mode 100644 conekta/models/get_plans_response_all_of.py delete mode 100644 conekta/models/get_transactions_response_all_of.py delete mode 100644 conekta/models/get_transfers_response_all_of.py delete mode 100644 conekta/models/get_webhook_keys_response_all_of.py delete mode 100644 conekta/models/get_webhooks_response_all_of.py delete mode 100644 conekta/models/order_response_charges_all_of.py delete mode 100644 conekta/models/order_response_customer_info_all_of.py delete mode 100644 conekta/models/order_response_discount_lines_all_of.py delete mode 100644 conekta/models/order_response_products_all_of.py delete mode 100644 conekta/models/order_response_shipping_contact_all_of.py delete mode 100644 conekta/models/payment_method_card_request_all_of.py delete mode 100644 conekta/models/payment_method_card_response_all_of.py delete mode 100644 conekta/models/payment_method_cash_request_all_of.py delete mode 100644 conekta/models/payment_method_cash_response_all_of.py delete mode 100644 conekta/models/payment_method_spei_recurrent_all_of.py rename conekta/models/{risk_rules.py => payout.py} (60%) rename conekta/models/{order_fiscal_entity_address_response_all_of.py => payout_method.py} (64%) create mode 100644 conekta/models/payout_order.py create mode 100644 conekta/models/payout_order_payouts_item.py create mode 100644 conekta/models/payout_order_response.py create mode 100644 conekta/models/payout_order_response_customer_info.py create mode 100644 conekta/models/payout_orders_response.py delete mode 100644 conekta/models/product_data_response_all_of.py delete mode 100644 conekta/models/product_order_response_all_of.py delete mode 100644 conekta/models/update_customer_fiscal_entities_response_all_of.py delete mode 100644 conekta/models/update_order_tax_response_all_of.py delete mode 100644 docs/ApiKeyCreateResponseAllOf.md delete mode 100644 docs/ChargeDataPaymentMethodBankTransferResponse.md delete mode 100644 docs/ChargeDataPaymentMethodCardResponse.md delete mode 100644 docs/ChargeDataPaymentMethodCashResponse.md delete mode 100644 docs/ChargeResponseRefundsAllOf.md delete mode 100644 docs/CheckoutsResponseAllOf.md delete mode 100644 docs/CreateCustomerFiscalEntitiesResponseAllOf.md delete mode 100644 docs/CustomerFiscalEntitiesRequestAddress.md delete mode 100644 docs/CustomerFiscalEntitiesResponseAllOf.md delete mode 100644 docs/CustomerPaymentMethods.md delete mode 100644 docs/CustomerResponseShippingContactsAllOf.md delete mode 100644 docs/CustomerShippingContactsDataResponseAllOf.md delete mode 100644 docs/CustomersResponseAllOf.md delete mode 100644 docs/DeleteApiKeysResponseAllOf.md delete mode 100644 docs/DiscountLinesResponseAllOf.md delete mode 100644 docs/ErrorAllOf.md create mode 100644 docs/EventTypes.md delete mode 100644 docs/GetApiKeysResponseAllOf.md delete mode 100644 docs/GetChargesResponseAllOf.md delete mode 100644 docs/GetCompaniesResponseAllOf.md delete mode 100644 docs/GetEventsResponseAllOf.md delete mode 100644 docs/GetOrderDiscountLinesResponseAllOf.md delete mode 100644 docs/GetPaymentMethodResponseAllOf.md delete mode 100644 docs/GetPlansResponseAllOf.md delete mode 100644 docs/GetTransactionsResponseAllOf.md delete mode 100644 docs/GetTransfersResponseAllOf.md delete mode 100644 docs/GetWebhookKeysResponseAllOf.md delete mode 100644 docs/GetWebhooksResponseAllOf.md delete mode 100644 docs/OrderFiscalEntityAddressResponseAllOf.md delete mode 100644 docs/OrderResponseChargesAllOf.md delete mode 100644 docs/OrderResponseCustomerInfoAllOf.md delete mode 100644 docs/OrderResponseDiscountLinesAllOf.md delete mode 100644 docs/OrderResponseProductsAllOf.md delete mode 100644 docs/OrderResponseShippingContactAllOf.md delete mode 100644 docs/PaymentMethodCardRequestAllOf.md delete mode 100644 docs/PaymentMethodCardResponseAllOf.md delete mode 100644 docs/PaymentMethodCashRequestAllOf.md delete mode 100644 docs/PaymentMethodCashResponseAllOf.md delete mode 100644 docs/PaymentMethodSpeiRecurrentAllOf.md rename docs/{RiskRules.md => Payout.md} (51%) create mode 100644 docs/PayoutMethod.md create mode 100644 docs/PayoutOrder.md create mode 100644 docs/PayoutOrderPayoutsItem.md create mode 100644 docs/PayoutOrderResponse.md create mode 100644 docs/PayoutOrderResponseCustomerInfo.md create mode 100644 docs/PayoutOrdersApi.md create mode 100644 docs/PayoutOrdersResponse.md delete mode 100644 docs/ProductDataResponseAllOf.md delete mode 100644 docs/ProductOrderResponseAllOf.md delete mode 100644 docs/UpdateCustomerFiscalEntitiesResponseAllOf.md delete mode 100644 docs/UpdateOrderTaxResponseAllOf.md create mode 100644 test/test_payout_orders_api.py diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index eafe155..519d6c8 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -36,7 +36,7 @@ jobs: - name: Run Mockoon CLI uses: mockoon/cli-action@v1 with: - version: 'latest' + version: '6.0.1' data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json' port: 3000 - name: Test with pytest diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 45d891c..eb38c43 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -18,6 +18,7 @@ conekta/api/logs_api.py conekta/api/orders_api.py conekta/api/payment_link_api.py conekta/api/payment_methods_api.py +conekta/api/payout_orders_api.py conekta/api/plans_api.py conekta/api/products_api.py conekta/api/shipping_contacts_api.py @@ -35,7 +36,6 @@ conekta/configuration.py conekta/exceptions.py conekta/models/__init__.py conekta/models/api_key_create_response.py -conekta/models/api_key_create_response_all_of.py conekta/models/api_key_request.py conekta/models/api_key_response.py conekta/models/api_key_response_on_delete.py @@ -43,9 +43,6 @@ conekta/models/api_key_update_request.py conekta/models/balance_common_field.py conekta/models/balance_response.py conekta/models/blacklist_rule_response.py -conekta/models/charge_data_payment_method_bank_transfer_response.py -conekta/models/charge_data_payment_method_card_response.py -conekta/models/charge_data_payment_method_cash_response.py conekta/models/charge_order_response.py conekta/models/charge_order_response_payment_method.py conekta/models/charge_request.py @@ -54,7 +51,6 @@ conekta/models/charge_response.py conekta/models/charge_response_channel.py conekta/models/charge_response_payment_method.py conekta/models/charge_response_refunds.py -conekta/models/charge_response_refunds_all_of.py conekta/models/charge_response_refunds_data.py conekta/models/charge_update_request.py conekta/models/charges_data_response.py @@ -64,13 +60,11 @@ conekta/models/checkout_order_template_customer_info.py conekta/models/checkout_request.py conekta/models/checkout_response.py conekta/models/checkouts_response.py -conekta/models/checkouts_response_all_of.py conekta/models/company_fiscal_info_address_response.py conekta/models/company_fiscal_info_response.py conekta/models/company_payout_destination_response.py conekta/models/company_response.py conekta/models/create_customer_fiscal_entities_response.py -conekta/models/create_customer_fiscal_entities_response_all_of.py conekta/models/create_customer_payment_methods_request.py conekta/models/create_customer_payment_methods_response.py conekta/models/create_risk_rules_data.py @@ -80,69 +74,50 @@ conekta/models/customer_antifraud_info.py conekta/models/customer_antifraud_info_response.py conekta/models/customer_fiscal_entities_data_response.py conekta/models/customer_fiscal_entities_request.py -conekta/models/customer_fiscal_entities_request_address.py conekta/models/customer_fiscal_entities_response.py -conekta/models/customer_fiscal_entities_response_all_of.py conekta/models/customer_info.py conekta/models/customer_info_just_customer_id.py conekta/models/customer_info_just_customer_id_response.py conekta/models/customer_payment_method_request.py -conekta/models/customer_payment_methods.py conekta/models/customer_payment_methods_data.py conekta/models/customer_payment_methods_request.py conekta/models/customer_payment_methods_response.py conekta/models/customer_response.py conekta/models/customer_response_shipping_contacts.py -conekta/models/customer_response_shipping_contacts_all_of.py conekta/models/customer_shipping_contacts.py conekta/models/customer_shipping_contacts_address.py conekta/models/customer_shipping_contacts_data_response.py -conekta/models/customer_shipping_contacts_data_response_all_of.py conekta/models/customer_shipping_contacts_response.py conekta/models/customer_shipping_contacts_response_address.py conekta/models/customer_update_fiscal_entities_request.py conekta/models/customer_update_shipping_contacts.py conekta/models/customers_response.py -conekta/models/customers_response_all_of.py conekta/models/delete_api_keys_response.py -conekta/models/delete_api_keys_response_all_of.py conekta/models/deleted_blacklist_rule_response.py conekta/models/deleted_whitelist_rule_response.py conekta/models/details.py conekta/models/details_error.py conekta/models/discount_lines_data_response.py conekta/models/discount_lines_response.py -conekta/models/discount_lines_response_all_of.py conekta/models/email_checkout_request.py conekta/models/error.py -conekta/models/error_all_of.py conekta/models/event_response.py +conekta/models/event_types.py conekta/models/events_resend_response.py conekta/models/fiscal_entity_address.py conekta/models/get_api_keys_response.py -conekta/models/get_api_keys_response_all_of.py conekta/models/get_charges_response.py -conekta/models/get_charges_response_all_of.py conekta/models/get_companies_response.py -conekta/models/get_companies_response_all_of.py conekta/models/get_customer_payment_method_data_response.py conekta/models/get_events_response.py -conekta/models/get_events_response_all_of.py conekta/models/get_order_discount_lines_response.py -conekta/models/get_order_discount_lines_response_all_of.py conekta/models/get_orders_response.py conekta/models/get_payment_method_response.py -conekta/models/get_payment_method_response_all_of.py conekta/models/get_plans_response.py -conekta/models/get_plans_response_all_of.py conekta/models/get_transactions_response.py -conekta/models/get_transactions_response_all_of.py conekta/models/get_transfers_response.py -conekta/models/get_transfers_response_all_of.py conekta/models/get_webhook_keys_response.py -conekta/models/get_webhook_keys_response_all_of.py conekta/models/get_webhooks_response.py -conekta/models/get_webhooks_response_all_of.py conekta/models/log_response.py conekta/models/logs_response.py conekta/models/logs_response_data.py @@ -150,7 +125,6 @@ conekta/models/order_capture_request.py conekta/models/order_customer_info_response.py conekta/models/order_discount_lines_request.py conekta/models/order_fiscal_entity_address_response.py -conekta/models/order_fiscal_entity_address_response_all_of.py conekta/models/order_fiscal_entity_request.py conekta/models/order_fiscal_entity_response.py conekta/models/order_next_action_response.py @@ -160,16 +134,11 @@ conekta/models/order_request.py conekta/models/order_request_customer_info.py conekta/models/order_response.py conekta/models/order_response_charges.py -conekta/models/order_response_charges_all_of.py conekta/models/order_response_checkout.py conekta/models/order_response_customer_info.py -conekta/models/order_response_customer_info_all_of.py conekta/models/order_response_discount_lines.py -conekta/models/order_response_discount_lines_all_of.py conekta/models/order_response_products.py -conekta/models/order_response_products_all_of.py conekta/models/order_response_shipping_contact.py -conekta/models/order_response_shipping_contact_all_of.py conekta/models/order_tax_request.py conekta/models/order_update_fiscal_entity_request.py conekta/models/order_update_request.py @@ -181,27 +150,26 @@ conekta/models/payment_method.py conekta/models/payment_method_bank_transfer.py conekta/models/payment_method_card.py conekta/models/payment_method_card_request.py -conekta/models/payment_method_card_request_all_of.py conekta/models/payment_method_card_response.py -conekta/models/payment_method_card_response_all_of.py conekta/models/payment_method_cash.py conekta/models/payment_method_cash_request.py -conekta/models/payment_method_cash_request_all_of.py conekta/models/payment_method_cash_response.py -conekta/models/payment_method_cash_response_all_of.py conekta/models/payment_method_response.py conekta/models/payment_method_spei_recurrent.py -conekta/models/payment_method_spei_recurrent_all_of.py conekta/models/payment_method_spei_request.py +conekta/models/payout.py +conekta/models/payout_method.py +conekta/models/payout_order.py +conekta/models/payout_order_payouts_item.py +conekta/models/payout_order_response.py +conekta/models/payout_order_response_customer_info.py +conekta/models/payout_orders_response.py conekta/models/plan_request.py conekta/models/plan_response.py conekta/models/plan_update_request.py conekta/models/product.py conekta/models/product_data_response.py -conekta/models/product_data_response_all_of.py conekta/models/product_order_response.py -conekta/models/product_order_response_all_of.py -conekta/models/risk_rules.py conekta/models/risk_rules_data.py conekta/models/risk_rules_list.py conekta/models/shipping_order_response.py @@ -224,12 +192,10 @@ conekta/models/transfers_response.py conekta/models/update_customer.py conekta/models/update_customer_antifraud_info.py conekta/models/update_customer_fiscal_entities_response.py -conekta/models/update_customer_fiscal_entities_response_all_of.py conekta/models/update_customer_payment_methods_response.py conekta/models/update_order_discount_lines_request.py conekta/models/update_order_tax_request.py conekta/models/update_order_tax_response.py -conekta/models/update_order_tax_response_all_of.py conekta/models/update_payment_methods.py conekta/models/update_product.py conekta/models/webhook_key_create_response.py @@ -246,7 +212,6 @@ conekta/py.typed conekta/rest.py docs/AntifraudApi.md docs/ApiKeyCreateResponse.md -docs/ApiKeyCreateResponseAllOf.md docs/ApiKeyRequest.md docs/ApiKeyResponse.md docs/ApiKeyResponseOnDelete.md @@ -256,9 +221,6 @@ docs/BalanceCommonField.md docs/BalanceResponse.md docs/BalancesApi.md docs/BlacklistRuleResponse.md -docs/ChargeDataPaymentMethodBankTransferResponse.md -docs/ChargeDataPaymentMethodCardResponse.md -docs/ChargeDataPaymentMethodCashResponse.md docs/ChargeOrderResponse.md docs/ChargeOrderResponsePaymentMethod.md docs/ChargeRequest.md @@ -267,7 +229,6 @@ docs/ChargeResponse.md docs/ChargeResponseChannel.md docs/ChargeResponsePaymentMethod.md docs/ChargeResponseRefunds.md -docs/ChargeResponseRefundsAllOf.md docs/ChargeResponseRefundsData.md docs/ChargeUpdateRequest.md docs/ChargesApi.md @@ -278,14 +239,12 @@ docs/CheckoutOrderTemplateCustomerInfo.md docs/CheckoutRequest.md docs/CheckoutResponse.md docs/CheckoutsResponse.md -docs/CheckoutsResponseAllOf.md docs/CompaniesApi.md docs/CompanyFiscalInfoAddressResponse.md docs/CompanyFiscalInfoResponse.md docs/CompanyPayoutDestinationResponse.md docs/CompanyResponse.md docs/CreateCustomerFiscalEntitiesResponse.md -docs/CreateCustomerFiscalEntitiesResponseAllOf.md docs/CreateCustomerPaymentMethodsRequest.md docs/CreateCustomerPaymentMethodsResponse.md docs/CreateRiskRulesData.md @@ -295,72 +254,53 @@ docs/CustomerAntifraudInfo.md docs/CustomerAntifraudInfoResponse.md docs/CustomerFiscalEntitiesDataResponse.md docs/CustomerFiscalEntitiesRequest.md -docs/CustomerFiscalEntitiesRequestAddress.md docs/CustomerFiscalEntitiesResponse.md -docs/CustomerFiscalEntitiesResponseAllOf.md docs/CustomerInfo.md docs/CustomerInfoJustCustomerId.md docs/CustomerInfoJustCustomerIdResponse.md docs/CustomerPaymentMethodRequest.md -docs/CustomerPaymentMethods.md docs/CustomerPaymentMethodsData.md docs/CustomerPaymentMethodsRequest.md docs/CustomerPaymentMethodsResponse.md docs/CustomerResponse.md docs/CustomerResponseShippingContacts.md -docs/CustomerResponseShippingContactsAllOf.md docs/CustomerShippingContacts.md docs/CustomerShippingContactsAddress.md docs/CustomerShippingContactsDataResponse.md -docs/CustomerShippingContactsDataResponseAllOf.md docs/CustomerShippingContactsResponse.md docs/CustomerShippingContactsResponseAddress.md docs/CustomerUpdateFiscalEntitiesRequest.md docs/CustomerUpdateShippingContacts.md docs/CustomersApi.md docs/CustomersResponse.md -docs/CustomersResponseAllOf.md docs/DeleteApiKeysResponse.md -docs/DeleteApiKeysResponseAllOf.md docs/DeletedBlacklistRuleResponse.md docs/DeletedWhitelistRuleResponse.md docs/Details.md docs/DetailsError.md docs/DiscountLinesDataResponse.md docs/DiscountLinesResponse.md -docs/DiscountLinesResponseAllOf.md docs/DiscountsApi.md docs/EmailCheckoutRequest.md docs/Error.md -docs/ErrorAllOf.md docs/EventResponse.md +docs/EventTypes.md docs/EventsApi.md docs/EventsResendResponse.md docs/FiscalEntityAddress.md docs/GetApiKeysResponse.md -docs/GetApiKeysResponseAllOf.md docs/GetChargesResponse.md -docs/GetChargesResponseAllOf.md docs/GetCompaniesResponse.md -docs/GetCompaniesResponseAllOf.md docs/GetCustomerPaymentMethodDataResponse.md docs/GetEventsResponse.md -docs/GetEventsResponseAllOf.md docs/GetOrderDiscountLinesResponse.md -docs/GetOrderDiscountLinesResponseAllOf.md docs/GetOrdersResponse.md docs/GetPaymentMethodResponse.md -docs/GetPaymentMethodResponseAllOf.md docs/GetPlansResponse.md -docs/GetPlansResponseAllOf.md docs/GetTransactionsResponse.md -docs/GetTransactionsResponseAllOf.md docs/GetTransfersResponse.md -docs/GetTransfersResponseAllOf.md docs/GetWebhookKeysResponse.md -docs/GetWebhookKeysResponseAllOf.md docs/GetWebhooksResponse.md -docs/GetWebhooksResponseAllOf.md docs/LogResponse.md docs/LogsApi.md docs/LogsResponse.md @@ -369,7 +309,6 @@ docs/OrderCaptureRequest.md docs/OrderCustomerInfoResponse.md docs/OrderDiscountLinesRequest.md docs/OrderFiscalEntityAddressResponse.md -docs/OrderFiscalEntityAddressResponseAllOf.md docs/OrderFiscalEntityRequest.md docs/OrderFiscalEntityResponse.md docs/OrderNextActionResponse.md @@ -379,16 +318,11 @@ docs/OrderRequest.md docs/OrderRequestCustomerInfo.md docs/OrderResponse.md docs/OrderResponseCharges.md -docs/OrderResponseChargesAllOf.md docs/OrderResponseCheckout.md docs/OrderResponseCustomerInfo.md -docs/OrderResponseCustomerInfoAllOf.md docs/OrderResponseDiscountLines.md -docs/OrderResponseDiscountLinesAllOf.md docs/OrderResponseProducts.md -docs/OrderResponseProductsAllOf.md docs/OrderResponseShippingContact.md -docs/OrderResponseShippingContactAllOf.md docs/OrderTaxRequest.md docs/OrderUpdateFiscalEntityRequest.md docs/OrderUpdateRequest.md @@ -402,30 +336,30 @@ docs/PaymentMethod.md docs/PaymentMethodBankTransfer.md docs/PaymentMethodCard.md docs/PaymentMethodCardRequest.md -docs/PaymentMethodCardRequestAllOf.md docs/PaymentMethodCardResponse.md -docs/PaymentMethodCardResponseAllOf.md docs/PaymentMethodCash.md docs/PaymentMethodCashRequest.md -docs/PaymentMethodCashRequestAllOf.md docs/PaymentMethodCashResponse.md -docs/PaymentMethodCashResponseAllOf.md docs/PaymentMethodResponse.md docs/PaymentMethodSpeiRecurrent.md -docs/PaymentMethodSpeiRecurrentAllOf.md docs/PaymentMethodSpeiRequest.md docs/PaymentMethodsApi.md +docs/Payout.md +docs/PayoutMethod.md +docs/PayoutOrder.md +docs/PayoutOrderPayoutsItem.md +docs/PayoutOrderResponse.md +docs/PayoutOrderResponseCustomerInfo.md +docs/PayoutOrdersApi.md +docs/PayoutOrdersResponse.md docs/PlanRequest.md docs/PlanResponse.md docs/PlanUpdateRequest.md docs/PlansApi.md docs/Product.md docs/ProductDataResponse.md -docs/ProductDataResponseAllOf.md docs/ProductOrderResponse.md -docs/ProductOrderResponseAllOf.md docs/ProductsApi.md -docs/RiskRules.md docs/RiskRulesData.md docs/RiskRulesList.md docs/ShippingContactsApi.md @@ -455,12 +389,10 @@ docs/TransfersResponse.md docs/UpdateCustomer.md docs/UpdateCustomerAntifraudInfo.md docs/UpdateCustomerFiscalEntitiesResponse.md -docs/UpdateCustomerFiscalEntitiesResponseAllOf.md docs/UpdateCustomerPaymentMethodsResponse.md docs/UpdateOrderDiscountLinesRequest.md docs/UpdateOrderTaxRequest.md docs/UpdateOrderTaxResponse.md -docs/UpdateOrderTaxResponseAllOf.md docs/UpdatePaymentMethods.md docs/UpdateProduct.md docs/WebhookKeyCreateResponse.md diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 3769235..18bb418 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.1.0 \ No newline at end of file +7.5.0 diff --git a/Makefile b/Makefile index 3a5ca63..6314944 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ python: rm -rf docs && \ rm -rf conekta/models && \ docker run --rm \ - -v ${PWD}:/local openapitools/openapi-generator-cli:v7.1.0 generate \ + -v ${PWD}:/local openapitools/openapi-generator-cli:v7.5.0 generate \ -i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \ -g python \ -o /local \ diff --git a/README.md b/README.md index 46800f2..a841435 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ Conekta sdk This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 2.1.0 -- Package version: 6.0.2 +- Package version: 6.0.3 +- Generator version: 7.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues) @@ -146,6 +147,9 @@ Class | Method | HTTP request | Description *PaymentMethodsApi* | [**delete_customer_payment_methods**](docs/PaymentMethodsApi.md#delete_customer_payment_methods) | **DELETE** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method *PaymentMethodsApi* | [**get_customer_payment_methods**](docs/PaymentMethodsApi.md#get_customer_payment_methods) | **GET** /customers/{id}/payment_sources | Get Payment Methods *PaymentMethodsApi* | [**update_customer_payment_methods**](docs/PaymentMethodsApi.md#update_customer_payment_methods) | **PUT** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method +*PayoutOrdersApi* | [**create_payout_order**](docs/PayoutOrdersApi.md#create_payout_order) | **POST** /payout_orders | Create payout order +*PayoutOrdersApi* | [**get_payout_order_by_id**](docs/PayoutOrdersApi.md#get_payout_order_by_id) | **GET** /payout_orders/{id} | Get Payout Order +*PayoutOrdersApi* | [**get_payout_orders**](docs/PayoutOrdersApi.md#get_payout_orders) | **GET** /payout_orders | Get a list of Payout Orders *PlansApi* | [**create_plan**](docs/PlansApi.md#create_plan) | **POST** /plans | Create Plan *PlansApi* | [**delete_plan**](docs/PlansApi.md#delete_plan) | **DELETE** /plans/{id} | Delete Plan *PlansApi* | [**get_plan**](docs/PlansApi.md#get_plan) | **GET** /plans/{id} | Get Plan @@ -191,7 +195,6 @@ Class | Method | HTTP request | Description ## Documentation For Models - [ApiKeyCreateResponse](docs/ApiKeyCreateResponse.md) - - [ApiKeyCreateResponseAllOf](docs/ApiKeyCreateResponseAllOf.md) - [ApiKeyRequest](docs/ApiKeyRequest.md) - [ApiKeyResponse](docs/ApiKeyResponse.md) - [ApiKeyResponseOnDelete](docs/ApiKeyResponseOnDelete.md) @@ -199,9 +202,6 @@ Class | Method | HTTP request | Description - [BalanceCommonField](docs/BalanceCommonField.md) - [BalanceResponse](docs/BalanceResponse.md) - [BlacklistRuleResponse](docs/BlacklistRuleResponse.md) - - [ChargeDataPaymentMethodBankTransferResponse](docs/ChargeDataPaymentMethodBankTransferResponse.md) - - [ChargeDataPaymentMethodCardResponse](docs/ChargeDataPaymentMethodCardResponse.md) - - [ChargeDataPaymentMethodCashResponse](docs/ChargeDataPaymentMethodCashResponse.md) - [ChargeOrderResponse](docs/ChargeOrderResponse.md) - [ChargeOrderResponsePaymentMethod](docs/ChargeOrderResponsePaymentMethod.md) - [ChargeRequest](docs/ChargeRequest.md) @@ -210,7 +210,6 @@ Class | Method | HTTP request | Description - [ChargeResponseChannel](docs/ChargeResponseChannel.md) - [ChargeResponsePaymentMethod](docs/ChargeResponsePaymentMethod.md) - [ChargeResponseRefunds](docs/ChargeResponseRefunds.md) - - [ChargeResponseRefundsAllOf](docs/ChargeResponseRefundsAllOf.md) - [ChargeResponseRefundsData](docs/ChargeResponseRefundsData.md) - [ChargeUpdateRequest](docs/ChargeUpdateRequest.md) - [ChargesDataResponse](docs/ChargesDataResponse.md) @@ -220,13 +219,11 @@ Class | Method | HTTP request | Description - [CheckoutRequest](docs/CheckoutRequest.md) - [CheckoutResponse](docs/CheckoutResponse.md) - [CheckoutsResponse](docs/CheckoutsResponse.md) - - [CheckoutsResponseAllOf](docs/CheckoutsResponseAllOf.md) - [CompanyFiscalInfoAddressResponse](docs/CompanyFiscalInfoAddressResponse.md) - [CompanyFiscalInfoResponse](docs/CompanyFiscalInfoResponse.md) - [CompanyPayoutDestinationResponse](docs/CompanyPayoutDestinationResponse.md) - [CompanyResponse](docs/CompanyResponse.md) - [CreateCustomerFiscalEntitiesResponse](docs/CreateCustomerFiscalEntitiesResponse.md) - - [CreateCustomerFiscalEntitiesResponseAllOf](docs/CreateCustomerFiscalEntitiesResponseAllOf.md) - [CreateCustomerPaymentMethodsRequest](docs/CreateCustomerPaymentMethodsRequest.md) - [CreateCustomerPaymentMethodsResponse](docs/CreateCustomerPaymentMethodsResponse.md) - [CreateRiskRulesData](docs/CreateRiskRulesData.md) @@ -236,69 +233,50 @@ Class | Method | HTTP request | Description - [CustomerAntifraudInfoResponse](docs/CustomerAntifraudInfoResponse.md) - [CustomerFiscalEntitiesDataResponse](docs/CustomerFiscalEntitiesDataResponse.md) - [CustomerFiscalEntitiesRequest](docs/CustomerFiscalEntitiesRequest.md) - - [CustomerFiscalEntitiesRequestAddress](docs/CustomerFiscalEntitiesRequestAddress.md) - [CustomerFiscalEntitiesResponse](docs/CustomerFiscalEntitiesResponse.md) - - [CustomerFiscalEntitiesResponseAllOf](docs/CustomerFiscalEntitiesResponseAllOf.md) - [CustomerInfo](docs/CustomerInfo.md) - [CustomerInfoJustCustomerId](docs/CustomerInfoJustCustomerId.md) - [CustomerInfoJustCustomerIdResponse](docs/CustomerInfoJustCustomerIdResponse.md) - [CustomerPaymentMethodRequest](docs/CustomerPaymentMethodRequest.md) - - [CustomerPaymentMethods](docs/CustomerPaymentMethods.md) - [CustomerPaymentMethodsData](docs/CustomerPaymentMethodsData.md) - [CustomerPaymentMethodsRequest](docs/CustomerPaymentMethodsRequest.md) - [CustomerPaymentMethodsResponse](docs/CustomerPaymentMethodsResponse.md) - [CustomerResponse](docs/CustomerResponse.md) - [CustomerResponseShippingContacts](docs/CustomerResponseShippingContacts.md) - - [CustomerResponseShippingContactsAllOf](docs/CustomerResponseShippingContactsAllOf.md) - [CustomerShippingContacts](docs/CustomerShippingContacts.md) - [CustomerShippingContactsAddress](docs/CustomerShippingContactsAddress.md) - [CustomerShippingContactsDataResponse](docs/CustomerShippingContactsDataResponse.md) - - [CustomerShippingContactsDataResponseAllOf](docs/CustomerShippingContactsDataResponseAllOf.md) - [CustomerShippingContactsResponse](docs/CustomerShippingContactsResponse.md) - [CustomerShippingContactsResponseAddress](docs/CustomerShippingContactsResponseAddress.md) - [CustomerUpdateFiscalEntitiesRequest](docs/CustomerUpdateFiscalEntitiesRequest.md) - [CustomerUpdateShippingContacts](docs/CustomerUpdateShippingContacts.md) - [CustomersResponse](docs/CustomersResponse.md) - - [CustomersResponseAllOf](docs/CustomersResponseAllOf.md) - [DeleteApiKeysResponse](docs/DeleteApiKeysResponse.md) - - [DeleteApiKeysResponseAllOf](docs/DeleteApiKeysResponseAllOf.md) - [DeletedBlacklistRuleResponse](docs/DeletedBlacklistRuleResponse.md) - [DeletedWhitelistRuleResponse](docs/DeletedWhitelistRuleResponse.md) - [Details](docs/Details.md) - [DetailsError](docs/DetailsError.md) - [DiscountLinesDataResponse](docs/DiscountLinesDataResponse.md) - [DiscountLinesResponse](docs/DiscountLinesResponse.md) - - [DiscountLinesResponseAllOf](docs/DiscountLinesResponseAllOf.md) - [EmailCheckoutRequest](docs/EmailCheckoutRequest.md) - [Error](docs/Error.md) - - [ErrorAllOf](docs/ErrorAllOf.md) - [EventResponse](docs/EventResponse.md) + - [EventTypes](docs/EventTypes.md) - [EventsResendResponse](docs/EventsResendResponse.md) - [FiscalEntityAddress](docs/FiscalEntityAddress.md) - [GetApiKeysResponse](docs/GetApiKeysResponse.md) - - [GetApiKeysResponseAllOf](docs/GetApiKeysResponseAllOf.md) - [GetChargesResponse](docs/GetChargesResponse.md) - - [GetChargesResponseAllOf](docs/GetChargesResponseAllOf.md) - [GetCompaniesResponse](docs/GetCompaniesResponse.md) - - [GetCompaniesResponseAllOf](docs/GetCompaniesResponseAllOf.md) - [GetCustomerPaymentMethodDataResponse](docs/GetCustomerPaymentMethodDataResponse.md) - [GetEventsResponse](docs/GetEventsResponse.md) - - [GetEventsResponseAllOf](docs/GetEventsResponseAllOf.md) - [GetOrderDiscountLinesResponse](docs/GetOrderDiscountLinesResponse.md) - - [GetOrderDiscountLinesResponseAllOf](docs/GetOrderDiscountLinesResponseAllOf.md) - [GetOrdersResponse](docs/GetOrdersResponse.md) - [GetPaymentMethodResponse](docs/GetPaymentMethodResponse.md) - - [GetPaymentMethodResponseAllOf](docs/GetPaymentMethodResponseAllOf.md) - [GetPlansResponse](docs/GetPlansResponse.md) - - [GetPlansResponseAllOf](docs/GetPlansResponseAllOf.md) - [GetTransactionsResponse](docs/GetTransactionsResponse.md) - - [GetTransactionsResponseAllOf](docs/GetTransactionsResponseAllOf.md) - [GetTransfersResponse](docs/GetTransfersResponse.md) - - [GetTransfersResponseAllOf](docs/GetTransfersResponseAllOf.md) - [GetWebhookKeysResponse](docs/GetWebhookKeysResponse.md) - - [GetWebhookKeysResponseAllOf](docs/GetWebhookKeysResponseAllOf.md) - [GetWebhooksResponse](docs/GetWebhooksResponse.md) - - [GetWebhooksResponseAllOf](docs/GetWebhooksResponseAllOf.md) - [LogResponse](docs/LogResponse.md) - [LogsResponse](docs/LogsResponse.md) - [LogsResponseData](docs/LogsResponseData.md) @@ -306,7 +284,6 @@ Class | Method | HTTP request | Description - [OrderCustomerInfoResponse](docs/OrderCustomerInfoResponse.md) - [OrderDiscountLinesRequest](docs/OrderDiscountLinesRequest.md) - [OrderFiscalEntityAddressResponse](docs/OrderFiscalEntityAddressResponse.md) - - [OrderFiscalEntityAddressResponseAllOf](docs/OrderFiscalEntityAddressResponseAllOf.md) - [OrderFiscalEntityRequest](docs/OrderFiscalEntityRequest.md) - [OrderFiscalEntityResponse](docs/OrderFiscalEntityResponse.md) - [OrderNextActionResponse](docs/OrderNextActionResponse.md) @@ -316,16 +293,11 @@ Class | Method | HTTP request | Description - [OrderRequestCustomerInfo](docs/OrderRequestCustomerInfo.md) - [OrderResponse](docs/OrderResponse.md) - [OrderResponseCharges](docs/OrderResponseCharges.md) - - [OrderResponseChargesAllOf](docs/OrderResponseChargesAllOf.md) - [OrderResponseCheckout](docs/OrderResponseCheckout.md) - [OrderResponseCustomerInfo](docs/OrderResponseCustomerInfo.md) - - [OrderResponseCustomerInfoAllOf](docs/OrderResponseCustomerInfoAllOf.md) - [OrderResponseDiscountLines](docs/OrderResponseDiscountLines.md) - - [OrderResponseDiscountLinesAllOf](docs/OrderResponseDiscountLinesAllOf.md) - [OrderResponseProducts](docs/OrderResponseProducts.md) - - [OrderResponseProductsAllOf](docs/OrderResponseProductsAllOf.md) - [OrderResponseShippingContact](docs/OrderResponseShippingContact.md) - - [OrderResponseShippingContactAllOf](docs/OrderResponseShippingContactAllOf.md) - [OrderTaxRequest](docs/OrderTaxRequest.md) - [OrderUpdateFiscalEntityRequest](docs/OrderUpdateFiscalEntityRequest.md) - [OrderUpdateRequest](docs/OrderUpdateRequest.md) @@ -337,27 +309,26 @@ Class | Method | HTTP request | Description - [PaymentMethodBankTransfer](docs/PaymentMethodBankTransfer.md) - [PaymentMethodCard](docs/PaymentMethodCard.md) - [PaymentMethodCardRequest](docs/PaymentMethodCardRequest.md) - - [PaymentMethodCardRequestAllOf](docs/PaymentMethodCardRequestAllOf.md) - [PaymentMethodCardResponse](docs/PaymentMethodCardResponse.md) - - [PaymentMethodCardResponseAllOf](docs/PaymentMethodCardResponseAllOf.md) - [PaymentMethodCash](docs/PaymentMethodCash.md) - [PaymentMethodCashRequest](docs/PaymentMethodCashRequest.md) - - [PaymentMethodCashRequestAllOf](docs/PaymentMethodCashRequestAllOf.md) - [PaymentMethodCashResponse](docs/PaymentMethodCashResponse.md) - - [PaymentMethodCashResponseAllOf](docs/PaymentMethodCashResponseAllOf.md) - [PaymentMethodResponse](docs/PaymentMethodResponse.md) - [PaymentMethodSpeiRecurrent](docs/PaymentMethodSpeiRecurrent.md) - - [PaymentMethodSpeiRecurrentAllOf](docs/PaymentMethodSpeiRecurrentAllOf.md) - [PaymentMethodSpeiRequest](docs/PaymentMethodSpeiRequest.md) + - [Payout](docs/Payout.md) + - [PayoutMethod](docs/PayoutMethod.md) + - [PayoutOrder](docs/PayoutOrder.md) + - [PayoutOrderPayoutsItem](docs/PayoutOrderPayoutsItem.md) + - [PayoutOrderResponse](docs/PayoutOrderResponse.md) + - [PayoutOrderResponseCustomerInfo](docs/PayoutOrderResponseCustomerInfo.md) + - [PayoutOrdersResponse](docs/PayoutOrdersResponse.md) - [PlanRequest](docs/PlanRequest.md) - [PlanResponse](docs/PlanResponse.md) - [PlanUpdateRequest](docs/PlanUpdateRequest.md) - [Product](docs/Product.md) - [ProductDataResponse](docs/ProductDataResponse.md) - - [ProductDataResponseAllOf](docs/ProductDataResponseAllOf.md) - [ProductOrderResponse](docs/ProductOrderResponse.md) - - [ProductOrderResponseAllOf](docs/ProductOrderResponseAllOf.md) - - [RiskRules](docs/RiskRules.md) - [RiskRulesData](docs/RiskRulesData.md) - [RiskRulesList](docs/RiskRulesList.md) - [ShippingOrderResponse](docs/ShippingOrderResponse.md) @@ -380,12 +351,10 @@ Class | Method | HTTP request | Description - [UpdateCustomer](docs/UpdateCustomer.md) - [UpdateCustomerAntifraudInfo](docs/UpdateCustomerAntifraudInfo.md) - [UpdateCustomerFiscalEntitiesResponse](docs/UpdateCustomerFiscalEntitiesResponse.md) - - [UpdateCustomerFiscalEntitiesResponseAllOf](docs/UpdateCustomerFiscalEntitiesResponseAllOf.md) - [UpdateCustomerPaymentMethodsResponse](docs/UpdateCustomerPaymentMethodsResponse.md) - [UpdateOrderDiscountLinesRequest](docs/UpdateOrderDiscountLinesRequest.md) - [UpdateOrderTaxRequest](docs/UpdateOrderTaxRequest.md) - [UpdateOrderTaxResponse](docs/UpdateOrderTaxResponse.md) - - [UpdateOrderTaxResponseAllOf](docs/UpdateOrderTaxResponseAllOf.md) - [UpdatePaymentMethods](docs/UpdatePaymentMethods.md) - [UpdateProduct](docs/UpdateProduct.md) - [WebhookKeyCreateResponse](docs/WebhookKeyCreateResponse.md) diff --git a/VERSION b/VERSION index 9b9a244..090ea9d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.2 +6.0.3 diff --git a/conekta/__init__.py b/conekta/__init__.py index 320c270..5b36bc9 100644 --- a/conekta/__init__.py +++ b/conekta/__init__.py @@ -15,7 +15,7 @@ """ # noqa: E501 -__version__ = "6.0.2" +__version__ = "6.0.3" # import apis into sdk package from conekta.api.antifraud_api import AntifraudApi @@ -30,6 +30,7 @@ from conekta.api.orders_api import OrdersApi from conekta.api.payment_link_api import PaymentLinkApi from conekta.api.payment_methods_api import PaymentMethodsApi +from conekta.api.payout_orders_api import PayoutOrdersApi from conekta.api.plans_api import PlansApi from conekta.api.products_api import ProductsApi from conekta.api.shipping_contacts_api import ShippingContactsApi @@ -55,7 +56,6 @@ # import models into sdk package from conekta.models.api_key_create_response import ApiKeyCreateResponse -from conekta.models.api_key_create_response_all_of import ApiKeyCreateResponseAllOf from conekta.models.api_key_request import ApiKeyRequest from conekta.models.api_key_response import ApiKeyResponse from conekta.models.api_key_response_on_delete import ApiKeyResponseOnDelete @@ -63,9 +63,6 @@ from conekta.models.balance_common_field import BalanceCommonField from conekta.models.balance_response import BalanceResponse from conekta.models.blacklist_rule_response import BlacklistRuleResponse -from conekta.models.charge_data_payment_method_bank_transfer_response import ChargeDataPaymentMethodBankTransferResponse -from conekta.models.charge_data_payment_method_card_response import ChargeDataPaymentMethodCardResponse -from conekta.models.charge_data_payment_method_cash_response import ChargeDataPaymentMethodCashResponse from conekta.models.charge_order_response import ChargeOrderResponse from conekta.models.charge_order_response_payment_method import ChargeOrderResponsePaymentMethod from conekta.models.charge_request import ChargeRequest @@ -74,7 +71,6 @@ from conekta.models.charge_response_channel import ChargeResponseChannel from conekta.models.charge_response_payment_method import ChargeResponsePaymentMethod from conekta.models.charge_response_refunds import ChargeResponseRefunds -from conekta.models.charge_response_refunds_all_of import ChargeResponseRefundsAllOf from conekta.models.charge_response_refunds_data import ChargeResponseRefundsData from conekta.models.charge_update_request import ChargeUpdateRequest from conekta.models.charges_data_response import ChargesDataResponse @@ -84,13 +80,11 @@ from conekta.models.checkout_request import CheckoutRequest from conekta.models.checkout_response import CheckoutResponse from conekta.models.checkouts_response import CheckoutsResponse -from conekta.models.checkouts_response_all_of import CheckoutsResponseAllOf from conekta.models.company_fiscal_info_address_response import CompanyFiscalInfoAddressResponse from conekta.models.company_fiscal_info_response import CompanyFiscalInfoResponse from conekta.models.company_payout_destination_response import CompanyPayoutDestinationResponse from conekta.models.company_response import CompanyResponse from conekta.models.create_customer_fiscal_entities_response import CreateCustomerFiscalEntitiesResponse -from conekta.models.create_customer_fiscal_entities_response_all_of import CreateCustomerFiscalEntitiesResponseAllOf from conekta.models.create_customer_payment_methods_request import CreateCustomerPaymentMethodsRequest from conekta.models.create_customer_payment_methods_response import CreateCustomerPaymentMethodsResponse from conekta.models.create_risk_rules_data import CreateRiskRulesData @@ -100,69 +94,50 @@ from conekta.models.customer_antifraud_info_response import CustomerAntifraudInfoResponse from conekta.models.customer_fiscal_entities_data_response import CustomerFiscalEntitiesDataResponse from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress from conekta.models.customer_fiscal_entities_response import CustomerFiscalEntitiesResponse -from conekta.models.customer_fiscal_entities_response_all_of import CustomerFiscalEntitiesResponseAllOf from conekta.models.customer_info import CustomerInfo from conekta.models.customer_info_just_customer_id import CustomerInfoJustCustomerId from conekta.models.customer_info_just_customer_id_response import CustomerInfoJustCustomerIdResponse from conekta.models.customer_payment_method_request import CustomerPaymentMethodRequest -from conekta.models.customer_payment_methods import CustomerPaymentMethods from conekta.models.customer_payment_methods_data import CustomerPaymentMethodsData from conekta.models.customer_payment_methods_request import CustomerPaymentMethodsRequest from conekta.models.customer_payment_methods_response import CustomerPaymentMethodsResponse from conekta.models.customer_response import CustomerResponse from conekta.models.customer_response_shipping_contacts import CustomerResponseShippingContacts -from conekta.models.customer_response_shipping_contacts_all_of import CustomerResponseShippingContactsAllOf from conekta.models.customer_shipping_contacts import CustomerShippingContacts from conekta.models.customer_shipping_contacts_address import CustomerShippingContactsAddress from conekta.models.customer_shipping_contacts_data_response import CustomerShippingContactsDataResponse -from conekta.models.customer_shipping_contacts_data_response_all_of import CustomerShippingContactsDataResponseAllOf from conekta.models.customer_shipping_contacts_response import CustomerShippingContactsResponse from conekta.models.customer_shipping_contacts_response_address import CustomerShippingContactsResponseAddress from conekta.models.customer_update_fiscal_entities_request import CustomerUpdateFiscalEntitiesRequest from conekta.models.customer_update_shipping_contacts import CustomerUpdateShippingContacts from conekta.models.customers_response import CustomersResponse -from conekta.models.customers_response_all_of import CustomersResponseAllOf from conekta.models.delete_api_keys_response import DeleteApiKeysResponse -from conekta.models.delete_api_keys_response_all_of import DeleteApiKeysResponseAllOf from conekta.models.deleted_blacklist_rule_response import DeletedBlacklistRuleResponse from conekta.models.deleted_whitelist_rule_response import DeletedWhitelistRuleResponse from conekta.models.details import Details from conekta.models.details_error import DetailsError from conekta.models.discount_lines_data_response import DiscountLinesDataResponse from conekta.models.discount_lines_response import DiscountLinesResponse -from conekta.models.discount_lines_response_all_of import DiscountLinesResponseAllOf from conekta.models.email_checkout_request import EmailCheckoutRequest from conekta.models.error import Error -from conekta.models.error_all_of import ErrorAllOf from conekta.models.event_response import EventResponse +from conekta.models.event_types import EventTypes from conekta.models.events_resend_response import EventsResendResponse from conekta.models.fiscal_entity_address import FiscalEntityAddress from conekta.models.get_api_keys_response import GetApiKeysResponse -from conekta.models.get_api_keys_response_all_of import GetApiKeysResponseAllOf from conekta.models.get_charges_response import GetChargesResponse -from conekta.models.get_charges_response_all_of import GetChargesResponseAllOf from conekta.models.get_companies_response import GetCompaniesResponse -from conekta.models.get_companies_response_all_of import GetCompaniesResponseAllOf from conekta.models.get_customer_payment_method_data_response import GetCustomerPaymentMethodDataResponse from conekta.models.get_events_response import GetEventsResponse -from conekta.models.get_events_response_all_of import GetEventsResponseAllOf from conekta.models.get_order_discount_lines_response import GetOrderDiscountLinesResponse -from conekta.models.get_order_discount_lines_response_all_of import GetOrderDiscountLinesResponseAllOf from conekta.models.get_orders_response import GetOrdersResponse from conekta.models.get_payment_method_response import GetPaymentMethodResponse -from conekta.models.get_payment_method_response_all_of import GetPaymentMethodResponseAllOf from conekta.models.get_plans_response import GetPlansResponse -from conekta.models.get_plans_response_all_of import GetPlansResponseAllOf from conekta.models.get_transactions_response import GetTransactionsResponse -from conekta.models.get_transactions_response_all_of import GetTransactionsResponseAllOf from conekta.models.get_transfers_response import GetTransfersResponse -from conekta.models.get_transfers_response_all_of import GetTransfersResponseAllOf from conekta.models.get_webhook_keys_response import GetWebhookKeysResponse -from conekta.models.get_webhook_keys_response_all_of import GetWebhookKeysResponseAllOf from conekta.models.get_webhooks_response import GetWebhooksResponse -from conekta.models.get_webhooks_response_all_of import GetWebhooksResponseAllOf from conekta.models.log_response import LogResponse from conekta.models.logs_response import LogsResponse from conekta.models.logs_response_data import LogsResponseData @@ -170,7 +145,6 @@ from conekta.models.order_customer_info_response import OrderCustomerInfoResponse from conekta.models.order_discount_lines_request import OrderDiscountLinesRequest from conekta.models.order_fiscal_entity_address_response import OrderFiscalEntityAddressResponse -from conekta.models.order_fiscal_entity_address_response_all_of import OrderFiscalEntityAddressResponseAllOf from conekta.models.order_fiscal_entity_request import OrderFiscalEntityRequest from conekta.models.order_fiscal_entity_response import OrderFiscalEntityResponse from conekta.models.order_next_action_response import OrderNextActionResponse @@ -180,16 +154,11 @@ from conekta.models.order_request_customer_info import OrderRequestCustomerInfo from conekta.models.order_response import OrderResponse from conekta.models.order_response_charges import OrderResponseCharges -from conekta.models.order_response_charges_all_of import OrderResponseChargesAllOf from conekta.models.order_response_checkout import OrderResponseCheckout from conekta.models.order_response_customer_info import OrderResponseCustomerInfo -from conekta.models.order_response_customer_info_all_of import OrderResponseCustomerInfoAllOf from conekta.models.order_response_discount_lines import OrderResponseDiscountLines -from conekta.models.order_response_discount_lines_all_of import OrderResponseDiscountLinesAllOf from conekta.models.order_response_products import OrderResponseProducts -from conekta.models.order_response_products_all_of import OrderResponseProductsAllOf from conekta.models.order_response_shipping_contact import OrderResponseShippingContact -from conekta.models.order_response_shipping_contact_all_of import OrderResponseShippingContactAllOf from conekta.models.order_tax_request import OrderTaxRequest from conekta.models.order_update_fiscal_entity_request import OrderUpdateFiscalEntityRequest from conekta.models.order_update_request import OrderUpdateRequest @@ -201,27 +170,26 @@ from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer from conekta.models.payment_method_card import PaymentMethodCard from conekta.models.payment_method_card_request import PaymentMethodCardRequest -from conekta.models.payment_method_card_request_all_of import PaymentMethodCardRequestAllOf from conekta.models.payment_method_card_response import PaymentMethodCardResponse -from conekta.models.payment_method_card_response_all_of import PaymentMethodCardResponseAllOf from conekta.models.payment_method_cash import PaymentMethodCash from conekta.models.payment_method_cash_request import PaymentMethodCashRequest -from conekta.models.payment_method_cash_request_all_of import PaymentMethodCashRequestAllOf from conekta.models.payment_method_cash_response import PaymentMethodCashResponse -from conekta.models.payment_method_cash_response_all_of import PaymentMethodCashResponseAllOf from conekta.models.payment_method_response import PaymentMethodResponse from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent -from conekta.models.payment_method_spei_recurrent_all_of import PaymentMethodSpeiRecurrentAllOf from conekta.models.payment_method_spei_request import PaymentMethodSpeiRequest +from conekta.models.payout import Payout +from conekta.models.payout_method import PayoutMethod +from conekta.models.payout_order import PayoutOrder +from conekta.models.payout_order_payouts_item import PayoutOrderPayoutsItem +from conekta.models.payout_order_response import PayoutOrderResponse +from conekta.models.payout_order_response_customer_info import PayoutOrderResponseCustomerInfo +from conekta.models.payout_orders_response import PayoutOrdersResponse from conekta.models.plan_request import PlanRequest from conekta.models.plan_response import PlanResponse from conekta.models.plan_update_request import PlanUpdateRequest from conekta.models.product import Product from conekta.models.product_data_response import ProductDataResponse -from conekta.models.product_data_response_all_of import ProductDataResponseAllOf from conekta.models.product_order_response import ProductOrderResponse -from conekta.models.product_order_response_all_of import ProductOrderResponseAllOf -from conekta.models.risk_rules import RiskRules from conekta.models.risk_rules_data import RiskRulesData from conekta.models.risk_rules_list import RiskRulesList from conekta.models.shipping_order_response import ShippingOrderResponse @@ -244,12 +212,10 @@ from conekta.models.update_customer import UpdateCustomer from conekta.models.update_customer_antifraud_info import UpdateCustomerAntifraudInfo from conekta.models.update_customer_fiscal_entities_response import UpdateCustomerFiscalEntitiesResponse -from conekta.models.update_customer_fiscal_entities_response_all_of import UpdateCustomerFiscalEntitiesResponseAllOf from conekta.models.update_customer_payment_methods_response import UpdateCustomerPaymentMethodsResponse from conekta.models.update_order_discount_lines_request import UpdateOrderDiscountLinesRequest from conekta.models.update_order_tax_request import UpdateOrderTaxRequest from conekta.models.update_order_tax_response import UpdateOrderTaxResponse -from conekta.models.update_order_tax_response_all_of import UpdateOrderTaxResponseAllOf from conekta.models.update_payment_methods import UpdatePaymentMethods from conekta.models.update_product import UpdateProduct from conekta.models.webhook_key_create_response import WebhookKeyCreateResponse diff --git a/conekta/api/__init__.py b/conekta/api/__init__.py index 8d8660e..18fb25d 100644 --- a/conekta/api/__init__.py +++ b/conekta/api/__init__.py @@ -13,6 +13,7 @@ from conekta.api.orders_api import OrdersApi from conekta.api.payment_link_api import PaymentLinkApi from conekta.api.payment_methods_api import PaymentMethodsApi +from conekta.api.payout_orders_api import PayoutOrdersApi from conekta.api.plans_api import PlansApi from conekta.api.products_api import ProductsApi from conekta.api.shipping_contacts_api import ShippingContactsApi diff --git a/conekta/api/antifraud_api.py b/conekta/api/antifraud_api.py index 7159bf9..5ff74c0 100644 --- a/conekta/api/antifraud_api.py +++ b/conekta/api/antifraud_api.py @@ -12,24 +12,14 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.blacklist_rule_response import BlacklistRuleResponse from conekta.models.create_risk_rules_data import CreateRiskRulesData from conekta.models.deleted_blacklist_rule_response import DeletedBlacklistRuleResponse @@ -37,7 +27,7 @@ from conekta.models.risk_rules_list import RiskRulesList from conekta.models.whitelistlist_rule_response import WhitelistlistRuleResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -114,8 +104,7 @@ def create_rule_blacklist( _response_types_map: Dict[str, Optional[str]] = { '200': "BlacklistRuleResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,8 +176,7 @@ def create_rule_blacklist_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "BlacklistRuleResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -260,8 +248,7 @@ def create_rule_blacklist_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "BlacklistRuleResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -278,19 +265,18 @@ def _create_rule_blacklist_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -408,8 +394,7 @@ def create_rule_whitelist( '200': "WhitelistlistRuleResponse", '401': "Error", '403': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -482,8 +467,7 @@ def create_rule_whitelist_with_http_info( '200': "WhitelistlistRuleResponse", '401': "Error", '403': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -556,8 +540,7 @@ def create_rule_whitelist_without_preload_content( '200': "WhitelistlistRuleResponse", '401': "Error", '403': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -574,19 +557,18 @@ def _create_rule_whitelist_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -708,8 +690,7 @@ def delete_rule_blacklist( '200': "DeletedBlacklistRuleResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -786,8 +767,7 @@ def delete_rule_blacklist_with_http_info( '200': "DeletedBlacklistRuleResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -864,8 +844,7 @@ def delete_rule_blacklist_without_preload_content( '200': "DeletedBlacklistRuleResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -883,19 +862,18 @@ def _delete_rule_blacklist_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1007,8 +985,7 @@ def delete_rule_whitelist( '401': "Error", '403': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1086,8 +1063,7 @@ def delete_rule_whitelist_with_http_info( '401': "Error", '403': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1165,8 +1141,7 @@ def delete_rule_whitelist_without_preload_content( '401': "Error", '403': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1184,19 +1159,18 @@ def _delete_rule_whitelist_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1299,8 +1273,7 @@ def get_rule_blacklist( _response_types_map: Dict[str, Optional[str]] = { '200': "RiskRulesList", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1369,8 +1342,7 @@ def get_rule_blacklist_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "RiskRulesList", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1439,8 +1411,7 @@ def get_rule_blacklist_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "RiskRulesList", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1456,19 +1427,18 @@ def _get_rule_blacklist_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1568,8 +1538,7 @@ def get_rule_whitelist( '200': "RiskRulesList", '401': "Error", '403': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1639,8 +1608,7 @@ def get_rule_whitelist_with_http_info( '200': "RiskRulesList", '401': "Error", '403': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1710,8 +1678,7 @@ def get_rule_whitelist_without_preload_content( '200': "RiskRulesList", '401': "Error", '403': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1727,19 +1694,18 @@ def _get_rule_whitelist_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/api_keys_api.py b/conekta/api/api_keys_api.py index c884a02..0cbda13 100644 --- a/conekta/api/api_keys_api.py +++ b/conekta/api/api_keys_api.py @@ -12,24 +12,14 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.api_key_create_response import ApiKeyCreateResponse from conekta.models.api_key_request import ApiKeyRequest from conekta.models.api_key_response import ApiKeyResponse @@ -37,7 +27,7 @@ from conekta.models.delete_api_keys_response import DeleteApiKeysResponse from conekta.models.get_api_keys_response import GetApiKeysResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -120,8 +110,7 @@ def create_api_key( '200': "ApiKeyCreateResponse", '401': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -199,8 +188,7 @@ def create_api_key_with_http_info( '200': "ApiKeyCreateResponse", '401': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -278,8 +266,7 @@ def create_api_key_without_preload_content( '200': "ApiKeyCreateResponse", '401': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -297,19 +284,18 @@ def _create_api_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -430,8 +416,7 @@ def delete_api_key( '200': "DeleteApiKeysResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -505,8 +490,7 @@ def delete_api_key_with_http_info( '200': "DeleteApiKeysResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -580,8 +564,7 @@ def delete_api_key_without_preload_content( '200': "DeleteApiKeysResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -598,19 +581,18 @@ def _delete_api_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -720,8 +702,7 @@ def get_api_key( '200': "ApiKeyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -799,8 +780,7 @@ def get_api_key_with_http_info( '200': "ApiKeyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -878,8 +858,7 @@ def get_api_key_without_preload_content( '200': "ApiKeyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -897,19 +876,18 @@ def _get_api_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1032,8 +1010,7 @@ def get_api_keys( _response_types_map: Dict[str, Optional[str]] = { '200': "GetApiKeysResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1122,8 +1099,7 @@ def get_api_keys_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetApiKeysResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1212,8 +1188,7 @@ def get_api_keys_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetApiKeysResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1234,19 +1209,18 @@ def _get_api_keys_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1372,8 +1346,7 @@ def update_api_key( '200': "ApiKeyResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1451,8 +1424,7 @@ def update_api_key_with_http_info( '200': "ApiKeyResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1530,8 +1502,7 @@ def update_api_key_without_preload_content( '200': "ApiKeyResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1549,19 +1520,18 @@ def _update_api_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/balances_api.py b/conekta/api/balances_api.py index c9273da..ea3da38 100644 --- a/conekta/api/balances_api.py +++ b/conekta/api/balances_api.py @@ -12,27 +12,17 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.balance_response import BalanceResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -106,8 +96,7 @@ def get_balance( _response_types_map: Dict[str, Optional[str]] = { '200': "BalanceResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -176,8 +165,7 @@ def get_balance_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "BalanceResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -246,8 +234,7 @@ def get_balance_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "BalanceResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -263,19 +250,18 @@ def _get_balance_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/charges_api.py b/conekta/api/charges_api.py index 3a95128..315b942 100644 --- a/conekta/api/charges_api.py +++ b/conekta/api/charges_api.py @@ -12,31 +12,21 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.charge_order_response import ChargeOrderResponse from conekta.models.charge_request import ChargeRequest from conekta.models.charge_response import ChargeResponse from conekta.models.charge_update_request import ChargeUpdateRequest from conekta.models.get_charges_response import GetChargesResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -129,8 +119,7 @@ def get_charges( _response_types_map: Dict[str, Optional[str]] = { '200': "GetChargesResponse", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -218,8 +207,7 @@ def get_charges_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetChargesResponse", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -307,8 +295,7 @@ def get_charges_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetChargesResponse", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -329,19 +316,18 @@ def _get_charges_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -472,8 +458,7 @@ def orders_create_charge( '401': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -556,8 +541,7 @@ def orders_create_charge_with_http_info( '401': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -640,8 +624,7 @@ def orders_create_charge_without_preload_content( '401': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -660,19 +643,18 @@ def _orders_create_charge_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -802,8 +784,7 @@ def update_charge( '200': "ChargeResponse", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -884,8 +865,7 @@ def update_charge_with_http_info( '200': "ChargeResponse", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -966,8 +946,7 @@ def update_charge_without_preload_content( '200': "ChargeResponse", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -986,19 +965,18 @@ def _update_charge_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/companies_api.py b/conekta/api/companies_api.py index 1c2d357..5676a66 100644 --- a/conekta/api/companies_api.py +++ b/conekta/api/companies_api.py @@ -12,28 +12,18 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.company_response import CompanyResponse from conekta.models.get_companies_response import GetCompaniesResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -123,8 +113,7 @@ def get_companies( _response_types_map: Dict[str, Optional[str]] = { '200': "GetCompaniesResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -209,8 +198,7 @@ def get_companies_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetCompaniesResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -295,8 +283,7 @@ def get_companies_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetCompaniesResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -316,19 +303,18 @@ def _get_companies_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -447,8 +433,7 @@ def get_company( '200': "CompanyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -521,8 +506,7 @@ def get_company_with_http_info( '200': "CompanyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -595,8 +579,7 @@ def get_company_without_preload_content( '200': "CompanyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -613,19 +596,18 @@ def _get_company_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/customers_api.py b/conekta/api/customers_api.py index 3cc02a3..c959eb2 100644 --- a/conekta/api/customers_api.py +++ b/conekta/api/customers_api.py @@ -12,24 +12,14 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.create_customer_fiscal_entities_response import CreateCustomerFiscalEntitiesResponse from conekta.models.customer import Customer from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest @@ -39,7 +29,7 @@ from conekta.models.update_customer import UpdateCustomer from conekta.models.update_customer_fiscal_entities_response import UpdateCustomerFiscalEntitiesResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -123,8 +113,7 @@ def create_customer( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -203,8 +192,7 @@ def create_customer_with_http_info( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -283,8 +271,7 @@ def create_customer_without_preload_content( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -302,19 +289,18 @@ def _create_customer_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -444,8 +430,7 @@ def create_customer_fiscal_entities( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -528,8 +513,7 @@ def create_customer_fiscal_entities_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -612,8 +596,7 @@ def create_customer_fiscal_entities_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -632,19 +615,18 @@ def _create_customer_fiscal_entities_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -772,8 +754,7 @@ def delete_customer_by_id( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -852,8 +833,7 @@ def delete_customer_by_id_with_http_info( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -932,8 +912,7 @@ def delete_customer_by_id_without_preload_content( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -951,19 +930,18 @@ def _delete_customer_by_id_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1075,8 +1053,7 @@ def get_customer_by_id( '200': "CustomerResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1154,8 +1131,7 @@ def get_customer_by_id_with_http_info( '200': "CustomerResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1233,8 +1209,7 @@ def get_customer_by_id_without_preload_content( '200': "CustomerResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1252,19 +1227,18 @@ def _get_customer_by_id_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1387,8 +1361,7 @@ def get_customers( _response_types_map: Dict[str, Optional[str]] = { '200': "CustomersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1477,8 +1450,7 @@ def get_customers_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "CustomersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1567,8 +1539,7 @@ def get_customers_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "CustomersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1589,19 +1560,18 @@ def _get_customers_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1732,8 +1702,7 @@ def update_customer( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1816,8 +1785,7 @@ def update_customer_with_http_info( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1900,8 +1868,7 @@ def update_customer_without_preload_content( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1920,19 +1887,18 @@ def _update_customer_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2068,8 +2034,7 @@ def update_customer_fiscal_entities( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2156,8 +2121,7 @@ def update_customer_fiscal_entities_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2244,8 +2208,7 @@ def update_customer_fiscal_entities_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2265,19 +2228,18 @@ def _update_customer_fiscal_entities_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/discounts_api.py b/conekta/api/discounts_api.py index 0e5ab8c..d954894 100644 --- a/conekta/api/discounts_api.py +++ b/conekta/api/discounts_api.py @@ -12,30 +12,20 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.discount_lines_response import DiscountLinesResponse from conekta.models.get_order_discount_lines_response import GetOrderDiscountLinesResponse from conekta.models.order_discount_lines_request import OrderDiscountLinesRequest from conekta.models.update_order_discount_lines_request import UpdateOrderDiscountLinesRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -122,8 +112,7 @@ def orders_create_discount_line( '200': "DiscountLinesResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -205,8 +194,7 @@ def orders_create_discount_line_with_http_info( '200': "DiscountLinesResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -288,8 +276,7 @@ def orders_create_discount_line_without_preload_content( '200': "DiscountLinesResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -308,19 +295,18 @@ def _orders_create_discount_line_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -452,8 +438,7 @@ def orders_delete_discount_lines( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -536,8 +521,7 @@ def orders_delete_discount_lines_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -620,8 +604,7 @@ def orders_delete_discount_lines_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -640,19 +623,18 @@ def _orders_delete_discount_lines_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -771,8 +753,7 @@ def orders_get_discount_line( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -855,8 +836,7 @@ def orders_get_discount_line_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -939,8 +919,7 @@ def orders_get_discount_line_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -959,19 +938,18 @@ def _orders_get_discount_line_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1100,8 +1078,7 @@ def orders_get_discount_lines( _response_types_map: Dict[str, Optional[str]] = { '200': "GetOrderDiscountLinesResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1194,8 +1171,7 @@ def orders_get_discount_lines_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetOrderDiscountLinesResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1288,8 +1264,7 @@ def orders_get_discount_lines_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetOrderDiscountLinesResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1311,19 +1286,18 @@ def _orders_get_discount_lines_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1460,8 +1434,7 @@ def orders_update_discount_lines( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1548,8 +1521,7 @@ def orders_update_discount_lines_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1636,8 +1608,7 @@ def orders_update_discount_lines_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1657,19 +1628,18 @@ def _orders_update_discount_lines_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/events_api.py b/conekta/api/events_api.py index e9a2d88..ad70e4a 100644 --- a/conekta/api/events_api.py +++ b/conekta/api/events_api.py @@ -12,29 +12,19 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.event_response import EventResponse from conekta.models.events_resend_response import EventsResendResponse from conekta.models.get_events_response import GetEventsResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -117,8 +107,7 @@ def get_event( '200': "EventResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -196,8 +185,7 @@ def get_event_with_http_info( '200': "EventResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -275,8 +263,7 @@ def get_event_without_preload_content( '200': "EventResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -294,19 +281,18 @@ def _get_event_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -428,8 +414,7 @@ def get_events( _response_types_map: Dict[str, Optional[str]] = { '200': "GetEventsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -517,8 +502,7 @@ def get_events_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetEventsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -606,8 +590,7 @@ def get_events_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetEventsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -628,19 +611,18 @@ def _get_events_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -766,8 +748,7 @@ def resend_event( '200': "EventsResendResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -845,8 +826,7 @@ def resend_event_with_http_info( '200': "EventsResendResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -924,8 +904,7 @@ def resend_event_without_preload_content( '200': "EventsResendResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -943,19 +922,18 @@ def _resend_event_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/logs_api.py b/conekta/api/logs_api.py index de5794e..7dc7db0 100644 --- a/conekta/api/logs_api.py +++ b/conekta/api/logs_api.py @@ -12,28 +12,18 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.log_response import LogResponse from conekta.models.logs_response import LogsResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -116,8 +106,7 @@ def get_log_by_id( '200': "LogResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -195,8 +184,7 @@ def get_log_by_id_with_http_info( '200': "LogResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -274,8 +262,7 @@ def get_log_by_id_without_preload_content( '200': "LogResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -293,19 +280,18 @@ def _get_log_by_id_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -428,8 +414,7 @@ def get_logs( _response_types_map: Dict[str, Optional[str]] = { '200': "LogsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -518,8 +503,7 @@ def get_logs_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "LogsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -608,8 +592,7 @@ def get_logs_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "LogsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -630,19 +613,18 @@ def _get_logs_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/orders_api.py b/conekta/api/orders_api.py index a426056..45fb322 100644 --- a/conekta/api/orders_api.py +++ b/conekta/api/orders_api.py @@ -12,24 +12,14 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.get_orders_response import GetOrdersResponse from conekta.models.order_capture_request import OrderCaptureRequest from conekta.models.order_refund_request import OrderRefundRequest @@ -37,7 +27,7 @@ from conekta.models.order_response import OrderResponse from conekta.models.order_update_request import OrderUpdateRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -122,8 +112,7 @@ def cancel_order( '402': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -203,8 +192,7 @@ def cancel_order_with_http_info( '402': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -284,8 +272,7 @@ def cancel_order_without_preload_content( '402': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -303,19 +290,18 @@ def _cancel_order_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -428,8 +414,7 @@ def create_order( '422': "Error", '401': "Error", '402': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -508,8 +493,7 @@ def create_order_with_http_info( '422': "Error", '401': "Error", '402': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -588,8 +572,7 @@ def create_order_without_preload_content( '422': "Error", '401': "Error", '402': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -607,19 +590,18 @@ def _create_order_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -744,8 +726,7 @@ def get_order_by_id( '200': "OrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -823,8 +804,7 @@ def get_order_by_id_with_http_info( '200': "OrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -902,8 +882,7 @@ def get_order_by_id_without_preload_content( '200': "OrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -921,19 +900,18 @@ def _get_order_by_id_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1056,8 +1034,7 @@ def get_orders( _response_types_map: Dict[str, Optional[str]] = { '200': "GetOrdersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1146,8 +1123,7 @@ def get_orders_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetOrdersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1236,8 +1212,7 @@ def get_orders_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetOrdersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1258,19 +1233,18 @@ def _get_orders_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1402,8 +1376,7 @@ def order_cancel_refund( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1487,8 +1460,7 @@ def order_cancel_refund_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1572,8 +1544,7 @@ def order_cancel_refund_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1592,19 +1563,18 @@ def _order_cancel_refund_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1724,8 +1694,7 @@ def order_refund( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1809,8 +1778,7 @@ def order_refund_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1894,8 +1862,7 @@ def order_refund_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1914,19 +1881,18 @@ def _order_refund_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2058,8 +2024,7 @@ def orders_create_capture( '401': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2142,8 +2107,7 @@ def orders_create_capture_with_http_info( '401': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2226,8 +2190,7 @@ def orders_create_capture_without_preload_content( '401': "Error", '404': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2246,19 +2209,18 @@ def _orders_create_capture_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -2386,8 +2348,7 @@ def update_order( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2466,8 +2427,7 @@ def update_order_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2546,8 +2506,7 @@ def update_order_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2565,19 +2524,18 @@ def _update_order_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/payment_link_api.py b/conekta/api/payment_link_api.py index 1ed9df4..bdd3af2 100644 --- a/conekta/api/payment_link_api.py +++ b/conekta/api/payment_link_api.py @@ -12,31 +12,21 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.checkout import Checkout from conekta.models.checkout_response import CheckoutResponse from conekta.models.checkouts_response import CheckoutsResponse from conekta.models.email_checkout_request import EmailCheckoutRequest from conekta.models.sms_checkout_request import SmsCheckoutRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -120,8 +110,7 @@ def cancel_checkout( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -200,8 +189,7 @@ def cancel_checkout_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -280,8 +268,7 @@ def cancel_checkout_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -299,19 +286,18 @@ def _cancel_checkout_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -423,8 +409,7 @@ def create_checkout( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -502,8 +487,7 @@ def create_checkout_with_http_info( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -581,8 +565,7 @@ def create_checkout_without_preload_content( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -600,19 +583,18 @@ def _create_checkout_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -742,8 +724,7 @@ def email_checkout( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -826,8 +807,7 @@ def email_checkout_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -910,8 +890,7 @@ def email_checkout_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -930,19 +909,18 @@ def _email_checkout_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1070,8 +1048,7 @@ def get_checkout( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1150,8 +1127,7 @@ def get_checkout_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1230,8 +1206,7 @@ def get_checkout_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1249,19 +1224,18 @@ def _get_checkout_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1386,8 +1360,7 @@ def get_checkouts( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1478,8 +1451,7 @@ def get_checkouts_with_http_info( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1570,8 +1542,7 @@ def get_checkouts_without_preload_content( '401': "Error", '402': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1592,19 +1563,18 @@ def _get_checkouts_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1735,8 +1705,7 @@ def sms_checkout( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1819,8 +1788,7 @@ def sms_checkout_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1903,8 +1871,7 @@ def sms_checkout_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1923,19 +1890,18 @@ def _sms_checkout_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/payment_methods_api.py b/conekta/api/payment_methods_api.py index 9158caa..03062da 100644 --- a/conekta/api/payment_methods_api.py +++ b/conekta/api/payment_methods_api.py @@ -12,31 +12,21 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.create_customer_payment_methods_request import CreateCustomerPaymentMethodsRequest from conekta.models.create_customer_payment_methods_response import CreateCustomerPaymentMethodsResponse from conekta.models.get_payment_method_response import GetPaymentMethodResponse from conekta.models.update_customer_payment_methods_response import UpdateCustomerPaymentMethodsResponse from conekta.models.update_payment_methods import UpdatePaymentMethods -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -124,8 +114,7 @@ def create_customer_payment_methods( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -208,8 +197,7 @@ def create_customer_payment_methods_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -292,8 +280,7 @@ def create_customer_payment_methods_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -312,19 +299,18 @@ def _create_customer_payment_methods_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -456,8 +442,7 @@ def delete_customer_payment_methods( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -540,8 +525,7 @@ def delete_customer_payment_methods_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -624,8 +608,7 @@ def delete_customer_payment_methods_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -644,19 +627,18 @@ def _delete_customer_payment_methods_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -786,8 +768,7 @@ def get_customer_payment_methods( '200': "GetPaymentMethodResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -881,8 +862,7 @@ def get_customer_payment_methods_with_http_info( '200': "GetPaymentMethodResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -976,8 +956,7 @@ def get_customer_payment_methods_without_preload_content( '200': "GetPaymentMethodResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -999,19 +978,18 @@ def _get_customer_payment_methods_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1148,8 +1126,7 @@ def update_customer_payment_methods( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1236,8 +1213,7 @@ def update_customer_payment_methods_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1324,8 +1300,7 @@ def update_customer_payment_methods_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1345,19 +1320,18 @@ def _update_customer_payment_methods_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/payout_orders_api.py b/conekta/api/payout_orders_api.py new file mode 100644 index 0000000..b0f0487 --- /dev/null +++ b/conekta/api/payout_orders_api.py @@ -0,0 +1,957 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from conekta.models.payout_order import PayoutOrder +from conekta.models.payout_order_response import PayoutOrderResponse +from conekta.models.payout_orders_response import PayoutOrdersResponse + +from conekta.api_client import ApiClient, RequestSerialized +from conekta.api_response import ApiResponse +from conekta.rest import RESTResponseType + + +class PayoutOrdersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def create_payout_order( + self, + payout_order: Annotated[PayoutOrder, Field(description="requested field for payout order")], + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayoutOrderResponse: + """Create payout order + + Create a new payout order. + + :param payout_order: requested field for payout order (required) + :type payout_order: PayoutOrder + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_payout_order_serialize( + payout_order=payout_order, + accept_language=accept_language, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrderResponse", + '422': "Error", + '401': "Error", + '402': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def create_payout_order_with_http_info( + self, + payout_order: Annotated[PayoutOrder, Field(description="requested field for payout order")], + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayoutOrderResponse]: + """Create payout order + + Create a new payout order. + + :param payout_order: requested field for payout order (required) + :type payout_order: PayoutOrder + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_payout_order_serialize( + payout_order=payout_order, + accept_language=accept_language, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrderResponse", + '422': "Error", + '401': "Error", + '402': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def create_payout_order_without_preload_content( + self, + payout_order: Annotated[PayoutOrder, Field(description="requested field for payout order")], + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create payout order + + Create a new payout order. + + :param payout_order: requested field for payout order (required) + :type payout_order: PayoutOrder + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_payout_order_serialize( + payout_order=payout_order, + accept_language=accept_language, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrderResponse", + '422': "Error", + '401': "Error", + '402': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_payout_order_serialize( + self, + payout_order, + accept_language, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if accept_language is not None: + _header_params['Accept-Language'] = accept_language + # process the form parameters + # process the body parameter + if payout_order is not None: + _body_params = payout_order + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.conekta-v2.1.0+json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/payout_orders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_payout_order_by_id( + self, + id: Annotated[StrictStr, Field(description="Identifier of the resource")], + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayoutOrderResponse: + """Get Payout Order + + Gets a payout Order resource that corresponds to a payout order ID. + + :param id: Identifier of the resource (required) + :type id: str + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_payout_order_by_id_serialize( + id=id, + accept_language=accept_language, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrderResponse", + '401': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_payout_order_by_id_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Identifier of the resource")], + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayoutOrderResponse]: + """Get Payout Order + + Gets a payout Order resource that corresponds to a payout order ID. + + :param id: Identifier of the resource (required) + :type id: str + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_payout_order_by_id_serialize( + id=id, + accept_language=accept_language, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrderResponse", + '401': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_payout_order_by_id_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Identifier of the resource")], + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Payout Order + + Gets a payout Order resource that corresponds to a payout order ID. + + :param id: Identifier of the resource (required) + :type id: str + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_payout_order_by_id_serialize( + id=id, + accept_language=accept_language, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrderResponse", + '401': "Error", + '404': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_payout_order_by_id_serialize( + self, + id, + accept_language, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + if accept_language is not None: + _header_params['Accept-Language'] = accept_language + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.conekta-v2.1.0+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/payout_orders/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_payout_orders( + self, + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None, + search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None, + next: Annotated[Optional[StrictStr], Field(description="next page")] = None, + previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PayoutOrdersResponse: + """Get a list of Payout Orders + + Get Payout order details in the form of a list + + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param limit: The numbers of items to return, the maximum value is 250 + :type limit: int + :param search: General order search, e.g. by mail, reference etc. + :type search: str + :param next: next page + :type next: str + :param previous: previous page + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_payout_orders_serialize( + accept_language=accept_language, + limit=limit, + search=search, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrdersResponse", + '401': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_payout_orders_with_http_info( + self, + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None, + search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None, + next: Annotated[Optional[StrictStr], Field(description="next page")] = None, + previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PayoutOrdersResponse]: + """Get a list of Payout Orders + + Get Payout order details in the form of a list + + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param limit: The numbers of items to return, the maximum value is 250 + :type limit: int + :param search: General order search, e.g. by mail, reference etc. + :type search: str + :param next: next page + :type next: str + :param previous: previous page + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_payout_orders_serialize( + accept_language=accept_language, + limit=limit, + search=search, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrdersResponse", + '401': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_payout_orders_without_preload_content( + self, + accept_language: Annotated[Optional[StrictStr], Field(description="Use for knowing which language to use")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None, + search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None, + next: Annotated[Optional[StrictStr], Field(description="next page")] = None, + previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get a list of Payout Orders + + Get Payout order details in the form of a list + + :param accept_language: Use for knowing which language to use + :type accept_language: str + :param limit: The numbers of items to return, the maximum value is 250 + :type limit: int + :param search: General order search, e.g. by mail, reference etc. + :type search: str + :param next: next page + :type next: str + :param previous: previous page + :type previous: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_payout_orders_serialize( + accept_language=accept_language, + limit=limit, + search=search, + next=next, + previous=previous, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "PayoutOrdersResponse", + '401': "Error", + '500': "Error", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_payout_orders_serialize( + self, + accept_language, + limit, + search, + next, + previous, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if search is not None: + + _query_params.append(('search', search)) + + if next is not None: + + _query_params.append(('next', next)) + + if previous is not None: + + _query_params.append(('previous', previous)) + + # process the header parameters + if accept_language is not None: + _header_params['Accept-Language'] = accept_language + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.conekta-v2.1.0+json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/payout_orders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/conekta/api/plans_api.py b/conekta/api/plans_api.py index 3a416cc..031e538 100644 --- a/conekta/api/plans_api.py +++ b/conekta/api/plans_api.py @@ -12,30 +12,20 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.get_plans_response import GetPlansResponse from conekta.models.plan_request import PlanRequest from conekta.models.plan_response import PlanResponse from conekta.models.plan_update_request import PlanUpdateRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -118,8 +108,7 @@ def create_plan( '200': "PlanResponse", '422': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -197,8 +186,7 @@ def create_plan_with_http_info( '200': "PlanResponse", '422': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -276,8 +264,7 @@ def create_plan_without_preload_content( '200': "PlanResponse", '422': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -295,19 +282,18 @@ def _create_plan_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -428,8 +414,7 @@ def delete_plan( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -503,8 +488,7 @@ def delete_plan_with_http_info( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -578,8 +562,7 @@ def delete_plan_without_preload_content( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -596,19 +579,18 @@ def _delete_plan_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -718,8 +700,7 @@ def get_plan( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -797,8 +778,7 @@ def get_plan_with_http_info( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -876,8 +856,7 @@ def get_plan_without_preload_content( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -895,19 +874,18 @@ def _get_plan_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1030,8 +1008,7 @@ def get_plans( '200': "GetPlansResponse", '422': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1120,8 +1097,7 @@ def get_plans_with_http_info( '200': "GetPlansResponse", '422': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1210,8 +1186,7 @@ def get_plans_without_preload_content( '200': "GetPlansResponse", '422': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1232,19 +1207,18 @@ def _get_plans_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1374,8 +1348,7 @@ def update_plan( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1457,8 +1430,7 @@ def update_plan_with_http_info( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1540,8 +1512,7 @@ def update_plan_without_preload_content( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1560,19 +1531,18 @@ def _update_plan_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/products_api.py b/conekta/api/products_api.py index 87cd139..e3c6238 100644 --- a/conekta/api/products_api.py +++ b/conekta/api/products_api.py @@ -12,29 +12,19 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.product import Product from conekta.models.product_order_response import ProductOrderResponse from conekta.models.update_product import UpdateProduct -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -121,8 +111,7 @@ def orders_create_product( '200': "ProductOrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -204,8 +193,7 @@ def orders_create_product_with_http_info( '200': "ProductOrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -287,8 +275,7 @@ def orders_create_product_without_preload_content( '200': "ProductOrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -307,19 +294,18 @@ def _orders_create_product_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -451,8 +437,7 @@ def orders_delete_product( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -535,8 +520,7 @@ def orders_delete_product_with_http_info( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -619,8 +603,7 @@ def orders_delete_product_without_preload_content( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -639,19 +622,18 @@ def _orders_delete_product_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -774,8 +756,7 @@ def orders_update_product( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -862,8 +843,7 @@ def orders_update_product_with_http_info( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -950,8 +930,7 @@ def orders_update_product_without_preload_content( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -971,19 +950,18 @@ def _orders_update_product_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/shipping_contacts_api.py b/conekta/api/shipping_contacts_api.py index 5336c3e..fe72363 100644 --- a/conekta/api/shipping_contacts_api.py +++ b/conekta/api/shipping_contacts_api.py @@ -12,29 +12,19 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.customer_shipping_contacts import CustomerShippingContacts from conekta.models.customer_shipping_contacts_response import CustomerShippingContactsResponse from conekta.models.customer_update_shipping_contacts import CustomerUpdateShippingContacts -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -122,8 +112,7 @@ def create_customer_shipping_contacts( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -206,8 +195,7 @@ def create_customer_shipping_contacts_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -290,8 +278,7 @@ def create_customer_shipping_contacts_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -310,19 +297,18 @@ def _create_customer_shipping_contacts_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -454,8 +440,7 @@ def delete_customer_shipping_contacts( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -538,8 +523,7 @@ def delete_customer_shipping_contacts_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -622,8 +606,7 @@ def delete_customer_shipping_contacts_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -642,19 +625,18 @@ def _delete_customer_shipping_contacts_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -777,8 +759,7 @@ def update_customer_shipping_contacts( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -865,8 +846,7 @@ def update_customer_shipping_contacts_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -953,8 +933,7 @@ def update_customer_shipping_contacts_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -974,19 +953,18 @@ def _update_customer_shipping_contacts_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/shippings_api.py b/conekta/api/shippings_api.py index f3f04ed..bcdba87 100644 --- a/conekta/api/shippings_api.py +++ b/conekta/api/shippings_api.py @@ -12,28 +12,18 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.shipping_order_response import ShippingOrderResponse from conekta.models.shipping_request import ShippingRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -120,8 +110,7 @@ def orders_create_shipping( '200': "ShippingOrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -203,8 +192,7 @@ def orders_create_shipping_with_http_info( '200': "ShippingOrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -286,8 +274,7 @@ def orders_create_shipping_without_preload_content( '200': "ShippingOrderResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -306,19 +293,18 @@ def _orders_create_shipping_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -451,8 +437,7 @@ def orders_delete_shipping( '404': "Error", '422': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -536,8 +521,7 @@ def orders_delete_shipping_with_http_info( '404': "Error", '422': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -621,8 +605,7 @@ def orders_delete_shipping_without_preload_content( '404': "Error", '422': "Error", '428': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -641,19 +624,18 @@ def _orders_delete_shipping_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -776,8 +758,7 @@ def orders_update_shipping( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -864,8 +845,7 @@ def orders_update_shipping_with_http_info( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -952,8 +932,7 @@ def orders_update_shipping_without_preload_content( '401': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -973,19 +952,18 @@ def _orders_update_shipping_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/subscriptions_api.py b/conekta/api/subscriptions_api.py index 5145715..095a6e6 100644 --- a/conekta/api/subscriptions_api.py +++ b/conekta/api/subscriptions_api.py @@ -12,30 +12,20 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.subscription_events_response import SubscriptionEventsResponse from conekta.models.subscription_request import SubscriptionRequest from conekta.models.subscription_response import SubscriptionResponse from conekta.models.subscription_update_request import SubscriptionUpdateRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -118,8 +108,7 @@ def cancel_subscription( '200': "SubscriptionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -197,8 +186,7 @@ def cancel_subscription_with_http_info( '200': "SubscriptionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -276,8 +264,7 @@ def cancel_subscription_without_preload_content( '200': "SubscriptionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -295,19 +282,18 @@ def _cancel_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -424,8 +410,7 @@ def create_subscription( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -508,8 +493,7 @@ def create_subscription_with_http_info( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -592,8 +576,7 @@ def create_subscription_without_preload_content( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -612,19 +595,18 @@ def _create_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -753,8 +735,7 @@ def get_all_events_from_subscription( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -834,8 +815,7 @@ def get_all_events_from_subscription_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -915,8 +895,7 @@ def get_all_events_from_subscription_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -934,19 +913,18 @@ def _get_all_events_from_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1053,8 +1031,7 @@ def get_subscription( '200': "SubscriptionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1127,8 +1104,7 @@ def get_subscription_with_http_info( '200': "SubscriptionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1201,8 +1177,7 @@ def get_subscription_without_preload_content( '200': "SubscriptionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1219,19 +1194,18 @@ def _get_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1342,8 +1316,7 @@ def pause_subscription( '401': "Error", '402': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1422,8 +1395,7 @@ def pause_subscription_with_http_info( '401': "Error", '402': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1502,8 +1474,7 @@ def pause_subscription_without_preload_content( '401': "Error", '402': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1521,19 +1492,18 @@ def _pause_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1647,8 +1617,7 @@ def resume_subscription( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1728,8 +1697,7 @@ def resume_subscription_with_http_info( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1809,8 +1777,7 @@ def resume_subscription_without_preload_content( '402': "Error", '404': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1828,19 +1795,18 @@ def _resume_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1957,8 +1923,7 @@ def update_subscription( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2041,8 +2006,7 @@ def update_subscription_with_http_info( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2125,8 +2089,7 @@ def update_subscription_without_preload_content( '422': "Error", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -2145,19 +2108,18 @@ def _update_subscription_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/taxes_api.py b/conekta/api/taxes_api.py index 8021999..056a64a 100644 --- a/conekta/api/taxes_api.py +++ b/conekta/api/taxes_api.py @@ -12,29 +12,19 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.order_tax_request import OrderTaxRequest from conekta.models.update_order_tax_request import UpdateOrderTaxRequest from conekta.models.update_order_tax_response import UpdateOrderTaxResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -121,8 +111,7 @@ def orders_create_taxes( '200': "UpdateOrderTaxResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -204,8 +193,7 @@ def orders_create_taxes_with_http_info( '200': "UpdateOrderTaxResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -287,8 +275,7 @@ def orders_create_taxes_without_preload_content( '200': "UpdateOrderTaxResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -307,19 +294,18 @@ def _orders_create_taxes_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -451,8 +437,7 @@ def orders_delete_taxes( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -535,8 +520,7 @@ def orders_delete_taxes_with_http_info( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -619,8 +603,7 @@ def orders_delete_taxes_without_preload_content( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -639,19 +622,18 @@ def _orders_delete_taxes_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -774,8 +756,7 @@ def orders_update_taxes( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -862,8 +843,7 @@ def orders_update_taxes_with_http_info( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -950,8 +930,7 @@ def orders_update_taxes_without_preload_content( '401': "Error", '422': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -971,19 +950,18 @@ def _orders_update_taxes_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/tokens_api.py b/conekta/api/tokens_api.py index 8dd194b..4b69065 100644 --- a/conekta/api/tokens_api.py +++ b/conekta/api/tokens_api.py @@ -12,28 +12,18 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.token import Token from conekta.models.token_response import TokenResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -112,8 +102,7 @@ def create_token( '200': "TokenResponse", '401': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,8 +176,7 @@ def create_token_with_http_info( '200': "TokenResponse", '401': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -262,8 +250,7 @@ def create_token_without_preload_content( '200': "TokenResponse", '401': "Error", '422': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -280,19 +267,18 @@ def _create_token_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/transactions_api.py b/conekta/api/transactions_api.py index 7916469..7ce1712 100644 --- a/conekta/api/transactions_api.py +++ b/conekta/api/transactions_api.py @@ -12,28 +12,18 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.get_transactions_response import GetTransactionsResponse from conekta.models.transaction_response import TransactionResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -116,8 +106,7 @@ def get_transaction( '200': "TransactionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -195,8 +184,7 @@ def get_transaction_with_http_info( '200': "TransactionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -274,8 +262,7 @@ def get_transaction_without_preload_content( '200': "TransactionResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -293,19 +280,18 @@ def _get_transaction_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -440,8 +426,7 @@ def get_transactions( _response_types_map: Dict[str, Optional[str]] = { '200': "GetTransactionsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -542,8 +527,7 @@ def get_transactions_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetTransactionsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -644,8 +628,7 @@ def get_transactions_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetTransactionsResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -669,19 +652,18 @@ def _get_transactions_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/transfers_api.py b/conekta/api/transfers_api.py index 75fefb4..d04fbc9 100644 --- a/conekta/api/transfers_api.py +++ b/conekta/api/transfers_api.py @@ -12,28 +12,18 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.get_transfers_response import GetTransfersResponse from conekta.models.transfer_response import TransferResponse -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -116,8 +106,7 @@ def get_transfer( '200': "TransferResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -195,8 +184,7 @@ def get_transfer_with_http_info( '200': "TransferResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -274,8 +262,7 @@ def get_transfer_without_preload_content( '200': "TransferResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -293,19 +280,18 @@ def _get_transfer_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -428,8 +414,7 @@ def get_transfers( _response_types_map: Dict[str, Optional[str]] = { '200': "GetTransfersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -518,8 +503,7 @@ def get_transfers_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetTransfersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -608,8 +592,7 @@ def get_transfers_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetTransfersResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -630,19 +613,18 @@ def _get_transfers_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/webhook_keys_api.py b/conekta/api/webhook_keys_api.py index ffb4c29..5eb3650 100644 --- a/conekta/api/webhook_keys_api.py +++ b/conekta/api/webhook_keys_api.py @@ -12,24 +12,14 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.get_webhook_keys_response import GetWebhookKeysResponse from conekta.models.webhook_key_create_response import WebhookKeyCreateResponse from conekta.models.webhook_key_delete_response import WebhookKeyDeleteResponse @@ -37,7 +27,7 @@ from conekta.models.webhook_key_response import WebhookKeyResponse from conekta.models.webhook_key_update_request import WebhookKeyUpdateRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -115,8 +105,7 @@ def create_webhook_key( _response_types_map: Dict[str, Optional[str]] = { '200': "WebhookKeyCreateResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -189,8 +178,7 @@ def create_webhook_key_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "WebhookKeyCreateResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -263,8 +251,7 @@ def create_webhook_key_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "WebhookKeyCreateResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -281,19 +268,18 @@ def _create_webhook_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -411,8 +397,7 @@ def delete_webhook_key( '200': "WebhookKeyDeleteResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -485,8 +470,7 @@ def delete_webhook_key_with_http_info( '200': "WebhookKeyDeleteResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -559,8 +543,7 @@ def delete_webhook_key_without_preload_content( '200': "WebhookKeyDeleteResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -577,19 +560,18 @@ def _delete_webhook_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -698,8 +680,7 @@ def get_webhook_key( '200': "WebhookKeyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -776,8 +757,7 @@ def get_webhook_key_with_http_info( '200': "WebhookKeyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -854,8 +834,7 @@ def get_webhook_key_without_preload_content( '200': "WebhookKeyResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -873,19 +852,18 @@ def _get_webhook_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1008,8 +986,7 @@ def get_webhook_keys( _response_types_map: Dict[str, Optional[str]] = { '200': "GetWebhookKeysResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1098,8 +1075,7 @@ def get_webhook_keys_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetWebhookKeysResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1188,8 +1164,7 @@ def get_webhook_keys_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetWebhookKeysResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1210,19 +1185,18 @@ def _get_webhook_keys_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1348,8 +1322,7 @@ def update_webhook_key( '200': "WebhookKeyResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1427,8 +1400,7 @@ def update_webhook_key_with_http_info( '200': "WebhookKeyResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1506,8 +1478,7 @@ def update_webhook_key_without_preload_content( '200': "WebhookKeyResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1525,19 +1496,18 @@ def _update_webhook_key_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api/webhooks_api.py b/conekta/api/webhooks_api.py index de22ca2..f6ffbd2 100644 --- a/conekta/api/webhooks_api.py +++ b/conekta/api/webhooks_api.py @@ -12,30 +12,20 @@ Do not edit the class manually. """ # noqa: E501 - -import io import warnings - from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Dict, List, Optional, Tuple, Union, Any - -try: - from typing import Annotated -except ImportError: - from typing_extensions import Annotated - -from pydantic import Field +from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import StrictStr, field_validator +from pydantic import Field, StrictStr, field_validator from typing import Optional - +from typing_extensions import Annotated from conekta.models.get_webhooks_response import GetWebhooksResponse from conekta.models.webhook_request import WebhookRequest from conekta.models.webhook_response import WebhookResponse from conekta.models.webhook_update_request import WebhookUpdateRequest -from conekta.api_client import ApiClient +from conekta.api_client import ApiClient, RequestSerialized from conekta.api_response import ApiResponse from conekta.rest import RESTResponseType @@ -113,8 +103,7 @@ def create_webhook( _response_types_map: Dict[str, Optional[str]] = { '200': "WebhookResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -187,8 +176,7 @@ def create_webhook_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "WebhookResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -261,8 +249,7 @@ def create_webhook_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "WebhookResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -279,19 +266,18 @@ def _create_webhook_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -409,8 +395,7 @@ def delete_webhook( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -483,8 +468,7 @@ def delete_webhook_with_http_info( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -557,8 +541,7 @@ def delete_webhook_without_preload_content( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -575,19 +558,18 @@ def _delete_webhook_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -696,8 +678,7 @@ def get_webhook( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -774,8 +755,7 @@ def get_webhook_with_http_info( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -852,8 +832,7 @@ def get_webhook_without_preload_content( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -871,19 +850,18 @@ def _get_webhook_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -937,6 +915,7 @@ def get_webhooks( x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None, limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None, search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None, + url: Annotated[Optional[StrictStr], Field(description="url for webhook filter")] = None, next: Annotated[Optional[StrictStr], Field(description="next page")] = None, previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None, _request_timeout: Union[ @@ -964,6 +943,8 @@ def get_webhooks( :type limit: int :param search: General order search, e.g. by mail, reference etc. :type search: str + :param url: url for webhook filter + :type url: str :param next: next page :type next: str :param previous: previous page @@ -995,6 +976,7 @@ def get_webhooks( x_child_company_id=x_child_company_id, limit=limit, search=search, + url=url, next=next, previous=previous, _request_auth=_request_auth, @@ -1006,8 +988,7 @@ def get_webhooks( _response_types_map: Dict[str, Optional[str]] = { '200': "GetWebhooksResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1027,6 +1008,7 @@ def get_webhooks_with_http_info( x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None, limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None, search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None, + url: Annotated[Optional[StrictStr], Field(description="url for webhook filter")] = None, next: Annotated[Optional[StrictStr], Field(description="next page")] = None, previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None, _request_timeout: Union[ @@ -1054,6 +1036,8 @@ def get_webhooks_with_http_info( :type limit: int :param search: General order search, e.g. by mail, reference etc. :type search: str + :param url: url for webhook filter + :type url: str :param next: next page :type next: str :param previous: previous page @@ -1085,6 +1069,7 @@ def get_webhooks_with_http_info( x_child_company_id=x_child_company_id, limit=limit, search=search, + url=url, next=next, previous=previous, _request_auth=_request_auth, @@ -1096,8 +1081,7 @@ def get_webhooks_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "GetWebhooksResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1117,6 +1101,7 @@ def get_webhooks_without_preload_content( x_child_company_id: Annotated[Optional[StrictStr], Field(description="In the case of a holding company, the company id of the child company to which will process the request.")] = None, limit: Annotated[Optional[Annotated[int, Field(le=250, strict=True, ge=1)]], Field(description="The numbers of items to return, the maximum value is 250")] = None, search: Annotated[Optional[StrictStr], Field(description="General order search, e.g. by mail, reference etc.")] = None, + url: Annotated[Optional[StrictStr], Field(description="url for webhook filter")] = None, next: Annotated[Optional[StrictStr], Field(description="next page")] = None, previous: Annotated[Optional[StrictStr], Field(description="previous page")] = None, _request_timeout: Union[ @@ -1144,6 +1129,8 @@ def get_webhooks_without_preload_content( :type limit: int :param search: General order search, e.g. by mail, reference etc. :type search: str + :param url: url for webhook filter + :type url: str :param next: next page :type next: str :param previous: previous page @@ -1175,6 +1162,7 @@ def get_webhooks_without_preload_content( x_child_company_id=x_child_company_id, limit=limit, search=search, + url=url, next=next, previous=previous, _request_auth=_request_auth, @@ -1186,8 +1174,7 @@ def get_webhooks_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "GetWebhooksResponse", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1202,25 +1189,25 @@ def _get_webhooks_serialize( x_child_company_id, limit, search, + url, next, previous, _request_auth, _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1233,6 +1220,10 @@ def _get_webhooks_serialize( _query_params.append(('search', search)) + if url is not None: + + _query_params.append(('url', url)) + if next is not None: _query_params.append(('next', next)) @@ -1342,8 +1333,7 @@ def test_webhook( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1417,8 +1407,7 @@ def test_webhook_with_http_info( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1492,8 +1481,7 @@ def test_webhook_without_preload_content( '200': "WebhookResponse", '401': "Error", '404': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1510,19 +1498,18 @@ def _test_webhook_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters @@ -1636,8 +1623,7 @@ def update_webhook( '200': "WebhookResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1719,8 +1705,7 @@ def update_webhook_with_http_info( '200': "WebhookResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1802,8 +1787,7 @@ def update_webhook_without_preload_content( '200': "WebhookResponse", '404': "Error", '401': "Error", - '500': "Error" - + '500': "Error", } response_data = self.api_client.call_api( *_param, @@ -1822,19 +1806,18 @@ def _update_webhook_serialize( _content_type, _headers, _host_index, - ) -> Tuple: + ) -> RequestSerialized: _host = None _collection_formats: Dict[str, str] = { - } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] _header_params: Dict[str, Optional[str]] = _headers or {} _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, str] = {} + _files: Dict[str, Union[str, bytes]] = {} _body_params: Optional[bytes] = None # process the path parameters diff --git a/conekta/api_client.py b/conekta/api_client.py index cee3d8a..f01d281 100644 --- a/conekta/api_client.py +++ b/conekta/api_client.py @@ -13,9 +13,9 @@ """ # noqa: E501 -import atexit import datetime from dateutil.parser import parse +from enum import Enum import json import mimetypes import os @@ -24,10 +24,11 @@ import platform from urllib.parse import quote -from typing import Tuple, Optional, List +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr from conekta.configuration import Configuration -from conekta.api_response import ApiResponse +from conekta.api_response import ApiResponse, T as ApiResponseT import conekta.models from conekta import rest from conekta.exceptions import ( @@ -40,6 +41,7 @@ ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] class ApiClient: """Generic API client for OpenAPI client library builds. @@ -72,7 +74,7 @@ class ApiClient: 'lang': 'python', 'lang_version': platform.python_version(), 'publisher': 'conekta', - 'bindings_version': '6.0.2', + 'bindings_version': '6.0.3', 'uname': platform.uname() } _pool = None @@ -95,7 +97,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Conekta/v2 PythonBindings/6.0.2' + self.user_agent = 'Conekta/v2 PythonBindings/6.0.3' self.conekta_user_agent = json.dumps(self.data) self.client_side_validation = configuration.client_side_validation @@ -166,7 +168,7 @@ def param_serialize( collection_formats=None, _host=None, _request_auth=None - ) -> Tuple: + ) -> RequestSerialized: """Builds the HTTP request params needed by the request. :param method: Method to call. @@ -225,7 +227,8 @@ def param_serialize( post_params, collection_formats ) - post_params.extend(self.files_parameters(files)) + if files: + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -292,62 +295,55 @@ def call_api( ) except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') raise e return response_data def response_deserialize( self, - response_data=None, - response_types_map=None - ) -> ApiResponse: + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. :param response_types_map: dict of response types. :return: ApiResponse """ + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, @@ -360,6 +356,7 @@ def sanitize_for_serialization(self, obj): """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. @@ -372,6 +369,10 @@ def sanitize_for_serialization(self, obj): """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -393,7 +394,10 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = obj.to_dict() + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ return { key: self.sanitize_for_serialization(val) @@ -431,12 +435,16 @@ def __deserialize(self, data, klass): if isinstance(klass, str): if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} @@ -454,6 +462,8 @@ def __deserialize(self, data, klass): return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) @@ -464,7 +474,7 @@ def parameters_to_tuples(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -494,7 +504,7 @@ def parameters_to_url_query(self, params, collection_formats): :param dict collection_formats: Parameter collection formats :return: URL query string (e.g. a=Hello%20World&b=123) """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -508,7 +518,7 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, value) for value in v) + new_params.extend((k, str(value)) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -524,33 +534,32 @@ def parameters_to_url_query(self, params, collection_formats): else: new_params.append((k, quote(str(v)))) - return "&".join(["=".join(item) for item in new_params]) + return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files=None): + def files_parameters(self, files: Dict[str, Union[str, bytes]]): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -679,10 +688,12 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.search( + m = re.search( r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -749,6 +760,24 @@ def __deserialize_datetime(self, string): ) ) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/conekta/api_response.py b/conekta/api_response.py index 2ac1ada..9bc7c11 100644 --- a/conekta/api_response.py +++ b/conekta/api_response.py @@ -1,8 +1,8 @@ """API response object.""" from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel T = TypeVar("T") @@ -12,7 +12,7 @@ class ApiResponse(BaseModel, Generic[T]): """ status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") diff --git a/conekta/configuration.py b/conekta/configuration.py index 9348d55..bcd15f2 100644 --- a/conekta/configuration.py +++ b/conekta/configuration.py @@ -15,7 +15,10 @@ import copy import logging +from logging import FileHandler +import multiprocessing import sys +from typing import Optional import urllib3 import http.client as httplib @@ -116,7 +119,7 @@ def __init__(self, host=None, self.logger_stream_handler = None """Log stream handler """ - self.logger_file_handler = None + self.logger_file_handler: Optional[FileHandler] = None """Log file handler """ self.logger_file = None @@ -148,8 +151,15 @@ def __init__(self, host=None, Set this to the SNI value expected by the server. """ + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. urllib3 uses 1 connection as default value, but this is + not the best value when you are making a lot of possibly parallel + requests to the same host, which is often the case here. + cpu_count * 5 is used as default value to increase performance. + """ - self.proxy = None + self.proxy: Optional[str] = None """Proxy URL """ self.proxy_headers = None @@ -369,7 +379,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.1.0\n"\ - "SDK Package Version: 6.0.2".\ + "SDK Package Version: 6.0.3".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/conekta/exceptions.py b/conekta/exceptions.py index b204ff4..26a42df 100644 --- a/conekta/exceptions.py +++ b/conekta/exceptions.py @@ -12,6 +12,8 @@ Do not edit the class manually. """ # noqa: E501 +from typing import Any, Optional +from typing_extensions import Self class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -102,17 +104,56 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None) -> None: + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + if http_resp: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode('utf-8') + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass self.headers = http_resp.getheaders() - else: - self.status = status - self.reason = reason - self.body = None - self.headers = None + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) def __str__(self): """Custom error messages for exception""" @@ -122,38 +163,30 @@ def __str__(self): error_message += "HTTP response headers: {0}\n".format( self.headers) - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) + if self.data or self.body: + error_message += "HTTP response body: {0}\n".format(self.data or self.body) return error_message + class BadRequestException(ApiException): + pass - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(BadRequestException, self).__init__(status, reason, http_resp) class NotFoundException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(NotFoundException, self).__init__(status, reason, http_resp) + pass class UnauthorizedException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(UnauthorizedException, self).__init__(status, reason, http_resp) + pass class ForbiddenException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ForbiddenException, self).__init__(status, reason, http_resp) + pass class ServiceException(ApiException): - - def __init__(self, status=None, reason=None, http_resp=None) -> None: - super(ServiceException, self).__init__(status, reason, http_resp) + pass def render_path(path_to_item): diff --git a/conekta/models/__init__.py b/conekta/models/__init__.py index 4bc28f3..0b47feb 100644 --- a/conekta/models/__init__.py +++ b/conekta/models/__init__.py @@ -16,7 +16,6 @@ # import models into model package from conekta.models.api_key_create_response import ApiKeyCreateResponse -from conekta.models.api_key_create_response_all_of import ApiKeyCreateResponseAllOf from conekta.models.api_key_request import ApiKeyRequest from conekta.models.api_key_response import ApiKeyResponse from conekta.models.api_key_response_on_delete import ApiKeyResponseOnDelete @@ -24,9 +23,6 @@ from conekta.models.balance_common_field import BalanceCommonField from conekta.models.balance_response import BalanceResponse from conekta.models.blacklist_rule_response import BlacklistRuleResponse -from conekta.models.charge_data_payment_method_bank_transfer_response import ChargeDataPaymentMethodBankTransferResponse -from conekta.models.charge_data_payment_method_card_response import ChargeDataPaymentMethodCardResponse -from conekta.models.charge_data_payment_method_cash_response import ChargeDataPaymentMethodCashResponse from conekta.models.charge_order_response import ChargeOrderResponse from conekta.models.charge_order_response_payment_method import ChargeOrderResponsePaymentMethod from conekta.models.charge_request import ChargeRequest @@ -35,7 +31,6 @@ from conekta.models.charge_response_channel import ChargeResponseChannel from conekta.models.charge_response_payment_method import ChargeResponsePaymentMethod from conekta.models.charge_response_refunds import ChargeResponseRefunds -from conekta.models.charge_response_refunds_all_of import ChargeResponseRefundsAllOf from conekta.models.charge_response_refunds_data import ChargeResponseRefundsData from conekta.models.charge_update_request import ChargeUpdateRequest from conekta.models.charges_data_response import ChargesDataResponse @@ -45,13 +40,11 @@ from conekta.models.checkout_request import CheckoutRequest from conekta.models.checkout_response import CheckoutResponse from conekta.models.checkouts_response import CheckoutsResponse -from conekta.models.checkouts_response_all_of import CheckoutsResponseAllOf from conekta.models.company_fiscal_info_address_response import CompanyFiscalInfoAddressResponse from conekta.models.company_fiscal_info_response import CompanyFiscalInfoResponse from conekta.models.company_payout_destination_response import CompanyPayoutDestinationResponse from conekta.models.company_response import CompanyResponse from conekta.models.create_customer_fiscal_entities_response import CreateCustomerFiscalEntitiesResponse -from conekta.models.create_customer_fiscal_entities_response_all_of import CreateCustomerFiscalEntitiesResponseAllOf from conekta.models.create_customer_payment_methods_request import CreateCustomerPaymentMethodsRequest from conekta.models.create_customer_payment_methods_response import CreateCustomerPaymentMethodsResponse from conekta.models.create_risk_rules_data import CreateRiskRulesData @@ -61,69 +54,50 @@ from conekta.models.customer_antifraud_info_response import CustomerAntifraudInfoResponse from conekta.models.customer_fiscal_entities_data_response import CustomerFiscalEntitiesDataResponse from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress from conekta.models.customer_fiscal_entities_response import CustomerFiscalEntitiesResponse -from conekta.models.customer_fiscal_entities_response_all_of import CustomerFiscalEntitiesResponseAllOf from conekta.models.customer_info import CustomerInfo from conekta.models.customer_info_just_customer_id import CustomerInfoJustCustomerId from conekta.models.customer_info_just_customer_id_response import CustomerInfoJustCustomerIdResponse from conekta.models.customer_payment_method_request import CustomerPaymentMethodRequest -from conekta.models.customer_payment_methods import CustomerPaymentMethods from conekta.models.customer_payment_methods_data import CustomerPaymentMethodsData from conekta.models.customer_payment_methods_request import CustomerPaymentMethodsRequest from conekta.models.customer_payment_methods_response import CustomerPaymentMethodsResponse from conekta.models.customer_response import CustomerResponse from conekta.models.customer_response_shipping_contacts import CustomerResponseShippingContacts -from conekta.models.customer_response_shipping_contacts_all_of import CustomerResponseShippingContactsAllOf from conekta.models.customer_shipping_contacts import CustomerShippingContacts from conekta.models.customer_shipping_contacts_address import CustomerShippingContactsAddress from conekta.models.customer_shipping_contacts_data_response import CustomerShippingContactsDataResponse -from conekta.models.customer_shipping_contacts_data_response_all_of import CustomerShippingContactsDataResponseAllOf from conekta.models.customer_shipping_contacts_response import CustomerShippingContactsResponse from conekta.models.customer_shipping_contacts_response_address import CustomerShippingContactsResponseAddress from conekta.models.customer_update_fiscal_entities_request import CustomerUpdateFiscalEntitiesRequest from conekta.models.customer_update_shipping_contacts import CustomerUpdateShippingContacts from conekta.models.customers_response import CustomersResponse -from conekta.models.customers_response_all_of import CustomersResponseAllOf from conekta.models.delete_api_keys_response import DeleteApiKeysResponse -from conekta.models.delete_api_keys_response_all_of import DeleteApiKeysResponseAllOf from conekta.models.deleted_blacklist_rule_response import DeletedBlacklistRuleResponse from conekta.models.deleted_whitelist_rule_response import DeletedWhitelistRuleResponse from conekta.models.details import Details from conekta.models.details_error import DetailsError from conekta.models.discount_lines_data_response import DiscountLinesDataResponse from conekta.models.discount_lines_response import DiscountLinesResponse -from conekta.models.discount_lines_response_all_of import DiscountLinesResponseAllOf from conekta.models.email_checkout_request import EmailCheckoutRequest from conekta.models.error import Error -from conekta.models.error_all_of import ErrorAllOf from conekta.models.event_response import EventResponse +from conekta.models.event_types import EventTypes from conekta.models.events_resend_response import EventsResendResponse from conekta.models.fiscal_entity_address import FiscalEntityAddress from conekta.models.get_api_keys_response import GetApiKeysResponse -from conekta.models.get_api_keys_response_all_of import GetApiKeysResponseAllOf from conekta.models.get_charges_response import GetChargesResponse -from conekta.models.get_charges_response_all_of import GetChargesResponseAllOf from conekta.models.get_companies_response import GetCompaniesResponse -from conekta.models.get_companies_response_all_of import GetCompaniesResponseAllOf from conekta.models.get_customer_payment_method_data_response import GetCustomerPaymentMethodDataResponse from conekta.models.get_events_response import GetEventsResponse -from conekta.models.get_events_response_all_of import GetEventsResponseAllOf from conekta.models.get_order_discount_lines_response import GetOrderDiscountLinesResponse -from conekta.models.get_order_discount_lines_response_all_of import GetOrderDiscountLinesResponseAllOf from conekta.models.get_orders_response import GetOrdersResponse from conekta.models.get_payment_method_response import GetPaymentMethodResponse -from conekta.models.get_payment_method_response_all_of import GetPaymentMethodResponseAllOf from conekta.models.get_plans_response import GetPlansResponse -from conekta.models.get_plans_response_all_of import GetPlansResponseAllOf from conekta.models.get_transactions_response import GetTransactionsResponse -from conekta.models.get_transactions_response_all_of import GetTransactionsResponseAllOf from conekta.models.get_transfers_response import GetTransfersResponse -from conekta.models.get_transfers_response_all_of import GetTransfersResponseAllOf from conekta.models.get_webhook_keys_response import GetWebhookKeysResponse -from conekta.models.get_webhook_keys_response_all_of import GetWebhookKeysResponseAllOf from conekta.models.get_webhooks_response import GetWebhooksResponse -from conekta.models.get_webhooks_response_all_of import GetWebhooksResponseAllOf from conekta.models.log_response import LogResponse from conekta.models.logs_response import LogsResponse from conekta.models.logs_response_data import LogsResponseData @@ -131,7 +105,6 @@ from conekta.models.order_customer_info_response import OrderCustomerInfoResponse from conekta.models.order_discount_lines_request import OrderDiscountLinesRequest from conekta.models.order_fiscal_entity_address_response import OrderFiscalEntityAddressResponse -from conekta.models.order_fiscal_entity_address_response_all_of import OrderFiscalEntityAddressResponseAllOf from conekta.models.order_fiscal_entity_request import OrderFiscalEntityRequest from conekta.models.order_fiscal_entity_response import OrderFiscalEntityResponse from conekta.models.order_next_action_response import OrderNextActionResponse @@ -141,16 +114,11 @@ from conekta.models.order_request_customer_info import OrderRequestCustomerInfo from conekta.models.order_response import OrderResponse from conekta.models.order_response_charges import OrderResponseCharges -from conekta.models.order_response_charges_all_of import OrderResponseChargesAllOf from conekta.models.order_response_checkout import OrderResponseCheckout from conekta.models.order_response_customer_info import OrderResponseCustomerInfo -from conekta.models.order_response_customer_info_all_of import OrderResponseCustomerInfoAllOf from conekta.models.order_response_discount_lines import OrderResponseDiscountLines -from conekta.models.order_response_discount_lines_all_of import OrderResponseDiscountLinesAllOf from conekta.models.order_response_products import OrderResponseProducts -from conekta.models.order_response_products_all_of import OrderResponseProductsAllOf from conekta.models.order_response_shipping_contact import OrderResponseShippingContact -from conekta.models.order_response_shipping_contact_all_of import OrderResponseShippingContactAllOf from conekta.models.order_tax_request import OrderTaxRequest from conekta.models.order_update_fiscal_entity_request import OrderUpdateFiscalEntityRequest from conekta.models.order_update_request import OrderUpdateRequest @@ -162,27 +130,26 @@ from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer from conekta.models.payment_method_card import PaymentMethodCard from conekta.models.payment_method_card_request import PaymentMethodCardRequest -from conekta.models.payment_method_card_request_all_of import PaymentMethodCardRequestAllOf from conekta.models.payment_method_card_response import PaymentMethodCardResponse -from conekta.models.payment_method_card_response_all_of import PaymentMethodCardResponseAllOf from conekta.models.payment_method_cash import PaymentMethodCash from conekta.models.payment_method_cash_request import PaymentMethodCashRequest -from conekta.models.payment_method_cash_request_all_of import PaymentMethodCashRequestAllOf from conekta.models.payment_method_cash_response import PaymentMethodCashResponse -from conekta.models.payment_method_cash_response_all_of import PaymentMethodCashResponseAllOf from conekta.models.payment_method_response import PaymentMethodResponse from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent -from conekta.models.payment_method_spei_recurrent_all_of import PaymentMethodSpeiRecurrentAllOf from conekta.models.payment_method_spei_request import PaymentMethodSpeiRequest +from conekta.models.payout import Payout +from conekta.models.payout_method import PayoutMethod +from conekta.models.payout_order import PayoutOrder +from conekta.models.payout_order_payouts_item import PayoutOrderPayoutsItem +from conekta.models.payout_order_response import PayoutOrderResponse +from conekta.models.payout_order_response_customer_info import PayoutOrderResponseCustomerInfo +from conekta.models.payout_orders_response import PayoutOrdersResponse from conekta.models.plan_request import PlanRequest from conekta.models.plan_response import PlanResponse from conekta.models.plan_update_request import PlanUpdateRequest from conekta.models.product import Product from conekta.models.product_data_response import ProductDataResponse -from conekta.models.product_data_response_all_of import ProductDataResponseAllOf from conekta.models.product_order_response import ProductOrderResponse -from conekta.models.product_order_response_all_of import ProductOrderResponseAllOf -from conekta.models.risk_rules import RiskRules from conekta.models.risk_rules_data import RiskRulesData from conekta.models.risk_rules_list import RiskRulesList from conekta.models.shipping_order_response import ShippingOrderResponse @@ -205,12 +172,10 @@ from conekta.models.update_customer import UpdateCustomer from conekta.models.update_customer_antifraud_info import UpdateCustomerAntifraudInfo from conekta.models.update_customer_fiscal_entities_response import UpdateCustomerFiscalEntitiesResponse -from conekta.models.update_customer_fiscal_entities_response_all_of import UpdateCustomerFiscalEntitiesResponseAllOf from conekta.models.update_customer_payment_methods_response import UpdateCustomerPaymentMethodsResponse from conekta.models.update_order_discount_lines_request import UpdateOrderDiscountLinesRequest from conekta.models.update_order_tax_request import UpdateOrderTaxRequest from conekta.models.update_order_tax_response import UpdateOrderTaxResponse -from conekta.models.update_order_tax_response_all_of import UpdateOrderTaxResponseAllOf from conekta.models.update_payment_methods import UpdatePaymentMethods from conekta.models.update_product import UpdateProduct from conekta.models.webhook_key_create_response import WebhookKeyCreateResponse diff --git a/conekta/models/api_key_create_response.py b/conekta/models/api_key_create_response.py index 5621b26..e2ece0e 100644 --- a/conekta/models/api_key_create_response.py +++ b/conekta/models/api_key_create_response.py @@ -18,20 +18,15 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiKeyCreateResponse(BaseModel): """ ApiKeyCreateResponse """ # noqa: E501 - authentication_token: Optional[StrictStr] = Field(default=None, description="It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.") active: Optional[StrictBool] = Field(default=None, description="Indicates if the api key is active") created_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was created") updated_at: Optional[StrictInt] = Field(default=None, description="Unix timestamp in seconds of when the api key was last updated") @@ -43,12 +38,14 @@ class ApiKeyCreateResponse(BaseModel): object: Optional[StrictStr] = Field(default=None, description="Object name, value is 'api_key'") prefix: Optional[StrictStr] = Field(default=None, description="The first few characters of the authentication_token") role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public") - __properties: ClassVar[List[str]] = ["authentication_token", "active", "created_at", "updated_at", "deactivated_at", "description", "id", "livemode", "deleted", "object", "prefix", "role"] + authentication_token: Optional[StrictStr] = Field(default=None, description="It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.") + __properties: ClassVar[List[str]] = ["active", "created_at", "updated_at", "deactivated_at", "description", "id", "livemode", "deleted", "object", "prefix", "role", "authentication_token"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiKeyCreateResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if deactivated_at (nullable) is None @@ -89,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiKeyCreateResponse from a dict""" if obj is None: return None @@ -98,7 +97,6 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "authentication_token": obj.get("authentication_token"), "active": obj.get("active"), "created_at": obj.get("created_at"), "updated_at": obj.get("updated_at"), @@ -109,7 +107,8 @@ def from_dict(cls, obj: Dict) -> Self: "deleted": obj.get("deleted"), "object": obj.get("object"), "prefix": obj.get("prefix"), - "role": obj.get("role") + "role": obj.get("role"), + "authentication_token": obj.get("authentication_token") }) return _obj diff --git a/conekta/models/api_key_create_response_all_of.py b/conekta/models/api_key_create_response_all_of.py deleted file mode 100644 index 862e4a5..0000000 --- a/conekta/models/api_key_create_response_all_of.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ApiKeyCreateResponseAllOf(BaseModel): - """ - ApiKeyCreateResponseAllOf - """ # noqa: E501 - authentication_token: Optional[StrictStr] = Field(default=None, description="It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.") - __properties: ClassVar[List[str]] = ["authentication_token"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApiKeyCreateResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ApiKeyCreateResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authentication_token": obj.get("authentication_token") - }) - return _obj - - diff --git a/conekta/models/api_key_request.py b/conekta/models/api_key_request.py index 5655ef7..85df331 100644 --- a/conekta/models/api_key_request.py +++ b/conekta/models/api_key_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiKeyRequest(BaseModel): """ @@ -35,10 +31,11 @@ class ApiKeyRequest(BaseModel): role: StrictStr __properties: ClassVar[List[str]] = ["description", "role"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiKeyRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiKeyRequest from a dict""" if obj is None: return None diff --git a/conekta/models/api_key_response.py b/conekta/models/api_key_response.py index 9f675f1..02a4341 100644 --- a/conekta/models/api_key_response.py +++ b/conekta/models/api_key_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiKeyResponse(BaseModel): """ @@ -44,10 +40,11 @@ class ApiKeyResponse(BaseModel): role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public") __properties: ClassVar[List[str]] = ["active", "created_at", "updated_at", "deactivated_at", "description", "id", "livemode", "deleted", "object", "prefix", "role"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +57,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiKeyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,10 +71,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if deactivated_at (nullable) is None @@ -88,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiKeyResponse from a dict""" if obj is None: return None diff --git a/conekta/models/api_key_response_on_delete.py b/conekta/models/api_key_response_on_delete.py index 3a348c0..16e021e 100644 --- a/conekta/models/api_key_response_on_delete.py +++ b/conekta/models/api_key_response_on_delete.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiKeyResponseOnDelete(BaseModel): """ @@ -42,10 +38,11 @@ class ApiKeyResponseOnDelete(BaseModel): role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public") __properties: ClassVar[List[str]] = ["active", "created_at", "description", "livemode", "prefix", "id", "object", "deleted", "role"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiKeyResponseOnDelete from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +69,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiKeyResponseOnDelete from a dict""" if obj is None: return None diff --git a/conekta/models/api_key_update_request.py b/conekta/models/api_key_update_request.py index 10470ce..4f2840b 100644 --- a/conekta/models/api_key_update_request.py +++ b/conekta/models/api_key_update_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ApiKeyUpdateRequest(BaseModel): """ @@ -35,10 +31,11 @@ class ApiKeyUpdateRequest(BaseModel): description: Optional[StrictStr] = Field(default=None, description="A name or brief explanation of what this api key is used for") __properties: ClassVar[List[str]] = ["active", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ApiKeyUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ApiKeyUpdateRequest from a dict""" if obj is None: return None diff --git a/conekta/models/balance_common_field.py b/conekta/models/balance_common_field.py index e55f7cc..99bf422 100644 --- a/conekta/models/balance_common_field.py +++ b/conekta/models/balance_common_field.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class BalanceCommonField(BaseModel): """ @@ -35,10 +31,11 @@ class BalanceCommonField(BaseModel): currency: Optional[StrictStr] = Field(default=None, description="The balance's currency") __properties: ClassVar[List[str]] = ["amount", "currency"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BalanceCommonField from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BalanceCommonField from a dict""" if obj is None: return None diff --git a/conekta/models/balance_response.py b/conekta/models/balance_response.py index 9949e11..3b181aa 100644 --- a/conekta/models/balance_response.py +++ b/conekta/models/balance_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel -from pydantic import Field +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional from conekta.models.balance_common_field import BalanceCommonField -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class BalanceResponse(BaseModel): """ @@ -39,15 +35,16 @@ class BalanceResponse(BaseModel): pending: Optional[List[BalanceCommonField]] = Field(default=None, description="The balance's pending") retained: Optional[List[BalanceCommonField]] = Field(default=None, description="The balance's retained") retention_amount: Optional[List[BalanceCommonField]] = Field(default=None, description="The balance's retention amount") - target_collateral_amount: Optional[Union[str, Any]] = Field(default=None, description="The balance's target collateral amount") + target_collateral_amount: Optional[Dict[str, Any]] = Field(default=None, description="The balance's target collateral amount") target_retention_amount: Optional[List[BalanceCommonField]] = Field(default=None, description="The balance's target retention amount") temporarily_retained: Optional[List[BalanceCommonField]] = Field(default=None, description="The balance's temporarily retained") __properties: ClassVar[List[str]] = ["available", "cashout_retention_amount", "conekta_retention", "gateway", "pending", "retained", "retention_amount", "target_collateral_amount", "target_retention_amount", "temporarily_retained"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +57,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BalanceResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,10 +71,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in available (list) @@ -146,7 +145,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BalanceResponse from a dict""" if obj is None: return None @@ -155,16 +154,16 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "available": [BalanceCommonField.from_dict(_item) for _item in obj.get("available")] if obj.get("available") is not None else None, - "cashout_retention_amount": [BalanceCommonField.from_dict(_item) for _item in obj.get("cashout_retention_amount")] if obj.get("cashout_retention_amount") is not None else None, - "conekta_retention": [BalanceCommonField.from_dict(_item) for _item in obj.get("conekta_retention")] if obj.get("conekta_retention") is not None else None, - "gateway": [BalanceCommonField.from_dict(_item) for _item in obj.get("gateway")] if obj.get("gateway") is not None else None, - "pending": [BalanceCommonField.from_dict(_item) for _item in obj.get("pending")] if obj.get("pending") is not None else None, - "retained": [BalanceCommonField.from_dict(_item) for _item in obj.get("retained")] if obj.get("retained") is not None else None, - "retention_amount": [BalanceCommonField.from_dict(_item) for _item in obj.get("retention_amount")] if obj.get("retention_amount") is not None else None, + "available": [BalanceCommonField.from_dict(_item) for _item in obj["available"]] if obj.get("available") is not None else None, + "cashout_retention_amount": [BalanceCommonField.from_dict(_item) for _item in obj["cashout_retention_amount"]] if obj.get("cashout_retention_amount") is not None else None, + "conekta_retention": [BalanceCommonField.from_dict(_item) for _item in obj["conekta_retention"]] if obj.get("conekta_retention") is not None else None, + "gateway": [BalanceCommonField.from_dict(_item) for _item in obj["gateway"]] if obj.get("gateway") is not None else None, + "pending": [BalanceCommonField.from_dict(_item) for _item in obj["pending"]] if obj.get("pending") is not None else None, + "retained": [BalanceCommonField.from_dict(_item) for _item in obj["retained"]] if obj.get("retained") is not None else None, + "retention_amount": [BalanceCommonField.from_dict(_item) for _item in obj["retention_amount"]] if obj.get("retention_amount") is not None else None, "target_collateral_amount": obj.get("target_collateral_amount"), - "target_retention_amount": [BalanceCommonField.from_dict(_item) for _item in obj.get("target_retention_amount")] if obj.get("target_retention_amount") is not None else None, - "temporarily_retained": [BalanceCommonField.from_dict(_item) for _item in obj.get("temporarily_retained")] if obj.get("temporarily_retained") is not None else None + "target_retention_amount": [BalanceCommonField.from_dict(_item) for _item in obj["target_retention_amount"]] if obj.get("target_retention_amount") is not None else None, + "temporarily_retained": [BalanceCommonField.from_dict(_item) for _item in obj["temporarily_retained"]] if obj.get("temporarily_retained") is not None else None }) return _obj diff --git a/conekta/models/blacklist_rule_response.py b/conekta/models/blacklist_rule_response.py index d856d11..c233822 100644 --- a/conekta/models/blacklist_rule_response.py +++ b/conekta/models/blacklist_rule_response.py @@ -18,29 +18,26 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class BlacklistRuleResponse(BaseModel): """ BlacklistRuleResponse """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Blacklist rule id") - field: Optional[StrictStr] = Field(default=None, description="field used for blacklists rule") + var_field: Optional[StrictStr] = Field(default=None, description="field used for blacklists rule", alias="field") value: Optional[StrictStr] = Field(default=None, description="value used for blacklists rule") description: Optional[StrictStr] = Field(default=None, description="use an description for blacklisted rule") __properties: ClassVar[List[str]] = ["id", "field", "value", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of BlacklistRuleResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of BlacklistRuleResponse from a dict""" if obj is None: return None diff --git a/conekta/models/charge_data_payment_method_bank_transfer_response.py b/conekta/models/charge_data_payment_method_bank_transfer_response.py deleted file mode 100644 index b7fcbce..0000000 --- a/conekta/models/charge_data_payment_method_bank_transfer_response.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ChargeDataPaymentMethodBankTransferResponse(BaseModel): - """ - use for bank transfer responses - """ # noqa: E501 - bank: Optional[StrictStr] = None - clabe: Optional[StrictStr] = None - description: Optional[StrictStr] = None - executed_at: Optional[StrictInt] = None - expires_at: Optional[StrictInt] = None - issuing_account_bank: Optional[StrictStr] = None - issuing_account_number: Optional[StrictStr] = None - issuing_account_holder_name: Optional[StrictStr] = None - issuing_account_tax_id: Optional[StrictStr] = None - payment_attempts: Optional[List[Any]] = None - receiving_account_holder_name: Optional[StrictStr] = None - receiving_account_number: Optional[StrictStr] = None - receiving_account_bank: Optional[StrictStr] = None - receiving_account_tax_id: Optional[StrictStr] = None - reference_number: Optional[StrictStr] = None - tracking_code: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["bank", "clabe", "description", "executed_at", "expires_at", "issuing_account_bank", "issuing_account_number", "issuing_account_holder_name", "issuing_account_tax_id", "payment_attempts", "receiving_account_holder_name", "receiving_account_number", "receiving_account_bank", "receiving_account_tax_id", "reference_number", "tracking_code"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ChargeDataPaymentMethodBankTransferResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if executed_at (nullable) is None - # and model_fields_set contains the field - if self.executed_at is None and "executed_at" in self.model_fields_set: - _dict['executed_at'] = None - - # set to None if issuing_account_bank (nullable) is None - # and model_fields_set contains the field - if self.issuing_account_bank is None and "issuing_account_bank" in self.model_fields_set: - _dict['issuing_account_bank'] = None - - # set to None if issuing_account_number (nullable) is None - # and model_fields_set contains the field - if self.issuing_account_number is None and "issuing_account_number" in self.model_fields_set: - _dict['issuing_account_number'] = None - - # set to None if issuing_account_holder_name (nullable) is None - # and model_fields_set contains the field - if self.issuing_account_holder_name is None and "issuing_account_holder_name" in self.model_fields_set: - _dict['issuing_account_holder_name'] = None - - # set to None if issuing_account_tax_id (nullable) is None - # and model_fields_set contains the field - if self.issuing_account_tax_id is None and "issuing_account_tax_id" in self.model_fields_set: - _dict['issuing_account_tax_id'] = None - - # set to None if receiving_account_holder_name (nullable) is None - # and model_fields_set contains the field - if self.receiving_account_holder_name is None and "receiving_account_holder_name" in self.model_fields_set: - _dict['receiving_account_holder_name'] = None - - # set to None if receiving_account_tax_id (nullable) is None - # and model_fields_set contains the field - if self.receiving_account_tax_id is None and "receiving_account_tax_id" in self.model_fields_set: - _dict['receiving_account_tax_id'] = None - - # set to None if reference_number (nullable) is None - # and model_fields_set contains the field - if self.reference_number is None and "reference_number" in self.model_fields_set: - _dict['reference_number'] = None - - # set to None if tracking_code (nullable) is None - # and model_fields_set contains the field - if self.tracking_code is None and "tracking_code" in self.model_fields_set: - _dict['tracking_code'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ChargeDataPaymentMethodBankTransferResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "bank": obj.get("bank"), - "clabe": obj.get("clabe"), - "description": obj.get("description"), - "executed_at": obj.get("executed_at"), - "expires_at": obj.get("expires_at"), - "issuing_account_bank": obj.get("issuing_account_bank"), - "issuing_account_number": obj.get("issuing_account_number"), - "issuing_account_holder_name": obj.get("issuing_account_holder_name"), - "issuing_account_tax_id": obj.get("issuing_account_tax_id"), - "payment_attempts": obj.get("payment_attempts"), - "receiving_account_holder_name": obj.get("receiving_account_holder_name"), - "receiving_account_number": obj.get("receiving_account_number"), - "receiving_account_bank": obj.get("receiving_account_bank"), - "receiving_account_tax_id": obj.get("receiving_account_tax_id"), - "reference_number": obj.get("reference_number"), - "tracking_code": obj.get("tracking_code") - }) - return _obj - - diff --git a/conekta/models/charge_data_payment_method_card_response.py b/conekta/models/charge_data_payment_method_card_response.py deleted file mode 100644 index 4ccc2c2..0000000 --- a/conekta/models/charge_data_payment_method_card_response.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ChargeDataPaymentMethodCardResponse(BaseModel): - """ - use for card responses - """ # noqa: E501 - account_type: Optional[StrictStr] = None - auth_code: Optional[StrictStr] = None - brand: Optional[StrictStr] = None - contract_id: Optional[StrictStr] = Field(default=None, description="Id sent for recurrent charges.") - country: Optional[StrictStr] = None - exp_month: Optional[StrictStr] = None - exp_year: Optional[StrictStr] = None - fraud_indicators: Optional[List[Any]] = None - issuer: Optional[StrictStr] = None - last4: Optional[StrictStr] = None - name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["account_type", "auth_code", "brand", "contract_id", "country", "exp_month", "exp_year", "fraud_indicators", "issuer", "last4", "name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ChargeDataPaymentMethodCardResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ChargeDataPaymentMethodCardResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "account_type": obj.get("account_type"), - "auth_code": obj.get("auth_code"), - "brand": obj.get("brand"), - "contract_id": obj.get("contract_id"), - "country": obj.get("country"), - "exp_month": obj.get("exp_month"), - "exp_year": obj.get("exp_year"), - "fraud_indicators": obj.get("fraud_indicators"), - "issuer": obj.get("issuer"), - "last4": obj.get("last4"), - "name": obj.get("name") - }) - return _obj - - diff --git a/conekta/models/charge_data_payment_method_cash_response.py b/conekta/models/charge_data_payment_method_cash_response.py deleted file mode 100644 index ff139da..0000000 --- a/conekta/models/charge_data_payment_method_cash_response.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ChargeDataPaymentMethodCashResponse(BaseModel): - """ - use for cash responses - """ # noqa: E501 - auth_code: Optional[StrictInt] = None - cashier_id: Optional[StrictStr] = None - reference: Optional[StrictStr] = None - barcode_url: Optional[StrictStr] = None - expires_at: Optional[StrictInt] = None - service_name: Optional[StrictStr] = None - store: Optional[StrictStr] = None - store_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["auth_code", "cashier_id", "reference", "barcode_url", "expires_at", "service_name", "store", "store_name"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ChargeDataPaymentMethodCashResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if auth_code (nullable) is None - # and model_fields_set contains the field - if self.auth_code is None and "auth_code" in self.model_fields_set: - _dict['auth_code'] = None - - # set to None if cashier_id (nullable) is None - # and model_fields_set contains the field - if self.cashier_id is None and "cashier_id" in self.model_fields_set: - _dict['cashier_id'] = None - - # set to None if store (nullable) is None - # and model_fields_set contains the field - if self.store is None and "store" in self.model_fields_set: - _dict['store'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ChargeDataPaymentMethodCashResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "auth_code": obj.get("auth_code"), - "cashier_id": obj.get("cashier_id"), - "reference": obj.get("reference"), - "barcode_url": obj.get("barcode_url"), - "expires_at": obj.get("expires_at"), - "service_name": obj.get("service_name"), - "store": obj.get("store"), - "store_name": obj.get("store_name") - }) - return _obj - - diff --git a/conekta/models/charge_order_response.py b/conekta/models/charge_order_response.py index 691ff5b..cab229b 100644 --- a/conekta/models/charge_order_response.py +++ b/conekta/models/charge_order_response.py @@ -18,16 +18,12 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from conekta.models.charge_order_response_payment_method import ChargeOrderResponsePaymentMethod from conekta.models.charge_response_channel import ChargeResponseChannel -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeOrderResponse(BaseModel): """ @@ -50,14 +46,15 @@ class ChargeOrderResponse(BaseModel): paid_at: Optional[StrictInt] = None payment_method: Optional[ChargeOrderResponsePaymentMethod] = None reference_id: Optional[StrictStr] = Field(default=None, description="Reference ID of the charge") - refunds: Optional[List[Union[str, Any]]] = None + refunds: Optional[List[Dict[str, Any]]] = None status: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "channel", "created_at", "currency", "customer_id", "description", "device_fingerprint", "failure_code", "failure_message", "id", "livemode", "monthly_installments", "object", "order_id", "paid_at", "payment_method", "reference_id", "refunds", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -70,7 +67,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeOrderResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,10 +81,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of channel @@ -119,7 +118,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeOrderResponse from a dict""" if obj is None: return None @@ -129,7 +128,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "amount": obj.get("amount"), - "channel": ChargeResponseChannel.from_dict(obj.get("channel")) if obj.get("channel") is not None else None, + "channel": ChargeResponseChannel.from_dict(obj["channel"]) if obj.get("channel") is not None else None, "created_at": obj.get("created_at"), "currency": obj.get("currency"), "customer_id": obj.get("customer_id"), @@ -143,7 +142,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "order_id": obj.get("order_id"), "paid_at": obj.get("paid_at"), - "payment_method": ChargeOrderResponsePaymentMethod.from_dict(obj.get("payment_method")) if obj.get("payment_method") is not None else None, + "payment_method": ChargeOrderResponsePaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None, "reference_id": obj.get("reference_id"), "refunds": obj.get("refunds"), "status": obj.get("status") diff --git a/conekta/models/charge_order_response_payment_method.py b/conekta/models/charge_order_response_payment_method.py index 30b2b3b..97f5bef 100644 --- a/conekta/models/charge_order_response_payment_method.py +++ b/conekta/models/charge_order_response_payment_method.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer from conekta.models.payment_method_card import PaymentMethodCard from conekta.models.payment_method_cash import PaymentMethodCash -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CHARGEORDERRESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash"] @@ -45,11 +38,12 @@ class ChargeOrderResponsePaymentMethod(BaseModel): # data type: PaymentMethodBankTransfer oneof_schema_3_validator: Optional[PaymentMethodBankTransfer] = None actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]] = None - one_of_schemas: List[str] = Literal["PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash"] + one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -95,7 +89,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -173,19 +167,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/charge_request.py b/conekta/models/charge_request.py index be83c22..331f666 100644 --- a/conekta/models/charge_request.py +++ b/conekta/models/charge_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from conekta.models.charge_request_payment_method import ChargeRequestPaymentMethod -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeRequest(BaseModel): """ @@ -37,10 +33,11 @@ class ChargeRequest(BaseModel): reference_id: Optional[StrictStr] = Field(default=None, description="Custom reference to add to the charge") __properties: ClassVar[List[str]] = ["amount", "payment_method", "reference_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of payment_method @@ -79,7 +78,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeRequest from a dict""" if obj is None: return None @@ -89,7 +88,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "amount": obj.get("amount"), - "payment_method": ChargeRequestPaymentMethod.from_dict(obj.get("payment_method")) if obj.get("payment_method") is not None else None, + "payment_method": ChargeRequestPaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None, "reference_id": obj.get("reference_id") }) return _obj diff --git a/conekta/models/charge_request_payment_method.py b/conekta/models/charge_request_payment_method.py index 1b77692..1be90bd 100644 --- a/conekta/models/charge_request_payment_method.py +++ b/conekta/models/charge_request_payment_method.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeRequestPaymentMethod(BaseModel): """ @@ -39,10 +35,11 @@ class ChargeRequestPaymentMethod(BaseModel): contract_id: Optional[StrictStr] = Field(default=None, description="Optional id sent to indicate the bank contract for recurrent card charges.") __properties: ClassVar[List[str]] = ["expires_at", "monthly_installments", "type", "token_id", "payment_source_id", "contract_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeRequestPaymentMethod from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +66,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeRequestPaymentMethod from a dict""" if obj is None: return None diff --git a/conekta/models/charge_response.py b/conekta/models/charge_response.py index 8d561ad..7acaddb 100644 --- a/conekta/models/charge_response.py +++ b/conekta/models/charge_response.py @@ -18,17 +18,13 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.charge_response_channel import ChargeResponseChannel from conekta.models.charge_response_payment_method import ChargeResponsePaymentMethod from conekta.models.charge_response_refunds import ChargeResponseRefunds -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeResponse(BaseModel): """ @@ -54,10 +50,11 @@ class ChargeResponse(BaseModel): status: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "channel", "created_at", "currency", "customer_id", "description", "device_fingerprint", "failure_code", "failure_message", "id", "livemode", "object", "order_id", "paid_at", "payment_method", "reference_id", "refunds", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -70,7 +67,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,10 +81,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of channel @@ -117,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeResponse from a dict""" if obj is None: return None @@ -127,7 +126,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "amount": obj.get("amount"), - "channel": ChargeResponseChannel.from_dict(obj.get("channel")) if obj.get("channel") is not None else None, + "channel": ChargeResponseChannel.from_dict(obj["channel"]) if obj.get("channel") is not None else None, "created_at": obj.get("created_at"), "currency": obj.get("currency"), "customer_id": obj.get("customer_id"), @@ -140,9 +139,9 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "order_id": obj.get("order_id"), "paid_at": obj.get("paid_at"), - "payment_method": ChargeResponsePaymentMethod.from_dict(obj.get("payment_method")) if obj.get("payment_method") is not None else None, + "payment_method": ChargeResponsePaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None, "reference_id": obj.get("reference_id"), - "refunds": ChargeResponseRefunds.from_dict(obj.get("refunds")) if obj.get("refunds") is not None else None, + "refunds": ChargeResponseRefunds.from_dict(obj["refunds"]) if obj.get("refunds") is not None else None, "status": obj.get("status") }) return _obj diff --git a/conekta/models/charge_response_channel.py b/conekta/models/charge_response_channel.py index 44c75bf..3af1b72 100644 --- a/conekta/models/charge_response_channel.py +++ b/conekta/models/charge_response_channel.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeResponseChannel(BaseModel): """ @@ -36,10 +33,11 @@ class ChargeResponseChannel(BaseModel): id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["segment", "checkout_request_id", "checkout_request_type", "id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeResponseChannel from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeResponseChannel from a dict""" if obj is None: return None diff --git a/conekta/models/charge_response_payment_method.py b/conekta/models/charge_response_payment_method.py index 8bcace4..1bd339c 100644 --- a/conekta/models/charge_response_payment_method.py +++ b/conekta/models/charge_response_payment_method.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_bank_transfer import PaymentMethodBankTransfer from conekta.models.payment_method_card import PaymentMethodCard from conekta.models.payment_method_cash import PaymentMethodCash -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CHARGERESPONSEPAYMENTMETHOD_ONE_OF_SCHEMAS = ["PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash"] @@ -45,11 +38,12 @@ class ChargeResponsePaymentMethod(BaseModel): # data type: PaymentMethodBankTransfer oneof_schema_3_validator: Optional[PaymentMethodBankTransfer] = None actual_instance: Optional[Union[PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]] = None - one_of_schemas: List[str] = Literal["PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash"] + one_of_schemas: Set[str] = { "PaymentMethodBankTransfer", "PaymentMethodCard", "PaymentMethodCash" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -95,7 +89,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -173,19 +167,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodBankTransfer, PaymentMethodCard, PaymentMethodCash]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/charge_response_refunds.py b/conekta/models/charge_response_refunds.py index fc234a5..abca11f 100644 --- a/conekta/models/charge_response_refunds.py +++ b/conekta/models/charge_response_refunds.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.charge_response_refunds_data import ChargeResponseRefundsData -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeResponseRefunds(BaseModel): """ @@ -39,10 +35,11 @@ class ChargeResponseRefunds(BaseModel): data: Optional[List[ChargeResponseRefundsData]] = Field(default=None, description="refunds") __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeResponseRefunds from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeResponseRefunds from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [ChargeResponseRefundsData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [ChargeResponseRefundsData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/charge_response_refunds_all_of.py b/conekta/models/charge_response_refunds_all_of.py deleted file mode 100644 index c58e47c..0000000 --- a/conekta/models/charge_response_refunds_all_of.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from conekta.models.charge_response_refunds_data import ChargeResponseRefundsData -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ChargeResponseRefundsAllOf(BaseModel): - """ - ChargeResponseRefundsAllOf - """ # noqa: E501 - data: Optional[List[ChargeResponseRefundsData]] = Field(default=None, description="refunds") - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ChargeResponseRefundsAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ChargeResponseRefundsAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ChargeResponseRefundsData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/charge_response_refunds_data.py b/conekta/models/charge_response_refunds_data.py index e17cff6..d512026 100644 --- a/conekta/models/charge_response_refunds_data.py +++ b/conekta/models/charge_response_refunds_data.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeResponseRefundsData(BaseModel): """ @@ -40,10 +36,11 @@ class ChargeResponseRefundsData(BaseModel): status: Optional[StrictStr] = Field(default=None, description="refund status") __properties: ClassVar[List[str]] = ["amount", "auth_code", "created_at", "expires_at", "id", "object", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeResponseRefundsData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeResponseRefundsData from a dict""" if obj is None: return None diff --git a/conekta/models/charge_update_request.py b/conekta/models/charge_update_request.py index 53b1dbf..73c6c01 100644 --- a/conekta/models/charge_update_request.py +++ b/conekta/models/charge_update_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargeUpdateRequest(BaseModel): """ @@ -34,10 +30,11 @@ class ChargeUpdateRequest(BaseModel): reference_id: Optional[StrictStr] = Field(default=None, description="custom reference id") __properties: ClassVar[List[str]] = ["reference_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargeUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargeUpdateRequest from a dict""" if obj is None: return None diff --git a/conekta/models/charges_data_response.py b/conekta/models/charges_data_response.py index 120ae91..bcbcee5 100644 --- a/conekta/models/charges_data_response.py +++ b/conekta/models/charges_data_response.py @@ -18,17 +18,13 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.charge_response_channel import ChargeResponseChannel from conekta.models.charge_response_payment_method import ChargeResponsePaymentMethod from conekta.models.charge_response_refunds import ChargeResponseRefunds -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ChargesDataResponse(BaseModel): """ @@ -54,10 +50,11 @@ class ChargesDataResponse(BaseModel): status: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "channel", "created_at", "currency", "customer_id", "description", "device_fingerprint", "failure_code", "failure_message", "id", "livemode", "object", "order_id", "paid_at", "payment_method", "reference_id", "refunds", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -70,7 +67,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ChargesDataResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -84,10 +81,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of channel @@ -117,7 +116,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ChargesDataResponse from a dict""" if obj is None: return None @@ -127,7 +126,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "amount": obj.get("amount"), - "channel": ChargeResponseChannel.from_dict(obj.get("channel")) if obj.get("channel") is not None else None, + "channel": ChargeResponseChannel.from_dict(obj["channel"]) if obj.get("channel") is not None else None, "created_at": obj.get("created_at"), "currency": obj.get("currency"), "customer_id": obj.get("customer_id"), @@ -140,9 +139,9 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "order_id": obj.get("order_id"), "paid_at": obj.get("paid_at"), - "payment_method": ChargeResponsePaymentMethod.from_dict(obj.get("payment_method")) if obj.get("payment_method") is not None else None, + "payment_method": ChargeResponsePaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None, "reference_id": obj.get("reference_id"), - "refunds": ChargeResponseRefunds.from_dict(obj.get("refunds")) if obj.get("refunds") is not None else None, + "refunds": ChargeResponseRefunds.from_dict(obj["refunds"]) if obj.get("refunds") is not None else None, "status": obj.get("status") }) return _obj diff --git a/conekta/models/checkout.py b/conekta/models/checkout.py index 6714deb..9a799a9 100644 --- a/conekta/models/checkout.py +++ b/conekta/models/checkout.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.checkout_order_template import CheckoutOrderTemplate -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Checkout(BaseModel): """ @@ -45,10 +41,11 @@ class Checkout(BaseModel): type: StrictStr = Field(description="It is the type of link that will be created. It must be a valid type.") __properties: ClassVar[List[str]] = ["allowed_payment_methods", "expires_at", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "on_demand_enabled", "order_template", "payments_limit_count", "recurrent", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Checkout from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of order_template @@ -92,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Checkout from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "name": obj.get("name"), "needs_shipping_contact": obj.get("needs_shipping_contact"), "on_demand_enabled": obj.get("on_demand_enabled"), - "order_template": CheckoutOrderTemplate.from_dict(obj.get("order_template")) if obj.get("order_template") is not None else None, + "order_template": CheckoutOrderTemplate.from_dict(obj["order_template"]) if obj.get("order_template") is not None else None, "payments_limit_count": obj.get("payments_limit_count"), "recurrent": obj.get("recurrent"), "type": obj.get("type") diff --git a/conekta/models/checkout_order_template.py b/conekta/models/checkout_order_template.py index d6e86fa..19670e6 100644 --- a/conekta/models/checkout_order_template.py +++ b/conekta/models/checkout_order_template.py @@ -18,17 +18,13 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field from typing_extensions import Annotated from conekta.models.checkout_order_template_customer_info import CheckoutOrderTemplateCustomerInfo from conekta.models.product import Product -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CheckoutOrderTemplate(BaseModel): """ @@ -40,10 +36,11 @@ class CheckoutOrderTemplate(BaseModel): metadata: Optional[Dict[str, Any]] = Field(default=None, description="It is a set of key-value pairs that you can attach to the order. It can be used to store additional information about the order in a structured format.") __properties: ClassVar[List[str]] = ["currency", "customer_info", "line_items", "metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CheckoutOrderTemplate from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of customer_info @@ -89,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CheckoutOrderTemplate from a dict""" if obj is None: return None @@ -99,8 +98,8 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "currency": obj.get("currency"), - "customer_info": CheckoutOrderTemplateCustomerInfo.from_dict(obj.get("customer_info")) if obj.get("customer_info") is not None else None, - "line_items": [Product.from_dict(_item) for _item in obj.get("line_items")] if obj.get("line_items") is not None else None, + "customer_info": CheckoutOrderTemplateCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None, + "line_items": [Product.from_dict(_item) for _item in obj["line_items"]] if obj.get("line_items") is not None else None, "metadata": obj.get("metadata") }) return _obj diff --git a/conekta/models/checkout_order_template_customer_info.py b/conekta/models/checkout_order_template_customer_info.py index e65ca78..1175ed8 100644 --- a/conekta/models/checkout_order_template_customer_info.py +++ b/conekta/models/checkout_order_template_customer_info.py @@ -14,22 +14,15 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.customer_info import CustomerInfo from conekta.models.customer_info_just_customer_id import CustomerInfoJustCustomerId -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CHECKOUTORDERTEMPLATECUSTOMERINFO_ONE_OF_SCHEMAS = ["CustomerInfo", "CustomerInfoJustCustomerId"] @@ -42,11 +35,12 @@ class CheckoutOrderTemplateCustomerInfo(BaseModel): # data type: CustomerInfoJustCustomerId oneof_schema_2_validator: Optional[CustomerInfoJustCustomerId] = None actual_instance: Optional[Union[CustomerInfo, CustomerInfoJustCustomerId]] = None - one_of_schemas: List[str] = Literal["CustomerInfo", "CustomerInfoJustCustomerId"] + one_of_schemas: Set[str] = { "CustomerInfo", "CustomerInfoJustCustomerId" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) def __init__(self, *args, **kwargs) -> None: @@ -84,7 +78,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -121,19 +115,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], CustomerInfo, CustomerInfoJustCustomerId]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/checkout_request.py b/conekta/models/checkout_request.py index effbf2c..c49c5b6 100644 --- a/conekta/models/checkout_request.py +++ b/conekta/models/checkout_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CheckoutRequest(BaseModel): """ @@ -38,14 +34,16 @@ class CheckoutRequest(BaseModel): monthly_installments_options: Optional[List[StrictInt]] = None name: Optional[StrictStr] = Field(default=None, description="Reason for payment") on_demand_enabled: Optional[StrictBool] = None + redirection_time: Optional[StrictInt] = Field(default=None, description="number of seconds to wait before redirecting to the success_url") success_url: Optional[StrictStr] = Field(default=None, description="Redirection url back to the site in case of successful payment, applies only to HostedPayment") type: Optional[StrictStr] = Field(default=None, description="This field represents the type of checkout") - __properties: ClassVar[List[str]] = ["allowed_payment_methods", "expires_at", "failure_url", "monthly_installments_enabled", "monthly_installments_options", "name", "on_demand_enabled", "success_url", "type"] + __properties: ClassVar[List[str]] = ["allowed_payment_methods", "expires_at", "failure_url", "monthly_installments_enabled", "monthly_installments_options", "name", "on_demand_enabled", "redirection_time", "success_url", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CheckoutRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CheckoutRequest from a dict""" if obj is None: return None @@ -97,6 +97,7 @@ def from_dict(cls, obj: Dict) -> Self: "monthly_installments_options": obj.get("monthly_installments_options"), "name": obj.get("name"), "on_demand_enabled": obj.get("on_demand_enabled"), + "redirection_time": obj.get("redirection_time"), "success_url": obj.get("success_url"), "type": obj.get("type") }) diff --git a/conekta/models/checkout_response.py b/conekta/models/checkout_response.py index d9531e5..4b1240f 100644 --- a/conekta/models/checkout_response.py +++ b/conekta/models/checkout_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self class CheckoutResponse(BaseModel): """ @@ -34,7 +30,7 @@ class CheckoutResponse(BaseModel): allowed_payment_methods: Optional[List[StrictStr]] = None can_not_expire: Optional[StrictBool] = None emails_sent: Optional[StrictInt] = None - exclude_card_networks: Optional[List[Union[str, Any]]] = None + exclude_card_networks: Optional[List[Dict[str, Any]]] = None expires_at: Optional[StrictInt] = None failure_url: Optional[StrictStr] = None force_3ds_flow: Optional[StrictBool] = None @@ -58,10 +54,11 @@ class CheckoutResponse(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["allowed_payment_methods", "can_not_expire", "emails_sent", "exclude_card_networks", "expires_at", "failure_url", "force_3ds_flow", "id", "livemode", "metadata", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "object", "paid_payments_count", "payments_limit_count", "recurrent", "slug", "sms_sent", "starts_at", "status", "success_url", "type", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -74,7 +71,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CheckoutResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -88,10 +85,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if payments_limit_count (nullable) is None @@ -102,7 +101,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CheckoutResponse from a dict""" if obj is None: return None diff --git a/conekta/models/checkouts_response.py b/conekta/models/checkouts_response.py index b31829d..732a13b 100644 --- a/conekta/models/checkouts_response.py +++ b/conekta/models/checkouts_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.checkout_response import CheckoutResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CheckoutsResponse(BaseModel): """ @@ -39,10 +35,11 @@ class CheckoutsResponse(BaseModel): data: Optional[List[CheckoutResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CheckoutsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CheckoutsResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [CheckoutResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [CheckoutResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/checkouts_response_all_of.py b/conekta/models/checkouts_response_all_of.py deleted file mode 100644 index 702a593..0000000 --- a/conekta/models/checkouts_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.checkout_response import CheckoutResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CheckoutsResponseAllOf(BaseModel): - """ - CheckoutsResponseAllOf - """ # noqa: E501 - data: Optional[List[CheckoutResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CheckoutsResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CheckoutsResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CheckoutResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/company_fiscal_info_address_response.py b/conekta/models/company_fiscal_info_address_response.py index a7ff9ef..6a4ee3d 100644 --- a/conekta/models/company_fiscal_info_address_response.py +++ b/conekta/models/company_fiscal_info_address_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CompanyFiscalInfoAddressResponse(BaseModel): """ @@ -48,14 +44,15 @@ def object_validate_enum(cls, value): if value is None: return value - if value not in ('address'): + if value not in set(['address']): raise ValueError("must be one of enum values ('address')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +65,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CompanyFiscalInfoAddressResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,16 +79,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CompanyFiscalInfoAddressResponse from a dict""" if obj is None: return None diff --git a/conekta/models/company_fiscal_info_response.py b/conekta/models/company_fiscal_info_response.py index 9232956..9c450db 100644 --- a/conekta/models/company_fiscal_info_response.py +++ b/conekta/models/company_fiscal_info_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field from conekta.models.company_fiscal_info_address_response import CompanyFiscalInfoAddressResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CompanyFiscalInfoResponse(BaseModel): """ @@ -47,14 +43,15 @@ def object_validate_enum(cls, value): if value is None: return value - if value not in ('fiscal_info'): + if value not in set(['fiscal_info']): raise ValueError("must be one of enum values ('fiscal_info')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -67,7 +64,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CompanyFiscalInfoResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -81,10 +78,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -93,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CompanyFiscalInfoResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "business_type": obj.get("business_type"), "phone": obj.get("phone"), "physical_person_business_type": obj.get("physical_person_business_type"), - "address": CompanyFiscalInfoAddressResponse.from_dict(obj.get("address")) if obj.get("address") is not None else None + "address": CompanyFiscalInfoAddressResponse.from_dict(obj["address"]) if obj.get("address") is not None else None }) return _obj diff --git a/conekta/models/company_payout_destination_response.py b/conekta/models/company_payout_destination_response.py index 89cad16..8746801 100644 --- a/conekta/models/company_payout_destination_response.py +++ b/conekta/models/company_payout_destination_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CompanyPayoutDestinationResponse(BaseModel): """ @@ -45,7 +41,7 @@ def object_validate_enum(cls, value): if value is None: return value - if value not in ('payout_destination'): + if value not in set(['payout_destination']): raise ValueError("must be one of enum values ('payout_destination')") return value @@ -55,14 +51,15 @@ def type_validate_enum(cls, value): if value is None: return value - if value not in ('bank_account'): + if value not in set(['bank_account']): raise ValueError("must be one of enum values ('bank_account')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -75,7 +72,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CompanyPayoutDestinationResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,16 +86,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CompanyPayoutDestinationResponse from a dict""" if obj is None: return None diff --git a/conekta/models/company_response.py b/conekta/models/company_response.py index d46c2b0..fa2ad18 100644 --- a/conekta/models/company_response.py +++ b/conekta/models/company_response.py @@ -18,16 +18,12 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr, field_validator -from pydantic import Field from conekta.models.company_fiscal_info_response import CompanyFiscalInfoResponse from conekta.models.company_payout_destination_response import CompanyPayoutDestinationResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CompanyResponse(BaseModel): """ @@ -49,14 +45,15 @@ def object_validate_enum(cls, value): if value is None: return value - if value not in ('company'): + if value not in set(['company']): raise ValueError("must be one of enum values ('company')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -69,7 +66,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CompanyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -83,10 +80,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of payout_destination @@ -98,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CompanyResponse from a dict""" if obj is None: return None @@ -113,8 +112,8 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "parent_company_id": obj.get("parent_company_id"), "use_parent_fiscal_data": obj.get("use_parent_fiscal_data"), - "payout_destination": CompanyPayoutDestinationResponse.from_dict(obj.get("payout_destination")) if obj.get("payout_destination") is not None else None, - "fiscal_info": CompanyFiscalInfoResponse.from_dict(obj.get("fiscal_info")) if obj.get("fiscal_info") is not None else None + "payout_destination": CompanyPayoutDestinationResponse.from_dict(obj["payout_destination"]) if obj.get("payout_destination") is not None else None, + "fiscal_info": CompanyFiscalInfoResponse.from_dict(obj["fiscal_info"]) if obj.get("fiscal_info") is not None else None }) return _obj diff --git a/conekta/models/create_customer_fiscal_entities_response.py b/conekta/models/create_customer_fiscal_entities_response.py index 95b6297..9d9e8cf 100644 --- a/conekta/models/create_customer_fiscal_entities_response.py +++ b/conekta/models/create_customer_fiscal_entities_response.py @@ -18,24 +18,21 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.customer_address import CustomerAddress +from typing import Optional, Set +from typing_extensions import Self class CreateCustomerFiscalEntitiesResponse(BaseModel): """ CreateCustomerFiscalEntitiesResponse """ # noqa: E501 - address: CustomerFiscalEntitiesRequestAddress + address: CustomerAddress tax_id: Optional[StrictStr] = None email: Optional[StrictStr] = None phone: Optional[StrictStr] = None - metadata: Optional[Dict[str, Union[str, Any]]] = None + metadata: Optional[Dict[str, Dict[str, Any]]] = None company_name: Optional[StrictStr] = None id: StrictStr object: StrictStr @@ -44,10 +41,11 @@ class CreateCustomerFiscalEntitiesResponse(BaseModel): default: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["address", "tax_id", "email", "phone", "metadata", "company_name", "id", "object", "created_at", "parent_id", "default"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateCustomerFiscalEntitiesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateCustomerFiscalEntitiesResponse from a dict""" if obj is None: return None @@ -95,7 +95,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": CustomerFiscalEntitiesRequestAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "tax_id": obj.get("tax_id"), "email": obj.get("email"), "phone": obj.get("phone"), diff --git a/conekta/models/create_customer_fiscal_entities_response_all_of.py b/conekta/models/create_customer_fiscal_entities_response_all_of.py deleted file mode 100644 index f831465..0000000 --- a/conekta/models/create_customer_fiscal_entities_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CreateCustomerFiscalEntitiesResponseAllOf(BaseModel): - """ - CreateCustomerFiscalEntitiesResponseAllOf - """ # noqa: E501 - id: StrictStr - object: StrictStr - created_at: StrictInt - parent_id: Optional[StrictStr] = None - default: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["id", "object", "created_at", "parent_id", "default"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CreateCustomerFiscalEntitiesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CreateCustomerFiscalEntitiesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "created_at": obj.get("created_at"), - "parent_id": obj.get("parent_id"), - "default": obj.get("default") - }) - return _obj - - diff --git a/conekta/models/create_customer_payment_methods_request.py b/conekta/models/create_customer_payment_methods_request.py index 2a8c7c0..7a3542c 100644 --- a/conekta/models/create_customer_payment_methods_request.py +++ b/conekta/models/create_customer_payment_methods_request.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_card_request import PaymentMethodCardRequest from conekta.models.payment_method_cash_request import PaymentMethodCashRequest from conekta.models.payment_method_spei_request import PaymentMethodSpeiRequest -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CREATECUSTOMERPAYMENTMETHODSREQUEST_ONE_OF_SCHEMAS = ["PaymentMethodCardRequest", "PaymentMethodCashRequest", "PaymentMethodSpeiRequest"] @@ -45,11 +38,12 @@ class CreateCustomerPaymentMethodsRequest(BaseModel): # data type: PaymentMethodSpeiRequest oneof_schema_3_validator: Optional[PaymentMethodSpeiRequest] = None actual_instance: Optional[Union[PaymentMethodCardRequest, PaymentMethodCashRequest, PaymentMethodSpeiRequest]] = None - one_of_schemas: List[str] = Literal["PaymentMethodCardRequest", "PaymentMethodCashRequest", "PaymentMethodSpeiRequest"] + one_of_schemas: Set[str] = { "PaymentMethodCardRequest", "PaymentMethodCashRequest", "PaymentMethodSpeiRequest" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) def __init__(self, *args, **kwargs) -> None: @@ -92,7 +86,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -135,19 +129,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardRequest, PaymentMethodCashRequest, PaymentMethodSpeiRequest]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/create_customer_payment_methods_response.py b/conekta/models/create_customer_payment_methods_response.py index c6e95e6..53089f1 100644 --- a/conekta/models/create_customer_payment_methods_response.py +++ b/conekta/models/create_customer_payment_methods_response.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_card_response import PaymentMethodCardResponse from conekta.models.payment_method_cash_response import PaymentMethodCashResponse from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CREATECUSTOMERPAYMENTMETHODSRESPONSE_ONE_OF_SCHEMAS = ["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] @@ -45,11 +38,12 @@ class CreateCustomerPaymentMethodsResponse(BaseModel): # data type: PaymentMethodSpeiRecurrent oneof_schema_3_validator: Optional[PaymentMethodSpeiRecurrent] = None actual_instance: Optional[Union[PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]] = None - one_of_schemas: List[str] = Literal["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] + one_of_schemas: Set[str] = { "PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -95,7 +89,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -178,19 +172,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/create_risk_rules_data.py b/conekta/models/create_risk_rules_data.py index 967c11a..bca8b8b 100644 --- a/conekta/models/create_risk_rules_data.py +++ b/conekta/models/create_risk_rules_data.py @@ -18,28 +18,25 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CreateRiskRulesData(BaseModel): """ CreateRiskRulesData """ # noqa: E501 description: StrictStr = Field(description="Description of the rule") - field: StrictStr = Field(description="Field to be used for the rule") + var_field: StrictStr = Field(description="Field to be used for the rule", alias="field") value: StrictStr = Field(description="Value to be used for the rule") __properties: ClassVar[List[str]] = ["description", "field", "value"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CreateRiskRulesData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,16 +63,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CreateRiskRulesData from a dict""" if obj is None: return None diff --git a/conekta/models/customer.py b/conekta/models/customer.py index ef974eb..ca95881 100644 --- a/conekta/models/customer.py +++ b/conekta/models/customer.py @@ -18,19 +18,15 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_antifraud_info import CustomerAntifraudInfo from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest from conekta.models.customer_payment_methods_request import CustomerPaymentMethodsRequest from conekta.models.customer_shipping_contacts import CustomerShippingContacts from conekta.models.subscription_request import SubscriptionRequest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Customer(BaseModel): """ @@ -52,10 +48,11 @@ class Customer(BaseModel): subscription: Optional[SubscriptionRequest] = None __properties: ClassVar[List[str]] = ["antifraud_info", "corporate", "custom_reference", "email", "default_payment_source_id", "default_shipping_contact_id", "fiscal_entities", "metadata", "name", "payment_sources", "phone", "plan_id", "shipping_contacts", "subscription"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +65,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Customer from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,10 +79,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of antifraud_info @@ -123,7 +122,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Customer from a dict""" if obj is None: return None @@ -132,20 +131,20 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "antifraud_info": CustomerAntifraudInfo.from_dict(obj.get("antifraud_info")) if obj.get("antifraud_info") is not None else None, + "antifraud_info": CustomerAntifraudInfo.from_dict(obj["antifraud_info"]) if obj.get("antifraud_info") is not None else None, "corporate": obj.get("corporate") if obj.get("corporate") is not None else False, "custom_reference": obj.get("custom_reference"), "email": obj.get("email"), "default_payment_source_id": obj.get("default_payment_source_id"), "default_shipping_contact_id": obj.get("default_shipping_contact_id"), - "fiscal_entities": [CustomerFiscalEntitiesRequest.from_dict(_item) for _item in obj.get("fiscal_entities")] if obj.get("fiscal_entities") is not None else None, + "fiscal_entities": [CustomerFiscalEntitiesRequest.from_dict(_item) for _item in obj["fiscal_entities"]] if obj.get("fiscal_entities") is not None else None, "metadata": obj.get("metadata"), "name": obj.get("name"), - "payment_sources": [CustomerPaymentMethodsRequest.from_dict(_item) for _item in obj.get("payment_sources")] if obj.get("payment_sources") is not None else None, + "payment_sources": [CustomerPaymentMethodsRequest.from_dict(_item) for _item in obj["payment_sources"]] if obj.get("payment_sources") is not None else None, "phone": obj.get("phone"), "plan_id": obj.get("plan_id"), - "shipping_contacts": [CustomerShippingContacts.from_dict(_item) for _item in obj.get("shipping_contacts")] if obj.get("shipping_contacts") is not None else None, - "subscription": SubscriptionRequest.from_dict(obj.get("subscription")) if obj.get("subscription") is not None else None + "shipping_contacts": [CustomerShippingContacts.from_dict(_item) for _item in obj["shipping_contacts"]] if obj.get("shipping_contacts") is not None else None, + "subscription": SubscriptionRequest.from_dict(obj["subscription"]) if obj.get("subscription") is not None else None }) return _obj diff --git a/conekta/models/customer_address.py b/conekta/models/customer_address.py index 57a1657..eeb6ccf 100644 --- a/conekta/models/customer_address.py +++ b/conekta/models/customer_address.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerAddress(BaseModel): """ @@ -41,10 +37,11 @@ class CustomerAddress(BaseModel): external_number: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["street1", "street2", "postal_code", "city", "state", "country", "residential", "external_number"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerAddress from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,16 +68,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerAddress from a dict""" if obj is None: return None diff --git a/conekta/models/customer_antifraud_info.py b/conekta/models/customer_antifraud_info.py index 7af0961..7321303 100644 --- a/conekta/models/customer_antifraud_info.py +++ b/conekta/models/customer_antifraud_info.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerAntifraudInfo(BaseModel): """ @@ -34,10 +31,11 @@ class CustomerAntifraudInfo(BaseModel): first_paid_at: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["account_created_at", "first_paid_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerAntifraudInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerAntifraudInfo from a dict""" if obj is None: return None diff --git a/conekta/models/customer_antifraud_info_response.py b/conekta/models/customer_antifraud_info_response.py index 04e3ab2..3874a69 100644 --- a/conekta/models/customer_antifraud_info_response.py +++ b/conekta/models/customer_antifraud_info_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerAntifraudInfoResponse(BaseModel): """ @@ -34,10 +31,11 @@ class CustomerAntifraudInfoResponse(BaseModel): account_created_at: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["first_paid_at", "account_created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerAntifraudInfoResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerAntifraudInfoResponse from a dict""" if obj is None: return None diff --git a/conekta/models/customer_fiscal_entities_data_response.py b/conekta/models/customer_fiscal_entities_data_response.py index e2ae252..cd962e4 100644 --- a/conekta/models/customer_fiscal_entities_data_response.py +++ b/conekta/models/customer_fiscal_entities_data_response.py @@ -18,24 +18,21 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.customer_address import CustomerAddress +from typing import Optional, Set +from typing_extensions import Self class CustomerFiscalEntitiesDataResponse(BaseModel): """ CustomerFiscalEntitiesDataResponse """ # noqa: E501 - address: CustomerFiscalEntitiesRequestAddress + address: CustomerAddress tax_id: Optional[StrictStr] = None email: Optional[StrictStr] = None phone: Optional[StrictStr] = None - metadata: Optional[Dict[str, Union[str, Any]]] = None + metadata: Optional[Dict[str, Dict[str, Any]]] = None company_name: Optional[StrictStr] = None id: StrictStr object: StrictStr @@ -44,10 +41,11 @@ class CustomerFiscalEntitiesDataResponse(BaseModel): default: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["address", "tax_id", "email", "phone", "metadata", "company_name", "id", "object", "created_at", "parent_id", "default"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerFiscalEntitiesDataResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerFiscalEntitiesDataResponse from a dict""" if obj is None: return None @@ -95,7 +95,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": CustomerFiscalEntitiesRequestAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "tax_id": obj.get("tax_id"), "email": obj.get("email"), "phone": obj.get("phone"), diff --git a/conekta/models/customer_fiscal_entities_request.py b/conekta/models/customer_fiscal_entities_request.py index 06305a6..ff51474 100644 --- a/conekta/models/customer_fiscal_entities_request.py +++ b/conekta/models/customer_fiscal_entities_request.py @@ -18,31 +18,29 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictStr -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.customer_address import CustomerAddress +from typing import Optional, Set +from typing_extensions import Self class CustomerFiscalEntitiesRequest(BaseModel): """ CustomerFiscalEntitiesRequest """ # noqa: E501 - address: CustomerFiscalEntitiesRequestAddress + address: CustomerAddress tax_id: Optional[StrictStr] = None email: Optional[StrictStr] = None phone: Optional[StrictStr] = None - metadata: Optional[Dict[str, Union[str, Any]]] = None + metadata: Optional[Dict[str, Dict[str, Any]]] = None company_name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["address", "tax_id", "email", "phone", "metadata", "company_name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerFiscalEntitiesRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerFiscalEntitiesRequest from a dict""" if obj is None: return None @@ -90,7 +90,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": CustomerFiscalEntitiesRequestAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "tax_id": obj.get("tax_id"), "email": obj.get("email"), "phone": obj.get("phone"), diff --git a/conekta/models/customer_fiscal_entities_request_address.py b/conekta/models/customer_fiscal_entities_request_address.py deleted file mode 100644 index 54495a5..0000000 --- a/conekta/models/customer_fiscal_entities_request_address.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CustomerFiscalEntitiesRequestAddress(BaseModel): - """ - CustomerFiscalEntitiesRequestAddress - """ # noqa: E501 - street1: StrictStr - street2: Optional[StrictStr] = None - postal_code: StrictStr - city: StrictStr - state: Optional[StrictStr] = None - country: Optional[StrictStr] = Field(default=None, description="this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)") - residential: Optional[StrictBool] = False - external_number: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["street1", "street2", "postal_code", "city", "state", "country", "residential", "external_number"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CustomerFiscalEntitiesRequestAddress from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CustomerFiscalEntitiesRequestAddress from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "street1": obj.get("street1"), - "street2": obj.get("street2"), - "postal_code": obj.get("postal_code"), - "city": obj.get("city"), - "state": obj.get("state"), - "country": obj.get("country"), - "residential": obj.get("residential") if obj.get("residential") is not None else False, - "external_number": obj.get("external_number") - }) - return _obj - - diff --git a/conekta/models/customer_fiscal_entities_response.py b/conekta/models/customer_fiscal_entities_response.py index da85cc8..96963ab 100644 --- a/conekta/models/customer_fiscal_entities_response.py +++ b/conekta/models/customer_fiscal_entities_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_fiscal_entities_data_response import CustomerFiscalEntitiesDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerFiscalEntitiesResponse(BaseModel): """ @@ -37,10 +33,11 @@ class CustomerFiscalEntitiesResponse(BaseModel): data: Optional[List[CustomerFiscalEntitiesDataResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerFiscalEntitiesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -83,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerFiscalEntitiesResponse from a dict""" if obj is None: return None @@ -94,7 +93,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "has_more": obj.get("has_more"), "object": obj.get("object"), - "data": [CustomerFiscalEntitiesDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [CustomerFiscalEntitiesDataResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/customer_fiscal_entities_response_all_of.py b/conekta/models/customer_fiscal_entities_response_all_of.py deleted file mode 100644 index 25f1e64..0000000 --- a/conekta/models/customer_fiscal_entities_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.customer_fiscal_entities_data_response import CustomerFiscalEntitiesDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CustomerFiscalEntitiesResponseAllOf(BaseModel): - """ - CustomerFiscalEntitiesResponseAllOf - """ # noqa: E501 - data: Optional[List[CustomerFiscalEntitiesDataResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CustomerFiscalEntitiesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CustomerFiscalEntitiesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CustomerFiscalEntitiesDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/customer_info.py b/conekta/models/customer_info.py index ee63b34..e769c75 100644 --- a/conekta/models/customer_info.py +++ b/conekta/models/customer_info.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerInfo(BaseModel): """ @@ -37,10 +34,11 @@ class CustomerInfo(BaseModel): object: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "email", "phone", "corporate", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +65,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerInfo from a dict""" if obj is None: return None diff --git a/conekta/models/customer_info_just_customer_id.py b/conekta/models/customer_info_just_customer_id.py index dbb241e..f1f4822 100644 --- a/conekta/models/customer_info_just_customer_id.py +++ b/conekta/models/customer_info_just_customer_id.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerInfoJustCustomerId(BaseModel): """ @@ -33,10 +30,11 @@ class CustomerInfoJustCustomerId(BaseModel): customer_id: StrictStr __properties: ClassVar[List[str]] = ["customer_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerInfoJustCustomerId from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerInfoJustCustomerId from a dict""" if obj is None: return None diff --git a/conekta/models/customer_info_just_customer_id_response.py b/conekta/models/customer_info_just_customer_id_response.py index 4f33698..156a909 100644 --- a/conekta/models/customer_info_just_customer_id_response.py +++ b/conekta/models/customer_info_just_customer_id_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerInfoJustCustomerIdResponse(BaseModel): """ @@ -33,10 +30,11 @@ class CustomerInfoJustCustomerIdResponse(BaseModel): customer_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["customer_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerInfoJustCustomerIdResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerInfoJustCustomerIdResponse from a dict""" if obj is None: return None diff --git a/conekta/models/customer_payment_method_request.py b/conekta/models/customer_payment_method_request.py index 6fa9a83..6889049 100644 --- a/conekta/models/customer_payment_method_request.py +++ b/conekta/models/customer_payment_method_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerPaymentMethodRequest(BaseModel): """ @@ -34,10 +30,11 @@ class CustomerPaymentMethodRequest(BaseModel): type: StrictStr = Field(description="Type of payment method") __properties: ClassVar[List[str]] = ["type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerPaymentMethodRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerPaymentMethodRequest from a dict""" if obj is None: return None diff --git a/conekta/models/customer_payment_methods.py b/conekta/models/customer_payment_methods.py deleted file mode 100644 index d293af7..0000000 --- a/conekta/models/customer_payment_methods.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.customer_payment_methods_data import CustomerPaymentMethodsData -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CustomerPaymentMethods(BaseModel): - """ - CustomerPaymentMethods - """ # noqa: E501 - data: Optional[List[CustomerPaymentMethodsData]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CustomerPaymentMethods from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CustomerPaymentMethods from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CustomerPaymentMethodsData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/customer_payment_methods_data.py b/conekta/models/customer_payment_methods_data.py index fe40612..faca08a 100644 --- a/conekta/models/customer_payment_methods_data.py +++ b/conekta/models/customer_payment_methods_data.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_card_response import PaymentMethodCardResponse from conekta.models.payment_method_cash_response import PaymentMethodCashResponse from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CUSTOMERPAYMENTMETHODSDATA_ONE_OF_SCHEMAS = ["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] @@ -45,11 +38,12 @@ class CustomerPaymentMethodsData(BaseModel): # data type: PaymentMethodSpeiRecurrent oneof_schema_3_validator: Optional[PaymentMethodSpeiRecurrent] = None actual_instance: Optional[Union[PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]] = None - one_of_schemas: List[str] = Literal["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] + one_of_schemas: Set[str] = { "PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -95,7 +89,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -178,19 +172,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/customer_payment_methods_request.py b/conekta/models/customer_payment_methods_request.py index b4867bd..44cbd0a 100644 --- a/conekta/models/customer_payment_methods_request.py +++ b/conekta/models/customer_payment_methods_request.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_card_request import PaymentMethodCardRequest from conekta.models.payment_method_cash_request import PaymentMethodCashRequest from conekta.models.payment_method_spei_request import PaymentMethodSpeiRequest -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self CUSTOMERPAYMENTMETHODSREQUEST_ONE_OF_SCHEMAS = ["PaymentMethodCardRequest", "PaymentMethodCashRequest", "PaymentMethodSpeiRequest"] @@ -45,11 +38,12 @@ class CustomerPaymentMethodsRequest(BaseModel): # data type: PaymentMethodSpeiRequest oneof_schema_3_validator: Optional[PaymentMethodSpeiRequest] = None actual_instance: Optional[Union[PaymentMethodCardRequest, PaymentMethodCashRequest, PaymentMethodSpeiRequest]] = None - one_of_schemas: List[str] = Literal["PaymentMethodCardRequest", "PaymentMethodCashRequest", "PaymentMethodSpeiRequest"] + one_of_schemas: Set[str] = { "PaymentMethodCardRequest", "PaymentMethodCashRequest", "PaymentMethodSpeiRequest" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) def __init__(self, *args, **kwargs) -> None: @@ -92,7 +86,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -135,19 +129,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardRequest, PaymentMethodCashRequest, PaymentMethodSpeiRequest]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/customer_payment_methods_response.py b/conekta/models/customer_payment_methods_response.py index 8786ba8..fe37d3b 100644 --- a/conekta/models/customer_payment_methods_response.py +++ b/conekta/models/customer_payment_methods_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_payment_methods_data import CustomerPaymentMethodsData -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerPaymentMethodsResponse(BaseModel): """ @@ -39,10 +35,11 @@ class CustomerPaymentMethodsResponse(BaseModel): data: Optional[List[CustomerPaymentMethodsData]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerPaymentMethodsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerPaymentMethodsResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [CustomerPaymentMethodsData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [CustomerPaymentMethodsData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/customer_response.py b/conekta/models/customer_response.py index 0355c0f..a049186 100644 --- a/conekta/models/customer_response.py +++ b/conekta/models/customer_response.py @@ -18,19 +18,15 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.customer_antifraud_info_response import CustomerAntifraudInfoResponse from conekta.models.customer_fiscal_entities_response import CustomerFiscalEntitiesResponse from conekta.models.customer_payment_methods_response import CustomerPaymentMethodsResponse from conekta.models.customer_response_shipping_contacts import CustomerResponseShippingContacts from conekta.models.subscription_response import SubscriptionResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerResponse(BaseModel): """ @@ -56,10 +52,11 @@ class CustomerResponse(BaseModel): subscription: Optional[SubscriptionResponse] = None __properties: ClassVar[List[str]] = ["antifraud_info", "corporate", "created_at", "custom_reference", "default_fiscal_entity_id", "default_shipping_contact_id", "default_payment_source_id", "email", "fiscal_entities", "id", "livemode", "name", "metadata", "object", "payment_sources", "phone", "shipping_contacts", "subscription"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +69,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,10 +83,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of antifraud_info @@ -125,7 +124,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerResponse from a dict""" if obj is None: return None @@ -134,7 +133,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "antifraud_info": CustomerAntifraudInfoResponse.from_dict(obj.get("antifraud_info")) if obj.get("antifraud_info") is not None else None, + "antifraud_info": CustomerAntifraudInfoResponse.from_dict(obj["antifraud_info"]) if obj.get("antifraud_info") is not None else None, "corporate": obj.get("corporate"), "created_at": obj.get("created_at"), "custom_reference": obj.get("custom_reference"), @@ -142,16 +141,16 @@ def from_dict(cls, obj: Dict) -> Self: "default_shipping_contact_id": obj.get("default_shipping_contact_id"), "default_payment_source_id": obj.get("default_payment_source_id"), "email": obj.get("email"), - "fiscal_entities": CustomerFiscalEntitiesResponse.from_dict(obj.get("fiscal_entities")) if obj.get("fiscal_entities") is not None else None, + "fiscal_entities": CustomerFiscalEntitiesResponse.from_dict(obj["fiscal_entities"]) if obj.get("fiscal_entities") is not None else None, "id": obj.get("id"), "livemode": obj.get("livemode"), "name": obj.get("name"), "metadata": obj.get("metadata"), "object": obj.get("object"), - "payment_sources": CustomerPaymentMethodsResponse.from_dict(obj.get("payment_sources")) if obj.get("payment_sources") is not None else None, + "payment_sources": CustomerPaymentMethodsResponse.from_dict(obj["payment_sources"]) if obj.get("payment_sources") is not None else None, "phone": obj.get("phone"), - "shipping_contacts": CustomerResponseShippingContacts.from_dict(obj.get("shipping_contacts")) if obj.get("shipping_contacts") is not None else None, - "subscription": SubscriptionResponse.from_dict(obj.get("subscription")) if obj.get("subscription") is not None else None + "shipping_contacts": CustomerResponseShippingContacts.from_dict(obj["shipping_contacts"]) if obj.get("shipping_contacts") is not None else None, + "subscription": SubscriptionResponse.from_dict(obj["subscription"]) if obj.get("subscription") is not None else None }) return _obj diff --git a/conekta/models/customer_response_shipping_contacts.py b/conekta/models/customer_response_shipping_contacts.py index b57e051..1a33165 100644 --- a/conekta/models/customer_response_shipping_contacts.py +++ b/conekta/models/customer_response_shipping_contacts.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_shipping_contacts_data_response import CustomerShippingContactsDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerResponseShippingContacts(BaseModel): """ @@ -37,10 +33,11 @@ class CustomerResponseShippingContacts(BaseModel): data: Optional[List[CustomerShippingContactsDataResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerResponseShippingContacts from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -83,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerResponseShippingContacts from a dict""" if obj is None: return None @@ -94,7 +93,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "has_more": obj.get("has_more"), "object": obj.get("object"), - "data": [CustomerShippingContactsDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [CustomerShippingContactsDataResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/customer_response_shipping_contacts_all_of.py b/conekta/models/customer_response_shipping_contacts_all_of.py deleted file mode 100644 index e02285b..0000000 --- a/conekta/models/customer_response_shipping_contacts_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.customer_shipping_contacts_data_response import CustomerShippingContactsDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CustomerResponseShippingContactsAllOf(BaseModel): - """ - CustomerResponseShippingContactsAllOf - """ # noqa: E501 - data: Optional[List[CustomerShippingContactsDataResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CustomerResponseShippingContactsAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CustomerResponseShippingContactsAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CustomerShippingContactsDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/customer_shipping_contacts.py b/conekta/models/customer_shipping_contacts.py index 2b773f9..bee6bd0 100644 --- a/conekta/models/customer_shipping_contacts.py +++ b/conekta/models/customer_shipping_contacts.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_shipping_contacts_address import CustomerShippingContactsAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerShippingContacts(BaseModel): """ @@ -42,10 +38,11 @@ class CustomerShippingContacts(BaseModel): metadata: Optional[Dict[str, Any]] = Field(default=None, description="Metadata associated with the shipping contact") __properties: ClassVar[List[str]] = ["phone", "receiver", "between_streets", "address", "parent_id", "default", "deleted", "metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerShippingContacts from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,10 +69,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -94,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerShippingContacts from a dict""" if obj is None: return None @@ -106,7 +105,7 @@ def from_dict(cls, obj: Dict) -> Self: "phone": obj.get("phone"), "receiver": obj.get("receiver"), "between_streets": obj.get("between_streets"), - "address": CustomerShippingContactsAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerShippingContactsAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "parent_id": obj.get("parent_id"), "default": obj.get("default"), "deleted": obj.get("deleted"), diff --git a/conekta/models/customer_shipping_contacts_address.py b/conekta/models/customer_shipping_contacts_address.py index 03320c1..7999c3c 100644 --- a/conekta/models/customer_shipping_contacts_address.py +++ b/conekta/models/customer_shipping_contacts_address.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerShippingContactsAddress(BaseModel): """ @@ -40,10 +36,11 @@ class CustomerShippingContactsAddress(BaseModel): residential: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["street1", "street2", "postal_code", "city", "state", "country", "residential"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerShippingContactsAddress from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if residential (nullable) is None @@ -84,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerShippingContactsAddress from a dict""" if obj is None: return None diff --git a/conekta/models/customer_shipping_contacts_data_response.py b/conekta/models/customer_shipping_contacts_data_response.py index 2eae304..4deffe7 100644 --- a/conekta/models/customer_shipping_contacts_data_response.py +++ b/conekta/models/customer_shipping_contacts_data_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.customer_shipping_contacts_address import CustomerShippingContactsAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerShippingContactsDataResponse(BaseModel): """ @@ -45,10 +41,11 @@ class CustomerShippingContactsDataResponse(BaseModel): created_at: StrictInt __properties: ClassVar[List[str]] = ["phone", "receiver", "between_streets", "address", "parent_id", "default", "deleted", "metadata", "id", "object", "created_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerShippingContactsDataResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -97,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerShippingContactsDataResponse from a dict""" if obj is None: return None @@ -109,7 +108,7 @@ def from_dict(cls, obj: Dict) -> Self: "phone": obj.get("phone"), "receiver": obj.get("receiver"), "between_streets": obj.get("between_streets"), - "address": CustomerShippingContactsAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerShippingContactsAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "parent_id": obj.get("parent_id"), "default": obj.get("default"), "deleted": obj.get("deleted"), diff --git a/conekta/models/customer_shipping_contacts_data_response_all_of.py b/conekta/models/customer_shipping_contacts_data_response_all_of.py deleted file mode 100644 index 1f6e92d..0000000 --- a/conekta/models/customer_shipping_contacts_data_response_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CustomerShippingContactsDataResponseAllOf(BaseModel): - """ - CustomerShippingContactsDataResponseAllOf - """ # noqa: E501 - id: StrictStr - object: StrictStr - created_at: StrictInt - __properties: ClassVar[List[str]] = ["id", "object", "created_at"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CustomerShippingContactsDataResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CustomerShippingContactsDataResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "created_at": obj.get("created_at") - }) - return _obj - - diff --git a/conekta/models/customer_shipping_contacts_response.py b/conekta/models/customer_shipping_contacts_response.py index 7a08b23..0dd4c63 100644 --- a/conekta/models/customer_shipping_contacts_response.py +++ b/conekta/models/customer_shipping_contacts_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.customer_shipping_contacts_response_address import CustomerShippingContactsResponseAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerShippingContactsResponse(BaseModel): """ @@ -45,10 +41,11 @@ class CustomerShippingContactsResponse(BaseModel): deleted: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["phone", "receiver", "between_streets", "address", "parent_id", "default", "id", "created_at", "metadata", "object", "deleted"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerShippingContactsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -92,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerShippingContactsResponse from a dict""" if obj is None: return None @@ -104,7 +103,7 @@ def from_dict(cls, obj: Dict) -> Self: "phone": obj.get("phone"), "receiver": obj.get("receiver"), "between_streets": obj.get("between_streets"), - "address": CustomerShippingContactsResponseAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerShippingContactsResponseAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "parent_id": obj.get("parent_id"), "default": obj.get("default"), "id": obj.get("id"), diff --git a/conekta/models/customer_shipping_contacts_response_address.py b/conekta/models/customer_shipping_contacts_response_address.py index 831f257..f8a06ae 100644 --- a/conekta/models/customer_shipping_contacts_response_address.py +++ b/conekta/models/customer_shipping_contacts_response_address.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerShippingContactsResponseAddress(BaseModel): """ @@ -40,10 +37,11 @@ class CustomerShippingContactsResponseAddress(BaseModel): residential: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["object", "street1", "street2", "postal_code", "city", "state", "country", "residential"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerShippingContactsResponseAddress from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +68,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if residential (nullable) is None @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerShippingContactsResponseAddress from a dict""" if obj is None: return None diff --git a/conekta/models/customer_update_fiscal_entities_request.py b/conekta/models/customer_update_fiscal_entities_request.py index e9918ca..db627dc 100644 --- a/conekta/models/customer_update_fiscal_entities_request.py +++ b/conekta/models/customer_update_fiscal_entities_request.py @@ -18,31 +18,29 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictStr -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.customer_address import CustomerAddress +from typing import Optional, Set +from typing_extensions import Self class CustomerUpdateFiscalEntitiesRequest(BaseModel): """ CustomerUpdateFiscalEntitiesRequest """ # noqa: E501 - address: Optional[CustomerFiscalEntitiesRequestAddress] = None + address: Optional[CustomerAddress] = None tax_id: Optional[StrictStr] = None email: Optional[StrictStr] = None phone: Optional[StrictStr] = None - metadata: Optional[Dict[str, Union[str, Any]]] = None + metadata: Optional[Dict[str, Dict[str, Any]]] = None company_name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["address", "tax_id", "email", "phone", "metadata", "company_name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerUpdateFiscalEntitiesRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -81,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerUpdateFiscalEntitiesRequest from a dict""" if obj is None: return None @@ -90,7 +90,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": CustomerFiscalEntitiesRequestAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "tax_id": obj.get("tax_id"), "email": obj.get("email"), "phone": obj.get("phone"), diff --git a/conekta/models/customer_update_shipping_contacts.py b/conekta/models/customer_update_shipping_contacts.py index de2d49f..916ec8c 100644 --- a/conekta/models/customer_update_shipping_contacts.py +++ b/conekta/models/customer_update_shipping_contacts.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_shipping_contacts_address import CustomerShippingContactsAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomerUpdateShippingContacts(BaseModel): """ @@ -41,10 +37,11 @@ class CustomerUpdateShippingContacts(BaseModel): deleted: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["phone", "receiver", "between_streets", "address", "parent_id", "default", "deleted"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomerUpdateShippingContacts from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,10 +68,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -93,7 +92,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomerUpdateShippingContacts from a dict""" if obj is None: return None @@ -105,7 +104,7 @@ def from_dict(cls, obj: Dict) -> Self: "phone": obj.get("phone"), "receiver": obj.get("receiver"), "between_streets": obj.get("between_streets"), - "address": CustomerShippingContactsAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerShippingContactsAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "parent_id": obj.get("parent_id"), "default": obj.get("default"), "deleted": obj.get("deleted") diff --git a/conekta/models/customers_response.py b/conekta/models/customers_response.py index d8e05b8..9a14123 100644 --- a/conekta/models/customers_response.py +++ b/conekta/models/customers_response.py @@ -18,31 +18,28 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_response import CustomerResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class CustomersResponse(BaseModel): """ CustomersResponse """ # noqa: E501 - data: Optional[List[CustomerResponse]] = None has_more: StrictBool = Field(description="Indicates if there are more pages to be requested") object: StrictStr = Field(description="Object type, in this case is list") next_page_url: Optional[StrictStr] = Field(default=None, description="URL of the next page.") previous_page_url: Optional[StrictStr] = Field(default=None, description="Url of the previous page.") - __properties: ClassVar[List[str]] = ["data", "has_more", "object", "next_page_url", "previous_page_url"] + data: Optional[List[CustomerResponse]] = None + __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of CustomersResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of CustomersResponse from a dict""" if obj is None: return None @@ -104,11 +103,11 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": [CustomerResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None, "has_more": obj.get("has_more"), "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), - "previous_page_url": obj.get("previous_page_url") + "previous_page_url": obj.get("previous_page_url"), + "data": [CustomerResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/customers_response_all_of.py b/conekta/models/customers_response_all_of.py deleted file mode 100644 index 8fc2c99..0000000 --- a/conekta/models/customers_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.customer_response import CustomerResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class CustomersResponseAllOf(BaseModel): - """ - CustomersResponseAllOf - """ # noqa: E501 - data: Optional[List[CustomerResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of CustomersResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of CustomersResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CustomerResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/delete_api_keys_response.py b/conekta/models/delete_api_keys_response.py index ed148c7..83ae9b7 100644 --- a/conekta/models/delete_api_keys_response.py +++ b/conekta/models/delete_api_keys_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DeleteApiKeysResponse(BaseModel): """ @@ -42,10 +38,11 @@ class DeleteApiKeysResponse(BaseModel): role: Optional[StrictStr] = Field(default=None, description="Indicates if the api key is private or public") __properties: ClassVar[List[str]] = ["active", "created_at", "description", "livemode", "prefix", "id", "object", "deleted", "role"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DeleteApiKeysResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +69,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DeleteApiKeysResponse from a dict""" if obj is None: return None diff --git a/conekta/models/delete_api_keys_response_all_of.py b/conekta/models/delete_api_keys_response_all_of.py deleted file mode 100644 index 8b07fbf..0000000 --- a/conekta/models/delete_api_keys_response_all_of.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DeleteApiKeysResponseAllOf(BaseModel): - """ - DeleteApiKeysResponseAllOf - """ # noqa: E501 - deleted: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["deleted"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DeleteApiKeysResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DeleteApiKeysResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "deleted": obj.get("deleted") - }) - return _obj - - diff --git a/conekta/models/deleted_blacklist_rule_response.py b/conekta/models/deleted_blacklist_rule_response.py index 5608cde..f22e1b7 100644 --- a/conekta/models/deleted_blacklist_rule_response.py +++ b/conekta/models/deleted_blacklist_rule_response.py @@ -18,29 +18,26 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DeletedBlacklistRuleResponse(BaseModel): """ DeletedBlacklistRuleResponse """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Blacklist rule id") - field: Optional[StrictStr] = Field(default=None, description="field used for blacklists rule deleted") + var_field: Optional[StrictStr] = Field(default=None, description="field used for blacklists rule deleted", alias="field") value: Optional[StrictStr] = Field(default=None, description="value used for blacklists rule deleted") description: Optional[StrictStr] = Field(default=None, description="use an description for blacklisted rule") __properties: ClassVar[List[str]] = ["id", "field", "value", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DeletedBlacklistRuleResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DeletedBlacklistRuleResponse from a dict""" if obj is None: return None diff --git a/conekta/models/deleted_whitelist_rule_response.py b/conekta/models/deleted_whitelist_rule_response.py index 0b8421a..cacf797 100644 --- a/conekta/models/deleted_whitelist_rule_response.py +++ b/conekta/models/deleted_whitelist_rule_response.py @@ -18,29 +18,26 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DeletedWhitelistRuleResponse(BaseModel): """ DeletedWhitelistRuleResponse """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Whitelist rule id") - field: Optional[StrictStr] = Field(default=None, description="field used for whitelists rule deleted") + var_field: Optional[StrictStr] = Field(default=None, description="field used for whitelists rule deleted", alias="field") value: Optional[StrictStr] = Field(default=None, description="value used for whitelists rule deleted") description: Optional[StrictStr] = Field(default=None, description="use an description for whitelisted rule") __properties: ClassVar[List[str]] = ["id", "field", "value", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DeletedWhitelistRuleResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DeletedWhitelistRuleResponse from a dict""" if obj is None: return None diff --git a/conekta/models/details.py b/conekta/models/details.py index 472f1d6..e79e23d 100644 --- a/conekta/models/details.py +++ b/conekta/models/details.py @@ -18,14 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel from conekta.models.details_error import DetailsError -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Details(BaseModel): """ @@ -34,10 +31,11 @@ class Details(BaseModel): details: Optional[List[DetailsError]] = None __properties: ClassVar[List[str]] = ["details"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Details from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +62,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in details (list) @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Details from a dict""" if obj is None: return None @@ -89,7 +89,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "details": [DetailsError.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None + "details": [DetailsError.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None }) return _obj diff --git a/conekta/models/details_error.py b/conekta/models/details_error.py index c192fee..6d05d1d 100644 --- a/conekta/models/details_error.py +++ b/conekta/models/details_error.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DetailsError(BaseModel): """ @@ -36,10 +33,11 @@ class DetailsError(BaseModel): debug_message: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["code", "param", "message", "debug_message"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DetailsError from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if param (nullable) is None @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DetailsError from a dict""" if obj is None: return None diff --git a/conekta/models/discount_lines_data_response.py b/conekta/models/discount_lines_data_response.py index 68e1f47..df3a4d2 100644 --- a/conekta/models/discount_lines_data_response.py +++ b/conekta/models/discount_lines_data_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DiscountLinesDataResponse(BaseModel): """ @@ -40,10 +36,11 @@ class DiscountLinesDataResponse(BaseModel): parent_id: StrictStr = Field(description="The order id") __properties: ClassVar[List[str]] = ["amount", "code", "type", "id", "object", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DiscountLinesDataResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DiscountLinesDataResponse from a dict""" if obj is None: return None diff --git a/conekta/models/discount_lines_response.py b/conekta/models/discount_lines_response.py index 2eda7bc..b72a0a4 100644 --- a/conekta/models/discount_lines_response.py +++ b/conekta/models/discount_lines_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class DiscountLinesResponse(BaseModel): """ @@ -40,10 +36,11 @@ class DiscountLinesResponse(BaseModel): parent_id: StrictStr = Field(description="The order id") __properties: ClassVar[List[str]] = ["amount", "code", "type", "id", "object", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of DiscountLinesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of DiscountLinesResponse from a dict""" if obj is None: return None diff --git a/conekta/models/discount_lines_response_all_of.py b/conekta/models/discount_lines_response_all_of.py deleted file mode 100644 index e3db5d1..0000000 --- a/conekta/models/discount_lines_response_all_of.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class DiscountLinesResponseAllOf(BaseModel): - """ - DiscountLinesResponseAllOf - """ # noqa: E501 - id: StrictStr = Field(description="The discount line id") - object: StrictStr = Field(description="The object name") - parent_id: StrictStr = Field(description="The order id") - __properties: ClassVar[List[str]] = ["id", "object", "parent_id"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DiscountLinesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DiscountLinesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "parent_id": obj.get("parent_id") - }) - return _obj - - diff --git a/conekta/models/email_checkout_request.py b/conekta/models/email_checkout_request.py index 8fa4d2c..4a13d79 100644 --- a/conekta/models/email_checkout_request.py +++ b/conekta/models/email_checkout_request.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EmailCheckoutRequest(BaseModel): """ @@ -33,10 +30,11 @@ class EmailCheckoutRequest(BaseModel): email: StrictStr __properties: ClassVar[List[str]] = ["email"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EmailCheckoutRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EmailCheckoutRequest from a dict""" if obj is None: return None diff --git a/conekta/models/error.py b/conekta/models/error.py index 4d02844..abd3e61 100644 --- a/conekta/models/error.py +++ b/conekta/models/error.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from conekta.models.details_error import DetailsError -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Error(BaseModel): """ @@ -38,10 +34,11 @@ class Error(BaseModel): object: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["details", "log_id", "type", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Error from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,10 +65,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in details (list) @@ -89,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Error from a dict""" if obj is None: return None @@ -98,7 +97,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "details": [DetailsError.from_dict(_item) for _item in obj.get("details")] if obj.get("details") is not None else None, + "details": [DetailsError.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None, "log_id": obj.get("log_id"), "type": obj.get("type"), "object": obj.get("object") diff --git a/conekta/models/error_all_of.py b/conekta/models/error_all_of.py deleted file mode 100644 index 1287040..0000000 --- a/conekta/models/error_all_of.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ErrorAllOf(BaseModel): - """ - ErrorAllOf - """ # noqa: E501 - log_id: Optional[StrictStr] = Field(default=None, description="log id") - type: Optional[StrictStr] = None - object: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["log_id", "type", "object"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ErrorAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # set to None if log_id (nullable) is None - # and model_fields_set contains the field - if self.log_id is None and "log_id" in self.model_fields_set: - _dict['log_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ErrorAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "log_id": obj.get("log_id"), - "type": obj.get("type"), - "object": obj.get("object") - }) - return _obj - - diff --git a/conekta/models/event_response.py b/conekta/models/event_response.py index f99a6cf..fd99365 100644 --- a/conekta/models/event_response.py +++ b/conekta/models/event_response.py @@ -18,14 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr from conekta.models.webhook_log import WebhookLog -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EventResponse(BaseModel): """ @@ -41,10 +38,11 @@ class EventResponse(BaseModel): webhook_status: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["created_at", "data", "id", "livemode", "object", "type", "webhook_logs", "webhook_status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EventResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,10 +69,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in webhook_logs (list) @@ -87,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EventResponse from a dict""" if obj is None: return None @@ -102,7 +102,7 @@ def from_dict(cls, obj: Dict) -> Self: "livemode": obj.get("livemode"), "object": obj.get("object"), "type": obj.get("type"), - "webhook_logs": [WebhookLog.from_dict(_item) for _item in obj.get("webhook_logs")] if obj.get("webhook_logs") is not None else None, + "webhook_logs": [WebhookLog.from_dict(_item) for _item in obj["webhook_logs"]] if obj.get("webhook_logs") is not None else None, "webhook_status": obj.get("webhook_status") }) return _obj diff --git a/conekta/models/event_types.py b/conekta/models/event_types.py new file mode 100644 index 0000000..1ec6b39 --- /dev/null +++ b/conekta/models/event_types.py @@ -0,0 +1,41 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class EventTypes(str, Enum): + """ + It is a parameter that allows to identify in the response, the type of event that is being generated. + """ + + """ + allowed enum values + """ + WEBHOOK_PING = 'webhook_ping' + ORDER_DOT_PAID = 'order.paid' + ORDER_DOT_EXPIRED = 'order.expired' + ORDER_DOT_CANCELED = 'order.canceled' + ORDER_DOT_PENDING_PAYMENT = 'order.pending_payment' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of EventTypes from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/conekta/models/events_resend_response.py b/conekta/models/events_resend_response.py index 426b828..f8d770e 100644 --- a/conekta/models/events_resend_response.py +++ b/conekta/models/events_resend_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class EventsResendResponse(BaseModel): """ @@ -38,10 +35,11 @@ class EventsResendResponse(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["failed_attempts", "id", "last_attempted_at", "last_http_response_status", "response_data", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of EventsResendResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,16 +66,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of EventsResendResponse from a dict""" if obj is None: return None diff --git a/conekta/models/fiscal_entity_address.py b/conekta/models/fiscal_entity_address.py index 43e4c71..bcbecbe 100644 --- a/conekta/models/fiscal_entity_address.py +++ b/conekta/models/fiscal_entity_address.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class FiscalEntityAddress(BaseModel): """ @@ -40,10 +36,11 @@ class FiscalEntityAddress(BaseModel): external_number: StrictStr = Field(description="External number") __properties: ClassVar[List[str]] = ["street1", "street2", "postal_code", "city", "state", "country", "external_number"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of FiscalEntityAddress from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if street2 (nullable) is None @@ -84,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of FiscalEntityAddress from a dict""" if obj is None: return None diff --git a/conekta/models/get_api_keys_response.py b/conekta/models/get_api_keys_response.py index fc490e5..f43d728 100644 --- a/conekta/models/get_api_keys_response.py +++ b/conekta/models/get_api_keys_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.api_key_response import ApiKeyResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetApiKeysResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetApiKeysResponse(BaseModel): data: Optional[List[ApiKeyResponse]] = None __properties: ClassVar[List[str]] = ["next_page_url", "previous_page_url", "has_more", "object", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetApiKeysResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetApiKeysResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "previous_page_url": obj.get("previous_page_url"), "has_more": obj.get("has_more"), "object": obj.get("object"), - "data": [ApiKeyResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [ApiKeyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_api_keys_response_all_of.py b/conekta/models/get_api_keys_response_all_of.py deleted file mode 100644 index 7937ea3..0000000 --- a/conekta/models/get_api_keys_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.api_key_response import ApiKeyResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetApiKeysResponseAllOf(BaseModel): - """ - GetApiKeysResponseAllOf - """ # noqa: E501 - data: Optional[List[ApiKeyResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetApiKeysResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetApiKeysResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ApiKeyResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_charges_response.py b/conekta/models/get_charges_response.py index d183764..b795996 100644 --- a/conekta/models/get_charges_response.py +++ b/conekta/models/get_charges_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.charge_response import ChargeResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetChargesResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetChargesResponse(BaseModel): data: Optional[List[ChargeResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetChargesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetChargesResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [ChargeResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [ChargeResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_charges_response_all_of.py b/conekta/models/get_charges_response_all_of.py deleted file mode 100644 index c908847..0000000 --- a/conekta/models/get_charges_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.charge_response import ChargeResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetChargesResponseAllOf(BaseModel): - """ - GetChargesResponseAllOf - """ # noqa: E501 - data: Optional[List[ChargeResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetChargesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetChargesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ChargeResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_companies_response.py b/conekta/models/get_companies_response.py index 4ca9ba6..6167c45 100644 --- a/conekta/models/get_companies_response.py +++ b/conekta/models/get_companies_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.company_response import CompanyResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetCompaniesResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetCompaniesResponse(BaseModel): data: Optional[List[CompanyResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetCompaniesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetCompaniesResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [CompanyResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [CompanyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_companies_response_all_of.py b/conekta/models/get_companies_response_all_of.py deleted file mode 100644 index 40bd35a..0000000 --- a/conekta/models/get_companies_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.company_response import CompanyResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetCompaniesResponseAllOf(BaseModel): - """ - GetCompaniesResponseAllOf - """ # noqa: E501 - data: Optional[List[CompanyResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetCompaniesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetCompaniesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [CompanyResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_customer_payment_method_data_response.py b/conekta/models/get_customer_payment_method_data_response.py index d8b9c0a..d0a0af5 100644 --- a/conekta/models/get_customer_payment_method_data_response.py +++ b/conekta/models/get_customer_payment_method_data_response.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_card_response import PaymentMethodCardResponse from conekta.models.payment_method_cash_response import PaymentMethodCashResponse from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self GETCUSTOMERPAYMENTMETHODDATARESPONSE_ONE_OF_SCHEMAS = ["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] @@ -45,11 +38,12 @@ class GetCustomerPaymentMethodDataResponse(BaseModel): # data type: PaymentMethodSpeiRecurrent oneof_schema_3_validator: Optional[PaymentMethodSpeiRecurrent] = None actual_instance: Optional[Union[PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]] = None - one_of_schemas: List[str] = Literal["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] + one_of_schemas: Set[str] = { "PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -95,7 +89,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -178,19 +172,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/get_events_response.py b/conekta/models/get_events_response.py index 207cc3d..8e6f7e2 100644 --- a/conekta/models/get_events_response.py +++ b/conekta/models/get_events_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.event_response import EventResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetEventsResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetEventsResponse(BaseModel): data: Optional[List[EventResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetEventsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetEventsResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [EventResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [EventResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_events_response_all_of.py b/conekta/models/get_events_response_all_of.py deleted file mode 100644 index 119bbdf..0000000 --- a/conekta/models/get_events_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.event_response import EventResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetEventsResponseAllOf(BaseModel): - """ - GetEventsResponseAllOf - """ # noqa: E501 - data: Optional[List[EventResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetEventsResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetEventsResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [EventResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_order_discount_lines_response.py b/conekta/models/get_order_discount_lines_response.py index 639716d..78f15d8 100644 --- a/conekta/models/get_order_discount_lines_response.py +++ b/conekta/models/get_order_discount_lines_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.discount_lines_response import DiscountLinesResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetOrderDiscountLinesResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetOrderDiscountLinesResponse(BaseModel): data: Optional[List[DiscountLinesResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetOrderDiscountLinesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetOrderDiscountLinesResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [DiscountLinesResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [DiscountLinesResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_order_discount_lines_response_all_of.py b/conekta/models/get_order_discount_lines_response_all_of.py deleted file mode 100644 index 38b57cb..0000000 --- a/conekta/models/get_order_discount_lines_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.discount_lines_response import DiscountLinesResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetOrderDiscountLinesResponseAllOf(BaseModel): - """ - GetOrderDiscountLinesResponseAllOf - """ # noqa: E501 - data: Optional[List[DiscountLinesResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetOrderDiscountLinesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetOrderDiscountLinesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [DiscountLinesResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_orders_response.py b/conekta/models/get_orders_response.py index f8e6f0e..07e54bd 100644 --- a/conekta/models/get_orders_response.py +++ b/conekta/models/get_orders_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.order_response import OrderResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetOrdersResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetOrdersResponse(BaseModel): previous_page_url: Optional[StrictStr] = Field(default=None, description="Url of the previous page.") __properties: ClassVar[List[str]] = ["data", "has_more", "object", "next_page_url", "previous_page_url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetOrdersResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetOrdersResponse from a dict""" if obj is None: return None @@ -104,7 +103,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": [OrderResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None, + "data": [OrderResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, "has_more": obj.get("has_more"), "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), diff --git a/conekta/models/get_payment_method_response.py b/conekta/models/get_payment_method_response.py index ca88fe8..6a95003 100644 --- a/conekta/models/get_payment_method_response.py +++ b/conekta/models/get_payment_method_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.get_customer_payment_method_data_response import GetCustomerPaymentMethodDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetPaymentMethodResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetPaymentMethodResponse(BaseModel): data: Optional[List[GetCustomerPaymentMethodDataResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetPaymentMethodResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetPaymentMethodResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [GetCustomerPaymentMethodDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [GetCustomerPaymentMethodDataResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_payment_method_response_all_of.py b/conekta/models/get_payment_method_response_all_of.py deleted file mode 100644 index 253e6a0..0000000 --- a/conekta/models/get_payment_method_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.get_customer_payment_method_data_response import GetCustomerPaymentMethodDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetPaymentMethodResponseAllOf(BaseModel): - """ - GetPaymentMethodResponseAllOf - """ # noqa: E501 - data: Optional[List[GetCustomerPaymentMethodDataResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetPaymentMethodResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetPaymentMethodResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [GetCustomerPaymentMethodDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_plans_response.py b/conekta/models/get_plans_response.py index d0e6aeb..97536b3 100644 --- a/conekta/models/get_plans_response.py +++ b/conekta/models/get_plans_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.plan_response import PlanResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetPlansResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetPlansResponse(BaseModel): data: Optional[List[PlanResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetPlansResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetPlansResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [PlanResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [PlanResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_plans_response_all_of.py b/conekta/models/get_plans_response_all_of.py deleted file mode 100644 index 3e27161..0000000 --- a/conekta/models/get_plans_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.plan_response import PlanResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetPlansResponseAllOf(BaseModel): - """ - GetPlansResponseAllOf - """ # noqa: E501 - data: Optional[List[PlanResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetPlansResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetPlansResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [PlanResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_transactions_response.py b/conekta/models/get_transactions_response.py index a40b483..e3f3161 100644 --- a/conekta/models/get_transactions_response.py +++ b/conekta/models/get_transactions_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.transaction_response import TransactionResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetTransactionsResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetTransactionsResponse(BaseModel): data: Optional[List[TransactionResponse]] = Field(default=None, description="Transactions") __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTransactionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTransactionsResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [TransactionResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [TransactionResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_transactions_response_all_of.py b/conekta/models/get_transactions_response_all_of.py deleted file mode 100644 index 98aeaf7..0000000 --- a/conekta/models/get_transactions_response_all_of.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from conekta.models.transaction_response import TransactionResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTransactionsResponseAllOf(BaseModel): - """ - GetTransactionsResponseAllOf - """ # noqa: E501 - data: Optional[List[TransactionResponse]] = Field(default=None, description="Transactions") - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTransactionsResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetTransactionsResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [TransactionResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_transfers_response.py b/conekta/models/get_transfers_response.py index b3b7ea2..b6d6425 100644 --- a/conekta/models/get_transfers_response.py +++ b/conekta/models/get_transfers_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.transfers_response import TransfersResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetTransfersResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetTransfersResponse(BaseModel): data: Optional[List[TransfersResponse]] = Field(default=None, description="Transfers") __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetTransfersResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetTransfersResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [TransfersResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [TransfersResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_transfers_response_all_of.py b/conekta/models/get_transfers_response_all_of.py deleted file mode 100644 index 43c17d8..0000000 --- a/conekta/models/get_transfers_response_all_of.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field -from conekta.models.transfers_response import TransfersResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetTransfersResponseAllOf(BaseModel): - """ - GetTransfersResponseAllOf - """ # noqa: E501 - data: Optional[List[TransfersResponse]] = Field(default=None, description="Transfers") - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetTransfersResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetTransfersResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [TransfersResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_webhook_keys_response.py b/conekta/models/get_webhook_keys_response.py index ce6e77e..ed2ae60 100644 --- a/conekta/models/get_webhook_keys_response.py +++ b/conekta/models/get_webhook_keys_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.webhook_key_response import WebhookKeyResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetWebhookKeysResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetWebhookKeysResponse(BaseModel): data: Optional[List[WebhookKeyResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetWebhookKeysResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetWebhookKeysResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [WebhookKeyResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [WebhookKeyResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_webhook_keys_response_all_of.py b/conekta/models/get_webhook_keys_response_all_of.py deleted file mode 100644 index d2a1522..0000000 --- a/conekta/models/get_webhook_keys_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.webhook_key_response import WebhookKeyResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetWebhookKeysResponseAllOf(BaseModel): - """ - GetWebhookKeysResponseAllOf - """ # noqa: E501 - data: Optional[List[WebhookKeyResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetWebhookKeysResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetWebhookKeysResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [WebhookKeyResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/get_webhooks_response.py b/conekta/models/get_webhooks_response.py index f1233db..dd54316 100644 --- a/conekta/models/get_webhooks_response.py +++ b/conekta/models/get_webhooks_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.webhook_response import WebhookResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class GetWebhooksResponse(BaseModel): """ @@ -39,10 +35,11 @@ class GetWebhooksResponse(BaseModel): data: Optional[List[WebhookResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of GetWebhooksResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of GetWebhooksResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [WebhookResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [WebhookResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/get_webhooks_response_all_of.py b/conekta/models/get_webhooks_response_all_of.py deleted file mode 100644 index 5d5c5cc..0000000 --- a/conekta/models/get_webhooks_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.webhook_response import WebhookResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class GetWebhooksResponseAllOf(BaseModel): - """ - GetWebhooksResponseAllOf - """ # noqa: E501 - data: Optional[List[WebhookResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of GetWebhooksResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of GetWebhooksResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [WebhookResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/log_response.py b/conekta/models/log_response.py index f6bd359..0f95c81 100644 --- a/conekta/models/log_response.py +++ b/conekta/models/log_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self class LogResponse(BaseModel): """ @@ -40,9 +37,9 @@ class LogResponse(BaseModel): oauth_token_id: Optional[StrictStr] = None query_string: Optional[Dict[str, Any]] = None related: Optional[StrictStr] = None - request_body: Optional[Union[str, Any]] = None + request_body: Optional[Dict[str, Any]] = None request_headers: Optional[Dict[str, StrictStr]] = None - response_body: Optional[Union[str, Any]] = None + response_body: Optional[Dict[str, Any]] = None response_headers: Optional[Dict[str, StrictStr]] = None searchable_tags: Optional[List[StrictStr]] = None status: Optional[StrictStr] = None @@ -52,10 +49,11 @@ class LogResponse(BaseModel): version: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["created_at", "id", "ip_address", "livemode", "loggable_id", "loggable_type", "method", "oauth_token_id", "query_string", "related", "request_body", "request_headers", "response_body", "response_headers", "searchable_tags", "status", "updated_at", "url", "user_account_id", "version"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +66,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LogResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,10 +80,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if loggable_id (nullable) is None @@ -106,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LogResponse from a dict""" if obj is None: return None diff --git a/conekta/models/logs_response.py b/conekta/models/logs_response.py index 14b448b..d105599 100644 --- a/conekta/models/logs_response.py +++ b/conekta/models/logs_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.logs_response_data import LogsResponseData -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class LogsResponse(BaseModel): """ @@ -39,10 +35,11 @@ class LogsResponse(BaseModel): data: Optional[List[LogsResponseData]] = Field(default=None, description="set to page results.") __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LogsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,12 +68,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. """ + excluded_fields: Set[str] = set([ + "has_more", + "object", + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - "has_more", - "object", - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -104,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LogsResponse from a dict""" if obj is None: return None @@ -117,7 +116,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [LogsResponseData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [LogsResponseData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/logs_response_data.py b/conekta/models/logs_response_data.py index 3c9ba71..bb3c40b 100644 --- a/conekta/models/logs_response_data.py +++ b/conekta/models/logs_response_data.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self class LogsResponseData(BaseModel): """ @@ -40,9 +37,9 @@ class LogsResponseData(BaseModel): oauth_token_id: Optional[StrictStr] = None query_string: Optional[Dict[str, Any]] = None related: Optional[StrictStr] = None - request_body: Optional[Union[str, Any]] = None + request_body: Optional[Dict[str, Any]] = None request_headers: Optional[Dict[str, StrictStr]] = None - response_body: Optional[Union[str, Any]] = None + response_body: Optional[Dict[str, Any]] = None response_headers: Optional[Dict[str, StrictStr]] = None searchable_tags: Optional[List[StrictStr]] = None status: Optional[StrictStr] = None @@ -52,10 +49,11 @@ class LogsResponseData(BaseModel): version: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["created_at", "id", "ip_address", "livemode", "loggable_id", "loggable_type", "method", "oauth_token_id", "query_string", "related", "request_body", "request_headers", "response_body", "response_headers", "searchable_tags", "status", "updated_at", "url", "user_account_id", "version"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +66,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of LogsResponseData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,10 +80,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if loggable_id (nullable) is None @@ -106,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of LogsResponseData from a dict""" if obj is None: return None diff --git a/conekta/models/order_capture_request.py b/conekta/models/order_capture_request.py index dd10fce..d452cee 100644 --- a/conekta/models/order_capture_request.py +++ b/conekta/models/order_capture_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderCaptureRequest(BaseModel): """ @@ -35,10 +31,11 @@ class OrderCaptureRequest(BaseModel): amount: Annotated[int, Field(strict=True, ge=1)] = Field(description="Amount to capture") __properties: ClassVar[List[str]] = ["amount"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderCaptureRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderCaptureRequest from a dict""" if obj is None: return None diff --git a/conekta/models/order_customer_info_response.py b/conekta/models/order_customer_info_response.py index aaa93d4..f485b2e 100644 --- a/conekta/models/order_customer_info_response.py +++ b/conekta/models/order_customer_info_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderCustomerInfoResponse(BaseModel): """ @@ -39,10 +35,11 @@ class OrderCustomerInfoResponse(BaseModel): object: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["customer_custom_reference", "name", "email", "phone", "corporate", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderCustomerInfoResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if customer_custom_reference (nullable) is None @@ -83,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderCustomerInfoResponse from a dict""" if obj is None: return None diff --git a/conekta/models/order_discount_lines_request.py b/conekta/models/order_discount_lines_request.py index ff0adaf..a4ea41f 100644 --- a/conekta/models/order_discount_lines_request.py +++ b/conekta/models/order_discount_lines_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderDiscountLinesRequest(BaseModel): """ @@ -37,10 +33,11 @@ class OrderDiscountLinesRequest(BaseModel): type: StrictStr = Field(description="It can be 'loyalty', 'campaign', 'coupon' o 'sign'") __properties: ClassVar[List[str]] = ["amount", "code", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderDiscountLinesRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderDiscountLinesRequest from a dict""" if obj is None: return None diff --git a/conekta/models/order_fiscal_entity_address_response.py b/conekta/models/order_fiscal_entity_address_response.py index a1fe102..7750d51 100644 --- a/conekta/models/order_fiscal_entity_address_response.py +++ b/conekta/models/order_fiscal_entity_address_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderFiscalEntityAddressResponse(BaseModel): """ @@ -41,10 +37,11 @@ class OrderFiscalEntityAddressResponse(BaseModel): object: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["street1", "street2", "postal_code", "city", "state", "country", "external_number", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderFiscalEntityAddressResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,10 +68,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if street2 (nullable) is None @@ -85,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderFiscalEntityAddressResponse from a dict""" if obj is None: return None diff --git a/conekta/models/order_fiscal_entity_request.py b/conekta/models/order_fiscal_entity_request.py index 075dff6..f7eca3e 100644 --- a/conekta/models/order_fiscal_entity_request.py +++ b/conekta/models/order_fiscal_entity_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from conekta.models.fiscal_entity_address import FiscalEntityAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderFiscalEntityRequest(BaseModel): """ @@ -40,10 +36,11 @@ class OrderFiscalEntityRequest(BaseModel): tax_id: Optional[StrictStr] = Field(default=None, description="Tax ID of the fiscal entity") __properties: ClassVar[List[str]] = ["address", "email", "metadata", "name", "phone", "tax_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderFiscalEntityRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -92,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderFiscalEntityRequest from a dict""" if obj is None: return None @@ -101,7 +100,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": FiscalEntityAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": FiscalEntityAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "email": obj.get("email"), "metadata": obj.get("metadata"), "name": obj.get("name"), diff --git a/conekta/models/order_fiscal_entity_response.py b/conekta/models/order_fiscal_entity_response.py index 43a28f0..466c50b 100644 --- a/conekta/models/order_fiscal_entity_response.py +++ b/conekta/models/order_fiscal_entity_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from conekta.models.order_fiscal_entity_address_response import OrderFiscalEntityAddressResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderFiscalEntityResponse(BaseModel): """ @@ -43,10 +39,11 @@ class OrderFiscalEntityResponse(BaseModel): phone: Optional[StrictStr] = Field(default=None, description="Phone of the fiscal entity") __properties: ClassVar[List[str]] = ["address", "email", "metadata", "name", "tax_id", "id", "created_at", "object", "phone"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderFiscalEntityResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,10 +70,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -105,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderFiscalEntityResponse from a dict""" if obj is None: return None @@ -114,7 +113,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": OrderFiscalEntityAddressResponse.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": OrderFiscalEntityAddressResponse.from_dict(obj["address"]) if obj.get("address") is not None else None, "email": obj.get("email"), "metadata": obj.get("metadata"), "name": obj.get("name"), diff --git a/conekta/models/order_next_action_response.py b/conekta/models/order_next_action_response.py index e8abe5e..e920fce 100644 --- a/conekta/models/order_next_action_response.py +++ b/conekta/models/order_next_action_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from conekta.models.order_next_action_response_redirect_to_url import OrderNextActionResponseRedirectToUrl -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderNextActionResponse(BaseModel): """ @@ -36,10 +32,11 @@ class OrderNextActionResponse(BaseModel): type: Optional[StrictStr] = Field(default=None, description="Indicates the type of action to be taken") __properties: ClassVar[List[str]] = ["redirect_to_url", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderNextActionResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +63,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of redirect_to_url @@ -78,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderNextActionResponse from a dict""" if obj is None: return None @@ -87,7 +86,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "redirect_to_url": OrderNextActionResponseRedirectToUrl.from_dict(obj.get("redirect_to_url")) if obj.get("redirect_to_url") is not None else None, + "redirect_to_url": OrderNextActionResponseRedirectToUrl.from_dict(obj["redirect_to_url"]) if obj.get("redirect_to_url") is not None else None, "type": obj.get("type") }) return _obj diff --git a/conekta/models/order_next_action_response_redirect_to_url.py b/conekta/models/order_next_action_response_redirect_to_url.py index 40148b9..3149634 100644 --- a/conekta/models/order_next_action_response_redirect_to_url.py +++ b/conekta/models/order_next_action_response_redirect_to_url.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderNextActionResponseRedirectToUrl(BaseModel): """ @@ -35,10 +31,11 @@ class OrderNextActionResponseRedirectToUrl(BaseModel): return_url: Optional[StrictStr] = Field(default=None, description="Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected.") __properties: ClassVar[List[str]] = ["url", "return_url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderNextActionResponseRedirectToUrl from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderNextActionResponseRedirectToUrl from a dict""" if obj is None: return None diff --git a/conekta/models/order_refund_request.py b/conekta/models/order_refund_request.py index 485f42e..85fc708 100644 --- a/conekta/models/order_refund_request.py +++ b/conekta/models/order_refund_request.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderRefundRequest(BaseModel): """ @@ -35,10 +32,11 @@ class OrderRefundRequest(BaseModel): reason: StrictStr __properties: ClassVar[List[str]] = ["amount", "expires_at", "reason"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderRefundRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +63,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if expires_at (nullable) is None @@ -79,7 +79,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderRefundRequest from a dict""" if obj is None: return None diff --git a/conekta/models/order_request.py b/conekta/models/order_request.py index 237900c..4404ca4 100644 --- a/conekta/models/order_request.py +++ b/conekta/models/order_request.py @@ -18,10 +18,8 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated from conekta.models.charge_request import ChargeRequest from conekta.models.checkout_request import CheckoutRequest @@ -32,10 +30,8 @@ from conekta.models.order_tax_request import OrderTaxRequest from conekta.models.product import Product from conekta.models.shipping_request import ShippingRequest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderRequest(BaseModel): """ @@ -59,10 +55,11 @@ class OrderRequest(BaseModel): three_ds_mode: Optional[StrictStr] = Field(default=None, description="Indicates the 3DS2 mode for the order, either smart or strict.") __properties: ClassVar[List[str]] = ["charges", "checkout", "currency", "customer_info", "discount_lines", "fiscal_entity", "line_items", "metadata", "needs_shipping_contact", "pre_authorize", "processing_mode", "return_url", "shipping_contact", "shipping_lines", "tax_lines", "three_ds_mode"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -75,7 +72,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -89,10 +86,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in charges (list) @@ -145,7 +144,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderRequest from a dict""" if obj is None: return None @@ -154,21 +153,21 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "charges": [ChargeRequest.from_dict(_item) for _item in obj.get("charges")] if obj.get("charges") is not None else None, - "checkout": CheckoutRequest.from_dict(obj.get("checkout")) if obj.get("checkout") is not None else None, + "charges": [ChargeRequest.from_dict(_item) for _item in obj["charges"]] if obj.get("charges") is not None else None, + "checkout": CheckoutRequest.from_dict(obj["checkout"]) if obj.get("checkout") is not None else None, "currency": obj.get("currency"), - "customer_info": OrderRequestCustomerInfo.from_dict(obj.get("customer_info")) if obj.get("customer_info") is not None else None, - "discount_lines": [OrderDiscountLinesRequest.from_dict(_item) for _item in obj.get("discount_lines")] if obj.get("discount_lines") is not None else None, - "fiscal_entity": OrderFiscalEntityRequest.from_dict(obj.get("fiscal_entity")) if obj.get("fiscal_entity") is not None else None, - "line_items": [Product.from_dict(_item) for _item in obj.get("line_items")] if obj.get("line_items") is not None else None, + "customer_info": OrderRequestCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None, + "discount_lines": [OrderDiscountLinesRequest.from_dict(_item) for _item in obj["discount_lines"]] if obj.get("discount_lines") is not None else None, + "fiscal_entity": OrderFiscalEntityRequest.from_dict(obj["fiscal_entity"]) if obj.get("fiscal_entity") is not None else None, + "line_items": [Product.from_dict(_item) for _item in obj["line_items"]] if obj.get("line_items") is not None else None, "metadata": obj.get("metadata"), "needs_shipping_contact": obj.get("needs_shipping_contact"), "pre_authorize": obj.get("pre_authorize") if obj.get("pre_authorize") is not None else False, "processing_mode": obj.get("processing_mode"), "return_url": obj.get("return_url"), - "shipping_contact": CustomerShippingContacts.from_dict(obj.get("shipping_contact")) if obj.get("shipping_contact") is not None else None, - "shipping_lines": [ShippingRequest.from_dict(_item) for _item in obj.get("shipping_lines")] if obj.get("shipping_lines") is not None else None, - "tax_lines": [OrderTaxRequest.from_dict(_item) for _item in obj.get("tax_lines")] if obj.get("tax_lines") is not None else None, + "shipping_contact": CustomerShippingContacts.from_dict(obj["shipping_contact"]) if obj.get("shipping_contact") is not None else None, + "shipping_lines": [ShippingRequest.from_dict(_item) for _item in obj["shipping_lines"]] if obj.get("shipping_lines") is not None else None, + "tax_lines": [OrderTaxRequest.from_dict(_item) for _item in obj["tax_lines"]] if obj.get("tax_lines") is not None else None, "three_ds_mode": obj.get("three_ds_mode") }) return _obj diff --git a/conekta/models/order_request_customer_info.py b/conekta/models/order_request_customer_info.py index 17531a2..0f19aeb 100644 --- a/conekta/models/order_request_customer_info.py +++ b/conekta/models/order_request_customer_info.py @@ -14,22 +14,15 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.customer_info import CustomerInfo from conekta.models.customer_info_just_customer_id import CustomerInfoJustCustomerId -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self ORDERREQUESTCUSTOMERINFO_ONE_OF_SCHEMAS = ["CustomerInfo", "CustomerInfoJustCustomerId"] @@ -42,11 +35,12 @@ class OrderRequestCustomerInfo(BaseModel): # data type: CustomerInfoJustCustomerId oneof_schema_2_validator: Optional[CustomerInfoJustCustomerId] = None actual_instance: Optional[Union[CustomerInfo, CustomerInfoJustCustomerId]] = None - one_of_schemas: List[str] = Literal["CustomerInfo", "CustomerInfoJustCustomerId"] + one_of_schemas: Set[str] = { "CustomerInfo", "CustomerInfoJustCustomerId" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) def __init__(self, *args, **kwargs) -> None: @@ -84,7 +78,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -121,19 +115,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], CustomerInfo, CustomerInfoJustCustomerId]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/order_response.py b/conekta/models/order_response.py index 2811fd5..52477c8 100644 --- a/conekta/models/order_response.py +++ b/conekta/models/order_response.py @@ -18,10 +18,8 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.charge_response_channel import ChargeResponseChannel from conekta.models.order_fiscal_entity_response import OrderFiscalEntityResponse from conekta.models.order_next_action_response import OrderNextActionResponse @@ -31,10 +29,8 @@ from conekta.models.order_response_discount_lines import OrderResponseDiscountLines from conekta.models.order_response_products import OrderResponseProducts from conekta.models.order_response_shipping_contact import OrderResponseShippingContact -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderResponse(BaseModel): """ @@ -63,10 +59,11 @@ class OrderResponse(BaseModel): updated_at: Optional[StrictInt] = Field(default=None, description="The time at which the object was last updated in seconds since the Unix epoch") __properties: ClassVar[List[str]] = ["amount", "amount_refunded", "channel", "charges", "checkout", "created_at", "currency", "customer_info", "discount_lines", "fiscal_entity", "id", "is_refundable", "line_items", "livemode", "metadata", "next_action", "object", "payment_status", "processing_mode", "shipping_contact", "updated_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -79,7 +76,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -93,10 +90,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of channel @@ -134,7 +133,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponse from a dict""" if obj is None: return None @@ -145,24 +144,24 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "amount": obj.get("amount"), "amount_refunded": obj.get("amount_refunded"), - "channel": ChargeResponseChannel.from_dict(obj.get("channel")) if obj.get("channel") is not None else None, - "charges": OrderResponseCharges.from_dict(obj.get("charges")) if obj.get("charges") is not None else None, - "checkout": OrderResponseCheckout.from_dict(obj.get("checkout")) if obj.get("checkout") is not None else None, + "channel": ChargeResponseChannel.from_dict(obj["channel"]) if obj.get("channel") is not None else None, + "charges": OrderResponseCharges.from_dict(obj["charges"]) if obj.get("charges") is not None else None, + "checkout": OrderResponseCheckout.from_dict(obj["checkout"]) if obj.get("checkout") is not None else None, "created_at": obj.get("created_at"), "currency": obj.get("currency"), - "customer_info": OrderResponseCustomerInfo.from_dict(obj.get("customer_info")) if obj.get("customer_info") is not None else None, - "discount_lines": OrderResponseDiscountLines.from_dict(obj.get("discount_lines")) if obj.get("discount_lines") is not None else None, - "fiscal_entity": OrderFiscalEntityResponse.from_dict(obj.get("fiscal_entity")) if obj.get("fiscal_entity") is not None else None, + "customer_info": OrderResponseCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None, + "discount_lines": OrderResponseDiscountLines.from_dict(obj["discount_lines"]) if obj.get("discount_lines") is not None else None, + "fiscal_entity": OrderFiscalEntityResponse.from_dict(obj["fiscal_entity"]) if obj.get("fiscal_entity") is not None else None, "id": obj.get("id"), "is_refundable": obj.get("is_refundable"), - "line_items": OrderResponseProducts.from_dict(obj.get("line_items")) if obj.get("line_items") is not None else None, + "line_items": OrderResponseProducts.from_dict(obj["line_items"]) if obj.get("line_items") is not None else None, "livemode": obj.get("livemode"), "metadata": obj.get("metadata"), - "next_action": OrderNextActionResponse.from_dict(obj.get("next_action")) if obj.get("next_action") is not None else None, + "next_action": OrderNextActionResponse.from_dict(obj["next_action"]) if obj.get("next_action") is not None else None, "object": obj.get("object"), "payment_status": obj.get("payment_status"), "processing_mode": obj.get("processing_mode"), - "shipping_contact": OrderResponseShippingContact.from_dict(obj.get("shipping_contact")) if obj.get("shipping_contact") is not None else None, + "shipping_contact": OrderResponseShippingContact.from_dict(obj["shipping_contact"]) if obj.get("shipping_contact") is not None else None, "updated_at": obj.get("updated_at") }) return _obj diff --git a/conekta/models/order_response_charges.py b/conekta/models/order_response_charges.py index 3716558..7e5988a 100644 --- a/conekta/models/order_response_charges.py +++ b/conekta/models/order_response_charges.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.charges_data_response import ChargesDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderResponseCharges(BaseModel): """ @@ -37,10 +33,11 @@ class OrderResponseCharges(BaseModel): data: Optional[List[ChargesDataResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponseCharges from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -83,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponseCharges from a dict""" if obj is None: return None @@ -94,7 +93,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "has_more": obj.get("has_more"), "object": obj.get("object"), - "data": [ChargesDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [ChargesDataResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/order_response_charges_all_of.py b/conekta/models/order_response_charges_all_of.py deleted file mode 100644 index 140de29..0000000 --- a/conekta/models/order_response_charges_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.charges_data_response import ChargesDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrderResponseChargesAllOf(BaseModel): - """ - OrderResponseChargesAllOf - """ # noqa: E501 - data: Optional[List[ChargesDataResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrderResponseChargesAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrderResponseChargesAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ChargesDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/order_response_checkout.py b/conekta/models/order_response_checkout.py index 8ce303d..22b88a4 100644 --- a/conekta/models/order_response_checkout.py +++ b/conekta/models/order_response_checkout.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self class OrderResponseCheckout(BaseModel): """ @@ -33,7 +30,7 @@ class OrderResponseCheckout(BaseModel): allowed_payment_methods: Optional[List[StrictStr]] = None can_not_expire: Optional[StrictBool] = None emails_sent: Optional[StrictInt] = None - exclude_card_networks: Optional[List[Union[str, Any]]] = None + exclude_card_networks: Optional[List[Dict[str, Any]]] = None expires_at: Optional[StrictInt] = None failure_url: Optional[StrictStr] = None force_3ds_flow: Optional[StrictBool] = None @@ -49,6 +46,7 @@ class OrderResponseCheckout(BaseModel): on_demand_enabled: Optional[StrictBool] = None paid_payments_count: Optional[StrictInt] = None recurrent: Optional[StrictBool] = None + redirection_time: Optional[StrictInt] = Field(default=None, description="number of seconds to wait before redirecting to the success_url") slug: Optional[StrictStr] = None sms_sent: Optional[StrictInt] = None success_url: Optional[StrictStr] = None @@ -56,12 +54,13 @@ class OrderResponseCheckout(BaseModel): status: Optional[StrictStr] = None type: Optional[StrictStr] = None url: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["allowed_payment_methods", "can_not_expire", "emails_sent", "exclude_card_networks", "expires_at", "failure_url", "force_3ds_flow", "id", "is_redirect_on_failure", "livemode", "metadata", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "object", "on_demand_enabled", "paid_payments_count", "recurrent", "slug", "sms_sent", "success_url", "starts_at", "status", "type", "url"] + __properties: ClassVar[List[str]] = ["allowed_payment_methods", "can_not_expire", "emails_sent", "exclude_card_networks", "expires_at", "failure_url", "force_3ds_flow", "id", "is_redirect_on_failure", "livemode", "metadata", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "object", "on_demand_enabled", "paid_payments_count", "recurrent", "redirection_time", "slug", "sms_sent", "success_url", "starts_at", "status", "type", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -74,7 +73,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponseCheckout from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -88,10 +87,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if on_demand_enabled (nullable) is None @@ -99,10 +100,15 @@ def to_dict(self) -> Dict[str, Any]: if self.on_demand_enabled is None and "on_demand_enabled" in self.model_fields_set: _dict['on_demand_enabled'] = None + # set to None if redirection_time (nullable) is None + # and model_fields_set contains the field + if self.redirection_time is None and "redirection_time" in self.model_fields_set: + _dict['redirection_time'] = None + return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponseCheckout from a dict""" if obj is None: return None @@ -130,6 +136,7 @@ def from_dict(cls, obj: Dict) -> Self: "on_demand_enabled": obj.get("on_demand_enabled"), "paid_payments_count": obj.get("paid_payments_count"), "recurrent": obj.get("recurrent"), + "redirection_time": obj.get("redirection_time"), "slug": obj.get("slug"), "sms_sent": obj.get("sms_sent"), "success_url": obj.get("success_url"), diff --git a/conekta/models/order_response_customer_info.py b/conekta/models/order_response_customer_info.py index af96a52..e6ea6ae 100644 --- a/conekta/models/order_response_customer_info.py +++ b/conekta/models/order_response_customer_info.py @@ -18,32 +18,29 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderResponseCustomerInfo(BaseModel): """ OrderResponseCustomerInfo """ # noqa: E501 - object: Optional[StrictStr] = None customer_custom_reference: Optional[StrictStr] = Field(default=None, description="Custom reference") name: Optional[StrictStr] = None email: Optional[StrictStr] = None phone: Optional[StrictStr] = None corporate: Optional[StrictBool] = False + object: Optional[StrictStr] = None customer_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["object", "customer_custom_reference", "name", "email", "phone", "corporate", "customer_id"] + __properties: ClassVar[List[str]] = ["customer_custom_reference", "name", "email", "phone", "corporate", "object", "customer_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponseCustomerInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if customer_custom_reference (nullable) is None @@ -84,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponseCustomerInfo from a dict""" if obj is None: return None @@ -93,12 +92,12 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "object": obj.get("object"), "customer_custom_reference": obj.get("customer_custom_reference"), "name": obj.get("name"), "email": obj.get("email"), "phone": obj.get("phone"), "corporate": obj.get("corporate") if obj.get("corporate") is not None else False, + "object": obj.get("object"), "customer_id": obj.get("customer_id") }) return _obj diff --git a/conekta/models/order_response_customer_info_all_of.py b/conekta/models/order_response_customer_info_all_of.py deleted file mode 100644 index 9809553..0000000 --- a/conekta/models/order_response_customer_info_all_of.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrderResponseCustomerInfoAllOf(BaseModel): - """ - OrderResponseCustomerInfoAllOf - """ # noqa: E501 - object: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["object"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrderResponseCustomerInfoAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrderResponseCustomerInfoAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "object": obj.get("object") - }) - return _obj - - diff --git a/conekta/models/order_response_discount_lines.py b/conekta/models/order_response_discount_lines.py index 2091b7e..ca07f2c 100644 --- a/conekta/models/order_response_discount_lines.py +++ b/conekta/models/order_response_discount_lines.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.discount_lines_data_response import DiscountLinesDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderResponseDiscountLines(BaseModel): """ @@ -37,10 +33,11 @@ class OrderResponseDiscountLines(BaseModel): data: Optional[List[DiscountLinesDataResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponseDiscountLines from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -83,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponseDiscountLines from a dict""" if obj is None: return None @@ -94,7 +93,7 @@ def from_dict(cls, obj: Dict) -> Self: _obj = cls.model_validate({ "has_more": obj.get("has_more"), "object": obj.get("object"), - "data": [DiscountLinesDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [DiscountLinesDataResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/order_response_discount_lines_all_of.py b/conekta/models/order_response_discount_lines_all_of.py deleted file mode 100644 index 4521203..0000000 --- a/conekta/models/order_response_discount_lines_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.discount_lines_data_response import DiscountLinesDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrderResponseDiscountLinesAllOf(BaseModel): - """ - OrderResponseDiscountLinesAllOf - """ # noqa: E501 - data: Optional[List[DiscountLinesDataResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrderResponseDiscountLinesAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrderResponseDiscountLinesAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [DiscountLinesDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/order_response_products.py b/conekta/models/order_response_products.py index ed39f9b..777717b 100644 --- a/conekta/models/order_response_products.py +++ b/conekta/models/order_response_products.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.product_data_response import ProductDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderResponseProducts(BaseModel): """ @@ -39,10 +35,11 @@ class OrderResponseProducts(BaseModel): data: Optional[List[ProductDataResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponseProducts from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponseProducts from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [ProductDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [ProductDataResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/order_response_products_all_of.py b/conekta/models/order_response_products_all_of.py deleted file mode 100644 index 4d3cfdc..0000000 --- a/conekta/models/order_response_products_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.product_data_response import ProductDataResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrderResponseProductsAllOf(BaseModel): - """ - OrderResponseProductsAllOf - """ # noqa: E501 - data: Optional[List[ProductDataResponse]] = None - __properties: ClassVar[List[str]] = ["data"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrderResponseProductsAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrderResponseProductsAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "data": [ProductDataResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None - }) - return _obj - - diff --git a/conekta/models/order_response_shipping_contact.py b/conekta/models/order_response_shipping_contact.py index 588507c..46de159 100644 --- a/conekta/models/order_response_shipping_contact.py +++ b/conekta/models/order_response_shipping_contact.py @@ -18,37 +18,34 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from conekta.models.customer_shipping_contacts_response_address import CustomerShippingContactsResponseAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderResponseShippingContact(BaseModel): """ OrderResponseShippingContact """ # noqa: E501 - created_at: Optional[StrictInt] = None - id: Optional[StrictStr] = None - object: Optional[StrictStr] = None phone: Optional[StrictStr] = None receiver: Optional[StrictStr] = None between_streets: Optional[StrictStr] = None address: Optional[CustomerShippingContactsResponseAddress] = None parent_id: Optional[StrictStr] = None default: Optional[StrictBool] = None + id: Optional[StrictStr] = None + created_at: Optional[StrictInt] = None metadata: Optional[Dict[str, Any]] = Field(default=None, description="Metadata associated with the shipping contact") + object: Optional[StrictStr] = None deleted: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["created_at", "id", "object", "phone", "receiver", "between_streets", "address", "parent_id", "default", "metadata", "deleted"] + __properties: ClassVar[List[str]] = ["phone", "receiver", "between_streets", "address", "parent_id", "default", "id", "created_at", "metadata", "object", "deleted"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderResponseShippingContact from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -92,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderResponseShippingContact from a dict""" if obj is None: return None @@ -101,16 +100,16 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "object": obj.get("object"), "phone": obj.get("phone"), "receiver": obj.get("receiver"), "between_streets": obj.get("between_streets"), - "address": CustomerShippingContactsResponseAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerShippingContactsResponseAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "parent_id": obj.get("parent_id"), "default": obj.get("default"), + "id": obj.get("id"), + "created_at": obj.get("created_at"), "metadata": obj.get("metadata"), + "object": obj.get("object"), "deleted": obj.get("deleted") }) return _obj diff --git a/conekta/models/order_response_shipping_contact_all_of.py b/conekta/models/order_response_shipping_contact_all_of.py deleted file mode 100644 index 951e081..0000000 --- a/conekta/models/order_response_shipping_contact_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrderResponseShippingContactAllOf(BaseModel): - """ - OrderResponseShippingContactAllOf - """ # noqa: E501 - created_at: Optional[StrictInt] = None - id: Optional[StrictStr] = None - object: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["created_at", "id", "object"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrderResponseShippingContactAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrderResponseShippingContactAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "object": obj.get("object") - }) - return _obj - - diff --git a/conekta/models/order_tax_request.py b/conekta/models/order_tax_request.py index a16806c..f591a05 100644 --- a/conekta/models/order_tax_request.py +++ b/conekta/models/order_tax_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderTaxRequest(BaseModel): """ @@ -37,10 +33,11 @@ class OrderTaxRequest(BaseModel): metadata: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["amount", "description", "metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderTaxRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderTaxRequest from a dict""" if obj is None: return None diff --git a/conekta/models/order_update_fiscal_entity_request.py b/conekta/models/order_update_fiscal_entity_request.py index 8e6acfd..b306ce6 100644 --- a/conekta/models/order_update_fiscal_entity_request.py +++ b/conekta/models/order_update_fiscal_entity_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from conekta.models.fiscal_entity_address import FiscalEntityAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderUpdateFiscalEntityRequest(BaseModel): """ @@ -40,10 +36,11 @@ class OrderUpdateFiscalEntityRequest(BaseModel): tax_id: Optional[StrictStr] = Field(default=None, description="Tax ID of the fiscal entity") __properties: ClassVar[List[str]] = ["address", "email", "name", "metadata", "phone", "tax_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderUpdateFiscalEntityRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -92,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderUpdateFiscalEntityRequest from a dict""" if obj is None: return None @@ -101,7 +100,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": FiscalEntityAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": FiscalEntityAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "email": obj.get("email"), "name": obj.get("name"), "metadata": obj.get("metadata"), diff --git a/conekta/models/order_update_request.py b/conekta/models/order_update_request.py index 8cc4e8b..19809e9 100644 --- a/conekta/models/order_update_request.py +++ b/conekta/models/order_update_request.py @@ -18,10 +18,8 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from typing_extensions import Annotated from conekta.models.charge_request import ChargeRequest from conekta.models.checkout_request import CheckoutRequest @@ -32,10 +30,8 @@ from conekta.models.order_update_request_customer_info import OrderUpdateRequestCustomerInfo from conekta.models.product import Product from conekta.models.shipping_request import ShippingRequest -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrderUpdateRequest(BaseModel): """ @@ -55,10 +51,11 @@ class OrderUpdateRequest(BaseModel): tax_lines: Optional[List[OrderTaxRequest]] = None __properties: ClassVar[List[str]] = ["charges", "checkout", "currency", "customer_info", "discount_lines", "fiscal_entity", "line_items", "metadata", "pre_authorize", "shipping_contact", "shipping_lines", "tax_lines"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -71,7 +68,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrderUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -85,10 +82,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in charges (list) @@ -141,7 +140,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrderUpdateRequest from a dict""" if obj is None: return None @@ -150,18 +149,18 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "charges": [ChargeRequest.from_dict(_item) for _item in obj.get("charges")] if obj.get("charges") is not None else None, - "checkout": CheckoutRequest.from_dict(obj.get("checkout")) if obj.get("checkout") is not None else None, + "charges": [ChargeRequest.from_dict(_item) for _item in obj["charges"]] if obj.get("charges") is not None else None, + "checkout": CheckoutRequest.from_dict(obj["checkout"]) if obj.get("checkout") is not None else None, "currency": obj.get("currency"), - "customer_info": OrderUpdateRequestCustomerInfo.from_dict(obj.get("customer_info")) if obj.get("customer_info") is not None else None, - "discount_lines": [OrderDiscountLinesRequest.from_dict(_item) for _item in obj.get("discount_lines")] if obj.get("discount_lines") is not None else None, - "fiscal_entity": OrderUpdateFiscalEntityRequest.from_dict(obj.get("fiscal_entity")) if obj.get("fiscal_entity") is not None else None, - "line_items": [Product.from_dict(_item) for _item in obj.get("line_items")] if obj.get("line_items") is not None else None, + "customer_info": OrderUpdateRequestCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None, + "discount_lines": [OrderDiscountLinesRequest.from_dict(_item) for _item in obj["discount_lines"]] if obj.get("discount_lines") is not None else None, + "fiscal_entity": OrderUpdateFiscalEntityRequest.from_dict(obj["fiscal_entity"]) if obj.get("fiscal_entity") is not None else None, + "line_items": [Product.from_dict(_item) for _item in obj["line_items"]] if obj.get("line_items") is not None else None, "metadata": obj.get("metadata"), "pre_authorize": obj.get("pre_authorize") if obj.get("pre_authorize") is not None else False, - "shipping_contact": CustomerShippingContacts.from_dict(obj.get("shipping_contact")) if obj.get("shipping_contact") is not None else None, - "shipping_lines": [ShippingRequest.from_dict(_item) for _item in obj.get("shipping_lines")] if obj.get("shipping_lines") is not None else None, - "tax_lines": [OrderTaxRequest.from_dict(_item) for _item in obj.get("tax_lines")] if obj.get("tax_lines") is not None else None + "shipping_contact": CustomerShippingContacts.from_dict(obj["shipping_contact"]) if obj.get("shipping_contact") is not None else None, + "shipping_lines": [ShippingRequest.from_dict(_item) for _item in obj["shipping_lines"]] if obj.get("shipping_lines") is not None else None, + "tax_lines": [OrderTaxRequest.from_dict(_item) for _item in obj["tax_lines"]] if obj.get("tax_lines") is not None else None }) return _obj diff --git a/conekta/models/order_update_request_customer_info.py b/conekta/models/order_update_request_customer_info.py index 8b12ca8..5dd9949 100644 --- a/conekta/models/order_update_request_customer_info.py +++ b/conekta/models/order_update_request_customer_info.py @@ -14,22 +14,15 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.customer_info import CustomerInfo from conekta.models.customer_info_just_customer_id import CustomerInfoJustCustomerId -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self ORDERUPDATEREQUESTCUSTOMERINFO_ONE_OF_SCHEMAS = ["CustomerInfo", "CustomerInfoJustCustomerId"] @@ -42,11 +35,12 @@ class OrderUpdateRequestCustomerInfo(BaseModel): # data type: CustomerInfoJustCustomerId oneof_schema_2_validator: Optional[CustomerInfoJustCustomerId] = None actual_instance: Optional[Union[CustomerInfo, CustomerInfoJustCustomerId]] = None - one_of_schemas: List[str] = Literal["CustomerInfo", "CustomerInfoJustCustomerId"] + one_of_schemas: Set[str] = { "CustomerInfo", "CustomerInfoJustCustomerId" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) def __init__(self, *args, **kwargs) -> None: @@ -84,7 +78,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -121,19 +115,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], CustomerInfo, CustomerInfoJustCustomerId]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/orders_response.py b/conekta/models/orders_response.py index 97084d2..746fb30 100644 --- a/conekta/models/orders_response.py +++ b/conekta/models/orders_response.py @@ -18,14 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel from conekta.models.order_response import OrderResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class OrdersResponse(BaseModel): """ @@ -34,10 +31,11 @@ class OrdersResponse(BaseModel): data: List[OrderResponse] __properties: ClassVar[List[str]] = ["data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of OrdersResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,10 +62,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of OrdersResponse from a dict""" if obj is None: return None @@ -89,7 +89,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": [OrderResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [OrderResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/page.py b/conekta/models/page.py index df10471..881c5e1 100644 --- a/conekta/models/page.py +++ b/conekta/models/page.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Page(BaseModel): """ @@ -35,10 +31,11 @@ class Page(BaseModel): previous_page_url: Optional[StrictStr] = Field(default=None, description="Url of the previous page.") __properties: ClassVar[List[str]] = ["next_page_url", "previous_page_url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Page from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,10 +62,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if next_page_url (nullable) is None @@ -84,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Page from a dict""" if obj is None: return None diff --git a/conekta/models/pagination.py b/conekta/models/pagination.py index c41ed2d..17cd7e2 100644 --- a/conekta/models/pagination.py +++ b/conekta/models/pagination.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Pagination(BaseModel): """ @@ -35,10 +31,11 @@ class Pagination(BaseModel): object: StrictStr = Field(description="Object type, in this case is list") __properties: ClassVar[List[str]] = ["has_more", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Pagination from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Pagination from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method.py b/conekta/models/payment_method.py index cbd89bb..0d73fc4 100644 --- a/conekta/models/payment_method.py +++ b/conekta/models/payment_method.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethod(BaseModel): """ @@ -34,10 +31,11 @@ class PaymentMethod(BaseModel): object: StrictStr __properties: ClassVar[List[str]] = ["type", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethod from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethod from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_bank_transfer.py b/conekta/models/payment_method_bank_transfer.py index cd83727..3b84d79 100644 --- a/conekta/models/payment_method_bank_transfer.py +++ b/conekta/models/payment_method_bank_transfer.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodBankTransfer(BaseModel): """ @@ -41,7 +38,7 @@ class PaymentMethodBankTransfer(BaseModel): issuing_account_number: Optional[StrictStr] = None issuing_account_holder_name: Optional[StrictStr] = None issuing_account_tax_id: Optional[StrictStr] = None - payment_attempts: Optional[List[Union[str, Any]]] = None + payment_attempts: Optional[List[Any]] = None receiving_account_holder_name: Optional[StrictStr] = None receiving_account_number: Optional[StrictStr] = None receiving_account_bank: Optional[StrictStr] = None @@ -50,10 +47,11 @@ class PaymentMethodBankTransfer(BaseModel): tracking_code: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "object", "bank", "clabe", "description", "executed_at", "expires_at", "issuing_account_bank", "issuing_account_number", "issuing_account_holder_name", "issuing_account_tax_id", "payment_attempts", "receiving_account_holder_name", "receiving_account_number", "receiving_account_bank", "receiving_account_tax_id", "reference_number", "tracking_code"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -66,7 +64,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodBankTransfer from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -80,10 +78,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if description (nullable) is None @@ -139,7 +139,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodBankTransfer from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_card.py b/conekta/models/payment_method_card.py index 3a96d6a..8e8da72 100644 --- a/conekta/models/payment_method_card.py +++ b/conekta/models/payment_method_card.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodCard(BaseModel): """ @@ -40,16 +36,17 @@ class PaymentMethodCard(BaseModel): country: Optional[StrictStr] = None exp_month: Optional[StrictStr] = None exp_year: Optional[StrictStr] = None - fraud_indicators: Optional[List[Union[str, Any]]] = None + fraud_indicators: Optional[List[Any]] = None issuer: Optional[StrictStr] = None last4: Optional[StrictStr] = None name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "object", "account_type", "auth_code", "brand", "contract_id", "country", "exp_month", "exp_year", "fraud_indicators", "issuer", "last4", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +59,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodCard from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,16 +73,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodCard from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_card_request.py b/conekta/models/payment_method_card_request.py index 34b36b3..3cbecf9 100644 --- a/conekta/models/payment_method_card_request.py +++ b/conekta/models/payment_method_card_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodCardRequest(BaseModel): """ @@ -35,10 +31,11 @@ class PaymentMethodCardRequest(BaseModel): token_id: StrictStr = Field(description="Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards.") __properties: ClassVar[List[str]] = ["type", "token_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodCardRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodCardRequest from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_card_request_all_of.py b/conekta/models/payment_method_card_request_all_of.py deleted file mode 100644 index 0721c24..0000000 --- a/conekta/models/payment_method_card_request_all_of.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaymentMethodCardRequestAllOf(BaseModel): - """ - PaymentMethodCardRequestAllOf - """ # noqa: E501 - token_id: Optional[StrictStr] = Field(default=None, description="Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards.") - __properties: ClassVar[List[str]] = ["token_id"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMethodCardRequestAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaymentMethodCardRequestAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "token_id": obj.get("token_id") - }) - return _obj - - diff --git a/conekta/models/payment_method_card_response.py b/conekta/models/payment_method_card_response.py index 2c55737..a950274 100644 --- a/conekta/models/payment_method_card_response.py +++ b/conekta/models/payment_method_card_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodCardResponse(BaseModel): """ @@ -47,10 +44,11 @@ class PaymentMethodCardResponse(BaseModel): payment_source_status: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "id", "object", "created_at", "parent_id", "last4", "bin", "card_type", "exp_month", "exp_year", "brand", "name", "default", "visible_on_checkout", "payment_source_status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -63,7 +61,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodCardResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -77,16 +75,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodCardResponse from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_card_response_all_of.py b/conekta/models/payment_method_card_response_all_of.py deleted file mode 100644 index 0086315..0000000 --- a/conekta/models/payment_method_card_response_all_of.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaymentMethodCardResponseAllOf(BaseModel): - """ - use for card responses - """ # noqa: E501 - last4: Optional[StrictStr] = None - bin: Optional[StrictStr] = None - card_type: Optional[StrictStr] = None - exp_month: Optional[StrictStr] = None - exp_year: Optional[StrictStr] = None - brand: Optional[StrictStr] = None - name: Optional[StrictStr] = None - default: Optional[StrictBool] = None - visible_on_checkout: Optional[StrictBool] = None - payment_source_status: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["last4", "bin", "card_type", "exp_month", "exp_year", "brand", "name", "default", "visible_on_checkout", "payment_source_status"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMethodCardResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaymentMethodCardResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "last4": obj.get("last4"), - "bin": obj.get("bin"), - "card_type": obj.get("card_type"), - "exp_month": obj.get("exp_month"), - "exp_year": obj.get("exp_year"), - "brand": obj.get("brand"), - "name": obj.get("name"), - "default": obj.get("default"), - "visible_on_checkout": obj.get("visible_on_checkout"), - "payment_source_status": obj.get("payment_source_status") - }) - return _obj - - diff --git a/conekta/models/payment_method_cash.py b/conekta/models/payment_method_cash.py index ab7d0ce..0c9dfad 100644 --- a/conekta/models/payment_method_cash.py +++ b/conekta/models/payment_method_cash.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodCash(BaseModel): """ @@ -42,10 +39,11 @@ class PaymentMethodCash(BaseModel): store_name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "object", "auth_code", "cashier_id", "reference", "barcode_url", "expires_at", "service_name", "store", "store_name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodCash from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,10 +70,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if auth_code (nullable) is None @@ -96,7 +96,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodCash from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_cash_request.py b/conekta/models/payment_method_cash_request.py index 89edc8d..2223d91 100644 --- a/conekta/models/payment_method_cash_request.py +++ b/conekta/models/payment_method_cash_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodCashRequest(BaseModel): """ @@ -35,10 +31,11 @@ class PaymentMethodCashRequest(BaseModel): expires_at: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["type", "expires_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodCashRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodCashRequest from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_cash_request_all_of.py b/conekta/models/payment_method_cash_request_all_of.py deleted file mode 100644 index 90c1185..0000000 --- a/conekta/models/payment_method_cash_request_all_of.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaymentMethodCashRequestAllOf(BaseModel): - """ - PaymentMethodCashRequestAllOf - """ # noqa: E501 - expires_at: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["expires_at"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMethodCashRequestAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaymentMethodCashRequestAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expires_at": obj.get("expires_at") - }) - return _obj - - diff --git a/conekta/models/payment_method_cash_response.py b/conekta/models/payment_method_cash_response.py index bfcfb00..140f500 100644 --- a/conekta/models/payment_method_cash_response.py +++ b/conekta/models/payment_method_cash_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodCashResponse(BaseModel): """ @@ -42,10 +39,11 @@ class PaymentMethodCashResponse(BaseModel): provider: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "id", "object", "created_at", "parent_id", "reference", "barcode", "barcode_url", "expires_at", "provider"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodCashResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodCashResponse from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_cash_response_all_of.py b/conekta/models/payment_method_cash_response_all_of.py deleted file mode 100644 index 94c68db..0000000 --- a/conekta/models/payment_method_cash_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaymentMethodCashResponseAllOf(BaseModel): - """ - use for cash responses - """ # noqa: E501 - reference: Optional[StrictStr] = None - barcode: Optional[StrictStr] = None - barcode_url: Optional[StrictStr] = None - expires_at: Optional[StrictInt] = None - provider: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["reference", "barcode", "barcode_url", "expires_at", "provider"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMethodCashResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaymentMethodCashResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "reference": obj.get("reference"), - "barcode": obj.get("barcode"), - "barcode_url": obj.get("barcode_url"), - "expires_at": obj.get("expires_at"), - "provider": obj.get("provider") - }) - return _obj - - diff --git a/conekta/models/payment_method_response.py b/conekta/models/payment_method_response.py index 54ec080..feeca59 100644 --- a/conekta/models/payment_method_response.py +++ b/conekta/models/payment_method_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodResponse(BaseModel): """ @@ -37,10 +34,11 @@ class PaymentMethodResponse(BaseModel): parent_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "id", "object", "created_at", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +65,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodResponse from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_spei_recurrent.py b/conekta/models/payment_method_spei_recurrent.py index fa97e91..c13941a 100644 --- a/conekta/models/payment_method_spei_recurrent.py +++ b/conekta/models/payment_method_spei_recurrent.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodSpeiRecurrent(BaseModel): """ @@ -39,10 +36,11 @@ class PaymentMethodSpeiRecurrent(BaseModel): expires_at: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "id", "object", "created_at", "parent_id", "reference", "expires_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodSpeiRecurrent from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodSpeiRecurrent from a dict""" if obj is None: return None diff --git a/conekta/models/payment_method_spei_recurrent_all_of.py b/conekta/models/payment_method_spei_recurrent_all_of.py deleted file mode 100644 index f0f3bc1..0000000 --- a/conekta/models/payment_method_spei_recurrent_all_of.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class PaymentMethodSpeiRecurrentAllOf(BaseModel): - """ - use for spei responses - """ # noqa: E501 - reference: Optional[StrictStr] = None - expires_at: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["reference", "expires_at"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of PaymentMethodSpeiRecurrentAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of PaymentMethodSpeiRecurrentAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "reference": obj.get("reference"), - "expires_at": obj.get("expires_at") - }) - return _obj - - diff --git a/conekta/models/payment_method_spei_request.py b/conekta/models/payment_method_spei_request.py index cddc200..4a67797 100644 --- a/conekta/models/payment_method_spei_request.py +++ b/conekta/models/payment_method_spei_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PaymentMethodSpeiRequest(BaseModel): """ @@ -35,10 +31,11 @@ class PaymentMethodSpeiRequest(BaseModel): expires_at: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["type", "expires_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PaymentMethodSpeiRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PaymentMethodSpeiRequest from a dict""" if obj is None: return None diff --git a/conekta/models/risk_rules.py b/conekta/models/payout.py similarity index 60% rename from conekta/models/risk_rules.py rename to conekta/models/payout.py index a39cc81..8aa9d21 100644 --- a/conekta/models/risk_rules.py +++ b/conekta/models/payout.py @@ -18,26 +18,24 @@ import re # noqa: F401 import json +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from conekta.models.payout_method import PayoutMethod +from typing import Optional, Set +from typing_extensions import Self -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel -from conekta.models.risk_rules_data import RiskRulesData -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class RiskRules(BaseModel): +class Payout(BaseModel): """ - RiskRules + The payout information of the payout order. """ # noqa: E501 - data: Optional[List[RiskRulesData]] = None - __properties: ClassVar[List[str]] = ["data"] + payout_method: PayoutMethod + __properties: ClassVar[List[str]] = ["payout_method"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,8 +48,8 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of RiskRules from a JSON string""" + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Payout from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -64,24 +62,22 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in data (list) - _items = [] - if self.data: - for _item in self.data: - if _item: - _items.append(_item.to_dict()) - _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of payout_method + if self.payout_method: + _dict['payout_method'] = self.payout_method.to_dict() return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of RiskRules from a dict""" + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Payout from a dict""" if obj is None: return None @@ -89,7 +85,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "data": [RiskRulesData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "payout_method": PayoutMethod.from_dict(obj["payout_method"]) if obj.get("payout_method") is not None else None }) return _obj diff --git a/conekta/models/order_fiscal_entity_address_response_all_of.py b/conekta/models/payout_method.py similarity index 64% rename from conekta/models/order_fiscal_entity_address_response_all_of.py rename to conekta/models/payout_method.py index 5a6f892..c581754 100644 --- a/conekta/models/order_fiscal_entity_address_response_all_of.py +++ b/conekta/models/payout_method.py @@ -18,25 +18,23 @@ import re # noqa: F401 import json +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class OrderFiscalEntityAddressResponseAllOf(BaseModel): +class PayoutMethod(BaseModel): """ - OrderFiscalEntityAddressResponseAllOf + The payout method of the payout order. """ # noqa: E501 - object: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["object"] + type: StrictStr = Field(description="The type of the payout method.") + __properties: ClassVar[List[str]] = ["type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,8 +47,8 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of OrderFiscalEntityAddressResponseAllOf from a JSON string""" + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PayoutMethod from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -63,17 +61,19 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of OrderFiscalEntityAddressResponseAllOf from a dict""" + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PayoutMethod from a dict""" if obj is None: return None @@ -81,7 +81,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "object": obj.get("object") + "type": obj.get("type") }) return _obj diff --git a/conekta/models/payout_order.py b/conekta/models/payout_order.py new file mode 100644 index 0000000..62963f1 --- /dev/null +++ b/conekta/models/payout_order.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.customer_info_just_customer_id import CustomerInfoJustCustomerId +from conekta.models.payout import Payout +from typing import Optional, Set +from typing_extensions import Self + +class PayoutOrder(BaseModel): + """ + a payout order + """ # noqa: E501 + allowed_payout_methods: List[StrictStr] = Field(description="The payout methods that are allowed for the payout order.") + amount: StrictInt = Field(description="The amount of the payout order.") + currency: StrictStr = Field(description="The currency in which the payout order is made.") + customer_info: CustomerInfoJustCustomerId + metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata of the payout order.") + payout: Payout + reason: StrictStr = Field(description="The reason for the payout order.") + __properties: ClassVar[List[str]] = ["allowed_payout_methods", "amount", "currency", "customer_info", "metadata", "payout", "reason"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PayoutOrder from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer_info + if self.customer_info: + _dict['customer_info'] = self.customer_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of payout + if self.payout: + _dict['payout'] = self.payout.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PayoutOrder from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowed_payout_methods": obj.get("allowed_payout_methods"), + "amount": obj.get("amount"), + "currency": obj.get("currency") if obj.get("currency") is not None else 'MXN', + "customer_info": CustomerInfoJustCustomerId.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None, + "metadata": obj.get("metadata"), + "payout": Payout.from_dict(obj["payout"]) if obj.get("payout") is not None else None, + "reason": obj.get("reason") + }) + return _obj + + diff --git a/conekta/models/payout_order_payouts_item.py b/conekta/models/payout_order_payouts_item.py new file mode 100644 index 0000000..5aed4da --- /dev/null +++ b/conekta/models/payout_order_payouts_item.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PayoutOrderPayoutsItem(BaseModel): + """ + PayoutOrderPayoutsItem + """ # noqa: E501 + amount: StrictInt = Field(description="The amount of the payout.") + currency: StrictStr = Field(description="The currency in which the payout is made.") + expires_at: Optional[StrictInt] = Field(default=None, description="The expiration date of the payout.") + id: StrictStr = Field(description="The id of the payout.") + livemode: StrictBool = Field(description="The live mode of the payout.") + object: StrictStr = Field(description="The object of the payout.") + payout_order_id: Optional[StrictStr] = Field(default=None, description="The id of the payout order.") + status: Optional[StrictStr] = Field(default=None, description="The status of the payout.") + __properties: ClassVar[List[str]] = ["amount", "currency", "expires_at", "id", "livemode", "object", "payout_order_id", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PayoutOrderPayoutsItem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PayoutOrderPayoutsItem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "currency": obj.get("currency"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "livemode": obj.get("livemode"), + "object": obj.get("object"), + "payout_order_id": obj.get("payout_order_id"), + "status": obj.get("status") + }) + return _obj + + diff --git a/conekta/models/payout_order_response.py b/conekta/models/payout_order_response.py new file mode 100644 index 0000000..c634578 --- /dev/null +++ b/conekta/models/payout_order_response.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from conekta.models.payout_order_payouts_item import PayoutOrderPayoutsItem +from conekta.models.payout_order_response_customer_info import PayoutOrderResponseCustomerInfo +from typing import Optional, Set +from typing_extensions import Self + +class PayoutOrderResponse(BaseModel): + """ + payout order model response + """ # noqa: E501 + allowed_payout_methods: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="The payout methods that are allowed for the payout order.") + amount: StrictInt = Field(description="The amount of the payout order.") + created_at: StrictInt = Field(description="The creation date of the payout order.") + currency: StrictStr = Field(description="The currency in which the payout order is made.") + customer_info: PayoutOrderResponseCustomerInfo + expires_at: Optional[StrictInt] = Field(default=None, description="The expiration date of the payout order.") + id: StrictStr = Field(description="The id of the payout order.") + livemode: StrictBool = Field(description="The live mode of the payout order.") + object: StrictStr = Field(description="The object of the payout order.") + metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata of the payout order.") + payouts: List[PayoutOrderPayoutsItem] = Field(description="The payout information of the payout order.") + reason: StrictStr = Field(description="The reason for the payout order.") + status: Optional[StrictStr] = Field(default=None, description="The status of the payout order.") + updated_at: StrictInt = Field(description="The update date of the payout order.") + __properties: ClassVar[List[str]] = ["allowed_payout_methods", "amount", "created_at", "currency", "customer_info", "expires_at", "id", "livemode", "object", "metadata", "payouts", "reason", "status", "updated_at"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PayoutOrderResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of customer_info + if self.customer_info: + _dict['customer_info'] = self.customer_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in payouts (list) + _items = [] + if self.payouts: + for _item in self.payouts: + if _item: + _items.append(_item.to_dict()) + _dict['payouts'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PayoutOrderResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "allowed_payout_methods": obj.get("allowed_payout_methods"), + "amount": obj.get("amount"), + "created_at": obj.get("created_at"), + "currency": obj.get("currency") if obj.get("currency") is not None else 'MXN', + "customer_info": PayoutOrderResponseCustomerInfo.from_dict(obj["customer_info"]) if obj.get("customer_info") is not None else None, + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "livemode": obj.get("livemode"), + "object": obj.get("object"), + "metadata": obj.get("metadata"), + "payouts": [PayoutOrderPayoutsItem.from_dict(_item) for _item in obj["payouts"]] if obj.get("payouts") is not None else None, + "reason": obj.get("reason"), + "status": obj.get("status"), + "updated_at": obj.get("updated_at") + }) + return _obj + + diff --git a/conekta/models/payout_order_response_customer_info.py b/conekta/models/payout_order_response_customer_info.py new file mode 100644 index 0000000..ace7291 --- /dev/null +++ b/conekta/models/payout_order_response_customer_info.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PayoutOrderResponseCustomerInfo(BaseModel): + """ + The customer information of the payout order. + """ # noqa: E501 + customer_custom_reference: Optional[StrictStr] = Field(default=None, description="Custom reference") + name: Optional[StrictStr] = None + email: Optional[StrictStr] = None + phone: Optional[StrictStr] = None + corporate: Optional[StrictBool] = False + object: Optional[StrictStr] = None + id: StrictStr = Field(description="The id of the customer.") + __properties: ClassVar[List[str]] = ["customer_custom_reference", "name", "email", "phone", "corporate", "object", "id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PayoutOrderResponseCustomerInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if customer_custom_reference (nullable) is None + # and model_fields_set contains the field + if self.customer_custom_reference is None and "customer_custom_reference" in self.model_fields_set: + _dict['customer_custom_reference'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PayoutOrderResponseCustomerInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "customer_custom_reference": obj.get("customer_custom_reference"), + "name": obj.get("name"), + "email": obj.get("email"), + "phone": obj.get("phone"), + "corporate": obj.get("corporate") if obj.get("corporate") is not None else False, + "object": obj.get("object"), + "id": obj.get("id") + }) + return _obj + + diff --git a/conekta/models/payout_orders_response.py b/conekta/models/payout_orders_response.py new file mode 100644 index 0000000..bce5891 --- /dev/null +++ b/conekta/models/payout_orders_response.py @@ -0,0 +1,114 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.payout_order_response import PayoutOrderResponse +from typing import Optional, Set +from typing_extensions import Self + +class PayoutOrdersResponse(BaseModel): + """ + PayoutOrdersResponse + """ # noqa: E501 + has_more: StrictBool = Field(description="Indicates if there are more pages to be requested") + object: StrictStr = Field(description="Object type, in this case is list") + next_page_url: Optional[StrictStr] = Field(default=None, description="URL of the next page.") + previous_page_url: Optional[StrictStr] = Field(default=None, description="Url of the previous page.") + data: Optional[List[PayoutOrderResponse]] = None + __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PayoutOrdersResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) + _items = [] + if self.data: + for _item in self.data: + if _item: + _items.append(_item.to_dict()) + _dict['data'] = _items + # set to None if next_page_url (nullable) is None + # and model_fields_set contains the field + if self.next_page_url is None and "next_page_url" in self.model_fields_set: + _dict['next_page_url'] = None + + # set to None if previous_page_url (nullable) is None + # and model_fields_set contains the field + if self.previous_page_url is None and "previous_page_url" in self.model_fields_set: + _dict['previous_page_url'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PayoutOrdersResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "has_more": obj.get("has_more"), + "object": obj.get("object"), + "next_page_url": obj.get("next_page_url"), + "previous_page_url": obj.get("previous_page_url"), + "data": [PayoutOrderResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None + }) + return _obj + + diff --git a/conekta/models/plan_request.py b/conekta/models/plan_request.py index ee85713..5c2fa12 100644 --- a/conekta/models/plan_request.py +++ b/conekta/models/plan_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr, field_validator -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PlanRequest(BaseModel): """ @@ -45,14 +41,15 @@ class PlanRequest(BaseModel): @field_validator('interval') def interval_validate_enum(cls, value): """Validates the enum""" - if value not in ('week', 'half_month', 'month', 'year'): + if value not in set(['week', 'half_month', 'month', 'year']): raise ValueError("must be one of enum values ('week', 'half_month', 'month', 'year')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -65,7 +62,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PlanRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,16 +76,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PlanRequest from a dict""" if obj is None: return None diff --git a/conekta/models/plan_response.py b/conekta/models/plan_response.py index d2eea8b..5a802cc 100644 --- a/conekta/models/plan_response.py +++ b/conekta/models/plan_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PlanResponse(BaseModel): """ @@ -45,10 +41,11 @@ class PlanResponse(BaseModel): trial_period_days: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["amount", "created_at", "currency", "expiry_count", "frequency", "id", "interval", "livemode", "name", "object", "trial_period_days"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PlanResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if expiry_count (nullable) is None @@ -94,7 +93,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PlanResponse from a dict""" if obj is None: return None diff --git a/conekta/models/plan_update_request.py b/conekta/models/plan_update_request.py index 4d975bf..e96295a 100644 --- a/conekta/models/plan_update_request.py +++ b/conekta/models/plan_update_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class PlanUpdateRequest(BaseModel): """ @@ -38,10 +34,11 @@ class PlanUpdateRequest(BaseModel): name: Optional[StrictStr] = Field(default=None, description="The name of the plan.") __properties: ClassVar[List[str]] = ["amount", "currency", "expiry_count", "name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -54,7 +51,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of PlanUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -68,16 +65,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of PlanUpdateRequest from a dict""" if obj is None: return None diff --git a/conekta/models/product.py b/conekta/models/product.py index e57508c..e119ab9 100644 --- a/conekta/models/product.py +++ b/conekta/models/product.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Product(BaseModel): """ @@ -43,10 +39,11 @@ class Product(BaseModel): unit_price: Annotated[int, Field(strict=True, ge=0)] = Field(description="The price of the item in cents.") __properties: ClassVar[List[str]] = ["antifraud_info", "brand", "description", "metadata", "name", "quantity", "sku", "tags", "unit_price"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Product from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Product from a dict""" if obj is None: return None diff --git a/conekta/models/product_data_response.py b/conekta/models/product_data_response.py index f14f351..0b35780 100644 --- a/conekta/models/product_data_response.py +++ b/conekta/models/product_data_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ProductDataResponse(BaseModel): """ @@ -46,10 +42,11 @@ class ProductDataResponse(BaseModel): parent_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["antifraud_info", "brand", "description", "metadata", "name", "quantity", "sku", "tags", "unit_price", "id", "object", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +59,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ProductDataResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,16 +73,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ProductDataResponse from a dict""" if obj is None: return None diff --git a/conekta/models/product_data_response_all_of.py b/conekta/models/product_data_response_all_of.py deleted file mode 100644 index c654c7d..0000000 --- a/conekta/models/product_data_response_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ProductDataResponseAllOf(BaseModel): - """ - ProductDataResponseAllOf - """ # noqa: E501 - id: Optional[StrictStr] = None - object: Optional[StrictStr] = None - parent_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "object", "parent_id"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ProductDataResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ProductDataResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "parent_id": obj.get("parent_id") - }) - return _obj - - diff --git a/conekta/models/product_order_response.py b/conekta/models/product_order_response.py index 4c5f568..2dca0eb 100644 --- a/conekta/models/product_order_response.py +++ b/conekta/models/product_order_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ProductOrderResponse(BaseModel): """ @@ -46,10 +42,11 @@ class ProductOrderResponse(BaseModel): parent_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["antifraud_info", "brand", "description", "metadata", "name", "quantity", "sku", "tags", "unit_price", "id", "object", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -62,7 +59,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ProductOrderResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -76,16 +73,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ProductOrderResponse from a dict""" if obj is None: return None diff --git a/conekta/models/product_order_response_all_of.py b/conekta/models/product_order_response_all_of.py deleted file mode 100644 index ea1f8a3..0000000 --- a/conekta/models/product_order_response_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class ProductOrderResponseAllOf(BaseModel): - """ - ProductOrderResponseAllOf - """ # noqa: E501 - id: Optional[StrictStr] = None - object: Optional[StrictStr] = None - parent_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "object", "parent_id"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ProductOrderResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of ProductOrderResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "parent_id": obj.get("parent_id") - }) - return _obj - - diff --git a/conekta/models/risk_rules_data.py b/conekta/models/risk_rules_data.py index d64c29a..b6e4c20 100644 --- a/conekta/models/risk_rules_data.py +++ b/conekta/models/risk_rules_data.py @@ -18,21 +18,17 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RiskRulesData(BaseModel): """ RiskRulesData """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="rule id") - field: Optional[StrictStr] = Field(default=None, description="field to be used for the rule") + var_field: Optional[StrictStr] = Field(default=None, description="field to be used for the rule", alias="field") created_at: Optional[StrictStr] = Field(default=None, description="rule creation date") value: Optional[StrictStr] = Field(default=None, description="value to be used for the rule") is_global: Optional[StrictBool] = Field(default=None, description="if the rule is global") @@ -40,10 +36,11 @@ class RiskRulesData(BaseModel): description: Optional[StrictStr] = Field(default=None, description="description of the rule") __properties: ClassVar[List[str]] = ["id", "field", "created_at", "value", "is_global", "is_test", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RiskRulesData from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RiskRulesData from a dict""" if obj is None: return None diff --git a/conekta/models/risk_rules_list.py b/conekta/models/risk_rules_list.py index 8a3f844..b70ce5d 100644 --- a/conekta/models/risk_rules_list.py +++ b/conekta/models/risk_rules_list.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.risk_rules_data import RiskRulesData -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class RiskRulesList(BaseModel): """ @@ -39,10 +35,11 @@ class RiskRulesList(BaseModel): data: Optional[List[RiskRulesData]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of RiskRulesList from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of RiskRulesList from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [RiskRulesData.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [RiskRulesData.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/shipping_order_response.py b/conekta/models/shipping_order_response.py index 7c0c1d8..6ffe769 100644 --- a/conekta/models/shipping_order_response.py +++ b/conekta/models/shipping_order_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ShippingOrderResponse(BaseModel): """ @@ -42,10 +38,11 @@ class ShippingOrderResponse(BaseModel): parent_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "carrier", "tracking_number", "method", "metadata", "id", "object", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +55,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ShippingOrderResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,16 +69,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ShippingOrderResponse from a dict""" if obj is None: return None diff --git a/conekta/models/shipping_request.py b/conekta/models/shipping_request.py index cc4815f..ebb5edf 100644 --- a/conekta/models/shipping_request.py +++ b/conekta/models/shipping_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class ShippingRequest(BaseModel): """ @@ -39,10 +35,11 @@ class ShippingRequest(BaseModel): metadata: Optional[Dict[str, Any]] = Field(default=None, description="Hash where the user can send additional information for each 'shipping'.") __properties: ClassVar[List[str]] = ["amount", "carrier", "tracking_number", "method", "metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of ShippingRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +66,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of ShippingRequest from a dict""" if obj is None: return None diff --git a/conekta/models/sms_checkout_request.py b/conekta/models/sms_checkout_request.py index 564e83d..1acc5bc 100644 --- a/conekta/models/sms_checkout_request.py +++ b/conekta/models/sms_checkout_request.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SmsCheckoutRequest(BaseModel): """ @@ -33,10 +30,11 @@ class SmsCheckoutRequest(BaseModel): phonenumber: StrictStr __properties: ClassVar[List[str]] = ["phonenumber"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SmsCheckoutRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SmsCheckoutRequest from a dict""" if obj is None: return None diff --git a/conekta/models/subscription_events_response.py b/conekta/models/subscription_events_response.py index 030e2d4..94a2cbf 100644 --- a/conekta/models/subscription_events_response.py +++ b/conekta/models/subscription_events_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.event_response import EventResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SubscriptionEventsResponse(BaseModel): """ @@ -39,10 +35,11 @@ class SubscriptionEventsResponse(BaseModel): data: Optional[List[EventResponse]] = None __properties: ClassVar[List[str]] = ["has_more", "object", "next_page_url", "previous_page_url", "data"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SubscriptionEventsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -95,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SubscriptionEventsResponse from a dict""" if obj is None: return None @@ -108,7 +107,7 @@ def from_dict(cls, obj: Dict) -> Self: "object": obj.get("object"), "next_page_url": obj.get("next_page_url"), "previous_page_url": obj.get("previous_page_url"), - "data": [EventResponse.from_dict(_item) for _item in obj.get("data")] if obj.get("data") is not None else None + "data": [EventResponse.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None }) return _obj diff --git a/conekta/models/subscription_request.py b/conekta/models/subscription_request.py index 09c97b5..b27c6af 100644 --- a/conekta/models/subscription_request.py +++ b/conekta/models/subscription_request.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SubscriptionRequest(BaseModel): """ @@ -35,10 +32,11 @@ class SubscriptionRequest(BaseModel): trial_end: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["plan_id", "card_id", "trial_end"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SubscriptionRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +63,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SubscriptionRequest from a dict""" if obj is None: return None diff --git a/conekta/models/subscription_response.py b/conekta/models/subscription_response.py index d82b7d1..9c6ae40 100644 --- a/conekta/models/subscription_response.py +++ b/conekta/models/subscription_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SubscriptionResponse(BaseModel): """ @@ -49,10 +46,11 @@ class SubscriptionResponse(BaseModel): trial_end: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["billing_cycle_start", "billing_cycle_end", "canceled_at", "card_id", "charge_id", "created_at", "customer_custom_reference", "customer_id", "id", "last_billing_cycle_order_id", "object", "paused_at", "plan_id", "status", "subscription_start", "trial_start", "trial_end"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -65,7 +63,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SubscriptionResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -79,10 +77,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if billing_cycle_start (nullable) is None @@ -123,7 +123,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SubscriptionResponse from a dict""" if obj is None: return None diff --git a/conekta/models/subscription_update_request.py b/conekta/models/subscription_update_request.py index 6a0adb1..15944fb 100644 --- a/conekta/models/subscription_update_request.py +++ b/conekta/models/subscription_update_request.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class SubscriptionUpdateRequest(BaseModel): """ @@ -35,10 +32,11 @@ class SubscriptionUpdateRequest(BaseModel): trial_end: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["plan_id", "card_id", "trial_end"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -51,7 +49,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of SubscriptionUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -65,16 +63,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of SubscriptionUpdateRequest from a dict""" if obj is None: return None diff --git a/conekta/models/token.py b/conekta/models/token.py index 5cd2e30..3f2758b 100644 --- a/conekta/models/token.py +++ b/conekta/models/token.py @@ -18,15 +18,12 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel from conekta.models.token_card import TokenCard from conekta.models.token_checkout import TokenCheckout -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class Token(BaseModel): """ @@ -36,10 +33,11 @@ class Token(BaseModel): checkout: Optional[TokenCheckout] = None __properties: ClassVar[List[str]] = ["card", "checkout"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -52,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of Token from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -66,10 +64,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of card @@ -91,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of Token from a dict""" if obj is None: return None @@ -100,8 +100,8 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "card": TokenCard.from_dict(obj.get("card")) if obj.get("card") is not None else None, - "checkout": TokenCheckout.from_dict(obj.get("checkout")) if obj.get("checkout") is not None else None + "card": TokenCard.from_dict(obj["card"]) if obj.get("card") is not None else None, + "checkout": TokenCheckout.from_dict(obj["checkout"]) if obj.get("checkout") is not None else None }) return _obj diff --git a/conekta/models/token_card.py b/conekta/models/token_card.py index c9612f4..2ac2c73 100644 --- a/conekta/models/token_card.py +++ b/conekta/models/token_card.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TokenCard(BaseModel): """ @@ -40,10 +36,11 @@ class TokenCard(BaseModel): number: StrictStr = Field(description="It is a value that allows identifying the number of the card.") __properties: ClassVar[List[str]] = ["cvc", "device_fingerprint", "exp_month", "exp_year", "name", "number"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TokenCard from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TokenCard from a dict""" if obj is None: return None diff --git a/conekta/models/token_checkout.py b/conekta/models/token_checkout.py index c1af541..9048445 100644 --- a/conekta/models/token_checkout.py +++ b/conekta/models/token_checkout.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TokenCheckout(BaseModel): """ @@ -34,10 +30,11 @@ class TokenCheckout(BaseModel): returns_control_on: Optional[StrictStr] = Field(default=None, description="It is a value that allows identifying the returns control on.") __properties: ClassVar[List[str]] = ["returns_control_on"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TokenCheckout from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TokenCheckout from a dict""" if obj is None: return None diff --git a/conekta/models/token_response.py b/conekta/models/token_response.py index cc21336..c1afd31 100644 --- a/conekta/models/token_response.py +++ b/conekta/models/token_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.token_response_checkout import TokenResponseCheckout -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TokenResponse(BaseModel): """ @@ -39,10 +35,11 @@ class TokenResponse(BaseModel): used: StrictBool = Field(description="Indicates if the token has been used") __properties: ClassVar[List[str]] = ["checkout", "id", "livemode", "object", "used"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TokenResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,10 +66,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of checkout @@ -86,7 +85,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TokenResponse from a dict""" if obj is None: return None @@ -95,7 +94,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "checkout": TokenResponseCheckout.from_dict(obj.get("checkout")) if obj.get("checkout") is not None else None, + "checkout": TokenResponseCheckout.from_dict(obj["checkout"]) if obj.get("checkout") is not None else None, "id": obj.get("id"), "livemode": obj.get("livemode"), "object": obj.get("object"), diff --git a/conekta/models/token_response_checkout.py b/conekta/models/token_response_checkout.py index 0370113..aead8dc 100644 --- a/conekta/models/token_response_checkout.py +++ b/conekta/models/token_response_checkout.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TokenResponseCheckout(BaseModel): """ @@ -56,10 +52,11 @@ class TokenResponseCheckout(BaseModel): type: Optional[StrictStr] = Field(default=None, description="Type of checkout.") __properties: ClassVar[List[str]] = ["allowed_payment_methods", "can_not_expire", "emails_sent", "exclude_card_networks", "expires_at", "failure_url", "force_3ds_flow", "id", "livemode", "metadata", "monthly_installments_enabled", "monthly_installments_options", "name", "needs_shipping_contact", "object", "on_demand_enabled", "paid_payments_count", "recurrent", "sms_sent", "starts_at", "status", "success_url", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -72,7 +69,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TokenResponseCheckout from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -86,16 +83,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TokenResponseCheckout from a dict""" if obj is None: return None diff --git a/conekta/models/transaction_response.py b/conekta/models/transaction_response.py index d06b156..2567431 100644 --- a/conekta/models/transaction_response.py +++ b/conekta/models/transaction_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TransactionResponse(BaseModel): """ @@ -45,10 +41,11 @@ class TransactionResponse(BaseModel): type: StrictStr = Field(description="Transaction Type") __properties: ClassVar[List[str]] = ["amount", "charge", "created_at", "currency", "fee", "id", "livemode", "net", "object", "status", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransactionResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,16 +72,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransactionResponse from a dict""" if obj is None: return None diff --git a/conekta/models/transfer_destination_response.py b/conekta/models/transfer_destination_response.py index 07672e6..1774e25 100644 --- a/conekta/models/transfer_destination_response.py +++ b/conekta/models/transfer_destination_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TransferDestinationResponse(BaseModel): """ @@ -41,10 +37,11 @@ class TransferDestinationResponse(BaseModel): type: Optional[StrictStr] = Field(default=None, description="Type of the payee.") __properties: ClassVar[List[str]] = ["account_holder", "account_number", "bank", "created_at", "id", "object", "payee_id", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransferDestinationResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,16 +68,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransferDestinationResponse from a dict""" if obj is None: return None diff --git a/conekta/models/transfer_method_response.py b/conekta/models/transfer_method_response.py index 998b3d9..d36d868 100644 --- a/conekta/models/transfer_method_response.py +++ b/conekta/models/transfer_method_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TransferMethodResponse(BaseModel): """ @@ -41,10 +37,11 @@ class TransferMethodResponse(BaseModel): type: Optional[StrictStr] = Field(default=None, description="Type of the payee.") __properties: ClassVar[List[str]] = ["account_holder", "account_number", "bank", "created_at", "id", "object", "payee_id", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -57,7 +54,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransferMethodResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -71,16 +68,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransferMethodResponse from a dict""" if obj is None: return None diff --git a/conekta/models/transfer_response.py b/conekta/models/transfer_response.py index 2940bf0..a595a95 100644 --- a/conekta/models/transfer_response.py +++ b/conekta/models/transfer_response.py @@ -18,16 +18,12 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated from conekta.models.transfer_destination_response import TransferDestinationResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TransferResponse(BaseModel): """ @@ -45,10 +41,11 @@ class TransferResponse(BaseModel): status: Optional[StrictStr] = Field(default=None, description="Code indicating transfer status.") __properties: ClassVar[List[str]] = ["amount", "created_at", "currency", "id", "livemode", "destination", "object", "statement_description", "statement_reference", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransferResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of destination @@ -87,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransferResponse from a dict""" if obj is None: return None @@ -101,7 +100,7 @@ def from_dict(cls, obj: Dict) -> Self: "currency": obj.get("currency"), "id": obj.get("id"), "livemode": obj.get("livemode"), - "destination": TransferDestinationResponse.from_dict(obj.get("destination")) if obj.get("destination") is not None else None, + "destination": TransferDestinationResponse.from_dict(obj["destination"]) if obj.get("destination") is not None else None, "object": obj.get("object"), "statement_description": obj.get("statement_description"), "statement_reference": obj.get("statement_reference"), diff --git a/conekta/models/transfers_response.py b/conekta/models/transfers_response.py index 6b40a4e..129ffbc 100644 --- a/conekta/models/transfers_response.py +++ b/conekta/models/transfers_response.py @@ -18,16 +18,12 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field from typing_extensions import Annotated from conekta.models.transfer_method_response import TransferMethodResponse -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class TransfersResponse(BaseModel): """ @@ -45,10 +41,11 @@ class TransfersResponse(BaseModel): status: Optional[StrictStr] = Field(default=None, description="Code indicating transfer status.") __properties: ClassVar[List[str]] = ["amount", "created_at", "currency", "id", "livemode", "method", "object", "statement_description", "statement_reference", "status"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -61,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of TransfersResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -75,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of method @@ -87,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of TransfersResponse from a dict""" if obj is None: return None @@ -101,7 +100,7 @@ def from_dict(cls, obj: Dict) -> Self: "currency": obj.get("currency"), "id": obj.get("id"), "livemode": obj.get("livemode"), - "method": TransferMethodResponse.from_dict(obj.get("method")) if obj.get("method") is not None else None, + "method": TransferMethodResponse.from_dict(obj["method"]) if obj.get("method") is not None else None, "object": obj.get("object"), "statement_description": obj.get("statement_description"), "statement_reference": obj.get("statement_reference"), diff --git a/conekta/models/update_customer.py b/conekta/models/update_customer.py index 9580a21..bce35d5 100644 --- a/conekta/models/update_customer.py +++ b/conekta/models/update_customer.py @@ -18,19 +18,15 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -from pydantic import Field from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest from conekta.models.customer_payment_methods_request import CustomerPaymentMethodsRequest from conekta.models.customer_shipping_contacts import CustomerShippingContacts from conekta.models.subscription_request import SubscriptionRequest from conekta.models.update_customer_antifraud_info import UpdateCustomerAntifraudInfo -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdateCustomer(BaseModel): """ @@ -52,10 +48,11 @@ class UpdateCustomer(BaseModel): subscription: Optional[SubscriptionRequest] = None __properties: ClassVar[List[str]] = ["antifraud_info", "default_payment_source_id", "email", "name", "phone", "plan_id", "default_shipping_contact_id", "corporate", "custom_reference", "fiscal_entities", "metadata", "payment_sources", "shipping_contacts", "subscription"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -68,7 +65,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateCustomer from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -82,10 +79,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of antifraud_info @@ -123,7 +122,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateCustomer from a dict""" if obj is None: return None @@ -132,7 +131,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "antifraud_info": UpdateCustomerAntifraudInfo.from_dict(obj.get("antifraud_info")) if obj.get("antifraud_info") is not None else None, + "antifraud_info": UpdateCustomerAntifraudInfo.from_dict(obj["antifraud_info"]) if obj.get("antifraud_info") is not None else None, "default_payment_source_id": obj.get("default_payment_source_id"), "email": obj.get("email"), "name": obj.get("name"), @@ -141,11 +140,11 @@ def from_dict(cls, obj: Dict) -> Self: "default_shipping_contact_id": obj.get("default_shipping_contact_id"), "corporate": obj.get("corporate") if obj.get("corporate") is not None else False, "custom_reference": obj.get("custom_reference"), - "fiscal_entities": [CustomerFiscalEntitiesRequest.from_dict(_item) for _item in obj.get("fiscal_entities")] if obj.get("fiscal_entities") is not None else None, + "fiscal_entities": [CustomerFiscalEntitiesRequest.from_dict(_item) for _item in obj["fiscal_entities"]] if obj.get("fiscal_entities") is not None else None, "metadata": obj.get("metadata"), - "payment_sources": [CustomerPaymentMethodsRequest.from_dict(_item) for _item in obj.get("payment_sources")] if obj.get("payment_sources") is not None else None, - "shipping_contacts": [CustomerShippingContacts.from_dict(_item) for _item in obj.get("shipping_contacts")] if obj.get("shipping_contacts") is not None else None, - "subscription": SubscriptionRequest.from_dict(obj.get("subscription")) if obj.get("subscription") is not None else None + "payment_sources": [CustomerPaymentMethodsRequest.from_dict(_item) for _item in obj["payment_sources"]] if obj.get("payment_sources") is not None else None, + "shipping_contacts": [CustomerShippingContacts.from_dict(_item) for _item in obj["shipping_contacts"]] if obj.get("shipping_contacts") is not None else None, + "subscription": SubscriptionRequest.from_dict(obj["subscription"]) if obj.get("subscription") is not None else None }) return _obj diff --git a/conekta/models/update_customer_antifraud_info.py b/conekta/models/update_customer_antifraud_info.py index 1ffd9b5..b7dbeb0 100644 --- a/conekta/models/update_customer_antifraud_info.py +++ b/conekta/models/update_customer_antifraud_info.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdateCustomerAntifraudInfo(BaseModel): """ @@ -34,10 +31,11 @@ class UpdateCustomerAntifraudInfo(BaseModel): first_paid_at: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["account_created_at", "first_paid_at"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +48,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateCustomerAntifraudInfo from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +62,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateCustomerAntifraudInfo from a dict""" if obj is None: return None diff --git a/conekta/models/update_customer_fiscal_entities_response.py b/conekta/models/update_customer_fiscal_entities_response.py index bbb0762..2882862 100644 --- a/conekta/models/update_customer_fiscal_entities_response.py +++ b/conekta/models/update_customer_fiscal_entities_response.py @@ -18,24 +18,21 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from conekta.models.customer_address import CustomerAddress +from typing import Optional, Set +from typing_extensions import Self class UpdateCustomerFiscalEntitiesResponse(BaseModel): """ UpdateCustomerFiscalEntitiesResponse """ # noqa: E501 - address: CustomerFiscalEntitiesRequestAddress + address: CustomerAddress tax_id: Optional[StrictStr] = None email: Optional[StrictStr] = None phone: Optional[StrictStr] = None - metadata: Optional[Dict[str, Union[str, Any]]] = None + metadata: Optional[Dict[str, Dict[str, Any]]] = None company_name: Optional[StrictStr] = None id: StrictStr object: StrictStr @@ -44,10 +41,11 @@ class UpdateCustomerFiscalEntitiesResponse(BaseModel): default: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["address", "tax_id", "email", "phone", "metadata", "company_name", "id", "object", "created_at", "parent_id", "default"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +58,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateCustomerFiscalEntitiesResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,10 +72,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of address @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateCustomerFiscalEntitiesResponse from a dict""" if obj is None: return None @@ -95,7 +95,7 @@ def from_dict(cls, obj: Dict) -> Self: return cls.model_validate(obj) _obj = cls.model_validate({ - "address": CustomerFiscalEntitiesRequestAddress.from_dict(obj.get("address")) if obj.get("address") is not None else None, + "address": CustomerAddress.from_dict(obj["address"]) if obj.get("address") is not None else None, "tax_id": obj.get("tax_id"), "email": obj.get("email"), "phone": obj.get("phone"), diff --git a/conekta/models/update_customer_fiscal_entities_response_all_of.py b/conekta/models/update_customer_fiscal_entities_response_all_of.py deleted file mode 100644 index 9a1b850..0000000 --- a/conekta/models/update_customer_fiscal_entities_response_all_of.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdateCustomerFiscalEntitiesResponseAllOf(BaseModel): - """ - UpdateCustomerFiscalEntitiesResponseAllOf - """ # noqa: E501 - id: StrictStr - object: StrictStr - created_at: StrictInt - parent_id: Optional[StrictStr] = None - default: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["id", "object", "created_at", "parent_id", "default"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdateCustomerFiscalEntitiesResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UpdateCustomerFiscalEntitiesResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "created_at": obj.get("created_at"), - "parent_id": obj.get("parent_id"), - "default": obj.get("default") - }) - return _obj - - diff --git a/conekta/models/update_customer_payment_methods_response.py b/conekta/models/update_customer_payment_methods_response.py index 30abc15..dd695f3 100644 --- a/conekta/models/update_customer_payment_methods_response.py +++ b/conekta/models/update_customer_payment_methods_response.py @@ -14,23 +14,16 @@ from __future__ import annotations -from inspect import getfullargspec import json import pprint -import re # noqa: F401 - +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional -from pydantic import BaseModel, Field, StrictStr, ValidationError, field_validator from conekta.models.payment_method_card_response import PaymentMethodCardResponse from conekta.models.payment_method_cash_response import PaymentMethodCashResponse from conekta.models.payment_method_spei_recurrent import PaymentMethodSpeiRecurrent -from typing import Union, Any, List, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal from pydantic import StrictStr, Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self UPDATECUSTOMERPAYMENTMETHODSRESPONSE_ONE_OF_SCHEMAS = ["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] @@ -45,11 +38,12 @@ class UpdateCustomerPaymentMethodsResponse(BaseModel): # data type: PaymentMethodSpeiRecurrent oneof_schema_3_validator: Optional[PaymentMethodSpeiRecurrent] = None actual_instance: Optional[Union[PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]] = None - one_of_schemas: List[str] = Literal["PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent"] + one_of_schemas: Set[str] = { "PaymentMethodCardResponse", "PaymentMethodCashResponse", "PaymentMethodSpeiRecurrent" } - model_config = { - "validate_assignment": True - } + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) discriminator_value_class_map: Dict[str, str] = { @@ -95,7 +89,7 @@ def actual_instance_must_validate_oneof(cls, v): return v @classmethod - def from_dict(cls, obj: dict) -> Self: + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: return cls.from_json(json.dumps(obj)) @classmethod @@ -178,19 +172,17 @@ def to_json(self) -> str: if self.actual_instance is None: return "null" - to_json = getattr(self.actual_instance, "to_json", None) - if callable(to_json): + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): return self.actual_instance.to_json() else: return json.dumps(self.actual_instance) - def to_dict(self) -> Dict: + def to_dict(self) -> Optional[Union[Dict[str, Any], PaymentMethodCardResponse, PaymentMethodCashResponse, PaymentMethodSpeiRecurrent]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None - to_dict = getattr(self.actual_instance, "to_dict", None) - if callable(to_dict): + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): return self.actual_instance.to_dict() else: # primitive type diff --git a/conekta/models/update_order_discount_lines_request.py b/conekta/models/update_order_discount_lines_request.py index 759adc0..24bc757 100644 --- a/conekta/models/update_order_discount_lines_request.py +++ b/conekta/models/update_order_discount_lines_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdateOrderDiscountLinesRequest(BaseModel): """ @@ -37,10 +33,11 @@ class UpdateOrderDiscountLinesRequest(BaseModel): type: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "code", "type"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateOrderDiscountLinesRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateOrderDiscountLinesRequest from a dict""" if obj is None: return None diff --git a/conekta/models/update_order_tax_request.py b/conekta/models/update_order_tax_request.py index 4cc8f6a..cac3e11 100644 --- a/conekta/models/update_order_tax_request.py +++ b/conekta/models/update_order_tax_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel -from pydantic import Field +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdateOrderTaxRequest(BaseModel): """ @@ -34,13 +30,14 @@ class UpdateOrderTaxRequest(BaseModel): """ # noqa: E501 amount: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="The amount to be collected for tax in cents") description: Optional[Annotated[str, Field(min_length=2, strict=True)]] = Field(default=None, description="description or tax's name") - metadata: Optional[Dict[str, Union[str, Any]]] = None + metadata: Optional[Dict[str, Dict[str, Any]]] = None __properties: ClassVar[List[str]] = ["amount", "description", "metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateOrderTaxRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateOrderTaxRequest from a dict""" if obj is None: return None diff --git a/conekta/models/update_order_tax_response.py b/conekta/models/update_order_tax_response.py index c56a30f..310ce93 100644 --- a/conekta/models/update_order_tax_response.py +++ b/conekta/models/update_order_tax_response.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdateOrderTaxResponse(BaseModel): """ @@ -40,10 +36,11 @@ class UpdateOrderTaxResponse(BaseModel): parent_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["amount", "description", "metadata", "id", "object", "parent_id"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateOrderTaxResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateOrderTaxResponse from a dict""" if obj is None: return None diff --git a/conekta/models/update_order_tax_response_all_of.py b/conekta/models/update_order_tax_response_all_of.py deleted file mode 100644 index b58c77c..0000000 --- a/conekta/models/update_order_tax_response_all_of.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Conekta API - - Conekta sdk - - The version of the OpenAPI document: 2.1.0 - Contact: engineering@conekta.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self - -class UpdateOrderTaxResponseAllOf(BaseModel): - """ - UpdateOrderTaxResponseAllOf - """ # noqa: E501 - id: Optional[StrictStr] = None - object: Optional[StrictStr] = None - parent_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["id", "object", "parent_id"] - - model_config = { - "populate_by_name": True, - "validate_assignment": True - } - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of UpdateOrderTaxResponseAllOf from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={ - }, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of UpdateOrderTaxResponseAllOf from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "object": obj.get("object"), - "parent_id": obj.get("parent_id") - }) - return _obj - - diff --git a/conekta/models/update_payment_methods.py b/conekta/models/update_payment_methods.py index 8af4685..030c8db 100644 --- a/conekta/models/update_payment_methods.py +++ b/conekta/models/update_payment_methods.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdatePaymentMethods(BaseModel): """ @@ -33,10 +30,11 @@ class UpdatePaymentMethods(BaseModel): name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -49,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdatePaymentMethods from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -63,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdatePaymentMethods from a dict""" if obj is None: return None diff --git a/conekta/models/update_product.py b/conekta/models/update_product.py index dfc794e..70a6046 100644 --- a/conekta/models/update_product.py +++ b/conekta/models/update_product.py @@ -18,21 +18,17 @@ import re # noqa: F401 import json - -from typing import Any, ClassVar, Dict, List, Optional, Union -from pydantic import BaseModel, StrictStr -from pydantic import Field +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class UpdateProduct(BaseModel): """ UpdateProduct """ # noqa: E501 - antifraud_info: Optional[Dict[str, Union[str, Any]]] = None + antifraud_info: Optional[Dict[str, Dict[str, Any]]] = None description: Optional[Annotated[str, Field(strict=True, max_length=250)]] = None sku: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -43,10 +39,11 @@ class UpdateProduct(BaseModel): metadata: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["antifraud_info", "description", "sku", "name", "unit_price", "quantity", "tags", "brand", "metadata"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of UpdateProduct from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of UpdateProduct from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_key_create_response.py b/conekta/models/webhook_key_create_response.py index 483f557..c96ac0a 100644 --- a/conekta/models/webhook_key_create_response.py +++ b/conekta/models/webhook_key_create_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookKeyCreateResponse(BaseModel): """ @@ -39,10 +35,11 @@ class WebhookKeyCreateResponse(BaseModel): public_key: Optional[StrictStr] = Field(default=None, description="Public key to be used in the webhook") __properties: ClassVar[List[str]] = ["active", "created_at", "id", "livemode", "object", "public_key"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookKeyCreateResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +66,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookKeyCreateResponse from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_key_delete_response.py b/conekta/models/webhook_key_delete_response.py index a37dc7e..37c74ca 100644 --- a/conekta/models/webhook_key_delete_response.py +++ b/conekta/models/webhook_key_delete_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookKeyDeleteResponse(BaseModel): """ @@ -39,10 +35,11 @@ class WebhookKeyDeleteResponse(BaseModel): object: Optional[StrictStr] = Field(default=None, description="Object name, value is webhook_key") __properties: ClassVar[List[str]] = ["active", "created_at", "deleted", "id", "livemode", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +52,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookKeyDeleteResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +66,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookKeyDeleteResponse from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_key_request.py b/conekta/models/webhook_key_request.py index c7fbfa7..4591be0 100644 --- a/conekta/models/webhook_key_request.py +++ b/conekta/models/webhook_key_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookKeyRequest(BaseModel): """ @@ -34,10 +30,11 @@ class WebhookKeyRequest(BaseModel): active: Optional[StrictBool] = Field(default=True, description="Indicates if the webhook key is active") __properties: ClassVar[List[str]] = ["active"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookKeyRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookKeyRequest from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_key_response.py b/conekta/models/webhook_key_response.py index 69c87e8..0cd487c 100644 --- a/conekta/models/webhook_key_response.py +++ b/conekta/models/webhook_key_response.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictInt, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookKeyResponse(BaseModel): """ @@ -40,10 +36,11 @@ class WebhookKeyResponse(BaseModel): object: Optional[StrictStr] = Field(default=None, description="Object name, value is webhook_key") __properties: ClassVar[List[str]] = ["id", "active", "created_at", "deactivated_at", "public_key", "livemode", "object"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -56,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookKeyResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -70,10 +67,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if deactivated_at (nullable) is None @@ -84,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookKeyResponse from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_key_update_request.py b/conekta/models/webhook_key_update_request.py index 25f972c..14f1cdb 100644 --- a/conekta/models/webhook_key_update_request.py +++ b/conekta/models/webhook_key_update_request.py @@ -18,14 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookKeyUpdateRequest(BaseModel): """ @@ -34,10 +30,11 @@ class WebhookKeyUpdateRequest(BaseModel): active: Optional[StrictBool] = Field(default=False, description="Indicates if the webhook key is active") __properties: ClassVar[List[str]] = ["active"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -50,7 +47,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookKeyUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -64,16 +61,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookKeyUpdateRequest from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_log.py b/conekta/models/webhook_log.py index 43d3ee0..da55eec 100644 --- a/conekta/models/webhook_log.py +++ b/conekta/models/webhook_log.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictInt, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookLog(BaseModel): """ @@ -39,10 +36,11 @@ class WebhookLog(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["failed_attempts", "id", "last_attempted_at", "last_http_response_status", "object", "response_data", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -55,7 +53,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookLog from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -69,16 +67,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookLog from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_request.py b/conekta/models/webhook_request.py index 7437f7b..1eb0379 100644 --- a/conekta/models/webhook_request.py +++ b/conekta/models/webhook_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator from typing import Any, ClassVar, Dict, List -from pydantic import BaseModel, StrictBool, field_validator -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookRequest(BaseModel): """ @@ -43,10 +39,11 @@ def url_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^(?!.*(localhost|127\.0\.0\.1)).*$/") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -59,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -73,16 +70,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookRequest from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_response.py b/conekta/models/webhook_response.py index 17ee20f..fac87aa 100644 --- a/conekta/models/webhook_response.py +++ b/conekta/models/webhook_response.py @@ -18,13 +18,10 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookResponse(BaseModel): """ @@ -42,10 +39,11 @@ class WebhookResponse(BaseModel): url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["deleted", "development_enabled", "id", "livemode", "object", "production_enabled", "status", "subscribed_events", "synchronous", "url"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -58,7 +56,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -72,10 +70,12 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) # set to None if deleted (nullable) is None @@ -86,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookResponse from a dict""" if obj is None: return None diff --git a/conekta/models/webhook_update_request.py b/conekta/models/webhook_update_request.py index 0442509..607353d 100644 --- a/conekta/models/webhook_update_request.py +++ b/conekta/models/webhook_update_request.py @@ -18,15 +18,11 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictBool, StrictStr, field_validator -from pydantic import Field from typing_extensions import Annotated -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WebhookUpdateRequest(BaseModel): """ @@ -44,10 +40,11 @@ def url_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^(?!.*(localhost|127\.0\.0\.1)).*$/") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -60,7 +57,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WebhookUpdateRequest from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -74,16 +71,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WebhookUpdateRequest from a dict""" if obj is None: return None diff --git a/conekta/models/whitelistlist_rule_response.py b/conekta/models/whitelistlist_rule_response.py index 668d796..5670440 100644 --- a/conekta/models/whitelistlist_rule_response.py +++ b/conekta/models/whitelistlist_rule_response.py @@ -18,29 +18,26 @@ import re # noqa: F401 import json - +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from pydantic import BaseModel, StrictStr -from pydantic import Field -try: - from typing import Self -except ImportError: - from typing_extensions import Self +from typing import Optional, Set +from typing_extensions import Self class WhitelistlistRuleResponse(BaseModel): """ WhitelistlistRuleResponse """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="Whitelist rule id") - field: Optional[StrictStr] = Field(default=None, description="field used for whitelists rule") + var_field: Optional[StrictStr] = Field(default=None, description="field used for whitelists rule", alias="field") value: Optional[StrictStr] = Field(default=None, description="value used for whitelists rule") description: Optional[StrictStr] = Field(default=None, description="use an description for whitelisted rule") __properties: ClassVar[List[str]] = ["id", "field", "value", "description"] - model_config = { - "populate_by_name": True, - "validate_assignment": True - } + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) def to_str(self) -> str: @@ -53,7 +50,7 @@ def to_json(self) -> str: return json.dumps(self.to_dict()) @classmethod - def from_json(cls, json_str: str) -> Self: + def from_json(cls, json_str: str) -> Optional[Self]: """Create an instance of WhitelistlistRuleResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -67,16 +64,18 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ + excluded_fields: Set[str] = set([ + ]) + _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude=excluded_fields, exclude_none=True, ) return _dict @classmethod - def from_dict(cls, obj: Dict) -> Self: + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: """Create an instance of WhitelistlistRuleResponse from a dict""" if obj is None: return None diff --git a/conekta/rest.py b/conekta/rest.py index 5f7e063..dd449c7 100644 --- a/conekta/rest.py +++ b/conekta/rest.py @@ -22,8 +22,20 @@ from conekta.exceptions import ApiException, ApiValueError +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} RESTResponseType = urllib3.HTTPResponse + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + class RESTResponse(io.IOBase): def __init__(self, resp) -> None: @@ -60,41 +72,45 @@ def __init__(self, configuration) -> None: else: cert_reqs = ssl.CERT_NONE - addition_pool_args = {} + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + } if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = ( + pool_args['assert_hostname'] = ( configuration.assert_hostname ) if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + pool_args['retries'] = configuration.retries if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name + pool_args['server_hostname'] = configuration.tls_server_name if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager + self.pool_manager: urllib3.PoolManager + if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) else: - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - ca_certs=configuration.ssl_ca_cert, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) + self.pool_manager = urllib3.PoolManager(**pool_args) def request( self, @@ -187,6 +203,8 @@ def request( # Content-Type which generated by urllib3 will be # overwritten. del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url, @@ -197,18 +215,26 @@ def request( preload_content=False ) # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form + # other content types than JSON when `body` argument is + # provided in serialized form. elif isinstance(body, str) or isinstance(body, bytes): - request_body = body r = self.pool_manager.request( method, url, - body=request_body, + body=body, timeout=timeout, headers=headers, preload_content=False ) + elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided diff --git a/config-python.json b/config-python.json index 039ff80..2b71b66 100644 --- a/config-python.json +++ b/config-python.json @@ -7,14 +7,14 @@ "licenseName": "MIT License", "licenseUrl": "https://www.opensource.org/licenses/mit-license.php", "generateSourceCodeOnly": "false", - "packageVersion": "6.0.2", + "packageVersion": "6.0.3", "packageUrl": "https://github.com/conekta/conekta-python", "projectName": "conekta", "templateDir": "/local/templates/python", "hasBearerMethods" : true, "useOneOfDiscriminatorLookup" : true, "nonCompliantUseDiscriminatorIfCompositionFails" : false, - "httpUserAgent": "Conekta/v2 PythonBindings/6.0.2", + "httpUserAgent": "Conekta/v2 PythonBindings/6.0.3", "files": { "/local/AUTHORS.md" : {}, "/local/CODE_OF_CONDUCT.md": {}, diff --git a/docs/AntifraudApi.md b/docs/AntifraudApi.md index 7881446..10ef6a9 100644 --- a/docs/AntifraudApi.md +++ b/docs/AntifraudApi.md @@ -20,9 +20,8 @@ Create blacklisted rule ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.blacklist_rule_response import BlacklistRuleResponse from conekta.models.create_risk_rules_data import CreateRiskRulesData @@ -65,6 +64,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **create_risk_rules_data** | [**CreateRiskRulesData**](CreateRiskRulesData.md)| requested field for blacklist rule | @@ -84,6 +84,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successfully registered rule | - | @@ -100,9 +101,8 @@ Create whitelisted rule ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.create_risk_rules_data import CreateRiskRulesData from conekta.models.whitelistlist_rule_response import WhitelistlistRuleResponse @@ -145,6 +145,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -164,6 +165,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successfully registered rule | - | @@ -181,9 +183,8 @@ Delete blacklisted rule ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.deleted_blacklist_rule_response import DeletedBlacklistRuleResponse from conekta.rest import ApiException @@ -226,6 +227,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -246,6 +248,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successfully deleted rule | - | @@ -263,9 +266,8 @@ Delete whitelisted rule ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.deleted_whitelist_rule_response import DeletedWhitelistRuleResponse from conekta.rest import ApiException @@ -308,6 +310,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -328,6 +331,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successfully deleted rule | - | @@ -348,9 +352,8 @@ Return all rules ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.risk_rules_list import RiskRulesList from conekta.rest import ApiException @@ -391,6 +394,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -409,6 +413,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | All the rules | - | @@ -427,9 +432,8 @@ Return all rules ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.risk_rules_list import RiskRulesList from conekta.rest import ApiException @@ -470,6 +474,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -488,6 +493,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | All the rules | - | diff --git a/docs/ApiKeyCreateResponse.md b/docs/ApiKeyCreateResponse.md index e61b0a3..fdd19db 100644 --- a/docs/ApiKeyCreateResponse.md +++ b/docs/ApiKeyCreateResponse.md @@ -2,9 +2,9 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authentication_token** | **str** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] **active** | **bool** | Indicates if the api key is active | [optional] **created_at** | **int** | Unix timestamp in seconds of when the api key was created | [optional] **updated_at** | **int** | Unix timestamp in seconds of when the api key was last updated | [optional] @@ -16,6 +16,7 @@ Name | Type | Description | Notes **object** | **str** | Object name, value is 'api_key' | [optional] **prefix** | **str** | The first few characters of the authentication_token | [optional] **role** | **str** | Indicates if the api key is private or public | [optional] +**authentication_token** | **str** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] ## Example @@ -27,12 +28,12 @@ json = "{}" # create an instance of ApiKeyCreateResponse from a JSON string api_key_create_response_instance = ApiKeyCreateResponse.from_json(json) # print the JSON string representation of the object -print ApiKeyCreateResponse.to_json() +print(ApiKeyCreateResponse.to_json()) # convert the object into a dict api_key_create_response_dict = api_key_create_response_instance.to_dict() # create an instance of ApiKeyCreateResponse from a dict -api_key_create_response_form_dict = api_key_create_response.from_dict(api_key_create_response_dict) +api_key_create_response_from_dict = ApiKeyCreateResponse.from_dict(api_key_create_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKeyCreateResponseAllOf.md b/docs/ApiKeyCreateResponseAllOf.md deleted file mode 100644 index 0173dbf..0000000 --- a/docs/ApiKeyCreateResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# ApiKeyCreateResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authentication_token** | **str** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] - -## Example - -```python -from conekta.models.api_key_create_response_all_of import ApiKeyCreateResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiKeyCreateResponseAllOf from a JSON string -api_key_create_response_all_of_instance = ApiKeyCreateResponseAllOf.from_json(json) -# print the JSON string representation of the object -print ApiKeyCreateResponseAllOf.to_json() - -# convert the object into a dict -api_key_create_response_all_of_dict = api_key_create_response_all_of_instance.to_dict() -# create an instance of ApiKeyCreateResponseAllOf from a dict -api_key_create_response_all_of_form_dict = api_key_create_response_all_of.from_dict(api_key_create_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ApiKeyRequest.md b/docs/ApiKeyRequest.md index 0f62ac9..27eb776 100644 --- a/docs/ApiKeyRequest.md +++ b/docs/ApiKeyRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **str** | A name or brief explanation of what this api key is used for | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of ApiKeyRequest from a JSON string api_key_request_instance = ApiKeyRequest.from_json(json) # print the JSON string representation of the object -print ApiKeyRequest.to_json() +print(ApiKeyRequest.to_json()) # convert the object into a dict api_key_request_dict = api_key_request_instance.to_dict() # create an instance of ApiKeyRequest from a dict -api_key_request_form_dict = api_key_request.from_dict(api_key_request_dict) +api_key_request_from_dict = ApiKeyRequest.from_dict(api_key_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKeyResponse.md b/docs/ApiKeyResponse.md index cdbdd21..4fb4874 100644 --- a/docs/ApiKeyResponse.md +++ b/docs/ApiKeyResponse.md @@ -3,6 +3,7 @@ api keys model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the api key is active | [optional] @@ -27,12 +28,12 @@ json = "{}" # create an instance of ApiKeyResponse from a JSON string api_key_response_instance = ApiKeyResponse.from_json(json) # print the JSON string representation of the object -print ApiKeyResponse.to_json() +print(ApiKeyResponse.to_json()) # convert the object into a dict api_key_response_dict = api_key_response_instance.to_dict() # create an instance of ApiKeyResponse from a dict -api_key_response_form_dict = api_key_response.from_dict(api_key_response_dict) +api_key_response_from_dict = ApiKeyResponse.from_dict(api_key_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKeyResponseOnDelete.md b/docs/ApiKeyResponseOnDelete.md index 1bfa065..cb8e7b7 100644 --- a/docs/ApiKeyResponseOnDelete.md +++ b/docs/ApiKeyResponseOnDelete.md @@ -3,6 +3,7 @@ api keys model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the api key is active | [optional] @@ -25,12 +26,12 @@ json = "{}" # create an instance of ApiKeyResponseOnDelete from a JSON string api_key_response_on_delete_instance = ApiKeyResponseOnDelete.from_json(json) # print the JSON string representation of the object -print ApiKeyResponseOnDelete.to_json() +print(ApiKeyResponseOnDelete.to_json()) # convert the object into a dict api_key_response_on_delete_dict = api_key_response_on_delete_instance.to_dict() # create an instance of ApiKeyResponseOnDelete from a dict -api_key_response_on_delete_form_dict = api_key_response_on_delete.from_dict(api_key_response_on_delete_dict) +api_key_response_on_delete_from_dict = ApiKeyResponseOnDelete.from_dict(api_key_response_on_delete_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKeyUpdateRequest.md b/docs/ApiKeyUpdateRequest.md index 7361958..8e49009 100644 --- a/docs/ApiKeyUpdateRequest.md +++ b/docs/ApiKeyUpdateRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the webhook key is active | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of ApiKeyUpdateRequest from a JSON string api_key_update_request_instance = ApiKeyUpdateRequest.from_json(json) # print the JSON string representation of the object -print ApiKeyUpdateRequest.to_json() +print(ApiKeyUpdateRequest.to_json()) # convert the object into a dict api_key_update_request_dict = api_key_update_request_instance.to_dict() # create an instance of ApiKeyUpdateRequest from a dict -api_key_update_request_form_dict = api_key_update_request.from_dict(api_key_update_request_dict) +api_key_update_request_from_dict = ApiKeyUpdateRequest.from_dict(api_key_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKeysApi.md b/docs/ApiKeysApi.md index 5e14c9a..1e0c561 100644 --- a/docs/ApiKeysApi.md +++ b/docs/ApiKeysApi.md @@ -21,9 +21,8 @@ Create a api key ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.api_key_create_response import ApiKeyCreateResponse from conekta.models.api_key_request import ApiKeyRequest @@ -67,6 +66,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **api_key_request** | [**ApiKeyRequest**](ApiKeyRequest.md)| requested field for a api keys | @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Content-Type - The format of the response body
* Conekta-Media-Type -
| @@ -106,9 +107,8 @@ Deletes a api key that corresponds to a api key ID ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.delete_api_keys_response import DeleteApiKeysResponse from conekta.rest import ApiException @@ -150,6 +150,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -169,6 +170,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Content-Type - The format of the response body
* Conekta-Media-Type -
| @@ -188,9 +190,8 @@ Gets a api key that corresponds to a api key ID ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.api_key_response import ApiKeyResponse from conekta.rest import ApiException @@ -233,6 +234,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -253,6 +255,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Content-Type - The format of the response body
* Conekta-Media-Type -
| @@ -272,9 +275,8 @@ Consume the list of api keys you have ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_api_keys_response import GetApiKeysResponse from conekta.rest import ApiException @@ -320,6 +322,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -343,6 +346,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Content-Type - The format of the response body
* Conekta-Media-Type -
| @@ -361,9 +365,8 @@ Update an existing api key ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.api_key_response import ApiKeyResponse from conekta.models.api_key_update_request import ApiKeyUpdateRequest @@ -407,6 +410,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -427,6 +431,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/BalanceCommonField.md b/docs/BalanceCommonField.md index 4825c16..aa1dfed 100644 --- a/docs/BalanceCommonField.md +++ b/docs/BalanceCommonField.md @@ -3,6 +3,7 @@ balance common fields model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The balance's amount | [optional] @@ -18,12 +19,12 @@ json = "{}" # create an instance of BalanceCommonField from a JSON string balance_common_field_instance = BalanceCommonField.from_json(json) # print the JSON string representation of the object -print BalanceCommonField.to_json() +print(BalanceCommonField.to_json()) # convert the object into a dict balance_common_field_dict = balance_common_field_instance.to_dict() # create an instance of BalanceCommonField from a dict -balance_common_field_form_dict = balance_common_field.from_dict(balance_common_field_dict) +balance_common_field_from_dict = BalanceCommonField.from_dict(balance_common_field_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BalanceResponse.md b/docs/BalanceResponse.md index a545c02..f918f8b 100644 --- a/docs/BalanceResponse.md +++ b/docs/BalanceResponse.md @@ -3,6 +3,7 @@ balance model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **available** | [**List[BalanceCommonField]**](BalanceCommonField.md) | The balance's available | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of BalanceResponse from a JSON string balance_response_instance = BalanceResponse.from_json(json) # print the JSON string representation of the object -print BalanceResponse.to_json() +print(BalanceResponse.to_json()) # convert the object into a dict balance_response_dict = balance_response_instance.to_dict() # create an instance of BalanceResponse from a dict -balance_response_form_dict = balance_response.from_dict(balance_response_dict) +balance_response_from_dict = BalanceResponse.from_dict(balance_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BalancesApi.md b/docs/BalancesApi.md index 9ecd2b6..6c42c11 100644 --- a/docs/BalancesApi.md +++ b/docs/BalancesApi.md @@ -17,9 +17,8 @@ Get a company's balance ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.balance_response import BalanceResponse from conekta.rest import ApiException @@ -60,6 +59,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -78,6 +78,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/BlacklistRuleResponse.md b/docs/BlacklistRuleResponse.md index ac18a86..dad65c5 100644 --- a/docs/BlacklistRuleResponse.md +++ b/docs/BlacklistRuleResponse.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Blacklist rule id | [optional] -**field** | **str** | field used for blacklists rule | [optional] +**var_field** | **str** | field used for blacklists rule | [optional] **value** | **str** | value used for blacklists rule | [optional] **description** | **str** | use an description for blacklisted rule | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of BlacklistRuleResponse from a JSON string blacklist_rule_response_instance = BlacklistRuleResponse.from_json(json) # print the JSON string representation of the object -print BlacklistRuleResponse.to_json() +print(BlacklistRuleResponse.to_json()) # convert the object into a dict blacklist_rule_response_dict = blacklist_rule_response_instance.to_dict() # create an instance of BlacklistRuleResponse from a dict -blacklist_rule_response_form_dict = blacklist_rule_response.from_dict(blacklist_rule_response_dict) +blacklist_rule_response_from_dict = BlacklistRuleResponse.from_dict(blacklist_rule_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeDataPaymentMethodBankTransferResponse.md b/docs/ChargeDataPaymentMethodBankTransferResponse.md deleted file mode 100644 index 4910cba..0000000 --- a/docs/ChargeDataPaymentMethodBankTransferResponse.md +++ /dev/null @@ -1,44 +0,0 @@ -# ChargeDataPaymentMethodBankTransferResponse - -use for bank transfer responses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bank** | **str** | | [optional] -**clabe** | **str** | | [optional] -**description** | **str** | | [optional] -**executed_at** | **int** | | [optional] -**expires_at** | **int** | | [optional] -**issuing_account_bank** | **str** | | [optional] -**issuing_account_number** | **str** | | [optional] -**issuing_account_holder_name** | **str** | | [optional] -**issuing_account_tax_id** | **str** | | [optional] -**payment_attempts** | **List[object]** | | [optional] -**receiving_account_holder_name** | **str** | | [optional] -**receiving_account_number** | **str** | | [optional] -**receiving_account_bank** | **str** | | [optional] -**receiving_account_tax_id** | **str** | | [optional] -**reference_number** | **str** | | [optional] -**tracking_code** | **str** | | [optional] - -## Example - -```python -from conekta.models.charge_data_payment_method_bank_transfer_response import ChargeDataPaymentMethodBankTransferResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ChargeDataPaymentMethodBankTransferResponse from a JSON string -charge_data_payment_method_bank_transfer_response_instance = ChargeDataPaymentMethodBankTransferResponse.from_json(json) -# print the JSON string representation of the object -print ChargeDataPaymentMethodBankTransferResponse.to_json() - -# convert the object into a dict -charge_data_payment_method_bank_transfer_response_dict = charge_data_payment_method_bank_transfer_response_instance.to_dict() -# create an instance of ChargeDataPaymentMethodBankTransferResponse from a dict -charge_data_payment_method_bank_transfer_response_form_dict = charge_data_payment_method_bank_transfer_response.from_dict(charge_data_payment_method_bank_transfer_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ChargeDataPaymentMethodCardResponse.md b/docs/ChargeDataPaymentMethodCardResponse.md deleted file mode 100644 index ec048a0..0000000 --- a/docs/ChargeDataPaymentMethodCardResponse.md +++ /dev/null @@ -1,39 +0,0 @@ -# ChargeDataPaymentMethodCardResponse - -use for card responses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_type** | **str** | | [optional] -**auth_code** | **str** | | [optional] -**brand** | **str** | | [optional] -**contract_id** | **str** | Id sent for recurrent charges. | [optional] -**country** | **str** | | [optional] -**exp_month** | **str** | | [optional] -**exp_year** | **str** | | [optional] -**fraud_indicators** | **List[object]** | | [optional] -**issuer** | **str** | | [optional] -**last4** | **str** | | [optional] -**name** | **str** | | [optional] - -## Example - -```python -from conekta.models.charge_data_payment_method_card_response import ChargeDataPaymentMethodCardResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ChargeDataPaymentMethodCardResponse from a JSON string -charge_data_payment_method_card_response_instance = ChargeDataPaymentMethodCardResponse.from_json(json) -# print the JSON string representation of the object -print ChargeDataPaymentMethodCardResponse.to_json() - -# convert the object into a dict -charge_data_payment_method_card_response_dict = charge_data_payment_method_card_response_instance.to_dict() -# create an instance of ChargeDataPaymentMethodCardResponse from a dict -charge_data_payment_method_card_response_form_dict = charge_data_payment_method_card_response.from_dict(charge_data_payment_method_card_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ChargeDataPaymentMethodCashResponse.md b/docs/ChargeDataPaymentMethodCashResponse.md deleted file mode 100644 index 19a9132..0000000 --- a/docs/ChargeDataPaymentMethodCashResponse.md +++ /dev/null @@ -1,36 +0,0 @@ -# ChargeDataPaymentMethodCashResponse - -use for cash responses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth_code** | **int** | | [optional] -**cashier_id** | **str** | | [optional] -**reference** | **str** | | [optional] -**barcode_url** | **str** | | [optional] -**expires_at** | **int** | | [optional] -**service_name** | **str** | | [optional] -**store** | **str** | | [optional] -**store_name** | **str** | | [optional] - -## Example - -```python -from conekta.models.charge_data_payment_method_cash_response import ChargeDataPaymentMethodCashResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ChargeDataPaymentMethodCashResponse from a JSON string -charge_data_payment_method_cash_response_instance = ChargeDataPaymentMethodCashResponse.from_json(json) -# print the JSON string representation of the object -print ChargeDataPaymentMethodCashResponse.to_json() - -# convert the object into a dict -charge_data_payment_method_cash_response_dict = charge_data_payment_method_cash_response_instance.to_dict() -# create an instance of ChargeDataPaymentMethodCashResponse from a dict -charge_data_payment_method_cash_response_form_dict = charge_data_payment_method_cash_response.from_dict(charge_data_payment_method_cash_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ChargeOrderResponse.md b/docs/ChargeOrderResponse.md index baf7581..da1cc13 100644 --- a/docs/ChargeOrderResponse.md +++ b/docs/ChargeOrderResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] @@ -34,12 +35,12 @@ json = "{}" # create an instance of ChargeOrderResponse from a JSON string charge_order_response_instance = ChargeOrderResponse.from_json(json) # print the JSON string representation of the object -print ChargeOrderResponse.to_json() +print(ChargeOrderResponse.to_json()) # convert the object into a dict charge_order_response_dict = charge_order_response_instance.to_dict() # create an instance of ChargeOrderResponse from a dict -charge_order_response_form_dict = charge_order_response.from_dict(charge_order_response_dict) +charge_order_response_from_dict = ChargeOrderResponse.from_dict(charge_order_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeOrderResponsePaymentMethod.md b/docs/ChargeOrderResponsePaymentMethod.md index 4500222..bd3b6db 100644 --- a/docs/ChargeOrderResponsePaymentMethod.md +++ b/docs/ChargeOrderResponsePaymentMethod.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | [optional] @@ -50,12 +51,12 @@ json = "{}" # create an instance of ChargeOrderResponsePaymentMethod from a JSON string charge_order_response_payment_method_instance = ChargeOrderResponsePaymentMethod.from_json(json) # print the JSON string representation of the object -print ChargeOrderResponsePaymentMethod.to_json() +print(ChargeOrderResponsePaymentMethod.to_json()) # convert the object into a dict charge_order_response_payment_method_dict = charge_order_response_payment_method_instance.to_dict() # create an instance of ChargeOrderResponsePaymentMethod from a dict -charge_order_response_payment_method_form_dict = charge_order_response_payment_method.from_dict(charge_order_response_payment_method_dict) +charge_order_response_payment_method_from_dict = ChargeOrderResponsePaymentMethod.from_dict(charge_order_response_payment_method_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md index 004517f..73f9b9c 100644 --- a/docs/ChargeRequest.md +++ b/docs/ChargeRequest.md @@ -3,6 +3,7 @@ The charges to be made ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of ChargeRequest from a JSON string charge_request_instance = ChargeRequest.from_json(json) # print the JSON string representation of the object -print ChargeRequest.to_json() +print(ChargeRequest.to_json()) # convert the object into a dict charge_request_dict = charge_request_instance.to_dict() # create an instance of ChargeRequest from a dict -charge_request_form_dict = charge_request.from_dict(charge_request_dict) +charge_request_from_dict = ChargeRequest.from_dict(charge_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeRequestPaymentMethod.md b/docs/ChargeRequestPaymentMethod.md index 618ad45..7400b75 100644 --- a/docs/ChargeRequestPaymentMethod.md +++ b/docs/ChargeRequestPaymentMethod.md @@ -3,6 +3,7 @@ Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **expires_at** | **int** | Method expiration date as unix timestamp | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of ChargeRequestPaymentMethod from a JSON string charge_request_payment_method_instance = ChargeRequestPaymentMethod.from_json(json) # print the JSON string representation of the object -print ChargeRequestPaymentMethod.to_json() +print(ChargeRequestPaymentMethod.to_json()) # convert the object into a dict charge_request_payment_method_dict = charge_request_payment_method_instance.to_dict() # create an instance of ChargeRequestPaymentMethod from a dict -charge_request_payment_method_form_dict = charge_request_payment_method.from_dict(charge_request_payment_method_dict) +charge_request_payment_method_from_dict = ChargeRequestPaymentMethod.from_dict(charge_request_payment_method_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeResponse.md b/docs/ChargeResponse.md index d5879bc..c8e28f3 100644 --- a/docs/ChargeResponse.md +++ b/docs/ChargeResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] @@ -33,12 +34,12 @@ json = "{}" # create an instance of ChargeResponse from a JSON string charge_response_instance = ChargeResponse.from_json(json) # print the JSON string representation of the object -print ChargeResponse.to_json() +print(ChargeResponse.to_json()) # convert the object into a dict charge_response_dict = charge_response_instance.to_dict() # create an instance of ChargeResponse from a dict -charge_response_form_dict = charge_response.from_dict(charge_response_dict) +charge_response_from_dict = ChargeResponse.from_dict(charge_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeResponseChannel.md b/docs/ChargeResponseChannel.md index 0762209..3fb2997 100644 --- a/docs/ChargeResponseChannel.md +++ b/docs/ChargeResponseChannel.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **segment** | **str** | | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of ChargeResponseChannel from a JSON string charge_response_channel_instance = ChargeResponseChannel.from_json(json) # print the JSON string representation of the object -print ChargeResponseChannel.to_json() +print(ChargeResponseChannel.to_json()) # convert the object into a dict charge_response_channel_dict = charge_response_channel_instance.to_dict() # create an instance of ChargeResponseChannel from a dict -charge_response_channel_form_dict = charge_response_channel.from_dict(charge_response_channel_dict) +charge_response_channel_from_dict = ChargeResponseChannel.from_dict(charge_response_channel_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeResponsePaymentMethod.md b/docs/ChargeResponsePaymentMethod.md index 204fd00..a91d84a 100644 --- a/docs/ChargeResponsePaymentMethod.md +++ b/docs/ChargeResponsePaymentMethod.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | [optional] @@ -50,12 +51,12 @@ json = "{}" # create an instance of ChargeResponsePaymentMethod from a JSON string charge_response_payment_method_instance = ChargeResponsePaymentMethod.from_json(json) # print the JSON string representation of the object -print ChargeResponsePaymentMethod.to_json() +print(ChargeResponsePaymentMethod.to_json()) # convert the object into a dict charge_response_payment_method_dict = charge_response_payment_method_instance.to_dict() # create an instance of ChargeResponsePaymentMethod from a dict -charge_response_payment_method_form_dict = charge_response_payment_method.from_dict(charge_response_payment_method_dict) +charge_response_payment_method_from_dict = ChargeResponsePaymentMethod.from_dict(charge_response_payment_method_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeResponseRefunds.md b/docs/ChargeResponseRefunds.md index 7d203f1..7c946d8 100644 --- a/docs/ChargeResponseRefunds.md +++ b/docs/ChargeResponseRefunds.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of ChargeResponseRefunds from a JSON string charge_response_refunds_instance = ChargeResponseRefunds.from_json(json) # print the JSON string representation of the object -print ChargeResponseRefunds.to_json() +print(ChargeResponseRefunds.to_json()) # convert the object into a dict charge_response_refunds_dict = charge_response_refunds_instance.to_dict() # create an instance of ChargeResponseRefunds from a dict -charge_response_refunds_form_dict = charge_response_refunds.from_dict(charge_response_refunds_dict) +charge_response_refunds_from_dict = ChargeResponseRefunds.from_dict(charge_response_refunds_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeResponseRefundsAllOf.md b/docs/ChargeResponseRefundsAllOf.md deleted file mode 100644 index 9a34390..0000000 --- a/docs/ChargeResponseRefundsAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# ChargeResponseRefundsAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ChargeResponseRefundsData]**](ChargeResponseRefundsData.md) | refunds | [optional] - -## Example - -```python -from conekta.models.charge_response_refunds_all_of import ChargeResponseRefundsAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of ChargeResponseRefundsAllOf from a JSON string -charge_response_refunds_all_of_instance = ChargeResponseRefundsAllOf.from_json(json) -# print the JSON string representation of the object -print ChargeResponseRefundsAllOf.to_json() - -# convert the object into a dict -charge_response_refunds_all_of_dict = charge_response_refunds_all_of_instance.to_dict() -# create an instance of ChargeResponseRefundsAllOf from a dict -charge_response_refunds_all_of_form_dict = charge_response_refunds_all_of.from_dict(charge_response_refunds_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ChargeResponseRefundsData.md b/docs/ChargeResponseRefundsData.md index 588872d..aa993b3 100644 --- a/docs/ChargeResponseRefundsData.md +++ b/docs/ChargeResponseRefundsData.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | @@ -22,12 +23,12 @@ json = "{}" # create an instance of ChargeResponseRefundsData from a JSON string charge_response_refunds_data_instance = ChargeResponseRefundsData.from_json(json) # print the JSON string representation of the object -print ChargeResponseRefundsData.to_json() +print(ChargeResponseRefundsData.to_json()) # convert the object into a dict charge_response_refunds_data_dict = charge_response_refunds_data_instance.to_dict() # create an instance of ChargeResponseRefundsData from a dict -charge_response_refunds_data_form_dict = charge_response_refunds_data.from_dict(charge_response_refunds_data_dict) +charge_response_refunds_data_from_dict = ChargeResponseRefundsData.from_dict(charge_response_refunds_data_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargeUpdateRequest.md b/docs/ChargeUpdateRequest.md index f1f51f8..45efbb0 100644 --- a/docs/ChargeUpdateRequest.md +++ b/docs/ChargeUpdateRequest.md @@ -3,6 +3,7 @@ requested field for update a charge ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **reference_id** | **str** | custom reference id | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of ChargeUpdateRequest from a JSON string charge_update_request_instance = ChargeUpdateRequest.from_json(json) # print the JSON string representation of the object -print ChargeUpdateRequest.to_json() +print(ChargeUpdateRequest.to_json()) # convert the object into a dict charge_update_request_dict = charge_update_request_instance.to_dict() # create an instance of ChargeUpdateRequest from a dict -charge_update_request_form_dict = charge_update_request.from_dict(charge_update_request_dict) +charge_update_request_from_dict = ChargeUpdateRequest.from_dict(charge_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChargesApi.md b/docs/ChargesApi.md index 220721d..3bd5549 100644 --- a/docs/ChargesApi.md +++ b/docs/ChargesApi.md @@ -17,9 +17,8 @@ Get A List of Charges ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_charges_response import GetChargesResponse from conekta.rest import ApiException @@ -65,6 +64,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -106,9 +107,8 @@ Create charge for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.charge_order_response import ChargeOrderResponse from conekta.models.charge_request import ChargeRequest @@ -153,6 +153,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -174,6 +175,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -192,9 +194,8 @@ Update a charge ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.charge_response import ChargeResponse from conekta.models.charge_update_request import ChargeUpdateRequest @@ -239,6 +240,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -260,6 +262,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/ChargesDataResponse.md b/docs/ChargesDataResponse.md index 22bf0e6..324cc0a 100644 --- a/docs/ChargesDataResponse.md +++ b/docs/ChargesDataResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] @@ -33,12 +34,12 @@ json = "{}" # create an instance of ChargesDataResponse from a JSON string charges_data_response_instance = ChargesDataResponse.from_json(json) # print the JSON string representation of the object -print ChargesDataResponse.to_json() +print(ChargesDataResponse.to_json()) # convert the object into a dict charges_data_response_dict = charges_data_response_instance.to_dict() # create an instance of ChargesDataResponse from a dict -charges_data_response_form_dict = charges_data_response.from_dict(charges_data_response_dict) +charges_data_response_from_dict = ChargesDataResponse.from_dict(charges_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Checkout.md b/docs/Checkout.md index 8296f9b..3a92e3d 100644 --- a/docs/Checkout.md +++ b/docs/Checkout.md @@ -3,6 +3,7 @@ It is a sub-resource of the Order model that can be stipulated in order to configure its corresponding checkout ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowed_payment_methods** | **List[str]** | Those are the payment methods that will be available for the link | @@ -27,12 +28,12 @@ json = "{}" # create an instance of Checkout from a JSON string checkout_instance = Checkout.from_json(json) # print the JSON string representation of the object -print Checkout.to_json() +print(Checkout.to_json()) # convert the object into a dict checkout_dict = checkout_instance.to_dict() # create an instance of Checkout from a dict -checkout_form_dict = checkout.from_dict(checkout_dict) +checkout_from_dict = Checkout.from_dict(checkout_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutOrderTemplate.md b/docs/CheckoutOrderTemplate.md index 58121eb..7b84fe4 100644 --- a/docs/CheckoutOrderTemplate.md +++ b/docs/CheckoutOrderTemplate.md @@ -3,6 +3,7 @@ It maintains the attributes with which the order will be created when receiving a new payment. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currency** | **str** | It is the currency in which the order will be created. It must be a valid ISO 4217 currency code. | @@ -20,12 +21,12 @@ json = "{}" # create an instance of CheckoutOrderTemplate from a JSON string checkout_order_template_instance = CheckoutOrderTemplate.from_json(json) # print the JSON string representation of the object -print CheckoutOrderTemplate.to_json() +print(CheckoutOrderTemplate.to_json()) # convert the object into a dict checkout_order_template_dict = checkout_order_template_instance.to_dict() # create an instance of CheckoutOrderTemplate from a dict -checkout_order_template_form_dict = checkout_order_template.from_dict(checkout_order_template_dict) +checkout_order_template_from_dict = CheckoutOrderTemplate.from_dict(checkout_order_template_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutOrderTemplateCustomerInfo.md b/docs/CheckoutOrderTemplateCustomerInfo.md index bd489d0..310b3fd 100644 --- a/docs/CheckoutOrderTemplateCustomerInfo.md +++ b/docs/CheckoutOrderTemplateCustomerInfo.md @@ -3,6 +3,7 @@ It is the information of the customer who will be created when receiving a new payment. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | @@ -22,12 +23,12 @@ json = "{}" # create an instance of CheckoutOrderTemplateCustomerInfo from a JSON string checkout_order_template_customer_info_instance = CheckoutOrderTemplateCustomerInfo.from_json(json) # print the JSON string representation of the object -print CheckoutOrderTemplateCustomerInfo.to_json() +print(CheckoutOrderTemplateCustomerInfo.to_json()) # convert the object into a dict checkout_order_template_customer_info_dict = checkout_order_template_customer_info_instance.to_dict() # create an instance of CheckoutOrderTemplateCustomerInfo from a dict -checkout_order_template_customer_info_form_dict = checkout_order_template_customer_info.from_dict(checkout_order_template_customer_info_dict) +checkout_order_template_customer_info_from_dict = CheckoutOrderTemplateCustomerInfo.from_dict(checkout_order_template_customer_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutRequest.md b/docs/CheckoutRequest.md index f37eb80..71cd1ec 100644 --- a/docs/CheckoutRequest.md +++ b/docs/CheckoutRequest.md @@ -3,6 +3,7 @@ [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowed_payment_methods** | **List[str]** | Are the payment methods available for this link | @@ -12,6 +13,7 @@ Name | Type | Description | Notes **monthly_installments_options** | **List[int]** | | [optional] **name** | **str** | Reason for payment | [optional] **on_demand_enabled** | **bool** | | [optional] +**redirection_time** | **int** | number of seconds to wait before redirecting to the success_url | [optional] **success_url** | **str** | Redirection url back to the site in case of successful payment, applies only to HostedPayment | [optional] **type** | **str** | This field represents the type of checkout | [optional] @@ -25,12 +27,12 @@ json = "{}" # create an instance of CheckoutRequest from a JSON string checkout_request_instance = CheckoutRequest.from_json(json) # print the JSON string representation of the object -print CheckoutRequest.to_json() +print(CheckoutRequest.to_json()) # convert the object into a dict checkout_request_dict = checkout_request_instance.to_dict() # create an instance of CheckoutRequest from a dict -checkout_request_form_dict = checkout_request.from_dict(checkout_request_dict) +checkout_request_from_dict = CheckoutRequest.from_dict(checkout_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutResponse.md b/docs/CheckoutResponse.md index dd776b0..52a463b 100644 --- a/docs/CheckoutResponse.md +++ b/docs/CheckoutResponse.md @@ -3,6 +3,7 @@ checkout response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowed_payment_methods** | **List[str]** | | [optional] @@ -41,12 +42,12 @@ json = "{}" # create an instance of CheckoutResponse from a JSON string checkout_response_instance = CheckoutResponse.from_json(json) # print the JSON string representation of the object -print CheckoutResponse.to_json() +print(CheckoutResponse.to_json()) # convert the object into a dict checkout_response_dict = checkout_response_instance.to_dict() # create an instance of CheckoutResponse from a dict -checkout_response_form_dict = checkout_response.from_dict(checkout_response_dict) +checkout_response_from_dict = CheckoutResponse.from_dict(checkout_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutsResponse.md b/docs/CheckoutsResponse.md index a8b40bb..1207807 100644 --- a/docs/CheckoutsResponse.md +++ b/docs/CheckoutsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of CheckoutsResponse from a JSON string checkouts_response_instance = CheckoutsResponse.from_json(json) # print the JSON string representation of the object -print CheckoutsResponse.to_json() +print(CheckoutsResponse.to_json()) # convert the object into a dict checkouts_response_dict = checkouts_response_instance.to_dict() # create an instance of CheckoutsResponse from a dict -checkouts_response_form_dict = checkouts_response.from_dict(checkouts_response_dict) +checkouts_response_from_dict = CheckoutsResponse.from_dict(checkouts_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CheckoutsResponseAllOf.md b/docs/CheckoutsResponseAllOf.md deleted file mode 100644 index 45745f0..0000000 --- a/docs/CheckoutsResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# CheckoutsResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CheckoutResponse]**](CheckoutResponse.md) | | [optional] - -## Example - -```python -from conekta.models.checkouts_response_all_of import CheckoutsResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CheckoutsResponseAllOf from a JSON string -checkouts_response_all_of_instance = CheckoutsResponseAllOf.from_json(json) -# print the JSON string representation of the object -print CheckoutsResponseAllOf.to_json() - -# convert the object into a dict -checkouts_response_all_of_dict = checkouts_response_all_of_instance.to_dict() -# create an instance of CheckoutsResponseAllOf from a dict -checkouts_response_all_of_form_dict = checkouts_response_all_of.from_dict(checkouts_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CompaniesApi.md b/docs/CompaniesApi.md index d654bf2..15fa03f 100644 --- a/docs/CompaniesApi.md +++ b/docs/CompaniesApi.md @@ -18,9 +18,8 @@ Consume the list of child companies. This is used for holding companies with se ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_companies_response import GetCompaniesResponse from conekta.rest import ApiException @@ -65,6 +64,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -103,9 +104,8 @@ Get Company ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.company_response import CompanyResponse from conekta.rest import ApiException @@ -147,6 +147,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -166,6 +167,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/CompanyFiscalInfoAddressResponse.md b/docs/CompanyFiscalInfoAddressResponse.md index 26f2924..a57161a 100644 --- a/docs/CompanyFiscalInfoAddressResponse.md +++ b/docs/CompanyFiscalInfoAddressResponse.md @@ -3,6 +3,7 @@ Company fiscal info address model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **str** | The resource's type | [optional] @@ -25,12 +26,12 @@ json = "{}" # create an instance of CompanyFiscalInfoAddressResponse from a JSON string company_fiscal_info_address_response_instance = CompanyFiscalInfoAddressResponse.from_json(json) # print the JSON string representation of the object -print CompanyFiscalInfoAddressResponse.to_json() +print(CompanyFiscalInfoAddressResponse.to_json()) # convert the object into a dict company_fiscal_info_address_response_dict = company_fiscal_info_address_response_instance.to_dict() # create an instance of CompanyFiscalInfoAddressResponse from a dict -company_fiscal_info_address_response_form_dict = company_fiscal_info_address_response.from_dict(company_fiscal_info_address_response_dict) +company_fiscal_info_address_response_from_dict = CompanyFiscalInfoAddressResponse.from_dict(company_fiscal_info_address_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CompanyFiscalInfoResponse.md b/docs/CompanyFiscalInfoResponse.md index c5fb882..3c95cc9 100644 --- a/docs/CompanyFiscalInfoResponse.md +++ b/docs/CompanyFiscalInfoResponse.md @@ -3,6 +3,7 @@ Company fiscal info model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **str** | The resource's type | [optional] @@ -23,12 +24,12 @@ json = "{}" # create an instance of CompanyFiscalInfoResponse from a JSON string company_fiscal_info_response_instance = CompanyFiscalInfoResponse.from_json(json) # print the JSON string representation of the object -print CompanyFiscalInfoResponse.to_json() +print(CompanyFiscalInfoResponse.to_json()) # convert the object into a dict company_fiscal_info_response_dict = company_fiscal_info_response_instance.to_dict() # create an instance of CompanyFiscalInfoResponse from a dict -company_fiscal_info_response_form_dict = company_fiscal_info_response.from_dict(company_fiscal_info_response_dict) +company_fiscal_info_response_from_dict = CompanyFiscalInfoResponse.from_dict(company_fiscal_info_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CompanyPayoutDestinationResponse.md b/docs/CompanyPayoutDestinationResponse.md index 2751ddd..9997c58 100644 --- a/docs/CompanyPayoutDestinationResponse.md +++ b/docs/CompanyPayoutDestinationResponse.md @@ -3,6 +3,7 @@ Company payout destination model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **str** | The resource's type | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of CompanyPayoutDestinationResponse from a JSON string company_payout_destination_response_instance = CompanyPayoutDestinationResponse.from_json(json) # print the JSON string representation of the object -print CompanyPayoutDestinationResponse.to_json() +print(CompanyPayoutDestinationResponse.to_json()) # convert the object into a dict company_payout_destination_response_dict = company_payout_destination_response_instance.to_dict() # create an instance of CompanyPayoutDestinationResponse from a dict -company_payout_destination_response_form_dict = company_payout_destination_response.from_dict(company_payout_destination_response_dict) +company_payout_destination_response_from_dict = CompanyPayoutDestinationResponse.from_dict(company_payout_destination_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CompanyResponse.md b/docs/CompanyResponse.md index 0d7ae37..c1c7427 100644 --- a/docs/CompanyResponse.md +++ b/docs/CompanyResponse.md @@ -3,6 +3,7 @@ Company model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | The child company's unique identifier | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of CompanyResponse from a JSON string company_response_instance = CompanyResponse.from_json(json) # print the JSON string representation of the object -print CompanyResponse.to_json() +print(CompanyResponse.to_json()) # convert the object into a dict company_response_dict = company_response_instance.to_dict() # create an instance of CompanyResponse from a dict -company_response_form_dict = company_response.from_dict(company_response_dict) +company_response_from_dict = CompanyResponse.from_dict(company_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerFiscalEntitiesResponse.md b/docs/CreateCustomerFiscalEntitiesResponse.md index bf710fd..3002b7c 100644 --- a/docs/CreateCustomerFiscalEntitiesResponse.md +++ b/docs/CreateCustomerFiscalEntitiesResponse.md @@ -2,9 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**address** | [**CustomerAddress**](CustomerAddress.md) | | **tax_id** | **str** | | [optional] **email** | **str** | | [optional] **phone** | **str** | | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of CreateCustomerFiscalEntitiesResponse from a JSON string create_customer_fiscal_entities_response_instance = CreateCustomerFiscalEntitiesResponse.from_json(json) # print the JSON string representation of the object -print CreateCustomerFiscalEntitiesResponse.to_json() +print(CreateCustomerFiscalEntitiesResponse.to_json()) # convert the object into a dict create_customer_fiscal_entities_response_dict = create_customer_fiscal_entities_response_instance.to_dict() # create an instance of CreateCustomerFiscalEntitiesResponse from a dict -create_customer_fiscal_entities_response_form_dict = create_customer_fiscal_entities_response.from_dict(create_customer_fiscal_entities_response_dict) +create_customer_fiscal_entities_response_from_dict = CreateCustomerFiscalEntitiesResponse.from_dict(create_customer_fiscal_entities_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerFiscalEntitiesResponseAllOf.md b/docs/CreateCustomerFiscalEntitiesResponseAllOf.md deleted file mode 100644 index 6cbce2f..0000000 --- a/docs/CreateCustomerFiscalEntitiesResponseAllOf.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateCustomerFiscalEntitiesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**object** | **str** | | -**created_at** | **int** | | -**parent_id** | **str** | | [optional] -**default** | **bool** | | [optional] - -## Example - -```python -from conekta.models.create_customer_fiscal_entities_response_all_of import CreateCustomerFiscalEntitiesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateCustomerFiscalEntitiesResponseAllOf from a JSON string -create_customer_fiscal_entities_response_all_of_instance = CreateCustomerFiscalEntitiesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print CreateCustomerFiscalEntitiesResponseAllOf.to_json() - -# convert the object into a dict -create_customer_fiscal_entities_response_all_of_dict = create_customer_fiscal_entities_response_all_of_instance.to_dict() -# create an instance of CreateCustomerFiscalEntitiesResponseAllOf from a dict -create_customer_fiscal_entities_response_all_of_form_dict = create_customer_fiscal_entities_response_all_of.from_dict(create_customer_fiscal_entities_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateCustomerPaymentMethodsRequest.md b/docs/CreateCustomerPaymentMethodsRequest.md index fdee590..f602602 100644 --- a/docs/CreateCustomerPaymentMethodsRequest.md +++ b/docs/CreateCustomerPaymentMethodsRequest.md @@ -3,6 +3,7 @@ Contains details of the payment methods that the customer has active or has used in Conekta ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of payment method | @@ -19,12 +20,12 @@ json = "{}" # create an instance of CreateCustomerPaymentMethodsRequest from a JSON string create_customer_payment_methods_request_instance = CreateCustomerPaymentMethodsRequest.from_json(json) # print the JSON string representation of the object -print CreateCustomerPaymentMethodsRequest.to_json() +print(CreateCustomerPaymentMethodsRequest.to_json()) # convert the object into a dict create_customer_payment_methods_request_dict = create_customer_payment_methods_request_instance.to_dict() # create an instance of CreateCustomerPaymentMethodsRequest from a dict -create_customer_payment_methods_request_form_dict = create_customer_payment_methods_request.from_dict(create_customer_payment_methods_request_dict) +create_customer_payment_methods_request_from_dict = CreateCustomerPaymentMethodsRequest.from_dict(create_customer_payment_methods_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateCustomerPaymentMethodsResponse.md b/docs/CreateCustomerPaymentMethodsResponse.md index e5a149b..779f048 100644 --- a/docs/CreateCustomerPaymentMethodsResponse.md +++ b/docs/CreateCustomerPaymentMethodsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -35,12 +36,12 @@ json = "{}" # create an instance of CreateCustomerPaymentMethodsResponse from a JSON string create_customer_payment_methods_response_instance = CreateCustomerPaymentMethodsResponse.from_json(json) # print the JSON string representation of the object -print CreateCustomerPaymentMethodsResponse.to_json() +print(CreateCustomerPaymentMethodsResponse.to_json()) # convert the object into a dict create_customer_payment_methods_response_dict = create_customer_payment_methods_response_instance.to_dict() # create an instance of CreateCustomerPaymentMethodsResponse from a dict -create_customer_payment_methods_response_form_dict = create_customer_payment_methods_response.from_dict(create_customer_payment_methods_response_dict) +create_customer_payment_methods_response_from_dict = CreateCustomerPaymentMethodsResponse.from_dict(create_customer_payment_methods_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateRiskRulesData.md b/docs/CreateRiskRulesData.md index c80ae12..7279f8c 100644 --- a/docs/CreateRiskRulesData.md +++ b/docs/CreateRiskRulesData.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **str** | Description of the rule | -**field** | **str** | Field to be used for the rule | +**var_field** | **str** | Field to be used for the rule | **value** | **str** | Value to be used for the rule | ## Example @@ -18,12 +19,12 @@ json = "{}" # create an instance of CreateRiskRulesData from a JSON string create_risk_rules_data_instance = CreateRiskRulesData.from_json(json) # print the JSON string representation of the object -print CreateRiskRulesData.to_json() +print(CreateRiskRulesData.to_json()) # convert the object into a dict create_risk_rules_data_dict = create_risk_rules_data_instance.to_dict() # create an instance of CreateRiskRulesData from a dict -create_risk_rules_data_form_dict = create_risk_rules_data.from_dict(create_risk_rules_data_dict) +create_risk_rules_data_from_dict = CreateRiskRulesData.from_dict(create_risk_rules_data_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Customer.md b/docs/Customer.md index 1beb832..639948b 100644 --- a/docs/Customer.md +++ b/docs/Customer.md @@ -3,6 +3,7 @@ a customer ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | [**CustomerAntifraudInfo**](CustomerAntifraudInfo.md) | | [optional] @@ -30,12 +31,12 @@ json = "{}" # create an instance of Customer from a JSON string customer_instance = Customer.from_json(json) # print the JSON string representation of the object -print Customer.to_json() +print(Customer.to_json()) # convert the object into a dict customer_dict = customer_instance.to_dict() # create an instance of Customer from a dict -customer_form_dict = customer.from_dict(customer_dict) +customer_from_dict = Customer.from_dict(customer_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerAddress.md b/docs/CustomerAddress.md index 5ea1fb7..cf7aec8 100644 --- a/docs/CustomerAddress.md +++ b/docs/CustomerAddress.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **street1** | **str** | | @@ -23,12 +24,12 @@ json = "{}" # create an instance of CustomerAddress from a JSON string customer_address_instance = CustomerAddress.from_json(json) # print the JSON string representation of the object -print CustomerAddress.to_json() +print(CustomerAddress.to_json()) # convert the object into a dict customer_address_dict = customer_address_instance.to_dict() # create an instance of CustomerAddress from a dict -customer_address_form_dict = customer_address.from_dict(customer_address_dict) +customer_address_from_dict = CustomerAddress.from_dict(customer_address_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerAntifraudInfo.md b/docs/CustomerAntifraudInfo.md index 2b0f770..0ee34b1 100644 --- a/docs/CustomerAntifraudInfo.md +++ b/docs/CustomerAntifraudInfo.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_created_at** | **int** | | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of CustomerAntifraudInfo from a JSON string customer_antifraud_info_instance = CustomerAntifraudInfo.from_json(json) # print the JSON string representation of the object -print CustomerAntifraudInfo.to_json() +print(CustomerAntifraudInfo.to_json()) # convert the object into a dict customer_antifraud_info_dict = customer_antifraud_info_instance.to_dict() # create an instance of CustomerAntifraudInfo from a dict -customer_antifraud_info_form_dict = customer_antifraud_info.from_dict(customer_antifraud_info_dict) +customer_antifraud_info_from_dict = CustomerAntifraudInfo.from_dict(customer_antifraud_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerAntifraudInfoResponse.md b/docs/CustomerAntifraudInfoResponse.md index 6092484..6c64336 100644 --- a/docs/CustomerAntifraudInfoResponse.md +++ b/docs/CustomerAntifraudInfoResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **first_paid_at** | **int** | | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of CustomerAntifraudInfoResponse from a JSON string customer_antifraud_info_response_instance = CustomerAntifraudInfoResponse.from_json(json) # print the JSON string representation of the object -print CustomerAntifraudInfoResponse.to_json() +print(CustomerAntifraudInfoResponse.to_json()) # convert the object into a dict customer_antifraud_info_response_dict = customer_antifraud_info_response_instance.to_dict() # create an instance of CustomerAntifraudInfoResponse from a dict -customer_antifraud_info_response_form_dict = customer_antifraud_info_response.from_dict(customer_antifraud_info_response_dict) +customer_antifraud_info_response_from_dict = CustomerAntifraudInfoResponse.from_dict(customer_antifraud_info_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerFiscalEntitiesDataResponse.md b/docs/CustomerFiscalEntitiesDataResponse.md index 7e66e06..6859c7f 100644 --- a/docs/CustomerFiscalEntitiesDataResponse.md +++ b/docs/CustomerFiscalEntitiesDataResponse.md @@ -2,9 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**address** | [**CustomerAddress**](CustomerAddress.md) | | **tax_id** | **str** | | [optional] **email** | **str** | | [optional] **phone** | **str** | | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of CustomerFiscalEntitiesDataResponse from a JSON string customer_fiscal_entities_data_response_instance = CustomerFiscalEntitiesDataResponse.from_json(json) # print the JSON string representation of the object -print CustomerFiscalEntitiesDataResponse.to_json() +print(CustomerFiscalEntitiesDataResponse.to_json()) # convert the object into a dict customer_fiscal_entities_data_response_dict = customer_fiscal_entities_data_response_instance.to_dict() # create an instance of CustomerFiscalEntitiesDataResponse from a dict -customer_fiscal_entities_data_response_form_dict = customer_fiscal_entities_data_response.from_dict(customer_fiscal_entities_data_response_dict) +customer_fiscal_entities_data_response_from_dict = CustomerFiscalEntitiesDataResponse.from_dict(customer_fiscal_entities_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerFiscalEntitiesRequest.md b/docs/CustomerFiscalEntitiesRequest.md index 88dc586..3038527 100644 --- a/docs/CustomerFiscalEntitiesRequest.md +++ b/docs/CustomerFiscalEntitiesRequest.md @@ -2,9 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**address** | [**CustomerAddress**](CustomerAddress.md) | | **tax_id** | **str** | | [optional] **email** | **str** | | [optional] **phone** | **str** | | [optional] @@ -21,12 +22,12 @@ json = "{}" # create an instance of CustomerFiscalEntitiesRequest from a JSON string customer_fiscal_entities_request_instance = CustomerFiscalEntitiesRequest.from_json(json) # print the JSON string representation of the object -print CustomerFiscalEntitiesRequest.to_json() +print(CustomerFiscalEntitiesRequest.to_json()) # convert the object into a dict customer_fiscal_entities_request_dict = customer_fiscal_entities_request_instance.to_dict() # create an instance of CustomerFiscalEntitiesRequest from a dict -customer_fiscal_entities_request_form_dict = customer_fiscal_entities_request.from_dict(customer_fiscal_entities_request_dict) +customer_fiscal_entities_request_from_dict = CustomerFiscalEntitiesRequest.from_dict(customer_fiscal_entities_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerFiscalEntitiesRequestAddress.md b/docs/CustomerFiscalEntitiesRequestAddress.md deleted file mode 100644 index b08c2c8..0000000 --- a/docs/CustomerFiscalEntitiesRequestAddress.md +++ /dev/null @@ -1,35 +0,0 @@ -# CustomerFiscalEntitiesRequestAddress - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**street1** | **str** | | -**street2** | **str** | | [optional] -**postal_code** | **str** | | -**city** | **str** | | -**state** | **str** | | [optional] -**country** | **str** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**residential** | **bool** | | [optional] [default to False] -**external_number** | **str** | | [optional] - -## Example - -```python -from conekta.models.customer_fiscal_entities_request_address import CustomerFiscalEntitiesRequestAddress - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomerFiscalEntitiesRequestAddress from a JSON string -customer_fiscal_entities_request_address_instance = CustomerFiscalEntitiesRequestAddress.from_json(json) -# print the JSON string representation of the object -print CustomerFiscalEntitiesRequestAddress.to_json() - -# convert the object into a dict -customer_fiscal_entities_request_address_dict = customer_fiscal_entities_request_address_instance.to_dict() -# create an instance of CustomerFiscalEntitiesRequestAddress from a dict -customer_fiscal_entities_request_address_form_dict = customer_fiscal_entities_request_address.from_dict(customer_fiscal_entities_request_address_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CustomerFiscalEntitiesResponse.md b/docs/CustomerFiscalEntitiesResponse.md index 28d8e98..72ddf6c 100644 --- a/docs/CustomerFiscalEntitiesResponse.md +++ b/docs/CustomerFiscalEntitiesResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -18,12 +19,12 @@ json = "{}" # create an instance of CustomerFiscalEntitiesResponse from a JSON string customer_fiscal_entities_response_instance = CustomerFiscalEntitiesResponse.from_json(json) # print the JSON string representation of the object -print CustomerFiscalEntitiesResponse.to_json() +print(CustomerFiscalEntitiesResponse.to_json()) # convert the object into a dict customer_fiscal_entities_response_dict = customer_fiscal_entities_response_instance.to_dict() # create an instance of CustomerFiscalEntitiesResponse from a dict -customer_fiscal_entities_response_form_dict = customer_fiscal_entities_response.from_dict(customer_fiscal_entities_response_dict) +customer_fiscal_entities_response_from_dict = CustomerFiscalEntitiesResponse.from_dict(customer_fiscal_entities_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerFiscalEntitiesResponseAllOf.md b/docs/CustomerFiscalEntitiesResponseAllOf.md deleted file mode 100644 index ad7d33a..0000000 --- a/docs/CustomerFiscalEntitiesResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# CustomerFiscalEntitiesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CustomerFiscalEntitiesDataResponse]**](CustomerFiscalEntitiesDataResponse.md) | | [optional] - -## Example - -```python -from conekta.models.customer_fiscal_entities_response_all_of import CustomerFiscalEntitiesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomerFiscalEntitiesResponseAllOf from a JSON string -customer_fiscal_entities_response_all_of_instance = CustomerFiscalEntitiesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print CustomerFiscalEntitiesResponseAllOf.to_json() - -# convert the object into a dict -customer_fiscal_entities_response_all_of_dict = customer_fiscal_entities_response_all_of_instance.to_dict() -# create an instance of CustomerFiscalEntitiesResponseAllOf from a dict -customer_fiscal_entities_response_all_of_form_dict = customer_fiscal_entities_response_all_of.from_dict(customer_fiscal_entities_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CustomerInfo.md b/docs/CustomerInfo.md index 926bd1b..5b3fe13 100644 --- a/docs/CustomerInfo.md +++ b/docs/CustomerInfo.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | @@ -20,12 +21,12 @@ json = "{}" # create an instance of CustomerInfo from a JSON string customer_info_instance = CustomerInfo.from_json(json) # print the JSON string representation of the object -print CustomerInfo.to_json() +print(CustomerInfo.to_json()) # convert the object into a dict customer_info_dict = customer_info_instance.to_dict() # create an instance of CustomerInfo from a dict -customer_info_form_dict = customer_info.from_dict(customer_info_dict) +customer_info_from_dict = CustomerInfo.from_dict(customer_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerInfoJustCustomerId.md b/docs/CustomerInfoJustCustomerId.md index 3f2c476..cfd0f3d 100644 --- a/docs/CustomerInfoJustCustomerId.md +++ b/docs/CustomerInfoJustCustomerId.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | **str** | | @@ -16,12 +17,12 @@ json = "{}" # create an instance of CustomerInfoJustCustomerId from a JSON string customer_info_just_customer_id_instance = CustomerInfoJustCustomerId.from_json(json) # print the JSON string representation of the object -print CustomerInfoJustCustomerId.to_json() +print(CustomerInfoJustCustomerId.to_json()) # convert the object into a dict customer_info_just_customer_id_dict = customer_info_just_customer_id_instance.to_dict() # create an instance of CustomerInfoJustCustomerId from a dict -customer_info_just_customer_id_form_dict = customer_info_just_customer_id.from_dict(customer_info_just_customer_id_dict) +customer_info_just_customer_id_from_dict = CustomerInfoJustCustomerId.from_dict(customer_info_just_customer_id_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerInfoJustCustomerIdResponse.md b/docs/CustomerInfoJustCustomerIdResponse.md index 6854059..6e80560 100644 --- a/docs/CustomerInfoJustCustomerIdResponse.md +++ b/docs/CustomerInfoJustCustomerIdResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_id** | **str** | | [optional] @@ -16,12 +17,12 @@ json = "{}" # create an instance of CustomerInfoJustCustomerIdResponse from a JSON string customer_info_just_customer_id_response_instance = CustomerInfoJustCustomerIdResponse.from_json(json) # print the JSON string representation of the object -print CustomerInfoJustCustomerIdResponse.to_json() +print(CustomerInfoJustCustomerIdResponse.to_json()) # convert the object into a dict customer_info_just_customer_id_response_dict = customer_info_just_customer_id_response_instance.to_dict() # create an instance of CustomerInfoJustCustomerIdResponse from a dict -customer_info_just_customer_id_response_form_dict = customer_info_just_customer_id_response.from_dict(customer_info_just_customer_id_response_dict) +customer_info_just_customer_id_response_from_dict = CustomerInfoJustCustomerIdResponse.from_dict(customer_info_just_customer_id_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerPaymentMethodRequest.md b/docs/CustomerPaymentMethodRequest.md index 967c684..5b56dda 100644 --- a/docs/CustomerPaymentMethodRequest.md +++ b/docs/CustomerPaymentMethodRequest.md @@ -3,6 +3,7 @@ Contains details of the payment methods that the customer has active or has used in Conekta ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of payment method | @@ -17,12 +18,12 @@ json = "{}" # create an instance of CustomerPaymentMethodRequest from a JSON string customer_payment_method_request_instance = CustomerPaymentMethodRequest.from_json(json) # print the JSON string representation of the object -print CustomerPaymentMethodRequest.to_json() +print(CustomerPaymentMethodRequest.to_json()) # convert the object into a dict customer_payment_method_request_dict = customer_payment_method_request_instance.to_dict() # create an instance of CustomerPaymentMethodRequest from a dict -customer_payment_method_request_form_dict = customer_payment_method_request.from_dict(customer_payment_method_request_dict) +customer_payment_method_request_from_dict = CustomerPaymentMethodRequest.from_dict(customer_payment_method_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerPaymentMethods.md b/docs/CustomerPaymentMethods.md deleted file mode 100644 index 471b9bf..0000000 --- a/docs/CustomerPaymentMethods.md +++ /dev/null @@ -1,28 +0,0 @@ -# CustomerPaymentMethods - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CustomerPaymentMethodsData]**](CustomerPaymentMethodsData.md) | | [optional] - -## Example - -```python -from conekta.models.customer_payment_methods import CustomerPaymentMethods - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomerPaymentMethods from a JSON string -customer_payment_methods_instance = CustomerPaymentMethods.from_json(json) -# print the JSON string representation of the object -print CustomerPaymentMethods.to_json() - -# convert the object into a dict -customer_payment_methods_dict = customer_payment_methods_instance.to_dict() -# create an instance of CustomerPaymentMethods from a dict -customer_payment_methods_form_dict = customer_payment_methods.from_dict(customer_payment_methods_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CustomerPaymentMethodsData.md b/docs/CustomerPaymentMethodsData.md index 8724ca9..0197451 100644 --- a/docs/CustomerPaymentMethodsData.md +++ b/docs/CustomerPaymentMethodsData.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -35,12 +36,12 @@ json = "{}" # create an instance of CustomerPaymentMethodsData from a JSON string customer_payment_methods_data_instance = CustomerPaymentMethodsData.from_json(json) # print the JSON string representation of the object -print CustomerPaymentMethodsData.to_json() +print(CustomerPaymentMethodsData.to_json()) # convert the object into a dict customer_payment_methods_data_dict = customer_payment_methods_data_instance.to_dict() # create an instance of CustomerPaymentMethodsData from a dict -customer_payment_methods_data_form_dict = customer_payment_methods_data.from_dict(customer_payment_methods_data_dict) +customer_payment_methods_data_from_dict = CustomerPaymentMethodsData.from_dict(customer_payment_methods_data_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerPaymentMethodsRequest.md b/docs/CustomerPaymentMethodsRequest.md index 90d15a5..e0385af 100644 --- a/docs/CustomerPaymentMethodsRequest.md +++ b/docs/CustomerPaymentMethodsRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of payment method | @@ -18,12 +19,12 @@ json = "{}" # create an instance of CustomerPaymentMethodsRequest from a JSON string customer_payment_methods_request_instance = CustomerPaymentMethodsRequest.from_json(json) # print the JSON string representation of the object -print CustomerPaymentMethodsRequest.to_json() +print(CustomerPaymentMethodsRequest.to_json()) # convert the object into a dict customer_payment_methods_request_dict = customer_payment_methods_request_instance.to_dict() # create an instance of CustomerPaymentMethodsRequest from a dict -customer_payment_methods_request_form_dict = customer_payment_methods_request.from_dict(customer_payment_methods_request_dict) +customer_payment_methods_request_from_dict = CustomerPaymentMethodsRequest.from_dict(customer_payment_methods_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerPaymentMethodsResponse.md b/docs/CustomerPaymentMethodsResponse.md index 3694886..9e9cbb9 100644 --- a/docs/CustomerPaymentMethodsResponse.md +++ b/docs/CustomerPaymentMethodsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of CustomerPaymentMethodsResponse from a JSON string customer_payment_methods_response_instance = CustomerPaymentMethodsResponse.from_json(json) # print the JSON string representation of the object -print CustomerPaymentMethodsResponse.to_json() +print(CustomerPaymentMethodsResponse.to_json()) # convert the object into a dict customer_payment_methods_response_dict = customer_payment_methods_response_instance.to_dict() # create an instance of CustomerPaymentMethodsResponse from a dict -customer_payment_methods_response_form_dict = customer_payment_methods_response.from_dict(customer_payment_methods_response_dict) +customer_payment_methods_response_from_dict = CustomerPaymentMethodsResponse.from_dict(customer_payment_methods_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerResponse.md b/docs/CustomerResponse.md index 6f818f7..0db34e5 100644 --- a/docs/CustomerResponse.md +++ b/docs/CustomerResponse.md @@ -3,6 +3,7 @@ customer response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | [**CustomerAntifraudInfoResponse**](CustomerAntifraudInfoResponse.md) | | [optional] @@ -34,12 +35,12 @@ json = "{}" # create an instance of CustomerResponse from a JSON string customer_response_instance = CustomerResponse.from_json(json) # print the JSON string representation of the object -print CustomerResponse.to_json() +print(CustomerResponse.to_json()) # convert the object into a dict customer_response_dict = customer_response_instance.to_dict() # create an instance of CustomerResponse from a dict -customer_response_form_dict = customer_response.from_dict(customer_response_dict) +customer_response_from_dict = CustomerResponse.from_dict(customer_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerResponseShippingContacts.md b/docs/CustomerResponseShippingContacts.md index 05ad014..2cd47ae 100644 --- a/docs/CustomerResponseShippingContacts.md +++ b/docs/CustomerResponseShippingContacts.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -18,12 +19,12 @@ json = "{}" # create an instance of CustomerResponseShippingContacts from a JSON string customer_response_shipping_contacts_instance = CustomerResponseShippingContacts.from_json(json) # print the JSON string representation of the object -print CustomerResponseShippingContacts.to_json() +print(CustomerResponseShippingContacts.to_json()) # convert the object into a dict customer_response_shipping_contacts_dict = customer_response_shipping_contacts_instance.to_dict() # create an instance of CustomerResponseShippingContacts from a dict -customer_response_shipping_contacts_form_dict = customer_response_shipping_contacts.from_dict(customer_response_shipping_contacts_dict) +customer_response_shipping_contacts_from_dict = CustomerResponseShippingContacts.from_dict(customer_response_shipping_contacts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerResponseShippingContactsAllOf.md b/docs/CustomerResponseShippingContactsAllOf.md deleted file mode 100644 index 0d3ae39..0000000 --- a/docs/CustomerResponseShippingContactsAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# CustomerResponseShippingContactsAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CustomerShippingContactsDataResponse]**](CustomerShippingContactsDataResponse.md) | | [optional] - -## Example - -```python -from conekta.models.customer_response_shipping_contacts_all_of import CustomerResponseShippingContactsAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomerResponseShippingContactsAllOf from a JSON string -customer_response_shipping_contacts_all_of_instance = CustomerResponseShippingContactsAllOf.from_json(json) -# print the JSON string representation of the object -print CustomerResponseShippingContactsAllOf.to_json() - -# convert the object into a dict -customer_response_shipping_contacts_all_of_dict = customer_response_shipping_contacts_all_of_instance.to_dict() -# create an instance of CustomerResponseShippingContactsAllOf from a dict -customer_response_shipping_contacts_all_of_form_dict = customer_response_shipping_contacts_all_of.from_dict(customer_response_shipping_contacts_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CustomerShippingContacts.md b/docs/CustomerShippingContacts.md index 9440e7d..e3fbbe2 100644 --- a/docs/CustomerShippingContacts.md +++ b/docs/CustomerShippingContacts.md @@ -3,6 +3,7 @@ [Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone** | **str** | Phone contact | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of CustomerShippingContacts from a JSON string customer_shipping_contacts_instance = CustomerShippingContacts.from_json(json) # print the JSON string representation of the object -print CustomerShippingContacts.to_json() +print(CustomerShippingContacts.to_json()) # convert the object into a dict customer_shipping_contacts_dict = customer_shipping_contacts_instance.to_dict() # create an instance of CustomerShippingContacts from a dict -customer_shipping_contacts_form_dict = customer_shipping_contacts.from_dict(customer_shipping_contacts_dict) +customer_shipping_contacts_from_dict = CustomerShippingContacts.from_dict(customer_shipping_contacts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerShippingContactsAddress.md b/docs/CustomerShippingContactsAddress.md index 3b824f2..f8d3f50 100644 --- a/docs/CustomerShippingContactsAddress.md +++ b/docs/CustomerShippingContactsAddress.md @@ -3,6 +3,7 @@ Address of the person who will receive the order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **street1** | **str** | | [optional] @@ -23,12 +24,12 @@ json = "{}" # create an instance of CustomerShippingContactsAddress from a JSON string customer_shipping_contacts_address_instance = CustomerShippingContactsAddress.from_json(json) # print the JSON string representation of the object -print CustomerShippingContactsAddress.to_json() +print(CustomerShippingContactsAddress.to_json()) # convert the object into a dict customer_shipping_contacts_address_dict = customer_shipping_contacts_address_instance.to_dict() # create an instance of CustomerShippingContactsAddress from a dict -customer_shipping_contacts_address_form_dict = customer_shipping_contacts_address.from_dict(customer_shipping_contacts_address_dict) +customer_shipping_contacts_address_from_dict = CustomerShippingContactsAddress.from_dict(customer_shipping_contacts_address_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerShippingContactsDataResponse.md b/docs/CustomerShippingContactsDataResponse.md index cd79069..46d285d 100644 --- a/docs/CustomerShippingContactsDataResponse.md +++ b/docs/CustomerShippingContactsDataResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone** | **str** | Phone contact | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of CustomerShippingContactsDataResponse from a JSON string customer_shipping_contacts_data_response_instance = CustomerShippingContactsDataResponse.from_json(json) # print the JSON string representation of the object -print CustomerShippingContactsDataResponse.to_json() +print(CustomerShippingContactsDataResponse.to_json()) # convert the object into a dict customer_shipping_contacts_data_response_dict = customer_shipping_contacts_data_response_instance.to_dict() # create an instance of CustomerShippingContactsDataResponse from a dict -customer_shipping_contacts_data_response_form_dict = customer_shipping_contacts_data_response.from_dict(customer_shipping_contacts_data_response_dict) +customer_shipping_contacts_data_response_from_dict = CustomerShippingContactsDataResponse.from_dict(customer_shipping_contacts_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerShippingContactsDataResponseAllOf.md b/docs/CustomerShippingContactsDataResponseAllOf.md deleted file mode 100644 index c054011..0000000 --- a/docs/CustomerShippingContactsDataResponseAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# CustomerShippingContactsDataResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**object** | **str** | | -**created_at** | **int** | | - -## Example - -```python -from conekta.models.customer_shipping_contacts_data_response_all_of import CustomerShippingContactsDataResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomerShippingContactsDataResponseAllOf from a JSON string -customer_shipping_contacts_data_response_all_of_instance = CustomerShippingContactsDataResponseAllOf.from_json(json) -# print the JSON string representation of the object -print CustomerShippingContactsDataResponseAllOf.to_json() - -# convert the object into a dict -customer_shipping_contacts_data_response_all_of_dict = customer_shipping_contacts_data_response_all_of_instance.to_dict() -# create an instance of CustomerShippingContactsDataResponseAllOf from a dict -customer_shipping_contacts_data_response_all_of_form_dict = customer_shipping_contacts_data_response_all_of.from_dict(customer_shipping_contacts_data_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CustomerShippingContactsResponse.md b/docs/CustomerShippingContactsResponse.md index efeac98..69a4c95 100644 --- a/docs/CustomerShippingContactsResponse.md +++ b/docs/CustomerShippingContactsResponse.md @@ -3,6 +3,7 @@ Contains the detail of the shipping addresses that the client has active or has used in Conekta ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone** | **str** | | [optional] @@ -27,12 +28,12 @@ json = "{}" # create an instance of CustomerShippingContactsResponse from a JSON string customer_shipping_contacts_response_instance = CustomerShippingContactsResponse.from_json(json) # print the JSON string representation of the object -print CustomerShippingContactsResponse.to_json() +print(CustomerShippingContactsResponse.to_json()) # convert the object into a dict customer_shipping_contacts_response_dict = customer_shipping_contacts_response_instance.to_dict() # create an instance of CustomerShippingContactsResponse from a dict -customer_shipping_contacts_response_form_dict = customer_shipping_contacts_response.from_dict(customer_shipping_contacts_response_dict) +customer_shipping_contacts_response_from_dict = CustomerShippingContactsResponse.from_dict(customer_shipping_contacts_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerShippingContactsResponseAddress.md b/docs/CustomerShippingContactsResponseAddress.md index 9565f9c..7b7d6ab 100644 --- a/docs/CustomerShippingContactsResponseAddress.md +++ b/docs/CustomerShippingContactsResponseAddress.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **str** | | [optional] @@ -23,12 +24,12 @@ json = "{}" # create an instance of CustomerShippingContactsResponseAddress from a JSON string customer_shipping_contacts_response_address_instance = CustomerShippingContactsResponseAddress.from_json(json) # print the JSON string representation of the object -print CustomerShippingContactsResponseAddress.to_json() +print(CustomerShippingContactsResponseAddress.to_json()) # convert the object into a dict customer_shipping_contacts_response_address_dict = customer_shipping_contacts_response_address_instance.to_dict() # create an instance of CustomerShippingContactsResponseAddress from a dict -customer_shipping_contacts_response_address_form_dict = customer_shipping_contacts_response_address.from_dict(customer_shipping_contacts_response_address_dict) +customer_shipping_contacts_response_address_from_dict = CustomerShippingContactsResponseAddress.from_dict(customer_shipping_contacts_response_address_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerUpdateFiscalEntitiesRequest.md b/docs/CustomerUpdateFiscalEntitiesRequest.md index 81a742c..fe44cc8 100644 --- a/docs/CustomerUpdateFiscalEntitiesRequest.md +++ b/docs/CustomerUpdateFiscalEntitiesRequest.md @@ -2,9 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | [optional] +**address** | [**CustomerAddress**](CustomerAddress.md) | | [optional] **tax_id** | **str** | | [optional] **email** | **str** | | [optional] **phone** | **str** | | [optional] @@ -21,12 +22,12 @@ json = "{}" # create an instance of CustomerUpdateFiscalEntitiesRequest from a JSON string customer_update_fiscal_entities_request_instance = CustomerUpdateFiscalEntitiesRequest.from_json(json) # print the JSON string representation of the object -print CustomerUpdateFiscalEntitiesRequest.to_json() +print(CustomerUpdateFiscalEntitiesRequest.to_json()) # convert the object into a dict customer_update_fiscal_entities_request_dict = customer_update_fiscal_entities_request_instance.to_dict() # create an instance of CustomerUpdateFiscalEntitiesRequest from a dict -customer_update_fiscal_entities_request_form_dict = customer_update_fiscal_entities_request.from_dict(customer_update_fiscal_entities_request_dict) +customer_update_fiscal_entities_request_from_dict = CustomerUpdateFiscalEntitiesRequest.from_dict(customer_update_fiscal_entities_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerUpdateShippingContacts.md b/docs/CustomerUpdateShippingContacts.md index ecc321c..0cdcdaa 100644 --- a/docs/CustomerUpdateShippingContacts.md +++ b/docs/CustomerUpdateShippingContacts.md @@ -3,6 +3,7 @@ [Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone** | **str** | Phone contact | [optional] @@ -23,12 +24,12 @@ json = "{}" # create an instance of CustomerUpdateShippingContacts from a JSON string customer_update_shipping_contacts_instance = CustomerUpdateShippingContacts.from_json(json) # print the JSON string representation of the object -print CustomerUpdateShippingContacts.to_json() +print(CustomerUpdateShippingContacts.to_json()) # convert the object into a dict customer_update_shipping_contacts_dict = customer_update_shipping_contacts_instance.to_dict() # create an instance of CustomerUpdateShippingContacts from a dict -customer_update_shipping_contacts_form_dict = customer_update_shipping_contacts.from_dict(customer_update_shipping_contacts_dict) +customer_update_shipping_contacts_from_dict = CustomerUpdateShippingContacts.from_dict(customer_update_shipping_contacts_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md index d460f14..48ddd88 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -23,9 +23,8 @@ The purpose of business is to create and keep a customer, you will learn what el ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer import Customer from conekta.models.customer_response import CustomerResponse @@ -69,6 +68,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **customer** | [**Customer**](Customer.md)| requested field for customer | @@ -89,6 +89,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -109,9 +110,8 @@ Create Fiscal entity resource that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.create_customer_fiscal_entities_response import CreateCustomerFiscalEntitiesResponse from conekta.models.customer_fiscal_entities_request import CustomerFiscalEntitiesRequest @@ -156,6 +156,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -177,6 +178,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -197,9 +199,8 @@ Deleted a customer resource that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_response import CustomerResponse from conekta.rest import ApiException @@ -242,6 +243,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -262,6 +264,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -282,9 +285,8 @@ Gets a customer resource that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_response import CustomerResponse from conekta.rest import ApiException @@ -327,6 +329,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -347,6 +350,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -366,9 +370,8 @@ The purpose of business is to create and maintain a client, you will learn what ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customers_response import CustomersResponse from conekta.rest import ApiException @@ -414,6 +417,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -437,6 +441,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -455,9 +460,8 @@ You can update customer-related data ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_response import CustomerResponse from conekta.models.update_customer import UpdateCustomer @@ -502,6 +506,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -523,6 +528,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -543,9 +549,8 @@ Update Fiscal Entity resource that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_update_fiscal_entities_request import CustomerUpdateFiscalEntitiesRequest from conekta.models.update_customer_fiscal_entities_response import UpdateCustomerFiscalEntitiesResponse @@ -591,6 +596,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -613,6 +619,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/CustomersResponse.md b/docs/CustomersResponse.md index 449b61c..28d82af 100644 --- a/docs/CustomersResponse.md +++ b/docs/CustomersResponse.md @@ -2,13 +2,14 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**List[CustomerResponse]**](CustomerResponse.md) | | [optional] **has_more** | **bool** | Indicates if there are more pages to be requested | **object** | **str** | Object type, in this case is list | **next_page_url** | **str** | URL of the next page. | [optional] **previous_page_url** | **str** | Url of the previous page. | [optional] +**data** | [**List[CustomerResponse]**](CustomerResponse.md) | | [optional] ## Example @@ -20,12 +21,12 @@ json = "{}" # create an instance of CustomersResponse from a JSON string customers_response_instance = CustomersResponse.from_json(json) # print the JSON string representation of the object -print CustomersResponse.to_json() +print(CustomersResponse.to_json()) # convert the object into a dict customers_response_dict = customers_response_instance.to_dict() # create an instance of CustomersResponse from a dict -customers_response_form_dict = customers_response.from_dict(customers_response_dict) +customers_response_from_dict = CustomersResponse.from_dict(customers_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomersResponseAllOf.md b/docs/CustomersResponseAllOf.md deleted file mode 100644 index 5fdb465..0000000 --- a/docs/CustomersResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# CustomersResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CustomerResponse]**](CustomerResponse.md) | | [optional] - -## Example - -```python -from conekta.models.customers_response_all_of import CustomersResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of CustomersResponseAllOf from a JSON string -customers_response_all_of_instance = CustomersResponseAllOf.from_json(json) -# print the JSON string representation of the object -print CustomersResponseAllOf.to_json() - -# convert the object into a dict -customers_response_all_of_dict = customers_response_all_of_instance.to_dict() -# create an instance of CustomersResponseAllOf from a dict -customers_response_all_of_form_dict = customers_response_all_of.from_dict(customers_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeleteApiKeysResponse.md b/docs/DeleteApiKeysResponse.md index 1039a68..33cf6c9 100644 --- a/docs/DeleteApiKeysResponse.md +++ b/docs/DeleteApiKeysResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the api key is active | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of DeleteApiKeysResponse from a JSON string delete_api_keys_response_instance = DeleteApiKeysResponse.from_json(json) # print the JSON string representation of the object -print DeleteApiKeysResponse.to_json() +print(DeleteApiKeysResponse.to_json()) # convert the object into a dict delete_api_keys_response_dict = delete_api_keys_response_instance.to_dict() # create an instance of DeleteApiKeysResponse from a dict -delete_api_keys_response_form_dict = delete_api_keys_response.from_dict(delete_api_keys_response_dict) +delete_api_keys_response_from_dict = DeleteApiKeysResponse.from_dict(delete_api_keys_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteApiKeysResponseAllOf.md b/docs/DeleteApiKeysResponseAllOf.md deleted file mode 100644 index d9df82a..0000000 --- a/docs/DeleteApiKeysResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# DeleteApiKeysResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted** | **bool** | | [optional] - -## Example - -```python -from conekta.models.delete_api_keys_response_all_of import DeleteApiKeysResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteApiKeysResponseAllOf from a JSON string -delete_api_keys_response_all_of_instance = DeleteApiKeysResponseAllOf.from_json(json) -# print the JSON string representation of the object -print DeleteApiKeysResponseAllOf.to_json() - -# convert the object into a dict -delete_api_keys_response_all_of_dict = delete_api_keys_response_all_of_instance.to_dict() -# create an instance of DeleteApiKeysResponseAllOf from a dict -delete_api_keys_response_all_of_form_dict = delete_api_keys_response_all_of.from_dict(delete_api_keys_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DeletedBlacklistRuleResponse.md b/docs/DeletedBlacklistRuleResponse.md index 9ce892e..aef327d 100644 --- a/docs/DeletedBlacklistRuleResponse.md +++ b/docs/DeletedBlacklistRuleResponse.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Blacklist rule id | [optional] -**field** | **str** | field used for blacklists rule deleted | [optional] +**var_field** | **str** | field used for blacklists rule deleted | [optional] **value** | **str** | value used for blacklists rule deleted | [optional] **description** | **str** | use an description for blacklisted rule | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of DeletedBlacklistRuleResponse from a JSON string deleted_blacklist_rule_response_instance = DeletedBlacklistRuleResponse.from_json(json) # print the JSON string representation of the object -print DeletedBlacklistRuleResponse.to_json() +print(DeletedBlacklistRuleResponse.to_json()) # convert the object into a dict deleted_blacklist_rule_response_dict = deleted_blacklist_rule_response_instance.to_dict() # create an instance of DeletedBlacklistRuleResponse from a dict -deleted_blacklist_rule_response_form_dict = deleted_blacklist_rule_response.from_dict(deleted_blacklist_rule_response_dict) +deleted_blacklist_rule_response_from_dict = DeletedBlacklistRuleResponse.from_dict(deleted_blacklist_rule_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeletedWhitelistRuleResponse.md b/docs/DeletedWhitelistRuleResponse.md index 112c388..cd5b031 100644 --- a/docs/DeletedWhitelistRuleResponse.md +++ b/docs/DeletedWhitelistRuleResponse.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Whitelist rule id | [optional] -**field** | **str** | field used for whitelists rule deleted | [optional] +**var_field** | **str** | field used for whitelists rule deleted | [optional] **value** | **str** | value used for whitelists rule deleted | [optional] **description** | **str** | use an description for whitelisted rule | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of DeletedWhitelistRuleResponse from a JSON string deleted_whitelist_rule_response_instance = DeletedWhitelistRuleResponse.from_json(json) # print the JSON string representation of the object -print DeletedWhitelistRuleResponse.to_json() +print(DeletedWhitelistRuleResponse.to_json()) # convert the object into a dict deleted_whitelist_rule_response_dict = deleted_whitelist_rule_response_instance.to_dict() # create an instance of DeletedWhitelistRuleResponse from a dict -deleted_whitelist_rule_response_form_dict = deleted_whitelist_rule_response.from_dict(deleted_whitelist_rule_response_dict) +deleted_whitelist_rule_response_from_dict = DeletedWhitelistRuleResponse.from_dict(deleted_whitelist_rule_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Details.md b/docs/Details.md index 31e736a..ad57267 100644 --- a/docs/Details.md +++ b/docs/Details.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **details** | [**List[DetailsError]**](DetailsError.md) | | [optional] @@ -16,12 +17,12 @@ json = "{}" # create an instance of Details from a JSON string details_instance = Details.from_json(json) # print the JSON string representation of the object -print Details.to_json() +print(Details.to_json()) # convert the object into a dict details_dict = details_instance.to_dict() # create an instance of Details from a dict -details_form_dict = details.from_dict(details_dict) +details_from_dict = Details.from_dict(details_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DetailsError.md b/docs/DetailsError.md index 4846daf..382c088 100644 --- a/docs/DetailsError.md +++ b/docs/DetailsError.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **str** | | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of DetailsError from a JSON string details_error_instance = DetailsError.from_json(json) # print the JSON string representation of the object -print DetailsError.to_json() +print(DetailsError.to_json()) # convert the object into a dict details_error_dict = details_error_instance.to_dict() # create an instance of DetailsError from a dict -details_error_form_dict = details_error.from_dict(details_error_dict) +details_error_from_dict = DetailsError.from_dict(details_error_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DiscountLinesDataResponse.md b/docs/DiscountLinesDataResponse.md index c5b466d..ffad875 100644 --- a/docs/DiscountLinesDataResponse.md +++ b/docs/DiscountLinesDataResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount to be deducted from the total sum of all payments, in cents. | @@ -21,12 +22,12 @@ json = "{}" # create an instance of DiscountLinesDataResponse from a JSON string discount_lines_data_response_instance = DiscountLinesDataResponse.from_json(json) # print the JSON string representation of the object -print DiscountLinesDataResponse.to_json() +print(DiscountLinesDataResponse.to_json()) # convert the object into a dict discount_lines_data_response_dict = discount_lines_data_response_instance.to_dict() # create an instance of DiscountLinesDataResponse from a dict -discount_lines_data_response_form_dict = discount_lines_data_response.from_dict(discount_lines_data_response_dict) +discount_lines_data_response_from_dict = DiscountLinesDataResponse.from_dict(discount_lines_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DiscountLinesResponse.md b/docs/DiscountLinesResponse.md index 677ebef..59dbf49 100644 --- a/docs/DiscountLinesResponse.md +++ b/docs/DiscountLinesResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount to be deducted from the total sum of all payments, in cents. | @@ -21,12 +22,12 @@ json = "{}" # create an instance of DiscountLinesResponse from a JSON string discount_lines_response_instance = DiscountLinesResponse.from_json(json) # print the JSON string representation of the object -print DiscountLinesResponse.to_json() +print(DiscountLinesResponse.to_json()) # convert the object into a dict discount_lines_response_dict = discount_lines_response_instance.to_dict() # create an instance of DiscountLinesResponse from a dict -discount_lines_response_form_dict = discount_lines_response.from_dict(discount_lines_response_dict) +discount_lines_response_from_dict = DiscountLinesResponse.from_dict(discount_lines_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DiscountLinesResponseAllOf.md b/docs/DiscountLinesResponseAllOf.md deleted file mode 100644 index fd86cc6..0000000 --- a/docs/DiscountLinesResponseAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# DiscountLinesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | The discount line id | -**object** | **str** | The object name | -**parent_id** | **str** | The order id | - -## Example - -```python -from conekta.models.discount_lines_response_all_of import DiscountLinesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of DiscountLinesResponseAllOf from a JSON string -discount_lines_response_all_of_instance = DiscountLinesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print DiscountLinesResponseAllOf.to_json() - -# convert the object into a dict -discount_lines_response_all_of_dict = discount_lines_response_all_of_instance.to_dict() -# create an instance of DiscountLinesResponseAllOf from a dict -discount_lines_response_all_of_form_dict = discount_lines_response_all_of.from_dict(discount_lines_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/DiscountsApi.md b/docs/DiscountsApi.md index b53fd00..0aaf097 100644 --- a/docs/DiscountsApi.md +++ b/docs/DiscountsApi.md @@ -21,9 +21,8 @@ Create discount lines for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.discount_lines_response import DiscountLinesResponse from conekta.models.order_discount_lines_request import OrderDiscountLinesRequest @@ -68,6 +67,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -89,6 +89,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -108,9 +109,8 @@ Delete an existing discount lines for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.discount_lines_response import DiscountLinesResponse from conekta.rest import ApiException @@ -154,6 +154,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -175,6 +176,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -195,9 +197,8 @@ Get an existing discount lines for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.discount_lines_response import DiscountLinesResponse from conekta.rest import ApiException @@ -241,6 +242,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -262,6 +264,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -282,9 +285,8 @@ Get discount lines for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_order_discount_lines_response import GetOrderDiscountLinesResponse from conekta.rest import ApiException @@ -331,6 +333,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -355,6 +358,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -373,9 +377,8 @@ Update an existing discount lines for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.discount_lines_response import DiscountLinesResponse from conekta.models.update_order_discount_lines_request import UpdateOrderDiscountLinesRequest @@ -421,6 +424,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -443,6 +447,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | diff --git a/docs/EmailCheckoutRequest.md b/docs/EmailCheckoutRequest.md index 9454b91..4c90f52 100644 --- a/docs/EmailCheckoutRequest.md +++ b/docs/EmailCheckoutRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **str** | | @@ -16,12 +17,12 @@ json = "{}" # create an instance of EmailCheckoutRequest from a JSON string email_checkout_request_instance = EmailCheckoutRequest.from_json(json) # print the JSON string representation of the object -print EmailCheckoutRequest.to_json() +print(EmailCheckoutRequest.to_json()) # convert the object into a dict email_checkout_request_dict = email_checkout_request_instance.to_dict() # create an instance of EmailCheckoutRequest from a dict -email_checkout_request_form_dict = email_checkout_request.from_dict(email_checkout_request_dict) +email_checkout_request_from_dict = EmailCheckoutRequest.from_dict(email_checkout_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Error.md b/docs/Error.md index 4d6a6cb..8e1291c 100644 --- a/docs/Error.md +++ b/docs/Error.md @@ -3,6 +3,7 @@ err model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **details** | [**List[DetailsError]**](DetailsError.md) | | [optional] @@ -20,12 +21,12 @@ json = "{}" # create an instance of Error from a JSON string error_instance = Error.from_json(json) # print the JSON string representation of the object -print Error.to_json() +print(Error.to_json()) # convert the object into a dict error_dict = error_instance.to_dict() # create an instance of Error from a dict -error_form_dict = error.from_dict(error_dict) +error_from_dict = Error.from_dict(error_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ErrorAllOf.md b/docs/ErrorAllOf.md deleted file mode 100644 index 27cf825..0000000 --- a/docs/ErrorAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# ErrorAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**log_id** | **str** | log id | [optional] -**type** | **str** | | [optional] -**object** | **str** | | [optional] - -## Example - -```python -from conekta.models.error_all_of import ErrorAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of ErrorAllOf from a JSON string -error_all_of_instance = ErrorAllOf.from_json(json) -# print the JSON string representation of the object -print ErrorAllOf.to_json() - -# convert the object into a dict -error_all_of_dict = error_all_of_instance.to_dict() -# create an instance of ErrorAllOf from a dict -error_all_of_form_dict = error_all_of.from_dict(error_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/EventResponse.md b/docs/EventResponse.md index 98fe662..31972dc 100644 --- a/docs/EventResponse.md +++ b/docs/EventResponse.md @@ -3,6 +3,7 @@ event model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_at** | **int** | | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of EventResponse from a JSON string event_response_instance = EventResponse.from_json(json) # print the JSON string representation of the object -print EventResponse.to_json() +print(EventResponse.to_json()) # convert the object into a dict event_response_dict = event_response_instance.to_dict() # create an instance of EventResponse from a dict -event_response_form_dict = event_response.from_dict(event_response_dict) +event_response_from_dict = EventResponse.from_dict(event_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EventTypes.md b/docs/EventTypes.md new file mode 100644 index 0000000..531bc7b --- /dev/null +++ b/docs/EventTypes.md @@ -0,0 +1,12 @@ +# EventTypes + +It is a parameter that allows to identify in the response, the type of event that is being generated. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EventsApi.md b/docs/EventsApi.md index ba25cf0..8a15531 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -19,9 +19,8 @@ Returns a single event ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.event_response import EventResponse from conekta.rest import ApiException @@ -64,6 +63,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -84,6 +84,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -101,9 +102,8 @@ Get list of Events ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_events_response import GetEventsResponse from conekta.rest import ApiException @@ -149,6 +149,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -172,6 +173,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -190,9 +192,8 @@ Try to send an event ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.events_resend_response import EventsResendResponse from conekta.rest import ApiException @@ -235,6 +236,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **event_id** | **str**| event identifier | @@ -255,6 +257,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/EventsResendResponse.md b/docs/EventsResendResponse.md index 5fa7c61..3062846 100644 --- a/docs/EventsResendResponse.md +++ b/docs/EventsResendResponse.md @@ -3,6 +3,7 @@ event model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **failed_attempts** | **int** | | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of EventsResendResponse from a JSON string events_resend_response_instance = EventsResendResponse.from_json(json) # print the JSON string representation of the object -print EventsResendResponse.to_json() +print(EventsResendResponse.to_json()) # convert the object into a dict events_resend_response_dict = events_resend_response_instance.to_dict() # create an instance of EventsResendResponse from a dict -events_resend_response_form_dict = events_resend_response.from_dict(events_resend_response_dict) +events_resend_response_from_dict = EventsResendResponse.from_dict(events_resend_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FiscalEntityAddress.md b/docs/FiscalEntityAddress.md index 0bc23d2..fbd4a90 100644 --- a/docs/FiscalEntityAddress.md +++ b/docs/FiscalEntityAddress.md @@ -3,6 +3,7 @@ Address of the fiscal entity ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **street1** | **str** | Street name and number | @@ -23,12 +24,12 @@ json = "{}" # create an instance of FiscalEntityAddress from a JSON string fiscal_entity_address_instance = FiscalEntityAddress.from_json(json) # print the JSON string representation of the object -print FiscalEntityAddress.to_json() +print(FiscalEntityAddress.to_json()) # convert the object into a dict fiscal_entity_address_dict = fiscal_entity_address_instance.to_dict() # create an instance of FiscalEntityAddress from a dict -fiscal_entity_address_form_dict = fiscal_entity_address.from_dict(fiscal_entity_address_dict) +fiscal_entity_address_from_dict = FiscalEntityAddress.from_dict(fiscal_entity_address_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetApiKeysResponse.md b/docs/GetApiKeysResponse.md index 0c3bb48..736940f 100644 --- a/docs/GetApiKeysResponse.md +++ b/docs/GetApiKeysResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **next_page_url** | **str** | URL of the next page. | [optional] @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetApiKeysResponse from a JSON string get_api_keys_response_instance = GetApiKeysResponse.from_json(json) # print the JSON string representation of the object -print GetApiKeysResponse.to_json() +print(GetApiKeysResponse.to_json()) # convert the object into a dict get_api_keys_response_dict = get_api_keys_response_instance.to_dict() # create an instance of GetApiKeysResponse from a dict -get_api_keys_response_form_dict = get_api_keys_response.from_dict(get_api_keys_response_dict) +get_api_keys_response_from_dict = GetApiKeysResponse.from_dict(get_api_keys_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetApiKeysResponseAllOf.md b/docs/GetApiKeysResponseAllOf.md deleted file mode 100644 index 0b4caac..0000000 --- a/docs/GetApiKeysResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetApiKeysResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ApiKeyResponse]**](ApiKeyResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_api_keys_response_all_of import GetApiKeysResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetApiKeysResponseAllOf from a JSON string -get_api_keys_response_all_of_instance = GetApiKeysResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetApiKeysResponseAllOf.to_json() - -# convert the object into a dict -get_api_keys_response_all_of_dict = get_api_keys_response_all_of_instance.to_dict() -# create an instance of GetApiKeysResponseAllOf from a dict -get_api_keys_response_all_of_form_dict = get_api_keys_response_all_of.from_dict(get_api_keys_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetChargesResponse.md b/docs/GetChargesResponse.md index 516c40a..3742c13 100644 --- a/docs/GetChargesResponse.md +++ b/docs/GetChargesResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetChargesResponse from a JSON string get_charges_response_instance = GetChargesResponse.from_json(json) # print the JSON string representation of the object -print GetChargesResponse.to_json() +print(GetChargesResponse.to_json()) # convert the object into a dict get_charges_response_dict = get_charges_response_instance.to_dict() # create an instance of GetChargesResponse from a dict -get_charges_response_form_dict = get_charges_response.from_dict(get_charges_response_dict) +get_charges_response_from_dict = GetChargesResponse.from_dict(get_charges_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetChargesResponseAllOf.md b/docs/GetChargesResponseAllOf.md deleted file mode 100644 index 7282d3b..0000000 --- a/docs/GetChargesResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetChargesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ChargeResponse]**](ChargeResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_charges_response_all_of import GetChargesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetChargesResponseAllOf from a JSON string -get_charges_response_all_of_instance = GetChargesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetChargesResponseAllOf.to_json() - -# convert the object into a dict -get_charges_response_all_of_dict = get_charges_response_all_of_instance.to_dict() -# create an instance of GetChargesResponseAllOf from a dict -get_charges_response_all_of_form_dict = get_charges_response_all_of.from_dict(get_charges_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetCompaniesResponse.md b/docs/GetCompaniesResponse.md index efa62e3..266667a 100644 --- a/docs/GetCompaniesResponse.md +++ b/docs/GetCompaniesResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetCompaniesResponse from a JSON string get_companies_response_instance = GetCompaniesResponse.from_json(json) # print the JSON string representation of the object -print GetCompaniesResponse.to_json() +print(GetCompaniesResponse.to_json()) # convert the object into a dict get_companies_response_dict = get_companies_response_instance.to_dict() # create an instance of GetCompaniesResponse from a dict -get_companies_response_form_dict = get_companies_response.from_dict(get_companies_response_dict) +get_companies_response_from_dict = GetCompaniesResponse.from_dict(get_companies_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetCompaniesResponseAllOf.md b/docs/GetCompaniesResponseAllOf.md deleted file mode 100644 index 14f4585..0000000 --- a/docs/GetCompaniesResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetCompaniesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[CompanyResponse]**](CompanyResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_companies_response_all_of import GetCompaniesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetCompaniesResponseAllOf from a JSON string -get_companies_response_all_of_instance = GetCompaniesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetCompaniesResponseAllOf.to_json() - -# convert the object into a dict -get_companies_response_all_of_dict = get_companies_response_all_of_instance.to_dict() -# create an instance of GetCompaniesResponseAllOf from a dict -get_companies_response_all_of_form_dict = get_companies_response_all_of.from_dict(get_companies_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetCustomerPaymentMethodDataResponse.md b/docs/GetCustomerPaymentMethodDataResponse.md index 44b4e20..ec9e97e 100644 --- a/docs/GetCustomerPaymentMethodDataResponse.md +++ b/docs/GetCustomerPaymentMethodDataResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -35,12 +36,12 @@ json = "{}" # create an instance of GetCustomerPaymentMethodDataResponse from a JSON string get_customer_payment_method_data_response_instance = GetCustomerPaymentMethodDataResponse.from_json(json) # print the JSON string representation of the object -print GetCustomerPaymentMethodDataResponse.to_json() +print(GetCustomerPaymentMethodDataResponse.to_json()) # convert the object into a dict get_customer_payment_method_data_response_dict = get_customer_payment_method_data_response_instance.to_dict() # create an instance of GetCustomerPaymentMethodDataResponse from a dict -get_customer_payment_method_data_response_form_dict = get_customer_payment_method_data_response.from_dict(get_customer_payment_method_data_response_dict) +get_customer_payment_method_data_response_from_dict = GetCustomerPaymentMethodDataResponse.from_dict(get_customer_payment_method_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEventsResponse.md b/docs/GetEventsResponse.md index 4b885ab..6bd991e 100644 --- a/docs/GetEventsResponse.md +++ b/docs/GetEventsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetEventsResponse from a JSON string get_events_response_instance = GetEventsResponse.from_json(json) # print the JSON string representation of the object -print GetEventsResponse.to_json() +print(GetEventsResponse.to_json()) # convert the object into a dict get_events_response_dict = get_events_response_instance.to_dict() # create an instance of GetEventsResponse from a dict -get_events_response_form_dict = get_events_response.from_dict(get_events_response_dict) +get_events_response_from_dict = GetEventsResponse.from_dict(get_events_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetEventsResponseAllOf.md b/docs/GetEventsResponseAllOf.md deleted file mode 100644 index 79a9a03..0000000 --- a/docs/GetEventsResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetEventsResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[EventResponse]**](EventResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_events_response_all_of import GetEventsResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetEventsResponseAllOf from a JSON string -get_events_response_all_of_instance = GetEventsResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetEventsResponseAllOf.to_json() - -# convert the object into a dict -get_events_response_all_of_dict = get_events_response_all_of_instance.to_dict() -# create an instance of GetEventsResponseAllOf from a dict -get_events_response_all_of_form_dict = get_events_response_all_of.from_dict(get_events_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetOrderDiscountLinesResponse.md b/docs/GetOrderDiscountLinesResponse.md index 697c33e..bded981 100644 --- a/docs/GetOrderDiscountLinesResponse.md +++ b/docs/GetOrderDiscountLinesResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetOrderDiscountLinesResponse from a JSON string get_order_discount_lines_response_instance = GetOrderDiscountLinesResponse.from_json(json) # print the JSON string representation of the object -print GetOrderDiscountLinesResponse.to_json() +print(GetOrderDiscountLinesResponse.to_json()) # convert the object into a dict get_order_discount_lines_response_dict = get_order_discount_lines_response_instance.to_dict() # create an instance of GetOrderDiscountLinesResponse from a dict -get_order_discount_lines_response_form_dict = get_order_discount_lines_response.from_dict(get_order_discount_lines_response_dict) +get_order_discount_lines_response_from_dict = GetOrderDiscountLinesResponse.from_dict(get_order_discount_lines_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetOrderDiscountLinesResponseAllOf.md b/docs/GetOrderDiscountLinesResponseAllOf.md deleted file mode 100644 index dedaadd..0000000 --- a/docs/GetOrderDiscountLinesResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetOrderDiscountLinesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[DiscountLinesResponse]**](DiscountLinesResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_order_discount_lines_response_all_of import GetOrderDiscountLinesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetOrderDiscountLinesResponseAllOf from a JSON string -get_order_discount_lines_response_all_of_instance = GetOrderDiscountLinesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetOrderDiscountLinesResponseAllOf.to_json() - -# convert the object into a dict -get_order_discount_lines_response_all_of_dict = get_order_discount_lines_response_all_of_instance.to_dict() -# create an instance of GetOrderDiscountLinesResponseAllOf from a dict -get_order_discount_lines_response_all_of_form_dict = get_order_discount_lines_response_all_of.from_dict(get_order_discount_lines_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetOrdersResponse.md b/docs/GetOrdersResponse.md index 13e0588..522a1bf 100644 --- a/docs/GetOrdersResponse.md +++ b/docs/GetOrdersResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**List[OrderResponse]**](OrderResponse.md) | | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetOrdersResponse from a JSON string get_orders_response_instance = GetOrdersResponse.from_json(json) # print the JSON string representation of the object -print GetOrdersResponse.to_json() +print(GetOrdersResponse.to_json()) # convert the object into a dict get_orders_response_dict = get_orders_response_instance.to_dict() # create an instance of GetOrdersResponse from a dict -get_orders_response_form_dict = get_orders_response.from_dict(get_orders_response_dict) +get_orders_response_from_dict = GetOrdersResponse.from_dict(get_orders_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetPaymentMethodResponse.md b/docs/GetPaymentMethodResponse.md index 2350f6f..f65d447 100644 --- a/docs/GetPaymentMethodResponse.md +++ b/docs/GetPaymentMethodResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetPaymentMethodResponse from a JSON string get_payment_method_response_instance = GetPaymentMethodResponse.from_json(json) # print the JSON string representation of the object -print GetPaymentMethodResponse.to_json() +print(GetPaymentMethodResponse.to_json()) # convert the object into a dict get_payment_method_response_dict = get_payment_method_response_instance.to_dict() # create an instance of GetPaymentMethodResponse from a dict -get_payment_method_response_form_dict = get_payment_method_response.from_dict(get_payment_method_response_dict) +get_payment_method_response_from_dict = GetPaymentMethodResponse.from_dict(get_payment_method_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetPaymentMethodResponseAllOf.md b/docs/GetPaymentMethodResponseAllOf.md deleted file mode 100644 index 3dcbec1..0000000 --- a/docs/GetPaymentMethodResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetPaymentMethodResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[GetCustomerPaymentMethodDataResponse]**](GetCustomerPaymentMethodDataResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_payment_method_response_all_of import GetPaymentMethodResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetPaymentMethodResponseAllOf from a JSON string -get_payment_method_response_all_of_instance = GetPaymentMethodResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetPaymentMethodResponseAllOf.to_json() - -# convert the object into a dict -get_payment_method_response_all_of_dict = get_payment_method_response_all_of_instance.to_dict() -# create an instance of GetPaymentMethodResponseAllOf from a dict -get_payment_method_response_all_of_form_dict = get_payment_method_response_all_of.from_dict(get_payment_method_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetPlansResponse.md b/docs/GetPlansResponse.md index ed4b192..221d43c 100644 --- a/docs/GetPlansResponse.md +++ b/docs/GetPlansResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetPlansResponse from a JSON string get_plans_response_instance = GetPlansResponse.from_json(json) # print the JSON string representation of the object -print GetPlansResponse.to_json() +print(GetPlansResponse.to_json()) # convert the object into a dict get_plans_response_dict = get_plans_response_instance.to_dict() # create an instance of GetPlansResponse from a dict -get_plans_response_form_dict = get_plans_response.from_dict(get_plans_response_dict) +get_plans_response_from_dict = GetPlansResponse.from_dict(get_plans_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetPlansResponseAllOf.md b/docs/GetPlansResponseAllOf.md deleted file mode 100644 index 7183d1e..0000000 --- a/docs/GetPlansResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetPlansResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[PlanResponse]**](PlanResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_plans_response_all_of import GetPlansResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetPlansResponseAllOf from a JSON string -get_plans_response_all_of_instance = GetPlansResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetPlansResponseAllOf.to_json() - -# convert the object into a dict -get_plans_response_all_of_dict = get_plans_response_all_of_instance.to_dict() -# create an instance of GetPlansResponseAllOf from a dict -get_plans_response_all_of_form_dict = get_plans_response_all_of.from_dict(get_plans_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetTransactionsResponse.md b/docs/GetTransactionsResponse.md index ece5f88..61e8715 100644 --- a/docs/GetTransactionsResponse.md +++ b/docs/GetTransactionsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetTransactionsResponse from a JSON string get_transactions_response_instance = GetTransactionsResponse.from_json(json) # print the JSON string representation of the object -print GetTransactionsResponse.to_json() +print(GetTransactionsResponse.to_json()) # convert the object into a dict get_transactions_response_dict = get_transactions_response_instance.to_dict() # create an instance of GetTransactionsResponse from a dict -get_transactions_response_form_dict = get_transactions_response.from_dict(get_transactions_response_dict) +get_transactions_response_from_dict = GetTransactionsResponse.from_dict(get_transactions_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransactionsResponseAllOf.md b/docs/GetTransactionsResponseAllOf.md deleted file mode 100644 index df1affc..0000000 --- a/docs/GetTransactionsResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetTransactionsResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[TransactionResponse]**](TransactionResponse.md) | Transactions | [optional] - -## Example - -```python -from conekta.models.get_transactions_response_all_of import GetTransactionsResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTransactionsResponseAllOf from a JSON string -get_transactions_response_all_of_instance = GetTransactionsResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetTransactionsResponseAllOf.to_json() - -# convert the object into a dict -get_transactions_response_all_of_dict = get_transactions_response_all_of_instance.to_dict() -# create an instance of GetTransactionsResponseAllOf from a dict -get_transactions_response_all_of_form_dict = get_transactions_response_all_of.from_dict(get_transactions_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetTransfersResponse.md b/docs/GetTransfersResponse.md index c00a9b1..aaf08b5 100644 --- a/docs/GetTransfersResponse.md +++ b/docs/GetTransfersResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetTransfersResponse from a JSON string get_transfers_response_instance = GetTransfersResponse.from_json(json) # print the JSON string representation of the object -print GetTransfersResponse.to_json() +print(GetTransfersResponse.to_json()) # convert the object into a dict get_transfers_response_dict = get_transfers_response_instance.to_dict() # create an instance of GetTransfersResponse from a dict -get_transfers_response_form_dict = get_transfers_response.from_dict(get_transfers_response_dict) +get_transfers_response_from_dict = GetTransfersResponse.from_dict(get_transfers_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetTransfersResponseAllOf.md b/docs/GetTransfersResponseAllOf.md deleted file mode 100644 index d034948..0000000 --- a/docs/GetTransfersResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetTransfersResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[TransfersResponse]**](TransfersResponse.md) | Transfers | [optional] - -## Example - -```python -from conekta.models.get_transfers_response_all_of import GetTransfersResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetTransfersResponseAllOf from a JSON string -get_transfers_response_all_of_instance = GetTransfersResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetTransfersResponseAllOf.to_json() - -# convert the object into a dict -get_transfers_response_all_of_dict = get_transfers_response_all_of_instance.to_dict() -# create an instance of GetTransfersResponseAllOf from a dict -get_transfers_response_all_of_form_dict = get_transfers_response_all_of.from_dict(get_transfers_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetWebhookKeysResponse.md b/docs/GetWebhookKeysResponse.md index e93bcf1..f93889e 100644 --- a/docs/GetWebhookKeysResponse.md +++ b/docs/GetWebhookKeysResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetWebhookKeysResponse from a JSON string get_webhook_keys_response_instance = GetWebhookKeysResponse.from_json(json) # print the JSON string representation of the object -print GetWebhookKeysResponse.to_json() +print(GetWebhookKeysResponse.to_json()) # convert the object into a dict get_webhook_keys_response_dict = get_webhook_keys_response_instance.to_dict() # create an instance of GetWebhookKeysResponse from a dict -get_webhook_keys_response_form_dict = get_webhook_keys_response.from_dict(get_webhook_keys_response_dict) +get_webhook_keys_response_from_dict = GetWebhookKeysResponse.from_dict(get_webhook_keys_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWebhookKeysResponseAllOf.md b/docs/GetWebhookKeysResponseAllOf.md deleted file mode 100644 index 185d26f..0000000 --- a/docs/GetWebhookKeysResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetWebhookKeysResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[WebhookKeyResponse]**](WebhookKeyResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_webhook_keys_response_all_of import GetWebhookKeysResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetWebhookKeysResponseAllOf from a JSON string -get_webhook_keys_response_all_of_instance = GetWebhookKeysResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetWebhookKeysResponseAllOf.to_json() - -# convert the object into a dict -get_webhook_keys_response_all_of_dict = get_webhook_keys_response_all_of_instance.to_dict() -# create an instance of GetWebhookKeysResponseAllOf from a dict -get_webhook_keys_response_all_of_form_dict = get_webhook_keys_response_all_of.from_dict(get_webhook_keys_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetWebhooksResponse.md b/docs/GetWebhooksResponse.md index f227de6..7dedbbf 100644 --- a/docs/GetWebhooksResponse.md +++ b/docs/GetWebhooksResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of GetWebhooksResponse from a JSON string get_webhooks_response_instance = GetWebhooksResponse.from_json(json) # print the JSON string representation of the object -print GetWebhooksResponse.to_json() +print(GetWebhooksResponse.to_json()) # convert the object into a dict get_webhooks_response_dict = get_webhooks_response_instance.to_dict() # create an instance of GetWebhooksResponse from a dict -get_webhooks_response_form_dict = get_webhooks_response.from_dict(get_webhooks_response_dict) +get_webhooks_response_from_dict = GetWebhooksResponse.from_dict(get_webhooks_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetWebhooksResponseAllOf.md b/docs/GetWebhooksResponseAllOf.md deleted file mode 100644 index bee46ae..0000000 --- a/docs/GetWebhooksResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# GetWebhooksResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[WebhookResponse]**](WebhookResponse.md) | | [optional] - -## Example - -```python -from conekta.models.get_webhooks_response_all_of import GetWebhooksResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of GetWebhooksResponseAllOf from a JSON string -get_webhooks_response_all_of_instance = GetWebhooksResponseAllOf.from_json(json) -# print the JSON string representation of the object -print GetWebhooksResponseAllOf.to_json() - -# convert the object into a dict -get_webhooks_response_all_of_dict = get_webhooks_response_all_of_instance.to_dict() -# create an instance of GetWebhooksResponseAllOf from a dict -get_webhooks_response_all_of_form_dict = get_webhooks_response_all_of.from_dict(get_webhooks_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/LogResponse.md b/docs/LogResponse.md index 7f19aa2..cb432a2 100644 --- a/docs/LogResponse.md +++ b/docs/LogResponse.md @@ -3,6 +3,7 @@ log model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_at** | **int** | | @@ -36,12 +37,12 @@ json = "{}" # create an instance of LogResponse from a JSON string log_response_instance = LogResponse.from_json(json) # print the JSON string representation of the object -print LogResponse.to_json() +print(LogResponse.to_json()) # convert the object into a dict log_response_dict = log_response_instance.to_dict() # create an instance of LogResponse from a dict -log_response_form_dict = log_response.from_dict(log_response_dict) +log_response_from_dict = LogResponse.from_dict(log_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LogsApi.md b/docs/LogsApi.md index 0bc58e9..380c2b3 100644 --- a/docs/LogsApi.md +++ b/docs/LogsApi.md @@ -18,9 +18,8 @@ Get the details of a specific log ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.log_response import LogResponse from conekta.rest import ApiException @@ -63,6 +62,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -83,6 +83,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -102,9 +103,8 @@ Get log details in the form of a list ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.logs_response import LogsResponse from conekta.rest import ApiException @@ -150,6 +150,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -173,6 +174,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/LogsResponse.md b/docs/LogsResponse.md index ae4dc7d..97f7109 100644 --- a/docs/LogsResponse.md +++ b/docs/LogsResponse.md @@ -3,6 +3,7 @@ logs model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | True, if there are more pages. | [optional] [readonly] @@ -21,12 +22,12 @@ json = "{}" # create an instance of LogsResponse from a JSON string logs_response_instance = LogsResponse.from_json(json) # print the JSON string representation of the object -print LogsResponse.to_json() +print(LogsResponse.to_json()) # convert the object into a dict logs_response_dict = logs_response_instance.to_dict() # create an instance of LogsResponse from a dict -logs_response_form_dict = logs_response.from_dict(logs_response_dict) +logs_response_from_dict = LogsResponse.from_dict(logs_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LogsResponseData.md b/docs/LogsResponseData.md index cdee261..3bcf3d5 100644 --- a/docs/LogsResponseData.md +++ b/docs/LogsResponseData.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_at** | **int** | | [optional] @@ -35,12 +36,12 @@ json = "{}" # create an instance of LogsResponseData from a JSON string logs_response_data_instance = LogsResponseData.from_json(json) # print the JSON string representation of the object -print LogsResponseData.to_json() +print(LogsResponseData.to_json()) # convert the object into a dict logs_response_data_dict = logs_response_data_instance.to_dict() # create an instance of LogsResponseData from a dict -logs_response_data_form_dict = logs_response_data.from_dict(logs_response_data_dict) +logs_response_data_from_dict = LogsResponseData.from_dict(logs_response_data_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderCaptureRequest.md b/docs/OrderCaptureRequest.md index c208e57..e575ba1 100644 --- a/docs/OrderCaptureRequest.md +++ b/docs/OrderCaptureRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | Amount to capture | @@ -16,12 +17,12 @@ json = "{}" # create an instance of OrderCaptureRequest from a JSON string order_capture_request_instance = OrderCaptureRequest.from_json(json) # print the JSON string representation of the object -print OrderCaptureRequest.to_json() +print(OrderCaptureRequest.to_json()) # convert the object into a dict order_capture_request_dict = order_capture_request_instance.to_dict() # create an instance of OrderCaptureRequest from a dict -order_capture_request_form_dict = order_capture_request.from_dict(order_capture_request_dict) +order_capture_request_from_dict = OrderCaptureRequest.from_dict(order_capture_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderCustomerInfoResponse.md b/docs/OrderCustomerInfoResponse.md index f555c9c..c8db7c9 100644 --- a/docs/OrderCustomerInfoResponse.md +++ b/docs/OrderCustomerInfoResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **customer_custom_reference** | **str** | Custom reference | [optional] @@ -21,12 +22,12 @@ json = "{}" # create an instance of OrderCustomerInfoResponse from a JSON string order_customer_info_response_instance = OrderCustomerInfoResponse.from_json(json) # print the JSON string representation of the object -print OrderCustomerInfoResponse.to_json() +print(OrderCustomerInfoResponse.to_json()) # convert the object into a dict order_customer_info_response_dict = order_customer_info_response_instance.to_dict() # create an instance of OrderCustomerInfoResponse from a dict -order_customer_info_response_form_dict = order_customer_info_response.from_dict(order_customer_info_response_dict) +order_customer_info_response_from_dict = OrderCustomerInfoResponse.from_dict(order_customer_info_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderDiscountLinesRequest.md b/docs/OrderDiscountLinesRequest.md index e4c1afb..3bf7f3e 100644 --- a/docs/OrderDiscountLinesRequest.md +++ b/docs/OrderDiscountLinesRequest.md @@ -3,6 +3,7 @@ List of discounts that apply to the order. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount to be deducted from the total sum of all payments, in cents. | @@ -19,12 +20,12 @@ json = "{}" # create an instance of OrderDiscountLinesRequest from a JSON string order_discount_lines_request_instance = OrderDiscountLinesRequest.from_json(json) # print the JSON string representation of the object -print OrderDiscountLinesRequest.to_json() +print(OrderDiscountLinesRequest.to_json()) # convert the object into a dict order_discount_lines_request_dict = order_discount_lines_request_instance.to_dict() # create an instance of OrderDiscountLinesRequest from a dict -order_discount_lines_request_form_dict = order_discount_lines_request.from_dict(order_discount_lines_request_dict) +order_discount_lines_request_from_dict = OrderDiscountLinesRequest.from_dict(order_discount_lines_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderFiscalEntityAddressResponse.md b/docs/OrderFiscalEntityAddressResponse.md index 88b56fd..f530dbb 100644 --- a/docs/OrderFiscalEntityAddressResponse.md +++ b/docs/OrderFiscalEntityAddressResponse.md @@ -3,6 +3,7 @@ Address of the fiscal entity ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **street1** | **str** | Street name and number | @@ -24,12 +25,12 @@ json = "{}" # create an instance of OrderFiscalEntityAddressResponse from a JSON string order_fiscal_entity_address_response_instance = OrderFiscalEntityAddressResponse.from_json(json) # print the JSON string representation of the object -print OrderFiscalEntityAddressResponse.to_json() +print(OrderFiscalEntityAddressResponse.to_json()) # convert the object into a dict order_fiscal_entity_address_response_dict = order_fiscal_entity_address_response_instance.to_dict() # create an instance of OrderFiscalEntityAddressResponse from a dict -order_fiscal_entity_address_response_form_dict = order_fiscal_entity_address_response.from_dict(order_fiscal_entity_address_response_dict) +order_fiscal_entity_address_response_from_dict = OrderFiscalEntityAddressResponse.from_dict(order_fiscal_entity_address_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderFiscalEntityAddressResponseAllOf.md b/docs/OrderFiscalEntityAddressResponseAllOf.md deleted file mode 100644 index aeaff76..0000000 --- a/docs/OrderFiscalEntityAddressResponseAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# OrderFiscalEntityAddressResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object** | **str** | | [optional] - -## Example - -```python -from conekta.models.order_fiscal_entity_address_response_all_of import OrderFiscalEntityAddressResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of OrderFiscalEntityAddressResponseAllOf from a JSON string -order_fiscal_entity_address_response_all_of_instance = OrderFiscalEntityAddressResponseAllOf.from_json(json) -# print the JSON string representation of the object -print OrderFiscalEntityAddressResponseAllOf.to_json() - -# convert the object into a dict -order_fiscal_entity_address_response_all_of_dict = order_fiscal_entity_address_response_all_of_instance.to_dict() -# create an instance of OrderFiscalEntityAddressResponseAllOf from a dict -order_fiscal_entity_address_response_all_of_form_dict = order_fiscal_entity_address_response_all_of.from_dict(order_fiscal_entity_address_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderFiscalEntityRequest.md b/docs/OrderFiscalEntityRequest.md index 27156fe..ae62158 100644 --- a/docs/OrderFiscalEntityRequest.md +++ b/docs/OrderFiscalEntityRequest.md @@ -3,6 +3,7 @@ Fiscal entity of the order, Currently it is a purely informative field ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | @@ -22,12 +23,12 @@ json = "{}" # create an instance of OrderFiscalEntityRequest from a JSON string order_fiscal_entity_request_instance = OrderFiscalEntityRequest.from_json(json) # print the JSON string representation of the object -print OrderFiscalEntityRequest.to_json() +print(OrderFiscalEntityRequest.to_json()) # convert the object into a dict order_fiscal_entity_request_dict = order_fiscal_entity_request_instance.to_dict() # create an instance of OrderFiscalEntityRequest from a dict -order_fiscal_entity_request_form_dict = order_fiscal_entity_request.from_dict(order_fiscal_entity_request_dict) +order_fiscal_entity_request_from_dict = OrderFiscalEntityRequest.from_dict(order_fiscal_entity_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderFiscalEntityResponse.md b/docs/OrderFiscalEntityResponse.md index 58a0c8d..ce05db4 100644 --- a/docs/OrderFiscalEntityResponse.md +++ b/docs/OrderFiscalEntityResponse.md @@ -3,6 +3,7 @@ Fiscal entity of the order, Currently it is a purely informative field ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | [**OrderFiscalEntityAddressResponse**](OrderFiscalEntityAddressResponse.md) | | @@ -25,12 +26,12 @@ json = "{}" # create an instance of OrderFiscalEntityResponse from a JSON string order_fiscal_entity_response_instance = OrderFiscalEntityResponse.from_json(json) # print the JSON string representation of the object -print OrderFiscalEntityResponse.to_json() +print(OrderFiscalEntityResponse.to_json()) # convert the object into a dict order_fiscal_entity_response_dict = order_fiscal_entity_response_instance.to_dict() # create an instance of OrderFiscalEntityResponse from a dict -order_fiscal_entity_response_form_dict = order_fiscal_entity_response.from_dict(order_fiscal_entity_response_dict) +order_fiscal_entity_response_from_dict = OrderFiscalEntityResponse.from_dict(order_fiscal_entity_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderNextActionResponse.md b/docs/OrderNextActionResponse.md index 87e7868..851c632 100644 --- a/docs/OrderNextActionResponse.md +++ b/docs/OrderNextActionResponse.md @@ -3,6 +3,7 @@ contains the following attributes that will guide to continue the flow ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **redirect_to_url** | [**OrderNextActionResponseRedirectToUrl**](OrderNextActionResponseRedirectToUrl.md) | | [optional] @@ -18,12 +19,12 @@ json = "{}" # create an instance of OrderNextActionResponse from a JSON string order_next_action_response_instance = OrderNextActionResponse.from_json(json) # print the JSON string representation of the object -print OrderNextActionResponse.to_json() +print(OrderNextActionResponse.to_json()) # convert the object into a dict order_next_action_response_dict = order_next_action_response_instance.to_dict() # create an instance of OrderNextActionResponse from a dict -order_next_action_response_form_dict = order_next_action_response.from_dict(order_next_action_response_dict) +order_next_action_response_from_dict = OrderNextActionResponse.from_dict(order_next_action_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderNextActionResponseRedirectToUrl.md b/docs/OrderNextActionResponseRedirectToUrl.md index 66eb462..03ddadb 100644 --- a/docs/OrderNextActionResponseRedirectToUrl.md +++ b/docs/OrderNextActionResponseRedirectToUrl.md @@ -3,6 +3,7 @@ contains the following attributes that will guide to continue the flow ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **str** | pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. | [optional] @@ -18,12 +19,12 @@ json = "{}" # create an instance of OrderNextActionResponseRedirectToUrl from a JSON string order_next_action_response_redirect_to_url_instance = OrderNextActionResponseRedirectToUrl.from_json(json) # print the JSON string representation of the object -print OrderNextActionResponseRedirectToUrl.to_json() +print(OrderNextActionResponseRedirectToUrl.to_json()) # convert the object into a dict order_next_action_response_redirect_to_url_dict = order_next_action_response_redirect_to_url_instance.to_dict() # create an instance of OrderNextActionResponseRedirectToUrl from a dict -order_next_action_response_redirect_to_url_form_dict = order_next_action_response_redirect_to_url.from_dict(order_next_action_response_redirect_to_url_dict) +order_next_action_response_redirect_to_url_from_dict = OrderNextActionResponseRedirectToUrl.from_dict(order_next_action_response_redirect_to_url_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderRefundRequest.md b/docs/OrderRefundRequest.md index 99ecfbf..1063601 100644 --- a/docs/OrderRefundRequest.md +++ b/docs/OrderRefundRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | @@ -18,12 +19,12 @@ json = "{}" # create an instance of OrderRefundRequest from a JSON string order_refund_request_instance = OrderRefundRequest.from_json(json) # print the JSON string representation of the object -print OrderRefundRequest.to_json() +print(OrderRefundRequest.to_json()) # convert the object into a dict order_refund_request_dict = order_refund_request_instance.to_dict() # create an instance of OrderRefundRequest from a dict -order_refund_request_form_dict = order_refund_request.from_dict(order_refund_request_dict) +order_refund_request_from_dict = OrderRefundRequest.from_dict(order_refund_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderRequest.md b/docs/OrderRequest.md index 2c2408c..cca5f8d 100644 --- a/docs/OrderRequest.md +++ b/docs/OrderRequest.md @@ -3,6 +3,7 @@ a order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **charges** | [**List[ChargeRequest]**](ChargeRequest.md) | List of [charges](https://developers.conekta.com/v2.1.0/reference/orderscreatecharge) that are applied to the order | [optional] @@ -32,12 +33,12 @@ json = "{}" # create an instance of OrderRequest from a JSON string order_request_instance = OrderRequest.from_json(json) # print the JSON string representation of the object -print OrderRequest.to_json() +print(OrderRequest.to_json()) # convert the object into a dict order_request_dict = order_request_instance.to_dict() # create an instance of OrderRequest from a dict -order_request_form_dict = order_request.from_dict(order_request_dict) +order_request_from_dict = OrderRequest.from_dict(order_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderRequestCustomerInfo.md b/docs/OrderRequestCustomerInfo.md index a21121d..bbb25ab 100644 --- a/docs/OrderRequestCustomerInfo.md +++ b/docs/OrderRequestCustomerInfo.md @@ -3,6 +3,7 @@ Customer information ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | @@ -22,12 +23,12 @@ json = "{}" # create an instance of OrderRequestCustomerInfo from a JSON string order_request_customer_info_instance = OrderRequestCustomerInfo.from_json(json) # print the JSON string representation of the object -print OrderRequestCustomerInfo.to_json() +print(OrderRequestCustomerInfo.to_json()) # convert the object into a dict order_request_customer_info_dict = order_request_customer_info_instance.to_dict() # create an instance of OrderRequestCustomerInfo from a dict -order_request_customer_info_form_dict = order_request_customer_info.from_dict(order_request_customer_info_dict) +order_request_customer_info_from_dict = OrderRequestCustomerInfo.from_dict(order_request_customer_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponse.md b/docs/OrderResponse.md index acb8702..804e336 100644 --- a/docs/OrderResponse.md +++ b/docs/OrderResponse.md @@ -3,6 +3,7 @@ order response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The total amount to be collected in cents | [optional] @@ -37,12 +38,12 @@ json = "{}" # create an instance of OrderResponse from a JSON string order_response_instance = OrderResponse.from_json(json) # print the JSON string representation of the object -print OrderResponse.to_json() +print(OrderResponse.to_json()) # convert the object into a dict order_response_dict = order_response_instance.to_dict() # create an instance of OrderResponse from a dict -order_response_form_dict = order_response.from_dict(order_response_dict) +order_response_from_dict = OrderResponse.from_dict(order_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseCharges.md b/docs/OrderResponseCharges.md index 11eafbd..f9cd2c2 100644 --- a/docs/OrderResponseCharges.md +++ b/docs/OrderResponseCharges.md @@ -3,6 +3,7 @@ The charges associated with the order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -19,12 +20,12 @@ json = "{}" # create an instance of OrderResponseCharges from a JSON string order_response_charges_instance = OrderResponseCharges.from_json(json) # print the JSON string representation of the object -print OrderResponseCharges.to_json() +print(OrderResponseCharges.to_json()) # convert the object into a dict order_response_charges_dict = order_response_charges_instance.to_dict() # create an instance of OrderResponseCharges from a dict -order_response_charges_form_dict = order_response_charges.from_dict(order_response_charges_dict) +order_response_charges_from_dict = OrderResponseCharges.from_dict(order_response_charges_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseChargesAllOf.md b/docs/OrderResponseChargesAllOf.md deleted file mode 100644 index bfee981..0000000 --- a/docs/OrderResponseChargesAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# OrderResponseChargesAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ChargesDataResponse]**](ChargesDataResponse.md) | | [optional] - -## Example - -```python -from conekta.models.order_response_charges_all_of import OrderResponseChargesAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of OrderResponseChargesAllOf from a JSON string -order_response_charges_all_of_instance = OrderResponseChargesAllOf.from_json(json) -# print the JSON string representation of the object -print OrderResponseChargesAllOf.to_json() - -# convert the object into a dict -order_response_charges_all_of_dict = order_response_charges_all_of_instance.to_dict() -# create an instance of OrderResponseChargesAllOf from a dict -order_response_charges_all_of_form_dict = order_response_charges_all_of.from_dict(order_response_charges_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderResponseCheckout.md b/docs/OrderResponseCheckout.md index 09f7e68..db3386f 100644 --- a/docs/OrderResponseCheckout.md +++ b/docs/OrderResponseCheckout.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowed_payment_methods** | **List[str]** | | [optional] @@ -23,6 +24,7 @@ Name | Type | Description | Notes **on_demand_enabled** | **bool** | | [optional] **paid_payments_count** | **int** | | [optional] **recurrent** | **bool** | | [optional] +**redirection_time** | **int** | number of seconds to wait before redirecting to the success_url | [optional] **slug** | **str** | | [optional] **sms_sent** | **int** | | [optional] **success_url** | **str** | | [optional] @@ -41,12 +43,12 @@ json = "{}" # create an instance of OrderResponseCheckout from a JSON string order_response_checkout_instance = OrderResponseCheckout.from_json(json) # print the JSON string representation of the object -print OrderResponseCheckout.to_json() +print(OrderResponseCheckout.to_json()) # convert the object into a dict order_response_checkout_dict = order_response_checkout_instance.to_dict() # create an instance of OrderResponseCheckout from a dict -order_response_checkout_form_dict = order_response_checkout.from_dict(order_response_checkout_dict) +order_response_checkout_from_dict = OrderResponseCheckout.from_dict(order_response_checkout_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseCustomerInfo.md b/docs/OrderResponseCustomerInfo.md index 65acdaa..9b55801 100644 --- a/docs/OrderResponseCustomerInfo.md +++ b/docs/OrderResponseCustomerInfo.md @@ -2,14 +2,15 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**object** | **str** | | [optional] **customer_custom_reference** | **str** | Custom reference | [optional] **name** | **str** | | [optional] **email** | **str** | | [optional] **phone** | **str** | | [optional] **corporate** | **bool** | | [optional] [default to False] +**object** | **str** | | [optional] **customer_id** | **str** | | [optional] ## Example @@ -22,12 +23,12 @@ json = "{}" # create an instance of OrderResponseCustomerInfo from a JSON string order_response_customer_info_instance = OrderResponseCustomerInfo.from_json(json) # print the JSON string representation of the object -print OrderResponseCustomerInfo.to_json() +print(OrderResponseCustomerInfo.to_json()) # convert the object into a dict order_response_customer_info_dict = order_response_customer_info_instance.to_dict() # create an instance of OrderResponseCustomerInfo from a dict -order_response_customer_info_form_dict = order_response_customer_info.from_dict(order_response_customer_info_dict) +order_response_customer_info_from_dict = OrderResponseCustomerInfo.from_dict(order_response_customer_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseCustomerInfoAllOf.md b/docs/OrderResponseCustomerInfoAllOf.md deleted file mode 100644 index 1e6b9cc..0000000 --- a/docs/OrderResponseCustomerInfoAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# OrderResponseCustomerInfoAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object** | **str** | | [optional] - -## Example - -```python -from conekta.models.order_response_customer_info_all_of import OrderResponseCustomerInfoAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of OrderResponseCustomerInfoAllOf from a JSON string -order_response_customer_info_all_of_instance = OrderResponseCustomerInfoAllOf.from_json(json) -# print the JSON string representation of the object -print OrderResponseCustomerInfoAllOf.to_json() - -# convert the object into a dict -order_response_customer_info_all_of_dict = order_response_customer_info_all_of_instance.to_dict() -# create an instance of OrderResponseCustomerInfoAllOf from a dict -order_response_customer_info_all_of_form_dict = order_response_customer_info_all_of.from_dict(order_response_customer_info_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderResponseDiscountLines.md b/docs/OrderResponseDiscountLines.md index c861ca7..8a18e7c 100644 --- a/docs/OrderResponseDiscountLines.md +++ b/docs/OrderResponseDiscountLines.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -18,12 +19,12 @@ json = "{}" # create an instance of OrderResponseDiscountLines from a JSON string order_response_discount_lines_instance = OrderResponseDiscountLines.from_json(json) # print the JSON string representation of the object -print OrderResponseDiscountLines.to_json() +print(OrderResponseDiscountLines.to_json()) # convert the object into a dict order_response_discount_lines_dict = order_response_discount_lines_instance.to_dict() # create an instance of OrderResponseDiscountLines from a dict -order_response_discount_lines_form_dict = order_response_discount_lines.from_dict(order_response_discount_lines_dict) +order_response_discount_lines_from_dict = OrderResponseDiscountLines.from_dict(order_response_discount_lines_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseDiscountLinesAllOf.md b/docs/OrderResponseDiscountLinesAllOf.md deleted file mode 100644 index 3badfad..0000000 --- a/docs/OrderResponseDiscountLinesAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# OrderResponseDiscountLinesAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[DiscountLinesDataResponse]**](DiscountLinesDataResponse.md) | | [optional] - -## Example - -```python -from conekta.models.order_response_discount_lines_all_of import OrderResponseDiscountLinesAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of OrderResponseDiscountLinesAllOf from a JSON string -order_response_discount_lines_all_of_instance = OrderResponseDiscountLinesAllOf.from_json(json) -# print the JSON string representation of the object -print OrderResponseDiscountLinesAllOf.to_json() - -# convert the object into a dict -order_response_discount_lines_all_of_dict = order_response_discount_lines_all_of_instance.to_dict() -# create an instance of OrderResponseDiscountLinesAllOf from a dict -order_response_discount_lines_all_of_form_dict = order_response_discount_lines_all_of.from_dict(order_response_discount_lines_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderResponseProducts.md b/docs/OrderResponseProducts.md index 23a7032..9f44e4d 100644 --- a/docs/OrderResponseProducts.md +++ b/docs/OrderResponseProducts.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of OrderResponseProducts from a JSON string order_response_products_instance = OrderResponseProducts.from_json(json) # print the JSON string representation of the object -print OrderResponseProducts.to_json() +print(OrderResponseProducts.to_json()) # convert the object into a dict order_response_products_dict = order_response_products_instance.to_dict() # create an instance of OrderResponseProducts from a dict -order_response_products_form_dict = order_response_products.from_dict(order_response_products_dict) +order_response_products_from_dict = OrderResponseProducts.from_dict(order_response_products_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseProductsAllOf.md b/docs/OrderResponseProductsAllOf.md deleted file mode 100644 index e347f81..0000000 --- a/docs/OrderResponseProductsAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# OrderResponseProductsAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data** | [**List[ProductDataResponse]**](ProductDataResponse.md) | | [optional] - -## Example - -```python -from conekta.models.order_response_products_all_of import OrderResponseProductsAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of OrderResponseProductsAllOf from a JSON string -order_response_products_all_of_instance = OrderResponseProductsAllOf.from_json(json) -# print the JSON string representation of the object -print OrderResponseProductsAllOf.to_json() - -# convert the object into a dict -order_response_products_all_of_dict = order_response_products_all_of_instance.to_dict() -# create an instance of OrderResponseProductsAllOf from a dict -order_response_products_all_of_form_dict = order_response_products_all_of.from_dict(order_response_products_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderResponseShippingContact.md b/docs/OrderResponseShippingContact.md index 9c85ef9..ae6b352 100644 --- a/docs/OrderResponseShippingContact.md +++ b/docs/OrderResponseShippingContact.md @@ -2,18 +2,19 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **int** | | [optional] -**id** | **str** | | [optional] -**object** | **str** | | [optional] **phone** | **str** | | [optional] **receiver** | **str** | | [optional] **between_streets** | **str** | | [optional] **address** | [**CustomerShippingContactsResponseAddress**](CustomerShippingContactsResponseAddress.md) | | [optional] **parent_id** | **str** | | [optional] **default** | **bool** | | [optional] +**id** | **str** | | [optional] +**created_at** | **int** | | [optional] **metadata** | **Dict[str, object]** | Metadata associated with the shipping contact | [optional] +**object** | **str** | | [optional] **deleted** | **bool** | | [optional] ## Example @@ -26,12 +27,12 @@ json = "{}" # create an instance of OrderResponseShippingContact from a JSON string order_response_shipping_contact_instance = OrderResponseShippingContact.from_json(json) # print the JSON string representation of the object -print OrderResponseShippingContact.to_json() +print(OrderResponseShippingContact.to_json()) # convert the object into a dict order_response_shipping_contact_dict = order_response_shipping_contact_instance.to_dict() # create an instance of OrderResponseShippingContact from a dict -order_response_shipping_contact_form_dict = order_response_shipping_contact.from_dict(order_response_shipping_contact_dict) +order_response_shipping_contact_from_dict = OrderResponseShippingContact.from_dict(order_response_shipping_contact_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseShippingContactAllOf.md b/docs/OrderResponseShippingContactAllOf.md deleted file mode 100644 index c6c372e..0000000 --- a/docs/OrderResponseShippingContactAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# OrderResponseShippingContactAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **int** | | [optional] -**id** | **str** | | [optional] -**object** | **str** | | [optional] - -## Example - -```python -from conekta.models.order_response_shipping_contact_all_of import OrderResponseShippingContactAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of OrderResponseShippingContactAllOf from a JSON string -order_response_shipping_contact_all_of_instance = OrderResponseShippingContactAllOf.from_json(json) -# print the JSON string representation of the object -print OrderResponseShippingContactAllOf.to_json() - -# convert the object into a dict -order_response_shipping_contact_all_of_dict = order_response_shipping_contact_all_of_instance.to_dict() -# create an instance of OrderResponseShippingContactAllOf from a dict -order_response_shipping_contact_all_of_form_dict = order_response_shipping_contact_all_of.from_dict(order_response_shipping_contact_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OrderTaxRequest.md b/docs/OrderTaxRequest.md index 1088f25..50f817e 100644 --- a/docs/OrderTaxRequest.md +++ b/docs/OrderTaxRequest.md @@ -3,6 +3,7 @@ create new taxes for an existing order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount to be collected for tax in cents | @@ -19,12 +20,12 @@ json = "{}" # create an instance of OrderTaxRequest from a JSON string order_tax_request_instance = OrderTaxRequest.from_json(json) # print the JSON string representation of the object -print OrderTaxRequest.to_json() +print(OrderTaxRequest.to_json()) # convert the object into a dict order_tax_request_dict = order_tax_request_instance.to_dict() # create an instance of OrderTaxRequest from a dict -order_tax_request_form_dict = order_tax_request.from_dict(order_tax_request_dict) +order_tax_request_from_dict = OrderTaxRequest.from_dict(order_tax_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderUpdateFiscalEntityRequest.md b/docs/OrderUpdateFiscalEntityRequest.md index a300e46..40b2ff9 100644 --- a/docs/OrderUpdateFiscalEntityRequest.md +++ b/docs/OrderUpdateFiscalEntityRequest.md @@ -3,6 +3,7 @@ Fiscal entity of the order, Currently it is a purely informative field ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | @@ -22,12 +23,12 @@ json = "{}" # create an instance of OrderUpdateFiscalEntityRequest from a JSON string order_update_fiscal_entity_request_instance = OrderUpdateFiscalEntityRequest.from_json(json) # print the JSON string representation of the object -print OrderUpdateFiscalEntityRequest.to_json() +print(OrderUpdateFiscalEntityRequest.to_json()) # convert the object into a dict order_update_fiscal_entity_request_dict = order_update_fiscal_entity_request_instance.to_dict() # create an instance of OrderUpdateFiscalEntityRequest from a dict -order_update_fiscal_entity_request_form_dict = order_update_fiscal_entity_request.from_dict(order_update_fiscal_entity_request_dict) +order_update_fiscal_entity_request_from_dict = OrderUpdateFiscalEntityRequest.from_dict(order_update_fiscal_entity_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderUpdateRequest.md b/docs/OrderUpdateRequest.md index 88662a9..2bfc744 100644 --- a/docs/OrderUpdateRequest.md +++ b/docs/OrderUpdateRequest.md @@ -3,6 +3,7 @@ a order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **charges** | [**List[ChargeRequest]**](ChargeRequest.md) | | [optional] @@ -28,12 +29,12 @@ json = "{}" # create an instance of OrderUpdateRequest from a JSON string order_update_request_instance = OrderUpdateRequest.from_json(json) # print the JSON string representation of the object -print OrderUpdateRequest.to_json() +print(OrderUpdateRequest.to_json()) # convert the object into a dict order_update_request_dict = order_update_request_instance.to_dict() # create an instance of OrderUpdateRequest from a dict -order_update_request_form_dict = order_update_request.from_dict(order_update_request_dict) +order_update_request_from_dict = OrderUpdateRequest.from_dict(order_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderUpdateRequestCustomerInfo.md b/docs/OrderUpdateRequestCustomerInfo.md index 72c540a..7dad0d8 100644 --- a/docs/OrderUpdateRequestCustomerInfo.md +++ b/docs/OrderUpdateRequestCustomerInfo.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | @@ -21,12 +22,12 @@ json = "{}" # create an instance of OrderUpdateRequestCustomerInfo from a JSON string order_update_request_customer_info_instance = OrderUpdateRequestCustomerInfo.from_json(json) # print the JSON string representation of the object -print OrderUpdateRequestCustomerInfo.to_json() +print(OrderUpdateRequestCustomerInfo.to_json()) # convert the object into a dict order_update_request_customer_info_dict = order_update_request_customer_info_instance.to_dict() # create an instance of OrderUpdateRequestCustomerInfo from a dict -order_update_request_customer_info_form_dict = order_update_request_customer_info.from_dict(order_update_request_customer_info_dict) +order_update_request_customer_info_from_dict = OrderUpdateRequestCustomerInfo.from_dict(order_update_request_customer_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index 23f2db2..ec33c07 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -24,9 +24,8 @@ Cancel an order that has been previously created. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_response import OrderResponse from conekta.rest import ApiException @@ -69,6 +68,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -89,6 +89,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -110,9 +111,8 @@ Create a new order. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_request import OrderRequest from conekta.models.order_response import OrderResponse @@ -156,6 +156,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **order_request** | [**OrderRequest**](OrderRequest.md)| requested field for order | @@ -176,6 +177,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -196,9 +198,8 @@ Info for a specific order ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_response import OrderResponse from conekta.rest import ApiException @@ -241,6 +242,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -261,6 +263,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -280,9 +283,8 @@ Get order details in the form of a list ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_orders_response import GetOrdersResponse from conekta.rest import ApiException @@ -328,6 +330,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -351,6 +354,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -369,9 +373,8 @@ A refunded order describes the items, amount, and reason an order is being refun ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_response import OrderResponse from conekta.rest import ApiException @@ -415,6 +418,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -436,6 +440,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -457,9 +462,8 @@ A refunded order describes the items, amount, and reason an order is being refun ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_refund_request import OrderRefundRequest from conekta.models.order_response import OrderResponse @@ -504,6 +508,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -525,6 +530,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -546,9 +552,8 @@ Processes an order that has been previously authorized. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_capture_request import OrderCaptureRequest from conekta.models.order_response import OrderResponse @@ -593,6 +598,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -614,6 +620,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -634,9 +641,8 @@ Update an existing Order. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_response import OrderResponse from conekta.models.order_update_request import OrderUpdateRequest @@ -680,6 +686,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -700,6 +707,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | diff --git a/docs/OrdersResponse.md b/docs/OrdersResponse.md index 0f28ac4..f7cb021 100644 --- a/docs/OrdersResponse.md +++ b/docs/OrdersResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data** | [**List[OrderResponse]**](OrderResponse.md) | | @@ -16,12 +17,12 @@ json = "{}" # create an instance of OrdersResponse from a JSON string orders_response_instance = OrdersResponse.from_json(json) # print the JSON string representation of the object -print OrdersResponse.to_json() +print(OrdersResponse.to_json()) # convert the object into a dict orders_response_dict = orders_response_instance.to_dict() # create an instance of OrdersResponse from a dict -orders_response_form_dict = orders_response.from_dict(orders_response_dict) +orders_response_from_dict = OrdersResponse.from_dict(orders_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Page.md b/docs/Page.md index 20666b3..7cbaf9b 100644 --- a/docs/Page.md +++ b/docs/Page.md @@ -3,6 +3,7 @@ page metadata ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **next_page_url** | **str** | URL of the next page. | [optional] @@ -18,12 +19,12 @@ json = "{}" # create an instance of Page from a JSON string page_instance = Page.from_json(json) # print the JSON string representation of the object -print Page.to_json() +print(Page.to_json()) # convert the object into a dict page_dict = page_instance.to_dict() # create an instance of Page from a dict -page_form_dict = page.from_dict(page_dict) +page_from_dict = Page.from_dict(page_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Pagination.md b/docs/Pagination.md index 82e1bb4..9c25ef7 100644 --- a/docs/Pagination.md +++ b/docs/Pagination.md @@ -3,6 +3,7 @@ pagination metadata ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -18,12 +19,12 @@ json = "{}" # create an instance of Pagination from a JSON string pagination_instance = Pagination.from_json(json) # print the JSON string representation of the object -print Pagination.to_json() +print(Pagination.to_json()) # convert the object into a dict pagination_dict = pagination_instance.to_dict() # create an instance of Pagination from a dict -pagination_form_dict = pagination.from_dict(pagination_dict) +pagination_from_dict = Pagination.from_dict(pagination_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentLinkApi.md b/docs/PaymentLinkApi.md index bb424d9..83373bf 100644 --- a/docs/PaymentLinkApi.md +++ b/docs/PaymentLinkApi.md @@ -20,9 +20,8 @@ Cancel Payment Link ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.checkout_response import CheckoutResponse from conekta.rest import ApiException @@ -65,6 +64,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -104,9 +105,8 @@ Create Unique Payment Link ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.checkout import Checkout from conekta.models.checkout_response import CheckoutResponse @@ -150,6 +150,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **checkout** | [**Checkout**](Checkout.md)| requested field for checkout | @@ -170,6 +171,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -188,9 +190,8 @@ Send an email ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.checkout_response import CheckoutResponse from conekta.models.email_checkout_request import EmailCheckoutRequest @@ -235,6 +236,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -256,6 +258,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -275,9 +278,8 @@ Get a payment link by ID ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.checkout_response import CheckoutResponse from conekta.rest import ApiException @@ -320,6 +322,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -340,6 +343,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -361,9 +365,8 @@ Returns a list of links generated by the merchant ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.checkouts_response import CheckoutsResponse from conekta.rest import ApiException @@ -409,6 +412,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -432,6 +436,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -450,9 +455,8 @@ Send an sms ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.checkout_response import CheckoutResponse from conekta.models.sms_checkout_request import SmsCheckoutRequest @@ -497,6 +501,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -518,6 +523,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/PaymentMethod.md b/docs/PaymentMethod.md index 40dc165..2dabd91 100644 --- a/docs/PaymentMethod.md +++ b/docs/PaymentMethod.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of PaymentMethod from a JSON string payment_method_instance = PaymentMethod.from_json(json) # print the JSON string representation of the object -print PaymentMethod.to_json() +print(PaymentMethod.to_json()) # convert the object into a dict payment_method_dict = payment_method_instance.to_dict() # create an instance of PaymentMethod from a dict -payment_method_form_dict = payment_method.from_dict(payment_method_dict) +payment_method_from_dict = PaymentMethod.from_dict(payment_method_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodBankTransfer.md b/docs/PaymentMethodBankTransfer.md index 2b1ace3..49a4664 100644 --- a/docs/PaymentMethodBankTransfer.md +++ b/docs/PaymentMethodBankTransfer.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | [optional] @@ -33,12 +34,12 @@ json = "{}" # create an instance of PaymentMethodBankTransfer from a JSON string payment_method_bank_transfer_instance = PaymentMethodBankTransfer.from_json(json) # print the JSON string representation of the object -print PaymentMethodBankTransfer.to_json() +print(PaymentMethodBankTransfer.to_json()) # convert the object into a dict payment_method_bank_transfer_dict = payment_method_bank_transfer_instance.to_dict() # create an instance of PaymentMethodBankTransfer from a dict -payment_method_bank_transfer_form_dict = payment_method_bank_transfer.from_dict(payment_method_bank_transfer_dict) +payment_method_bank_transfer_from_dict = PaymentMethodBankTransfer.from_dict(payment_method_bank_transfer_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCard.md b/docs/PaymentMethodCard.md index 52e2b07..5e949f9 100644 --- a/docs/PaymentMethodCard.md +++ b/docs/PaymentMethodCard.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | [optional] @@ -28,12 +29,12 @@ json = "{}" # create an instance of PaymentMethodCard from a JSON string payment_method_card_instance = PaymentMethodCard.from_json(json) # print the JSON string representation of the object -print PaymentMethodCard.to_json() +print(PaymentMethodCard.to_json()) # convert the object into a dict payment_method_card_dict = payment_method_card_instance.to_dict() # create an instance of PaymentMethodCard from a dict -payment_method_card_form_dict = payment_method_card.from_dict(payment_method_card_dict) +payment_method_card_from_dict = PaymentMethodCard.from_dict(payment_method_card_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCardRequest.md b/docs/PaymentMethodCardRequest.md index f988d59..cecb164 100644 --- a/docs/PaymentMethodCardRequest.md +++ b/docs/PaymentMethodCardRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of payment method | @@ -17,12 +18,12 @@ json = "{}" # create an instance of PaymentMethodCardRequest from a JSON string payment_method_card_request_instance = PaymentMethodCardRequest.from_json(json) # print the JSON string representation of the object -print PaymentMethodCardRequest.to_json() +print(PaymentMethodCardRequest.to_json()) # convert the object into a dict payment_method_card_request_dict = payment_method_card_request_instance.to_dict() # create an instance of PaymentMethodCardRequest from a dict -payment_method_card_request_form_dict = payment_method_card_request.from_dict(payment_method_card_request_dict) +payment_method_card_request_from_dict = PaymentMethodCardRequest.from_dict(payment_method_card_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCardRequestAllOf.md b/docs/PaymentMethodCardRequestAllOf.md deleted file mode 100644 index f594358..0000000 --- a/docs/PaymentMethodCardRequestAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# PaymentMethodCardRequestAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**token_id** | **str** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. | [optional] - -## Example - -```python -from conekta.models.payment_method_card_request_all_of import PaymentMethodCardRequestAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of PaymentMethodCardRequestAllOf from a JSON string -payment_method_card_request_all_of_instance = PaymentMethodCardRequestAllOf.from_json(json) -# print the JSON string representation of the object -print PaymentMethodCardRequestAllOf.to_json() - -# convert the object into a dict -payment_method_card_request_all_of_dict = payment_method_card_request_all_of_instance.to_dict() -# create an instance of PaymentMethodCardRequestAllOf from a dict -payment_method_card_request_all_of_form_dict = payment_method_card_request_all_of.from_dict(payment_method_card_request_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaymentMethodCardResponse.md b/docs/PaymentMethodCardResponse.md index 9e4715b..a1ec5e3 100644 --- a/docs/PaymentMethodCardResponse.md +++ b/docs/PaymentMethodCardResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -30,12 +31,12 @@ json = "{}" # create an instance of PaymentMethodCardResponse from a JSON string payment_method_card_response_instance = PaymentMethodCardResponse.from_json(json) # print the JSON string representation of the object -print PaymentMethodCardResponse.to_json() +print(PaymentMethodCardResponse.to_json()) # convert the object into a dict payment_method_card_response_dict = payment_method_card_response_instance.to_dict() # create an instance of PaymentMethodCardResponse from a dict -payment_method_card_response_form_dict = payment_method_card_response.from_dict(payment_method_card_response_dict) +payment_method_card_response_from_dict = PaymentMethodCardResponse.from_dict(payment_method_card_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCardResponseAllOf.md b/docs/PaymentMethodCardResponseAllOf.md deleted file mode 100644 index 8ca7ce8..0000000 --- a/docs/PaymentMethodCardResponseAllOf.md +++ /dev/null @@ -1,38 +0,0 @@ -# PaymentMethodCardResponseAllOf - -use for card responses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**last4** | **str** | | [optional] -**bin** | **str** | | [optional] -**card_type** | **str** | | [optional] -**exp_month** | **str** | | [optional] -**exp_year** | **str** | | [optional] -**brand** | **str** | | [optional] -**name** | **str** | | [optional] -**default** | **bool** | | [optional] -**visible_on_checkout** | **bool** | | [optional] -**payment_source_status** | **str** | | [optional] - -## Example - -```python -from conekta.models.payment_method_card_response_all_of import PaymentMethodCardResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of PaymentMethodCardResponseAllOf from a JSON string -payment_method_card_response_all_of_instance = PaymentMethodCardResponseAllOf.from_json(json) -# print the JSON string representation of the object -print PaymentMethodCardResponseAllOf.to_json() - -# convert the object into a dict -payment_method_card_response_all_of_dict = payment_method_card_response_all_of_instance.to_dict() -# create an instance of PaymentMethodCardResponseAllOf from a dict -payment_method_card_response_all_of_form_dict = payment_method_card_response_all_of.from_dict(payment_method_card_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaymentMethodCash.md b/docs/PaymentMethodCash.md index e009f30..a54863c 100644 --- a/docs/PaymentMethodCash.md +++ b/docs/PaymentMethodCash.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | [optional] @@ -25,12 +26,12 @@ json = "{}" # create an instance of PaymentMethodCash from a JSON string payment_method_cash_instance = PaymentMethodCash.from_json(json) # print the JSON string representation of the object -print PaymentMethodCash.to_json() +print(PaymentMethodCash.to_json()) # convert the object into a dict payment_method_cash_dict = payment_method_cash_instance.to_dict() # create an instance of PaymentMethodCash from a dict -payment_method_cash_form_dict = payment_method_cash.from_dict(payment_method_cash_dict) +payment_method_cash_from_dict = PaymentMethodCash.from_dict(payment_method_cash_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCashRequest.md b/docs/PaymentMethodCashRequest.md index f51fb5a..ddff9b7 100644 --- a/docs/PaymentMethodCashRequest.md +++ b/docs/PaymentMethodCashRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of payment method | @@ -17,12 +18,12 @@ json = "{}" # create an instance of PaymentMethodCashRequest from a JSON string payment_method_cash_request_instance = PaymentMethodCashRequest.from_json(json) # print the JSON string representation of the object -print PaymentMethodCashRequest.to_json() +print(PaymentMethodCashRequest.to_json()) # convert the object into a dict payment_method_cash_request_dict = payment_method_cash_request_instance.to_dict() # create an instance of PaymentMethodCashRequest from a dict -payment_method_cash_request_form_dict = payment_method_cash_request.from_dict(payment_method_cash_request_dict) +payment_method_cash_request_from_dict = PaymentMethodCashRequest.from_dict(payment_method_cash_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCashRequestAllOf.md b/docs/PaymentMethodCashRequestAllOf.md deleted file mode 100644 index 7fd72b3..0000000 --- a/docs/PaymentMethodCashRequestAllOf.md +++ /dev/null @@ -1,28 +0,0 @@ -# PaymentMethodCashRequestAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires_at** | **int** | | [optional] - -## Example - -```python -from conekta.models.payment_method_cash_request_all_of import PaymentMethodCashRequestAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of PaymentMethodCashRequestAllOf from a JSON string -payment_method_cash_request_all_of_instance = PaymentMethodCashRequestAllOf.from_json(json) -# print the JSON string representation of the object -print PaymentMethodCashRequestAllOf.to_json() - -# convert the object into a dict -payment_method_cash_request_all_of_dict = payment_method_cash_request_all_of_instance.to_dict() -# create an instance of PaymentMethodCashRequestAllOf from a dict -payment_method_cash_request_all_of_form_dict = payment_method_cash_request_all_of.from_dict(payment_method_cash_request_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaymentMethodCashResponse.md b/docs/PaymentMethodCashResponse.md index 958e3af..7a807a9 100644 --- a/docs/PaymentMethodCashResponse.md +++ b/docs/PaymentMethodCashResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -25,12 +26,12 @@ json = "{}" # create an instance of PaymentMethodCashResponse from a JSON string payment_method_cash_response_instance = PaymentMethodCashResponse.from_json(json) # print the JSON string representation of the object -print PaymentMethodCashResponse.to_json() +print(PaymentMethodCashResponse.to_json()) # convert the object into a dict payment_method_cash_response_dict = payment_method_cash_response_instance.to_dict() # create an instance of PaymentMethodCashResponse from a dict -payment_method_cash_response_form_dict = payment_method_cash_response.from_dict(payment_method_cash_response_dict) +payment_method_cash_response_from_dict = PaymentMethodCashResponse.from_dict(payment_method_cash_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodCashResponseAllOf.md b/docs/PaymentMethodCashResponseAllOf.md deleted file mode 100644 index 222fe65..0000000 --- a/docs/PaymentMethodCashResponseAllOf.md +++ /dev/null @@ -1,33 +0,0 @@ -# PaymentMethodCashResponseAllOf - -use for cash responses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reference** | **str** | | [optional] -**barcode** | **str** | | [optional] -**barcode_url** | **str** | | [optional] -**expires_at** | **int** | | [optional] -**provider** | **str** | | [optional] - -## Example - -```python -from conekta.models.payment_method_cash_response_all_of import PaymentMethodCashResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of PaymentMethodCashResponseAllOf from a JSON string -payment_method_cash_response_all_of_instance = PaymentMethodCashResponseAllOf.from_json(json) -# print the JSON string representation of the object -print PaymentMethodCashResponseAllOf.to_json() - -# convert the object into a dict -payment_method_cash_response_all_of_dict = payment_method_cash_response_all_of_instance.to_dict() -# create an instance of PaymentMethodCashResponseAllOf from a dict -payment_method_cash_response_all_of_form_dict = payment_method_cash_response_all_of.from_dict(payment_method_cash_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaymentMethodResponse.md b/docs/PaymentMethodResponse.md index 0041329..b1c6a74 100644 --- a/docs/PaymentMethodResponse.md +++ b/docs/PaymentMethodResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -20,12 +21,12 @@ json = "{}" # create an instance of PaymentMethodResponse from a JSON string payment_method_response_instance = PaymentMethodResponse.from_json(json) # print the JSON string representation of the object -print PaymentMethodResponse.to_json() +print(PaymentMethodResponse.to_json()) # convert the object into a dict payment_method_response_dict = payment_method_response_instance.to_dict() # create an instance of PaymentMethodResponse from a dict -payment_method_response_form_dict = payment_method_response.from_dict(payment_method_response_dict) +payment_method_response_from_dict = PaymentMethodResponse.from_dict(payment_method_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodSpeiRecurrent.md b/docs/PaymentMethodSpeiRecurrent.md index 286675e..31f3e44 100644 --- a/docs/PaymentMethodSpeiRecurrent.md +++ b/docs/PaymentMethodSpeiRecurrent.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -22,12 +23,12 @@ json = "{}" # create an instance of PaymentMethodSpeiRecurrent from a JSON string payment_method_spei_recurrent_instance = PaymentMethodSpeiRecurrent.from_json(json) # print the JSON string representation of the object -print PaymentMethodSpeiRecurrent.to_json() +print(PaymentMethodSpeiRecurrent.to_json()) # convert the object into a dict payment_method_spei_recurrent_dict = payment_method_spei_recurrent_instance.to_dict() # create an instance of PaymentMethodSpeiRecurrent from a dict -payment_method_spei_recurrent_form_dict = payment_method_spei_recurrent.from_dict(payment_method_spei_recurrent_dict) +payment_method_spei_recurrent_from_dict = PaymentMethodSpeiRecurrent.from_dict(payment_method_spei_recurrent_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodSpeiRecurrentAllOf.md b/docs/PaymentMethodSpeiRecurrentAllOf.md deleted file mode 100644 index 8f33776..0000000 --- a/docs/PaymentMethodSpeiRecurrentAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# PaymentMethodSpeiRecurrentAllOf - -use for spei responses - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reference** | **str** | | [optional] -**expires_at** | **str** | | [optional] - -## Example - -```python -from conekta.models.payment_method_spei_recurrent_all_of import PaymentMethodSpeiRecurrentAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of PaymentMethodSpeiRecurrentAllOf from a JSON string -payment_method_spei_recurrent_all_of_instance = PaymentMethodSpeiRecurrentAllOf.from_json(json) -# print the JSON string representation of the object -print PaymentMethodSpeiRecurrentAllOf.to_json() - -# convert the object into a dict -payment_method_spei_recurrent_all_of_dict = payment_method_spei_recurrent_all_of_instance.to_dict() -# create an instance of PaymentMethodSpeiRecurrentAllOf from a dict -payment_method_spei_recurrent_all_of_form_dict = payment_method_spei_recurrent_all_of.from_dict(payment_method_spei_recurrent_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/PaymentMethodSpeiRequest.md b/docs/PaymentMethodSpeiRequest.md index 61c479b..b8ffb84 100644 --- a/docs/PaymentMethodSpeiRequest.md +++ b/docs/PaymentMethodSpeiRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | Type of payment method | @@ -17,12 +18,12 @@ json = "{}" # create an instance of PaymentMethodSpeiRequest from a JSON string payment_method_spei_request_instance = PaymentMethodSpeiRequest.from_json(json) # print the JSON string representation of the object -print PaymentMethodSpeiRequest.to_json() +print(PaymentMethodSpeiRequest.to_json()) # convert the object into a dict payment_method_spei_request_dict = payment_method_spei_request_instance.to_dict() # create an instance of PaymentMethodSpeiRequest from a dict -payment_method_spei_request_form_dict = payment_method_spei_request.from_dict(payment_method_spei_request_dict) +payment_method_spei_request_from_dict = PaymentMethodSpeiRequest.from_dict(payment_method_spei_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PaymentMethodsApi.md b/docs/PaymentMethodsApi.md index 7ef93c0..75f0cd0 100644 --- a/docs/PaymentMethodsApi.md +++ b/docs/PaymentMethodsApi.md @@ -20,9 +20,8 @@ Create a payment method for a customer. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.create_customer_payment_methods_request import CreateCustomerPaymentMethodsRequest from conekta.models.create_customer_payment_methods_response import CreateCustomerPaymentMethodsResponse @@ -67,6 +66,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -108,9 +109,8 @@ Delete an existing payment method ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.update_customer_payment_methods_response import UpdateCustomerPaymentMethodsResponse from conekta.rest import ApiException @@ -154,6 +154,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -175,6 +176,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -195,9 +197,8 @@ Get a list of Payment Methods ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_payment_method_response import GetPaymentMethodResponse from conekta.rest import ApiException @@ -244,6 +245,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -268,6 +270,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -287,9 +290,8 @@ Gets a payment Method that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.update_customer_payment_methods_response import UpdateCustomerPaymentMethodsResponse from conekta.models.update_payment_methods import UpdatePaymentMethods @@ -335,6 +337,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -357,6 +360,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/RiskRules.md b/docs/Payout.md similarity index 51% rename from docs/RiskRules.md rename to docs/Payout.md index 87c641a..9b204d6 100644 --- a/docs/RiskRules.md +++ b/docs/Payout.md @@ -1,27 +1,29 @@ -# RiskRules +# Payout +The payout information of the payout order. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**List[RiskRulesData]**](RiskRulesData.md) | | [optional] +**payout_method** | [**PayoutMethod**](PayoutMethod.md) | | ## Example ```python -from conekta.models.risk_rules import RiskRules +from conekta.models.payout import Payout # TODO update the JSON string below json = "{}" -# create an instance of RiskRules from a JSON string -risk_rules_instance = RiskRules.from_json(json) +# create an instance of Payout from a JSON string +payout_instance = Payout.from_json(json) # print the JSON string representation of the object -print RiskRules.to_json() +print(Payout.to_json()) # convert the object into a dict -risk_rules_dict = risk_rules_instance.to_dict() -# create an instance of RiskRules from a dict -risk_rules_form_dict = risk_rules.from_dict(risk_rules_dict) +payout_dict = payout_instance.to_dict() +# create an instance of Payout from a dict +payout_from_dict = Payout.from_dict(payout_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PayoutMethod.md b/docs/PayoutMethod.md new file mode 100644 index 0000000..7439de5 --- /dev/null +++ b/docs/PayoutMethod.md @@ -0,0 +1,30 @@ +# PayoutMethod + +The payout method of the payout order. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | The type of the payout method. | + +## Example + +```python +from conekta.models.payout_method import PayoutMethod + +# TODO update the JSON string below +json = "{}" +# create an instance of PayoutMethod from a JSON string +payout_method_instance = PayoutMethod.from_json(json) +# print the JSON string representation of the object +print(PayoutMethod.to_json()) + +# convert the object into a dict +payout_method_dict = payout_method_instance.to_dict() +# create an instance of PayoutMethod from a dict +payout_method_from_dict = PayoutMethod.from_dict(payout_method_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayoutOrder.md b/docs/PayoutOrder.md new file mode 100644 index 0000000..91ee2ca --- /dev/null +++ b/docs/PayoutOrder.md @@ -0,0 +1,36 @@ +# PayoutOrder + +a payout order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_payout_methods** | **List[str]** | The payout methods that are allowed for the payout order. | +**amount** | **int** | The amount of the payout order. | +**currency** | **str** | The currency in which the payout order is made. | [default to 'MXN'] +**customer_info** | [**CustomerInfoJustCustomerId**](CustomerInfoJustCustomerId.md) | | +**metadata** | **Dict[str, object]** | The metadata of the payout order. | [optional] +**payout** | [**Payout**](Payout.md) | | +**reason** | **str** | The reason for the payout order. | + +## Example + +```python +from conekta.models.payout_order import PayoutOrder + +# TODO update the JSON string below +json = "{}" +# create an instance of PayoutOrder from a JSON string +payout_order_instance = PayoutOrder.from_json(json) +# print the JSON string representation of the object +print(PayoutOrder.to_json()) + +# convert the object into a dict +payout_order_dict = payout_order_instance.to_dict() +# create an instance of PayoutOrder from a dict +payout_order_from_dict = PayoutOrder.from_dict(payout_order_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayoutOrderPayoutsItem.md b/docs/PayoutOrderPayoutsItem.md new file mode 100644 index 0000000..53da316 --- /dev/null +++ b/docs/PayoutOrderPayoutsItem.md @@ -0,0 +1,36 @@ +# PayoutOrderPayoutsItem + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **int** | The amount of the payout. | +**currency** | **str** | The currency in which the payout is made. | +**expires_at** | **int** | The expiration date of the payout. | [optional] +**id** | **str** | The id of the payout. | +**livemode** | **bool** | The live mode of the payout. | +**object** | **str** | The object of the payout. | +**payout_order_id** | **str** | The id of the payout order. | [optional] +**status** | **str** | The status of the payout. | [optional] + +## Example + +```python +from conekta.models.payout_order_payouts_item import PayoutOrderPayoutsItem + +# TODO update the JSON string below +json = "{}" +# create an instance of PayoutOrderPayoutsItem from a JSON string +payout_order_payouts_item_instance = PayoutOrderPayoutsItem.from_json(json) +# print the JSON string representation of the object +print(PayoutOrderPayoutsItem.to_json()) + +# convert the object into a dict +payout_order_payouts_item_dict = payout_order_payouts_item_instance.to_dict() +# create an instance of PayoutOrderPayoutsItem from a dict +payout_order_payouts_item_from_dict = PayoutOrderPayoutsItem.from_dict(payout_order_payouts_item_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayoutOrderResponse.md b/docs/PayoutOrderResponse.md new file mode 100644 index 0000000..6e45559 --- /dev/null +++ b/docs/PayoutOrderResponse.md @@ -0,0 +1,43 @@ +# PayoutOrderResponse + +payout order model response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowed_payout_methods** | **List[str]** | The payout methods that are allowed for the payout order. | +**amount** | **int** | The amount of the payout order. | +**created_at** | **int** | The creation date of the payout order. | +**currency** | **str** | The currency in which the payout order is made. | [default to 'MXN'] +**customer_info** | [**PayoutOrderResponseCustomerInfo**](PayoutOrderResponseCustomerInfo.md) | | +**expires_at** | **int** | The expiration date of the payout order. | [optional] +**id** | **str** | The id of the payout order. | +**livemode** | **bool** | The live mode of the payout order. | +**object** | **str** | The object of the payout order. | +**metadata** | **Dict[str, object]** | The metadata of the payout order. | [optional] +**payouts** | [**List[PayoutOrderPayoutsItem]**](PayoutOrderPayoutsItem.md) | The payout information of the payout order. | +**reason** | **str** | The reason for the payout order. | +**status** | **str** | The status of the payout order. | [optional] +**updated_at** | **int** | The update date of the payout order. | + +## Example + +```python +from conekta.models.payout_order_response import PayoutOrderResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PayoutOrderResponse from a JSON string +payout_order_response_instance = PayoutOrderResponse.from_json(json) +# print the JSON string representation of the object +print(PayoutOrderResponse.to_json()) + +# convert the object into a dict +payout_order_response_dict = payout_order_response_instance.to_dict() +# create an instance of PayoutOrderResponse from a dict +payout_order_response_from_dict = PayoutOrderResponse.from_dict(payout_order_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayoutOrderResponseCustomerInfo.md b/docs/PayoutOrderResponseCustomerInfo.md new file mode 100644 index 0000000..adb903f --- /dev/null +++ b/docs/PayoutOrderResponseCustomerInfo.md @@ -0,0 +1,36 @@ +# PayoutOrderResponseCustomerInfo + +The customer information of the payout order. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customer_custom_reference** | **str** | Custom reference | [optional] +**name** | **str** | | [optional] +**email** | **str** | | [optional] +**phone** | **str** | | [optional] +**corporate** | **bool** | | [optional] [default to False] +**object** | **str** | | [optional] +**id** | **str** | The id of the customer. | + +## Example + +```python +from conekta.models.payout_order_response_customer_info import PayoutOrderResponseCustomerInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of PayoutOrderResponseCustomerInfo from a JSON string +payout_order_response_customer_info_instance = PayoutOrderResponseCustomerInfo.from_json(json) +# print the JSON string representation of the object +print(PayoutOrderResponseCustomerInfo.to_json()) + +# convert the object into a dict +payout_order_response_customer_info_dict = payout_order_response_customer_info_instance.to_dict() +# create an instance of PayoutOrderResponseCustomerInfo from a dict +payout_order_response_customer_info_from_dict = PayoutOrderResponseCustomerInfo.from_dict(payout_order_response_customer_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PayoutOrdersApi.md b/docs/PayoutOrdersApi.md new file mode 100644 index 0000000..fff20bd --- /dev/null +++ b/docs/PayoutOrdersApi.md @@ -0,0 +1,268 @@ +# conekta.PayoutOrdersApi + +All URIs are relative to *https://api.conekta.io* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_payout_order**](PayoutOrdersApi.md#create_payout_order) | **POST** /payout_orders | Create payout order +[**get_payout_order_by_id**](PayoutOrdersApi.md#get_payout_order_by_id) | **GET** /payout_orders/{id} | Get Payout Order +[**get_payout_orders**](PayoutOrdersApi.md#get_payout_orders) | **GET** /payout_orders | Get a list of Payout Orders + + +# **create_payout_order** +> PayoutOrderResponse create_payout_order(payout_order, accept_language=accept_language) + +Create payout order + +Create a new payout order. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import conekta +from conekta.models.payout_order import PayoutOrder +from conekta.models.payout_order_response import PayoutOrderResponse +from conekta.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.conekta.io +# See configuration.py for a list of all supported configuration parameters. +configuration = conekta.Configuration( + host = "https://api.conekta.io" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = conekta.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with conekta.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = conekta.PayoutOrdersApi(api_client) + payout_order = conekta.PayoutOrder() # PayoutOrder | requested field for payout order + accept_language = 'es' # str | Use for knowing which language to use (optional) (default to 'es') + + try: + # Create payout order + api_response = api_instance.create_payout_order(payout_order, accept_language=accept_language) + print("The response of PayoutOrdersApi->create_payout_order:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PayoutOrdersApi->create_payout_order: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payout_order** | [**PayoutOrder**](PayoutOrder.md)| requested field for payout order | + **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/vnd.conekta-v2.1.0+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**422** | parameter validation error | - | +**401** | authentication error | - | +**402** | payment required error | - | +**404** | not found entity | - | +**500** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_payout_order_by_id** +> PayoutOrderResponse get_payout_order_by_id(id, accept_language=accept_language) + +Get Payout Order + +Gets a payout Order resource that corresponds to a payout order ID. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import conekta +from conekta.models.payout_order_response import PayoutOrderResponse +from conekta.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.conekta.io +# See configuration.py for a list of all supported configuration parameters. +configuration = conekta.Configuration( + host = "https://api.conekta.io" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = conekta.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with conekta.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = conekta.PayoutOrdersApi(api_client) + id = '6307a60c41de27127515a575' # str | Identifier of the resource + accept_language = 'es' # str | Use for knowing which language to use (optional) (default to 'es') + + try: + # Get Payout Order + api_response = api_instance.get_payout_order_by_id(id, accept_language=accept_language) + print("The response of PayoutOrdersApi->get_payout_order_by_id:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PayoutOrdersApi->get_payout_order_by_id: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Identifier of the resource | + **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.conekta-v2.1.0+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**401** | authentication error | - | +**404** | not found entity | - | +**500** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_payout_orders** +> PayoutOrdersResponse get_payout_orders(accept_language=accept_language, limit=limit, search=search, next=next, previous=previous) + +Get a list of Payout Orders + +Get Payout order details in the form of a list + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import conekta +from conekta.models.payout_orders_response import PayoutOrdersResponse +from conekta.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.conekta.io +# See configuration.py for a list of all supported configuration parameters. +configuration = conekta.Configuration( + host = "https://api.conekta.io" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = conekta.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with conekta.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = conekta.PayoutOrdersApi(api_client) + accept_language = 'es' # str | Use for knowing which language to use (optional) (default to 'es') + limit = 20 # int | The numbers of items to return, the maximum value is 250 (optional) (default to 20) + search = 'search_example' # str | General order search, e.g. by mail, reference etc. (optional) + next = 'next_example' # str | next page (optional) + previous = 'previous_example' # str | previous page (optional) + + try: + # Get a list of Payout Orders + api_response = api_instance.get_payout_orders(accept_language=accept_language, limit=limit, search=search, next=next, previous=previous) + print("The response of PayoutOrdersApi->get_payout_orders:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PayoutOrdersApi->get_payout_orders: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] + **limit** | **int**| The numbers of items to return, the maximum value is 250 | [optional] [default to 20] + **search** | **str**| General order search, e.g. by mail, reference etc. | [optional] + **next** | **str**| next page | [optional] + **previous** | **str**| previous page | [optional] + +### Return type + +[**PayoutOrdersResponse**](PayoutOrdersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.conekta-v2.1.0+json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | successful operation | - | +**401** | authentication error | - | +**500** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PayoutOrdersResponse.md b/docs/PayoutOrdersResponse.md new file mode 100644 index 0000000..79d902d --- /dev/null +++ b/docs/PayoutOrdersResponse.md @@ -0,0 +1,33 @@ +# PayoutOrdersResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**has_more** | **bool** | Indicates if there are more pages to be requested | +**object** | **str** | Object type, in this case is list | +**next_page_url** | **str** | URL of the next page. | [optional] +**previous_page_url** | **str** | Url of the previous page. | [optional] +**data** | [**List[PayoutOrderResponse]**](PayoutOrderResponse.md) | | [optional] + +## Example + +```python +from conekta.models.payout_orders_response import PayoutOrdersResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PayoutOrdersResponse from a JSON string +payout_orders_response_instance = PayoutOrdersResponse.from_json(json) +# print the JSON string representation of the object +print(PayoutOrdersResponse.to_json()) + +# convert the object into a dict +payout_orders_response_dict = payout_orders_response_instance.to_dict() +# create an instance of PayoutOrdersResponse from a dict +payout_orders_response_from_dict = PayoutOrdersResponse.from_dict(payout_orders_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PlanRequest.md b/docs/PlanRequest.md index aa21ffa..63352b1 100644 --- a/docs/PlanRequest.md +++ b/docs/PlanRequest.md @@ -3,6 +3,7 @@ a plan ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount in cents that will be charged on the interval specified. | @@ -24,12 +25,12 @@ json = "{}" # create an instance of PlanRequest from a JSON string plan_request_instance = PlanRequest.from_json(json) # print the JSON string representation of the object -print PlanRequest.to_json() +print(PlanRequest.to_json()) # convert the object into a dict plan_request_dict = plan_request_instance.to_dict() # create an instance of PlanRequest from a dict -plan_request_form_dict = plan_request.from_dict(plan_request_dict) +plan_request_from_dict = PlanRequest.from_dict(plan_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlanResponse.md b/docs/PlanResponse.md index 8df0f1e..6673a25 100644 --- a/docs/PlanResponse.md +++ b/docs/PlanResponse.md @@ -3,6 +3,7 @@ plans model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] @@ -27,12 +28,12 @@ json = "{}" # create an instance of PlanResponse from a JSON string plan_response_instance = PlanResponse.from_json(json) # print the JSON string representation of the object -print PlanResponse.to_json() +print(PlanResponse.to_json()) # convert the object into a dict plan_response_dict = plan_response_instance.to_dict() # create an instance of PlanResponse from a dict -plan_response_form_dict = plan_response.from_dict(plan_response_dict) +plan_response_from_dict = PlanResponse.from_dict(plan_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlanUpdateRequest.md b/docs/PlanUpdateRequest.md index 2f660b9..9df7f70 100644 --- a/docs/PlanUpdateRequest.md +++ b/docs/PlanUpdateRequest.md @@ -3,6 +3,7 @@ a plan ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount in cents that will be charged on the interval specified. | [optional] @@ -20,12 +21,12 @@ json = "{}" # create an instance of PlanUpdateRequest from a JSON string plan_update_request_instance = PlanUpdateRequest.from_json(json) # print the JSON string representation of the object -print PlanUpdateRequest.to_json() +print(PlanUpdateRequest.to_json()) # convert the object into a dict plan_update_request_dict = plan_update_request_instance.to_dict() # create an instance of PlanUpdateRequest from a dict -plan_update_request_form_dict = plan_update_request.from_dict(plan_update_request_dict) +plan_update_request_from_dict = PlanUpdateRequest.from_dict(plan_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PlansApi.md b/docs/PlansApi.md index 8ff0641..b47bedb 100644 --- a/docs/PlansApi.md +++ b/docs/PlansApi.md @@ -21,9 +21,8 @@ Create a new plan for an existing order ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.plan_request import PlanRequest from conekta.models.plan_response import PlanResponse @@ -67,6 +66,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **plan_request** | [**PlanRequest**](PlanRequest.md)| requested field for plan | @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -104,9 +105,8 @@ Delete Plan ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.plan_response import PlanResponse from conekta.rest import ApiException @@ -148,6 +148,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -167,6 +168,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -185,9 +187,8 @@ Get Plan ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.plan_response import PlanResponse from conekta.rest import ApiException @@ -230,6 +231,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -250,6 +252,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -268,9 +271,8 @@ Get A List of Plans ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_plans_response import GetPlansResponse from conekta.rest import ApiException @@ -316,6 +318,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -339,6 +342,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -356,9 +360,8 @@ Update Plan ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.plan_response import PlanResponse from conekta.models.plan_update_request import PlanUpdateRequest @@ -403,6 +406,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -424,6 +428,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/Product.md b/docs/Product.md index 1a1b312..3d2c433 100644 --- a/docs/Product.md +++ b/docs/Product.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | **Dict[str, object]** | | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of Product from a JSON string product_instance = Product.from_json(json) # print the JSON string representation of the object -print Product.to_json() +print(Product.to_json()) # convert the object into a dict product_dict = product_instance.to_dict() # create an instance of Product from a dict -product_form_dict = product.from_dict(product_dict) +product_from_dict = Product.from_dict(product_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductDataResponse.md b/docs/ProductDataResponse.md index dfd19ca..66e2760 100644 --- a/docs/ProductDataResponse.md +++ b/docs/ProductDataResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | **Dict[str, object]** | | [optional] @@ -27,12 +28,12 @@ json = "{}" # create an instance of ProductDataResponse from a JSON string product_data_response_instance = ProductDataResponse.from_json(json) # print the JSON string representation of the object -print ProductDataResponse.to_json() +print(ProductDataResponse.to_json()) # convert the object into a dict product_data_response_dict = product_data_response_instance.to_dict() # create an instance of ProductDataResponse from a dict -product_data_response_form_dict = product_data_response.from_dict(product_data_response_dict) +product_data_response_from_dict = ProductDataResponse.from_dict(product_data_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductDataResponseAllOf.md b/docs/ProductDataResponseAllOf.md deleted file mode 100644 index 6324901..0000000 --- a/docs/ProductDataResponseAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# ProductDataResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**object** | **str** | | [optional] -**parent_id** | **str** | | [optional] - -## Example - -```python -from conekta.models.product_data_response_all_of import ProductDataResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of ProductDataResponseAllOf from a JSON string -product_data_response_all_of_instance = ProductDataResponseAllOf.from_json(json) -# print the JSON string representation of the object -print ProductDataResponseAllOf.to_json() - -# convert the object into a dict -product_data_response_all_of_dict = product_data_response_all_of_instance.to_dict() -# create an instance of ProductDataResponseAllOf from a dict -product_data_response_all_of_form_dict = product_data_response_all_of.from_dict(product_data_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProductOrderResponse.md b/docs/ProductOrderResponse.md index ed988bf..ac7dfe6 100644 --- a/docs/ProductOrderResponse.md +++ b/docs/ProductOrderResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | **Dict[str, object]** | | [optional] @@ -27,12 +28,12 @@ json = "{}" # create an instance of ProductOrderResponse from a JSON string product_order_response_instance = ProductOrderResponse.from_json(json) # print the JSON string representation of the object -print ProductOrderResponse.to_json() +print(ProductOrderResponse.to_json()) # convert the object into a dict product_order_response_dict = product_order_response_instance.to_dict() # create an instance of ProductOrderResponse from a dict -product_order_response_form_dict = product_order_response.from_dict(product_order_response_dict) +product_order_response_from_dict = ProductOrderResponse.from_dict(product_order_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ProductOrderResponseAllOf.md b/docs/ProductOrderResponseAllOf.md deleted file mode 100644 index ece9e7e..0000000 --- a/docs/ProductOrderResponseAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# ProductOrderResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**object** | **str** | | [optional] -**parent_id** | **str** | | [optional] - -## Example - -```python -from conekta.models.product_order_response_all_of import ProductOrderResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of ProductOrderResponseAllOf from a JSON string -product_order_response_all_of_instance = ProductOrderResponseAllOf.from_json(json) -# print the JSON string representation of the object -print ProductOrderResponseAllOf.to_json() - -# convert the object into a dict -product_order_response_all_of_dict = product_order_response_all_of_instance.to_dict() -# create an instance of ProductOrderResponseAllOf from a dict -product_order_response_all_of_form_dict = product_order_response_all_of.from_dict(product_order_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ProductsApi.md b/docs/ProductsApi.md index e1435ff..2335a77 100644 --- a/docs/ProductsApi.md +++ b/docs/ProductsApi.md @@ -19,9 +19,8 @@ Create a new product for an existing order. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.product import Product from conekta.models.product_order_response import ProductOrderResponse @@ -66,6 +65,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -106,9 +107,8 @@ Delete product for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.product_order_response import ProductOrderResponse from conekta.rest import ApiException @@ -152,6 +152,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -173,6 +174,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -193,9 +195,8 @@ Update an existing product for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.product_order_response import ProductOrderResponse from conekta.models.update_product import UpdateProduct @@ -241,6 +242,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -263,6 +265,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | diff --git a/docs/RiskRulesData.md b/docs/RiskRulesData.md index 0be8f5d..b8a5032 100644 --- a/docs/RiskRulesData.md +++ b/docs/RiskRulesData.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | rule id | [optional] -**field** | **str** | field to be used for the rule | [optional] +**var_field** | **str** | field to be used for the rule | [optional] **created_at** | **str** | rule creation date | [optional] **value** | **str** | value to be used for the rule | [optional] **is_global** | **bool** | if the rule is global | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of RiskRulesData from a JSON string risk_rules_data_instance = RiskRulesData.from_json(json) # print the JSON string representation of the object -print RiskRulesData.to_json() +print(RiskRulesData.to_json()) # convert the object into a dict risk_rules_data_dict = risk_rules_data_instance.to_dict() # create an instance of RiskRulesData from a dict -risk_rules_data_form_dict = risk_rules_data.from_dict(risk_rules_data_dict) +risk_rules_data_from_dict = RiskRulesData.from_dict(risk_rules_data_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RiskRulesList.md b/docs/RiskRulesList.md index 4e0370c..579ad1b 100644 --- a/docs/RiskRulesList.md +++ b/docs/RiskRulesList.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of RiskRulesList from a JSON string risk_rules_list_instance = RiskRulesList.from_json(json) # print the JSON string representation of the object -print RiskRulesList.to_json() +print(RiskRulesList.to_json()) # convert the object into a dict risk_rules_list_dict = risk_rules_list_instance.to_dict() # create an instance of RiskRulesList from a dict -risk_rules_list_form_dict = risk_rules_list.from_dict(risk_rules_list_dict) +risk_rules_list_from_dict = RiskRulesList.from_dict(risk_rules_list_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ShippingContactsApi.md b/docs/ShippingContactsApi.md index 54e155e..803c53c 100644 --- a/docs/ShippingContactsApi.md +++ b/docs/ShippingContactsApi.md @@ -19,9 +19,8 @@ Create a shipping contacts for a customer. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_shipping_contacts import CustomerShippingContacts from conekta.models.customer_shipping_contacts_response import CustomerShippingContactsResponse @@ -66,6 +65,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -107,9 +108,8 @@ Delete shipping contact that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_shipping_contacts_response import CustomerShippingContactsResponse from conekta.rest import ApiException @@ -153,6 +153,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -174,6 +175,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -194,9 +196,8 @@ Update shipping contact that corresponds to a customer ID. ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.customer_shipping_contacts_response import CustomerShippingContactsResponse from conekta.models.customer_update_shipping_contacts import CustomerUpdateShippingContacts @@ -242,6 +243,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -264,6 +266,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/ShippingOrderResponse.md b/docs/ShippingOrderResponse.md index 0324ce3..ca00a81 100644 --- a/docs/ShippingOrderResponse.md +++ b/docs/ShippingOrderResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | Shipping amount in cents | @@ -23,12 +24,12 @@ json = "{}" # create an instance of ShippingOrderResponse from a JSON string shipping_order_response_instance = ShippingOrderResponse.from_json(json) # print the JSON string representation of the object -print ShippingOrderResponse.to_json() +print(ShippingOrderResponse.to_json()) # convert the object into a dict shipping_order_response_dict = shipping_order_response_instance.to_dict() # create an instance of ShippingOrderResponse from a dict -shipping_order_response_form_dict = shipping_order_response.from_dict(shipping_order_response_dict) +shipping_order_response_from_dict = ShippingOrderResponse.from_dict(shipping_order_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ShippingRequest.md b/docs/ShippingRequest.md index 3aefae2..7c03b43 100644 --- a/docs/ShippingRequest.md +++ b/docs/ShippingRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | Shipping amount in cents | @@ -20,12 +21,12 @@ json = "{}" # create an instance of ShippingRequest from a JSON string shipping_request_instance = ShippingRequest.from_json(json) # print the JSON string representation of the object -print ShippingRequest.to_json() +print(ShippingRequest.to_json()) # convert the object into a dict shipping_request_dict = shipping_request_instance.to_dict() # create an instance of ShippingRequest from a dict -shipping_request_form_dict = shipping_request.from_dict(shipping_request_dict) +shipping_request_from_dict = ShippingRequest.from_dict(shipping_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ShippingsApi.md b/docs/ShippingsApi.md index b28601e..f890229 100644 --- a/docs/ShippingsApi.md +++ b/docs/ShippingsApi.md @@ -19,9 +19,8 @@ Create new shipping for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.shipping_order_response import ShippingOrderResponse from conekta.models.shipping_request import ShippingRequest @@ -66,6 +65,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -106,9 +107,8 @@ Delete shipping ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.shipping_order_response import ShippingOrderResponse from conekta.rest import ApiException @@ -152,6 +152,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -173,6 +174,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -194,9 +196,8 @@ Update existing shipping for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.shipping_order_response import ShippingOrderResponse from conekta.models.shipping_request import ShippingRequest @@ -242,6 +243,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -264,6 +266,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | diff --git a/docs/SmsCheckoutRequest.md b/docs/SmsCheckoutRequest.md index 3a43908..fb2df93 100644 --- a/docs/SmsCheckoutRequest.md +++ b/docs/SmsCheckoutRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phonenumber** | **str** | | @@ -16,12 +17,12 @@ json = "{}" # create an instance of SmsCheckoutRequest from a JSON string sms_checkout_request_instance = SmsCheckoutRequest.from_json(json) # print the JSON string representation of the object -print SmsCheckoutRequest.to_json() +print(SmsCheckoutRequest.to_json()) # convert the object into a dict sms_checkout_request_dict = sms_checkout_request_instance.to_dict() # create an instance of SmsCheckoutRequest from a dict -sms_checkout_request_form_dict = sms_checkout_request.from_dict(sms_checkout_request_dict) +sms_checkout_request_from_dict = SmsCheckoutRequest.from_dict(sms_checkout_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionEventsResponse.md b/docs/SubscriptionEventsResponse.md index 19ab616..30d92fa 100644 --- a/docs/SubscriptionEventsResponse.md +++ b/docs/SubscriptionEventsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **has_more** | **bool** | Indicates if there are more pages to be requested | @@ -20,12 +21,12 @@ json = "{}" # create an instance of SubscriptionEventsResponse from a JSON string subscription_events_response_instance = SubscriptionEventsResponse.from_json(json) # print the JSON string representation of the object -print SubscriptionEventsResponse.to_json() +print(SubscriptionEventsResponse.to_json()) # convert the object into a dict subscription_events_response_dict = subscription_events_response_instance.to_dict() # create an instance of SubscriptionEventsResponse from a dict -subscription_events_response_form_dict = subscription_events_response.from_dict(subscription_events_response_dict) +subscription_events_response_from_dict = SubscriptionEventsResponse.from_dict(subscription_events_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionRequest.md b/docs/SubscriptionRequest.md index d743486..fb1f817 100644 --- a/docs/SubscriptionRequest.md +++ b/docs/SubscriptionRequest.md @@ -3,6 +3,7 @@ It is a parameter that allows to identify in the response, the detailed content of the plans to which the client has subscribed ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **plan_id** | **str** | | @@ -19,12 +20,12 @@ json = "{}" # create an instance of SubscriptionRequest from a JSON string subscription_request_instance = SubscriptionRequest.from_json(json) # print the JSON string representation of the object -print SubscriptionRequest.to_json() +print(SubscriptionRequest.to_json()) # convert the object into a dict subscription_request_dict = subscription_request_instance.to_dict() # create an instance of SubscriptionRequest from a dict -subscription_request_form_dict = subscription_request.from_dict(subscription_request_dict) +subscription_request_from_dict = SubscriptionRequest.from_dict(subscription_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionResponse.md b/docs/SubscriptionResponse.md index 5c3b647..2aa3795 100644 --- a/docs/SubscriptionResponse.md +++ b/docs/SubscriptionResponse.md @@ -3,6 +3,7 @@ subscription model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **billing_cycle_start** | **int** | | [optional] @@ -33,12 +34,12 @@ json = "{}" # create an instance of SubscriptionResponse from a JSON string subscription_response_instance = SubscriptionResponse.from_json(json) # print the JSON string representation of the object -print SubscriptionResponse.to_json() +print(SubscriptionResponse.to_json()) # convert the object into a dict subscription_response_dict = subscription_response_instance.to_dict() # create an instance of SubscriptionResponse from a dict -subscription_response_form_dict = subscription_response.from_dict(subscription_response_dict) +subscription_response_from_dict = SubscriptionResponse.from_dict(subscription_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionUpdateRequest.md b/docs/SubscriptionUpdateRequest.md index 37f1a16..c9617a8 100644 --- a/docs/SubscriptionUpdateRequest.md +++ b/docs/SubscriptionUpdateRequest.md @@ -3,6 +3,7 @@ You can modify the subscription to change the plan used by your customers. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **plan_id** | **str** | | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of SubscriptionUpdateRequest from a JSON string subscription_update_request_instance = SubscriptionUpdateRequest.from_json(json) # print the JSON string representation of the object -print SubscriptionUpdateRequest.to_json() +print(SubscriptionUpdateRequest.to_json()) # convert the object into a dict subscription_update_request_dict = subscription_update_request_instance.to_dict() # create an instance of SubscriptionUpdateRequest from a dict -subscription_update_request_form_dict = subscription_update_request.from_dict(subscription_update_request_dict) +subscription_update_request_from_dict = SubscriptionUpdateRequest.from_dict(subscription_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md index c8655a3..401a22b 100644 --- a/docs/SubscriptionsApi.md +++ b/docs/SubscriptionsApi.md @@ -23,9 +23,8 @@ You can cancel the subscription to stop the plans that your customers consume ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_response import SubscriptionResponse from conekta.rest import ApiException @@ -68,6 +67,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -88,6 +88,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -107,9 +108,8 @@ You can create the subscription to include the plans that your customers consume ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_request import SubscriptionRequest from conekta.models.subscription_response import SubscriptionResponse @@ -154,6 +154,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -175,6 +176,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -195,9 +197,8 @@ You can get the events of the subscription(s) of a client, with the customer id ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_events_response import SubscriptionEventsResponse from conekta.rest import ApiException @@ -240,6 +241,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -260,6 +262,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -279,9 +282,8 @@ Get Subscription ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_response import SubscriptionResponse from conekta.rest import ApiException @@ -323,6 +325,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -342,6 +345,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -361,9 +365,8 @@ You can pause the subscription to stop the plans that your customers consume ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_response import SubscriptionResponse from conekta.rest import ApiException @@ -406,6 +409,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -426,6 +430,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -446,9 +451,8 @@ You can resume the subscription to start the plans that your customers consume ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_response import SubscriptionResponse from conekta.rest import ApiException @@ -491,6 +495,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -511,6 +516,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -532,9 +538,8 @@ You can modify the subscription to change the plans that your customers consume ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.subscription_response import SubscriptionResponse from conekta.models.subscription_update_request import SubscriptionUpdateRequest @@ -579,6 +584,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -600,6 +606,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/TaxesApi.md b/docs/TaxesApi.md index 40b4791..37d854f 100644 --- a/docs/TaxesApi.md +++ b/docs/TaxesApi.md @@ -19,9 +19,8 @@ Create new taxes for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.order_tax_request import OrderTaxRequest from conekta.models.update_order_tax_response import UpdateOrderTaxResponse @@ -66,6 +65,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -87,6 +87,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -106,9 +107,8 @@ Delete taxes for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.update_order_tax_response import UpdateOrderTaxResponse from conekta.rest import ApiException @@ -152,6 +152,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -173,6 +174,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -193,9 +195,8 @@ Update taxes for an existing orden ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.update_order_tax_request import UpdateOrderTaxRequest from conekta.models.update_order_tax_response import UpdateOrderTaxResponse @@ -241,6 +242,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -263,6 +265,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | diff --git a/docs/Token.md b/docs/Token.md index e90e083..3d3f416 100644 --- a/docs/Token.md +++ b/docs/Token.md @@ -3,6 +3,7 @@ a token ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **card** | [**TokenCard**](TokenCard.md) | | [optional] @@ -18,12 +19,12 @@ json = "{}" # create an instance of Token from a JSON string token_instance = Token.from_json(json) # print the JSON string representation of the object -print Token.to_json() +print(Token.to_json()) # convert the object into a dict token_dict = token_instance.to_dict() # create an instance of Token from a dict -token_form_dict = token.from_dict(token_dict) +token_from_dict = Token.from_dict(token_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokenCard.md b/docs/TokenCard.md index 356000f..b8615ef 100644 --- a/docs/TokenCard.md +++ b/docs/TokenCard.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **cvc** | **str** | It is a value that allows identifying the security code of the card. | @@ -21,12 +22,12 @@ json = "{}" # create an instance of TokenCard from a JSON string token_card_instance = TokenCard.from_json(json) # print the JSON string representation of the object -print TokenCard.to_json() +print(TokenCard.to_json()) # convert the object into a dict token_card_dict = token_card_instance.to_dict() # create an instance of TokenCard from a dict -token_card_form_dict = token_card.from_dict(token_card_dict) +token_card_from_dict = TokenCard.from_dict(token_card_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokenCheckout.md b/docs/TokenCheckout.md index ef1d21a..ed11bea 100644 --- a/docs/TokenCheckout.md +++ b/docs/TokenCheckout.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **returns_control_on** | **str** | It is a value that allows identifying the returns control on. | [optional] @@ -16,12 +17,12 @@ json = "{}" # create an instance of TokenCheckout from a JSON string token_checkout_instance = TokenCheckout.from_json(json) # print the JSON string representation of the object -print TokenCheckout.to_json() +print(TokenCheckout.to_json()) # convert the object into a dict token_checkout_dict = token_checkout_instance.to_dict() # create an instance of TokenCheckout from a dict -token_checkout_form_dict = token_checkout.from_dict(token_checkout_dict) +token_checkout_from_dict = TokenCheckout.from_dict(token_checkout_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokenResponse.md b/docs/TokenResponse.md index 5a1e171..b027c39 100644 --- a/docs/TokenResponse.md +++ b/docs/TokenResponse.md @@ -3,6 +3,7 @@ token response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **checkout** | [**TokenResponseCheckout**](TokenResponseCheckout.md) | | [optional] @@ -21,12 +22,12 @@ json = "{}" # create an instance of TokenResponse from a JSON string token_response_instance = TokenResponse.from_json(json) # print the JSON string representation of the object -print TokenResponse.to_json() +print(TokenResponse.to_json()) # convert the object into a dict token_response_dict = token_response_instance.to_dict() # create an instance of TokenResponse from a dict -token_response_form_dict = token_response.from_dict(token_response_dict) +token_response_from_dict = TokenResponse.from_dict(token_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokenResponseCheckout.md b/docs/TokenResponseCheckout.md index e72d7b0..9c8f5c3 100644 --- a/docs/TokenResponseCheckout.md +++ b/docs/TokenResponseCheckout.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **allowed_payment_methods** | **List[str]** | | [optional] @@ -38,12 +39,12 @@ json = "{}" # create an instance of TokenResponseCheckout from a JSON string token_response_checkout_instance = TokenResponseCheckout.from_json(json) # print the JSON string representation of the object -print TokenResponseCheckout.to_json() +print(TokenResponseCheckout.to_json()) # convert the object into a dict token_response_checkout_dict = token_response_checkout_instance.to_dict() # create an instance of TokenResponseCheckout from a dict -token_response_checkout_form_dict = token_response_checkout.from_dict(token_response_checkout_dict) +token_response_checkout_from_dict = TokenResponseCheckout.from_dict(token_response_checkout_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokensApi.md b/docs/TokensApi.md index 25cfa8b..9fe645e 100644 --- a/docs/TokensApi.md +++ b/docs/TokensApi.md @@ -17,9 +17,8 @@ Generate a payment token, to associate it with a card ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.token import Token from conekta.models.token_response import TokenResponse @@ -62,6 +61,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **token** | [**Token**](Token.md)| requested field for token | @@ -81,6 +81,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/TransactionResponse.md b/docs/TransactionResponse.md index 7ce86af..6b04d42 100644 --- a/docs/TransactionResponse.md +++ b/docs/TransactionResponse.md @@ -3,6 +3,7 @@ The Transaction object represents the actions or steps of an order. Statuses can be: unprocessed, pending, available, owen, paid_out, voided, capture, capture_reversal, liquidation, liquidation_reversal, payout, payout_reversal, refund, refund_reversal, chargeback, chargeback_reversal, rounding_adjustment, won_chargeback, transferred, and transferred. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount of the transaction. | @@ -27,12 +28,12 @@ json = "{}" # create an instance of TransactionResponse from a JSON string transaction_response_instance = TransactionResponse.from_json(json) # print the JSON string representation of the object -print TransactionResponse.to_json() +print(TransactionResponse.to_json()) # convert the object into a dict transaction_response_dict = transaction_response_instance.to_dict() # create an instance of TransactionResponse from a dict -transaction_response_form_dict = transaction_response.from_dict(transaction_response_dict) +transaction_response_from_dict = TransactionResponse.from_dict(transaction_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 0c8330d..422368c 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -18,9 +18,8 @@ Get the details of a transaction ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.transaction_response import TransactionResponse from conekta.rest import ApiException @@ -63,6 +62,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -83,6 +83,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -102,9 +103,8 @@ Get transaction details in the form of a list ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_transactions_response import GetTransactionsResponse from conekta.rest import ApiException @@ -153,6 +153,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -179,6 +180,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/TransferDestinationResponse.md b/docs/TransferDestinationResponse.md index 6dd826e..15d749c 100644 --- a/docs/TransferDestinationResponse.md +++ b/docs/TransferDestinationResponse.md @@ -3,6 +3,7 @@ Method used to make the transfer. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_holder** | **str** | Name of the account holder. | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of TransferDestinationResponse from a JSON string transfer_destination_response_instance = TransferDestinationResponse.from_json(json) # print the JSON string representation of the object -print TransferDestinationResponse.to_json() +print(TransferDestinationResponse.to_json()) # convert the object into a dict transfer_destination_response_dict = transfer_destination_response_instance.to_dict() # create an instance of TransferDestinationResponse from a dict -transfer_destination_response_form_dict = transfer_destination_response.from_dict(transfer_destination_response_dict) +transfer_destination_response_from_dict = TransferDestinationResponse.from_dict(transfer_destination_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferMethodResponse.md b/docs/TransferMethodResponse.md index cd904da..6c9b493 100644 --- a/docs/TransferMethodResponse.md +++ b/docs/TransferMethodResponse.md @@ -3,6 +3,7 @@ Method used to make the transfer. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_holder** | **str** | Name of the account holder. | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of TransferMethodResponse from a JSON string transfer_method_response_instance = TransferMethodResponse.from_json(json) # print the JSON string representation of the object -print TransferMethodResponse.to_json() +print(TransferMethodResponse.to_json()) # convert the object into a dict transfer_method_response_dict = transfer_method_response_instance.to_dict() # create an instance of TransferMethodResponse from a dict -transfer_method_response_form_dict = transfer_method_response.from_dict(transfer_method_response_dict) +transfer_method_response_from_dict = TransferMethodResponse.from_dict(transfer_method_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferResponse.md b/docs/TransferResponse.md index 0cb5694..275554d 100644 --- a/docs/TransferResponse.md +++ b/docs/TransferResponse.md @@ -3,6 +3,7 @@ A transfer represents the action of sending an amount to a business bank account including the status, amount and method used to make the transfer. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | Amount in cents of the transfer. | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of TransferResponse from a JSON string transfer_response_instance = TransferResponse.from_json(json) # print the JSON string representation of the object -print TransferResponse.to_json() +print(TransferResponse.to_json()) # convert the object into a dict transfer_response_dict = transfer_response_instance.to_dict() # create an instance of TransferResponse from a dict -transfer_response_form_dict = transfer_response.from_dict(transfer_response_dict) +transfer_response_from_dict = TransferResponse.from_dict(transfer_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransfersApi.md b/docs/TransfersApi.md index f61c7f1..60e34dc 100644 --- a/docs/TransfersApi.md +++ b/docs/TransfersApi.md @@ -18,9 +18,8 @@ Get the details of a Transfer ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.transfer_response import TransferResponse from conekta.rest import ApiException @@ -63,6 +62,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -83,6 +83,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -102,9 +103,8 @@ Get transfers details in the form of a list ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_transfers_response import GetTransfersResponse from conekta.rest import ApiException @@ -150,6 +150,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -173,6 +174,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| diff --git a/docs/TransfersResponse.md b/docs/TransfersResponse.md index 8480089..25f72fb 100644 --- a/docs/TransfersResponse.md +++ b/docs/TransfersResponse.md @@ -3,6 +3,7 @@ A transfer represents the action of sending an amount to a business bank account including the status, amount and method used to make the transfer. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | Amount in cents of the transfer. | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of TransfersResponse from a JSON string transfers_response_instance = TransfersResponse.from_json(json) # print the JSON string representation of the object -print TransfersResponse.to_json() +print(TransfersResponse.to_json()) # convert the object into a dict transfers_response_dict = transfers_response_instance.to_dict() # create an instance of TransfersResponse from a dict -transfers_response_form_dict = transfers_response.from_dict(transfers_response_dict) +transfers_response_from_dict = TransfersResponse.from_dict(transfers_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateCustomer.md b/docs/UpdateCustomer.md index 407bc2a..9867490 100644 --- a/docs/UpdateCustomer.md +++ b/docs/UpdateCustomer.md @@ -3,6 +3,7 @@ update customer ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | [**UpdateCustomerAntifraudInfo**](UpdateCustomerAntifraudInfo.md) | | [optional] @@ -30,12 +31,12 @@ json = "{}" # create an instance of UpdateCustomer from a JSON string update_customer_instance = UpdateCustomer.from_json(json) # print the JSON string representation of the object -print UpdateCustomer.to_json() +print(UpdateCustomer.to_json()) # convert the object into a dict update_customer_dict = update_customer_instance.to_dict() # create an instance of UpdateCustomer from a dict -update_customer_form_dict = update_customer.from_dict(update_customer_dict) +update_customer_from_dict = UpdateCustomer.from_dict(update_customer_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateCustomerAntifraudInfo.md b/docs/UpdateCustomerAntifraudInfo.md index 226ca64..2f4d40f 100644 --- a/docs/UpdateCustomerAntifraudInfo.md +++ b/docs/UpdateCustomerAntifraudInfo.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_created_at** | **int** | | [optional] @@ -17,12 +18,12 @@ json = "{}" # create an instance of UpdateCustomerAntifraudInfo from a JSON string update_customer_antifraud_info_instance = UpdateCustomerAntifraudInfo.from_json(json) # print the JSON string representation of the object -print UpdateCustomerAntifraudInfo.to_json() +print(UpdateCustomerAntifraudInfo.to_json()) # convert the object into a dict update_customer_antifraud_info_dict = update_customer_antifraud_info_instance.to_dict() # create an instance of UpdateCustomerAntifraudInfo from a dict -update_customer_antifraud_info_form_dict = update_customer_antifraud_info.from_dict(update_customer_antifraud_info_dict) +update_customer_antifraud_info_from_dict = UpdateCustomerAntifraudInfo.from_dict(update_customer_antifraud_info_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateCustomerFiscalEntitiesResponse.md b/docs/UpdateCustomerFiscalEntitiesResponse.md index 5841a2b..226f59b 100644 --- a/docs/UpdateCustomerFiscalEntitiesResponse.md +++ b/docs/UpdateCustomerFiscalEntitiesResponse.md @@ -2,9 +2,10 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**address** | [**CustomerAddress**](CustomerAddress.md) | | **tax_id** | **str** | | [optional] **email** | **str** | | [optional] **phone** | **str** | | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of UpdateCustomerFiscalEntitiesResponse from a JSON string update_customer_fiscal_entities_response_instance = UpdateCustomerFiscalEntitiesResponse.from_json(json) # print the JSON string representation of the object -print UpdateCustomerFiscalEntitiesResponse.to_json() +print(UpdateCustomerFiscalEntitiesResponse.to_json()) # convert the object into a dict update_customer_fiscal_entities_response_dict = update_customer_fiscal_entities_response_instance.to_dict() # create an instance of UpdateCustomerFiscalEntitiesResponse from a dict -update_customer_fiscal_entities_response_form_dict = update_customer_fiscal_entities_response.from_dict(update_customer_fiscal_entities_response_dict) +update_customer_fiscal_entities_response_from_dict = UpdateCustomerFiscalEntitiesResponse.from_dict(update_customer_fiscal_entities_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md b/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md deleted file mode 100644 index 44dd921..0000000 --- a/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md +++ /dev/null @@ -1,32 +0,0 @@ -# UpdateCustomerFiscalEntitiesResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**object** | **str** | | -**created_at** | **int** | | -**parent_id** | **str** | | [optional] -**default** | **bool** | | [optional] - -## Example - -```python -from conekta.models.update_customer_fiscal_entities_response_all_of import UpdateCustomerFiscalEntitiesResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateCustomerFiscalEntitiesResponseAllOf from a JSON string -update_customer_fiscal_entities_response_all_of_instance = UpdateCustomerFiscalEntitiesResponseAllOf.from_json(json) -# print the JSON string representation of the object -print UpdateCustomerFiscalEntitiesResponseAllOf.to_json() - -# convert the object into a dict -update_customer_fiscal_entities_response_all_of_dict = update_customer_fiscal_entities_response_all_of_instance.to_dict() -# create an instance of UpdateCustomerFiscalEntitiesResponseAllOf from a dict -update_customer_fiscal_entities_response_all_of_form_dict = update_customer_fiscal_entities_response_all_of.from_dict(update_customer_fiscal_entities_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateCustomerPaymentMethodsResponse.md b/docs/UpdateCustomerPaymentMethodsResponse.md index 7804d8d..d193263 100644 --- a/docs/UpdateCustomerPaymentMethodsResponse.md +++ b/docs/UpdateCustomerPaymentMethodsResponse.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **str** | | @@ -35,12 +36,12 @@ json = "{}" # create an instance of UpdateCustomerPaymentMethodsResponse from a JSON string update_customer_payment_methods_response_instance = UpdateCustomerPaymentMethodsResponse.from_json(json) # print the JSON string representation of the object -print UpdateCustomerPaymentMethodsResponse.to_json() +print(UpdateCustomerPaymentMethodsResponse.to_json()) # convert the object into a dict update_customer_payment_methods_response_dict = update_customer_payment_methods_response_instance.to_dict() # create an instance of UpdateCustomerPaymentMethodsResponse from a dict -update_customer_payment_methods_response_form_dict = update_customer_payment_methods_response.from_dict(update_customer_payment_methods_response_dict) +update_customer_payment_methods_response_from_dict = UpdateCustomerPaymentMethodsResponse.from_dict(update_customer_payment_methods_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOrderDiscountLinesRequest.md b/docs/UpdateOrderDiscountLinesRequest.md index 39f3b21..1325928 100644 --- a/docs/UpdateOrderDiscountLinesRequest.md +++ b/docs/UpdateOrderDiscountLinesRequest.md @@ -3,6 +3,7 @@ List of discounts that apply to the order. ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of UpdateOrderDiscountLinesRequest from a JSON string update_order_discount_lines_request_instance = UpdateOrderDiscountLinesRequest.from_json(json) # print the JSON string representation of the object -print UpdateOrderDiscountLinesRequest.to_json() +print(UpdateOrderDiscountLinesRequest.to_json()) # convert the object into a dict update_order_discount_lines_request_dict = update_order_discount_lines_request_instance.to_dict() # create an instance of UpdateOrderDiscountLinesRequest from a dict -update_order_discount_lines_request_form_dict = update_order_discount_lines_request.from_dict(update_order_discount_lines_request_dict) +update_order_discount_lines_request_from_dict = UpdateOrderDiscountLinesRequest.from_dict(update_order_discount_lines_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOrderTaxRequest.md b/docs/UpdateOrderTaxRequest.md index d105a2a..72a2db5 100644 --- a/docs/UpdateOrderTaxRequest.md +++ b/docs/UpdateOrderTaxRequest.md @@ -3,6 +3,7 @@ create new taxes for an existing order ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount to be collected for tax in cents | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of UpdateOrderTaxRequest from a JSON string update_order_tax_request_instance = UpdateOrderTaxRequest.from_json(json) # print the JSON string representation of the object -print UpdateOrderTaxRequest.to_json() +print(UpdateOrderTaxRequest.to_json()) # convert the object into a dict update_order_tax_request_dict = update_order_tax_request_instance.to_dict() # create an instance of UpdateOrderTaxRequest from a dict -update_order_tax_request_form_dict = update_order_tax_request.from_dict(update_order_tax_request_dict) +update_order_tax_request_from_dict = UpdateOrderTaxRequest.from_dict(update_order_tax_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOrderTaxResponse.md b/docs/UpdateOrderTaxResponse.md index cd2139b..98a373f 100644 --- a/docs/UpdateOrderTaxResponse.md +++ b/docs/UpdateOrderTaxResponse.md @@ -3,6 +3,7 @@ create new taxes for an existing order response ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | The amount to be collected for tax in cents | @@ -22,12 +23,12 @@ json = "{}" # create an instance of UpdateOrderTaxResponse from a JSON string update_order_tax_response_instance = UpdateOrderTaxResponse.from_json(json) # print the JSON string representation of the object -print UpdateOrderTaxResponse.to_json() +print(UpdateOrderTaxResponse.to_json()) # convert the object into a dict update_order_tax_response_dict = update_order_tax_response_instance.to_dict() # create an instance of UpdateOrderTaxResponse from a dict -update_order_tax_response_form_dict = update_order_tax_response.from_dict(update_order_tax_response_dict) +update_order_tax_response_from_dict = UpdateOrderTaxResponse.from_dict(update_order_tax_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateOrderTaxResponseAllOf.md b/docs/UpdateOrderTaxResponseAllOf.md deleted file mode 100644 index a25229c..0000000 --- a/docs/UpdateOrderTaxResponseAllOf.md +++ /dev/null @@ -1,30 +0,0 @@ -# UpdateOrderTaxResponseAllOf - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | [optional] -**object** | **str** | | [optional] -**parent_id** | **str** | | [optional] - -## Example - -```python -from conekta.models.update_order_tax_response_all_of import UpdateOrderTaxResponseAllOf - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateOrderTaxResponseAllOf from a JSON string -update_order_tax_response_all_of_instance = UpdateOrderTaxResponseAllOf.from_json(json) -# print the JSON string representation of the object -print UpdateOrderTaxResponseAllOf.to_json() - -# convert the object into a dict -update_order_tax_response_all_of_dict = update_order_tax_response_all_of_instance.to_dict() -# create an instance of UpdateOrderTaxResponseAllOf from a dict -update_order_tax_response_all_of_form_dict = update_order_tax_response_all_of.from_dict(update_order_tax_response_all_of_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdatePaymentMethods.md b/docs/UpdatePaymentMethods.md index 8d706c9..41459f8 100644 --- a/docs/UpdatePaymentMethods.md +++ b/docs/UpdatePaymentMethods.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | | [optional] @@ -16,12 +17,12 @@ json = "{}" # create an instance of UpdatePaymentMethods from a JSON string update_payment_methods_instance = UpdatePaymentMethods.from_json(json) # print the JSON string representation of the object -print UpdatePaymentMethods.to_json() +print(UpdatePaymentMethods.to_json()) # convert the object into a dict update_payment_methods_dict = update_payment_methods_instance.to_dict() # create an instance of UpdatePaymentMethods from a dict -update_payment_methods_form_dict = update_payment_methods.from_dict(update_payment_methods_dict) +update_payment_methods_from_dict = UpdatePaymentMethods.from_dict(update_payment_methods_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateProduct.md b/docs/UpdateProduct.md index 9869bce..1f2f8be 100644 --- a/docs/UpdateProduct.md +++ b/docs/UpdateProduct.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraud_info** | **Dict[str, object]** | | [optional] @@ -24,12 +25,12 @@ json = "{}" # create an instance of UpdateProduct from a JSON string update_product_instance = UpdateProduct.from_json(json) # print the JSON string representation of the object -print UpdateProduct.to_json() +print(UpdateProduct.to_json()) # convert the object into a dict update_product_dict = update_product_instance.to_dict() # create an instance of UpdateProduct from a dict -update_product_form_dict = update_product.from_dict(update_product_dict) +update_product_from_dict = UpdateProduct.from_dict(update_product_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookKeyCreateResponse.md b/docs/WebhookKeyCreateResponse.md index 467949e..527c330 100644 --- a/docs/WebhookKeyCreateResponse.md +++ b/docs/WebhookKeyCreateResponse.md @@ -3,6 +3,7 @@ webhook keys model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the webhook key is active | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of WebhookKeyCreateResponse from a JSON string webhook_key_create_response_instance = WebhookKeyCreateResponse.from_json(json) # print the JSON string representation of the object -print WebhookKeyCreateResponse.to_json() +print(WebhookKeyCreateResponse.to_json()) # convert the object into a dict webhook_key_create_response_dict = webhook_key_create_response_instance.to_dict() # create an instance of WebhookKeyCreateResponse from a dict -webhook_key_create_response_form_dict = webhook_key_create_response.from_dict(webhook_key_create_response_dict) +webhook_key_create_response_from_dict = WebhookKeyCreateResponse.from_dict(webhook_key_create_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookKeyDeleteResponse.md b/docs/WebhookKeyDeleteResponse.md index d6e7b48..92f4878 100644 --- a/docs/WebhookKeyDeleteResponse.md +++ b/docs/WebhookKeyDeleteResponse.md @@ -3,6 +3,7 @@ webhook keys model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the webhook key is active | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of WebhookKeyDeleteResponse from a JSON string webhook_key_delete_response_instance = WebhookKeyDeleteResponse.from_json(json) # print the JSON string representation of the object -print WebhookKeyDeleteResponse.to_json() +print(WebhookKeyDeleteResponse.to_json()) # convert the object into a dict webhook_key_delete_response_dict = webhook_key_delete_response_instance.to_dict() # create an instance of WebhookKeyDeleteResponse from a dict -webhook_key_delete_response_form_dict = webhook_key_delete_response.from_dict(webhook_key_delete_response_dict) +webhook_key_delete_response_from_dict = WebhookKeyDeleteResponse.from_dict(webhook_key_delete_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookKeyRequest.md b/docs/WebhookKeyRequest.md index 6ef05d0..d8c02af 100644 --- a/docs/WebhookKeyRequest.md +++ b/docs/WebhookKeyRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the webhook key is active | [optional] [default to True] @@ -16,12 +17,12 @@ json = "{}" # create an instance of WebhookKeyRequest from a JSON string webhook_key_request_instance = WebhookKeyRequest.from_json(json) # print the JSON string representation of the object -print WebhookKeyRequest.to_json() +print(WebhookKeyRequest.to_json()) # convert the object into a dict webhook_key_request_dict = webhook_key_request_instance.to_dict() # create an instance of WebhookKeyRequest from a dict -webhook_key_request_form_dict = webhook_key_request.from_dict(webhook_key_request_dict) +webhook_key_request_from_dict = WebhookKeyRequest.from_dict(webhook_key_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookKeyResponse.md b/docs/WebhookKeyResponse.md index 0f9aac3..2a39ea0 100644 --- a/docs/WebhookKeyResponse.md +++ b/docs/WebhookKeyResponse.md @@ -3,6 +3,7 @@ webhook keys model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Unique identifier of the webhook key | [optional] @@ -23,12 +24,12 @@ json = "{}" # create an instance of WebhookKeyResponse from a JSON string webhook_key_response_instance = WebhookKeyResponse.from_json(json) # print the JSON string representation of the object -print WebhookKeyResponse.to_json() +print(WebhookKeyResponse.to_json()) # convert the object into a dict webhook_key_response_dict = webhook_key_response_instance.to_dict() # create an instance of WebhookKeyResponse from a dict -webhook_key_response_form_dict = webhook_key_response.from_dict(webhook_key_response_dict) +webhook_key_response_from_dict = WebhookKeyResponse.from_dict(webhook_key_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookKeyUpdateRequest.md b/docs/WebhookKeyUpdateRequest.md index 64bde2c..49f95e1 100644 --- a/docs/WebhookKeyUpdateRequest.md +++ b/docs/WebhookKeyUpdateRequest.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the webhook key is active | [optional] [default to False] @@ -16,12 +17,12 @@ json = "{}" # create an instance of WebhookKeyUpdateRequest from a JSON string webhook_key_update_request_instance = WebhookKeyUpdateRequest.from_json(json) # print the JSON string representation of the object -print WebhookKeyUpdateRequest.to_json() +print(WebhookKeyUpdateRequest.to_json()) # convert the object into a dict webhook_key_update_request_dict = webhook_key_update_request_instance.to_dict() # create an instance of WebhookKeyUpdateRequest from a dict -webhook_key_update_request_form_dict = webhook_key_update_request.from_dict(webhook_key_update_request_dict) +webhook_key_update_request_from_dict = WebhookKeyUpdateRequest.from_dict(webhook_key_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookKeysApi.md b/docs/WebhookKeysApi.md index efd30d4..0f4e07a 100644 --- a/docs/WebhookKeysApi.md +++ b/docs/WebhookKeysApi.md @@ -21,9 +21,8 @@ Create a webhook key ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_key_create_response import WebhookKeyCreateResponse from conekta.models.webhook_key_request import WebhookKeyRequest @@ -66,6 +65,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -85,6 +85,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -101,9 +102,8 @@ Delete Webhook key ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_key_delete_response import WebhookKeyDeleteResponse from conekta.rest import ApiException @@ -145,6 +145,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -164,6 +165,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -181,9 +183,8 @@ Get Webhook Key ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_key_response import WebhookKeyResponse from conekta.rest import ApiException @@ -226,6 +227,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -246,6 +248,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -265,9 +268,8 @@ Consume the list of webhook keys you have ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_webhook_keys_response import GetWebhookKeysResponse from conekta.rest import ApiException @@ -313,6 +315,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] @@ -336,6 +339,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -354,9 +358,8 @@ updates an existing webhook key ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_key_response import WebhookKeyResponse from conekta.models.webhook_key_update_request import WebhookKeyUpdateRequest @@ -400,6 +403,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -420,6 +424,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/WebhookLog.md b/docs/WebhookLog.md index 0f5d331..8cab78f 100644 --- a/docs/WebhookLog.md +++ b/docs/WebhookLog.md @@ -2,6 +2,7 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **failed_attempts** | **int** | | [optional] @@ -22,12 +23,12 @@ json = "{}" # create an instance of WebhookLog from a JSON string webhook_log_instance = WebhookLog.from_json(json) # print the JSON string representation of the object -print WebhookLog.to_json() +print(WebhookLog.to_json()) # convert the object into a dict webhook_log_dict = webhook_log_instance.to_dict() # create an instance of WebhookLog from a dict -webhook_log_form_dict = webhook_log.from_dict(webhook_log_dict) +webhook_log_from_dict = WebhookLog.from_dict(webhook_log_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookRequest.md b/docs/WebhookRequest.md index a8c8930..609812f 100644 --- a/docs/WebhookRequest.md +++ b/docs/WebhookRequest.md @@ -3,6 +3,7 @@ a webhook ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **str** | Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. | @@ -18,12 +19,12 @@ json = "{}" # create an instance of WebhookRequest from a JSON string webhook_request_instance = WebhookRequest.from_json(json) # print the JSON string representation of the object -print WebhookRequest.to_json() +print(WebhookRequest.to_json()) # convert the object into a dict webhook_request_dict = webhook_request_instance.to_dict() # create an instance of WebhookRequest from a dict -webhook_request_form_dict = webhook_request.from_dict(webhook_request_dict) +webhook_request_from_dict = WebhookRequest.from_dict(webhook_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookResponse.md b/docs/WebhookResponse.md index 4405bff..7ada7dd 100644 --- a/docs/WebhookResponse.md +++ b/docs/WebhookResponse.md @@ -3,6 +3,7 @@ webhooks model ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **deleted** | **bool** | | [optional] @@ -26,12 +27,12 @@ json = "{}" # create an instance of WebhookResponse from a JSON string webhook_response_instance = WebhookResponse.from_json(json) # print the JSON string representation of the object -print WebhookResponse.to_json() +print(WebhookResponse.to_json()) # convert the object into a dict webhook_response_dict = webhook_response_instance.to_dict() # create an instance of WebhookResponse from a dict -webhook_response_form_dict = webhook_response.from_dict(webhook_response_dict) +webhook_response_from_dict = WebhookResponse.from_dict(webhook_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhookUpdateRequest.md b/docs/WebhookUpdateRequest.md index a76c158..e696ee0 100644 --- a/docs/WebhookUpdateRequest.md +++ b/docs/WebhookUpdateRequest.md @@ -3,6 +3,7 @@ an updated webhook ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **str** | Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. | @@ -19,12 +20,12 @@ json = "{}" # create an instance of WebhookUpdateRequest from a JSON string webhook_update_request_instance = WebhookUpdateRequest.from_json(json) # print the JSON string representation of the object -print WebhookUpdateRequest.to_json() +print(WebhookUpdateRequest.to_json()) # convert the object into a dict webhook_update_request_dict = webhook_update_request_instance.to_dict() # create an instance of WebhookUpdateRequest from a dict -webhook_update_request_form_dict = webhook_update_request.from_dict(webhook_update_request_dict) +webhook_update_request_from_dict = WebhookUpdateRequest.from_dict(webhook_update_request_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WebhooksApi.md b/docs/WebhooksApi.md index fb7e919..bdb115c 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -22,9 +22,8 @@ What we do at Conekta translates into events. For example, an event of interest ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_request import WebhookRequest from conekta.models.webhook_response import WebhookResponse @@ -67,6 +66,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **webhook_request** | [**WebhookRequest**](WebhookRequest.md)| requested field for webhook | @@ -86,6 +86,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | @@ -102,9 +103,8 @@ Delete Webhook ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_response import WebhookResponse from conekta.rest import ApiException @@ -146,6 +146,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -165,6 +166,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -182,9 +184,8 @@ Get Webhook ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_response import WebhookResponse from conekta.rest import ApiException @@ -227,6 +228,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -247,6 +249,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -257,7 +260,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_webhooks** -> GetWebhooksResponse get_webhooks(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous) +> GetWebhooksResponse get_webhooks(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, url=url, next=next, previous=previous) Get List of Webhooks @@ -266,9 +269,8 @@ Consume the list of webhooks you have, each environment supports 10 webhooks (Fo ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.get_webhooks_response import GetWebhooksResponse from conekta.rest import ApiException @@ -298,12 +300,13 @@ with conekta.ApiClient(configuration) as api_client: x_child_company_id = '6441b6376b60c3a638da80af' # str | In the case of a holding company, the company id of the child company to which will process the request. (optional) limit = 20 # int | The numbers of items to return, the maximum value is 250 (optional) (default to 20) search = 'search_example' # str | General order search, e.g. by mail, reference etc. (optional) + url = 'url_example' # str | url for webhook filter (optional) next = 'next_example' # str | next page (optional) previous = 'previous_example' # str | previous page (optional) try: # Get List of Webhooks - api_response = api_instance.get_webhooks(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, next=next, previous=previous) + api_response = api_instance.get_webhooks(accept_language=accept_language, x_child_company_id=x_child_company_id, limit=limit, search=search, url=url, next=next, previous=previous) print("The response of WebhooksApi->get_webhooks:\n") pprint(api_response) except Exception as e: @@ -314,12 +317,14 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **accept_language** | **str**| Use for knowing which language to use | [optional] [default to 'es'] **x_child_company_id** | **str**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] **limit** | **int**| The numbers of items to return, the maximum value is 250 | [optional] [default to 20] **search** | **str**| General order search, e.g. by mail, reference etc. | [optional] + **url** | **str**| url for webhook filter | [optional] **next** | **str**| next page | [optional] **previous** | **str**| previous page | [optional] @@ -337,6 +342,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| @@ -355,9 +361,8 @@ Send a webhook.ping event ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_response import WebhookResponse from conekta.rest import ApiException @@ -399,6 +404,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -418,6 +424,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful | - | @@ -437,9 +444,8 @@ updates an existing webhook ### Example * Bearer Authentication (bearerAuth): + ```python -import time -import os import conekta from conekta.models.webhook_response import WebhookResponse from conekta.models.webhook_update_request import WebhookUpdateRequest @@ -484,6 +490,7 @@ with conekta.ApiClient(configuration) as api_client: ### Parameters + Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **str**| Identifier of the resource | @@ -505,6 +512,7 @@ Name | Type | Description | Notes - **Accept**: application/vnd.conekta-v2.1.0+json ### HTTP response details + | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | successful operation | - | diff --git a/docs/WhitelistlistRuleResponse.md b/docs/WhitelistlistRuleResponse.md index 4ec6459..90e3526 100644 --- a/docs/WhitelistlistRuleResponse.md +++ b/docs/WhitelistlistRuleResponse.md @@ -2,10 +2,11 @@ ## Properties + Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | Whitelist rule id | [optional] -**field** | **str** | field used for whitelists rule | [optional] +**var_field** | **str** | field used for whitelists rule | [optional] **value** | **str** | value used for whitelists rule | [optional] **description** | **str** | use an description for whitelisted rule | [optional] @@ -19,12 +20,12 @@ json = "{}" # create an instance of WhitelistlistRuleResponse from a JSON string whitelistlist_rule_response_instance = WhitelistlistRuleResponse.from_json(json) # print the JSON string representation of the object -print WhitelistlistRuleResponse.to_json() +print(WhitelistlistRuleResponse.to_json()) # convert the object into a dict whitelistlist_rule_response_dict = whitelistlist_rule_response_instance.to_dict() # create an instance of WhitelistlistRuleResponse from a dict -whitelistlist_rule_response_form_dict = whitelistlist_rule_response.from_dict(whitelistlist_rule_response_dict) +whitelistlist_rule_response_from_dict = WhitelistlistRuleResponse.from_dict(whitelistlist_rule_response_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/pyproject.toml b/pyproject.toml index a538dfe..c0f0b77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "conekta" -version = "6.0.2" +version = "6.0.3" description = "Conekta API" authors = ["Engineering Conekta "] license = "MIT-LICENSE" @@ -21,6 +21,9 @@ typing-extensions = ">=4.7.1" pytest = ">=7.2.1" tox = ">=3.9.0" flake8 = ">=4.0.0" +types-python-dateutil = ">=2.8.19.14" +mypy = "1.4.1" + [build-system] requires = ["setuptools"] @@ -28,3 +31,41 @@ build-backend = "setuptools.build_meta" [tool.pylint.'MESSAGES CONTROL'] extension-pkg-whitelist = "pydantic" + +[tool.mypy] +files = [ + "conekta", + #"test", # auto-generated tests + "tests", # hand-written tests +] +# TODO: enable "strict" once all these individual checks are passing +# strict = true + +# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options +warn_unused_configs = true +warn_redundant_casts = true +warn_unused_ignores = true + +## Getting these passing should be easy +strict_equality = true +strict_concatenate = true + +## Strongly recommend enabling this one as soon as you can +check_untyped_defs = true + +## These shouldn't be too much additional work, but may be tricky to +## get passing if you use a lot of untyped libraries +disallow_subclassing_any = true +disallow_untyped_decorators = true +disallow_any_generics = true + +### These next few are various gradations of forcing use of type annotations +#disallow_untyped_calls = true +#disallow_incomplete_defs = true +#disallow_untyped_defs = true +# +### This one isn't too hard to get passing, but return on investment is lower +#no_implicit_reexport = true +# +### This one can be tricky to get passing if you use a lot of untyped libraries +#warn_return_any = true diff --git a/setup.py b/setup.py index 942401d..6ac2486 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "conekta" -VERSION = "6.0.2" +VERSION = "6.0.3" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/templates/python/api_client.mustache b/templates/python/api_client.mustache index 472f1a6..07f2c4e 100644 --- a/templates/python/api_client.mustache +++ b/templates/python/api_client.mustache @@ -2,9 +2,9 @@ {{>partial_header}} -import atexit import datetime from dateutil.parser import parse +from enum import Enum import json import mimetypes import os @@ -13,13 +13,14 @@ import tempfile import platform from urllib.parse import quote -from typing import Tuple, Optional, List +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr {{#tornado}} import tornado.gen {{/tornado}} from {{packageName}}.configuration import Configuration -from {{packageName}}.api_response import ApiResponse +from {{packageName}}.api_response import ApiResponse, T as ApiResponseT import {{modelPackage}} from {{packageName}} import rest from {{packageName}}.exceptions import ( @@ -32,6 +33,7 @@ from {{packageName}}.exceptions import ( ServiceException ) +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] class ApiClient: """Generic API client for OpenAPI client library builds. @@ -170,7 +172,7 @@ class ApiClient: collection_formats=None, _host=None, _request_auth=None - ) -> Tuple: + ) -> RequestSerialized: """Builds the HTTP request params needed by the request. :param method: Method to call. @@ -229,7 +231,8 @@ class ApiClient: post_params, collection_formats ) - post_params.extend(self.files_parameters(files)) + if files: + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth( @@ -299,62 +302,55 @@ class ApiClient: ) except ApiException as e: - if e.body: - e.body = e.body.decode('utf-8') raise e return response_data def response_deserialize( self, - response_data=None, - response_types_map=None - ) -> ApiResponse: + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. :param response_types_map: dict of response types. :return: ApiResponse """ + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - if not 200 <= response_data.status <= 299: - if response_data.status == 400: - raise BadRequestException(http_resp=response_data) - - if response_data.status == 401: - raise UnauthorizedException(http_resp=response_data) - - if response_data.status == 403: - raise ForbiddenException(http_resp=response_data) - - if response_data.status == 404: - raise NotFoundException(http_resp=response_data) - - if 500 <= response_data.status <= 599: - raise ServiceException(http_resp=response_data) - raise ApiException(http_resp=response_data) - # deserialize response data - - if response_type == "bytearray": - return_data = response_data.data - elif response_type is None: - return_data = None - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - else: - match = None - content_type = response_data.getheader('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type) + response_text = None + return_data = None + try: + if response_type == "bytearray": + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.getheader('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + if response_type in ["bytearray", "str"]: + return_data = self.__deserialize_primitive(response_text, response_type) + else: + return_data = self.deserialize(response_text, response_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) return ApiResponse( status_code = response_data.status, @@ -367,6 +363,7 @@ class ApiClient: """Builds a JSON POST object. If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() If obj is str, int, long, float, bool, return directly. If obj is datetime.datetime, datetime.date convert to string in iso8601 format. @@ -379,6 +376,10 @@ class ApiClient: """ if obj is None: return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): @@ -400,7 +401,10 @@ class ApiClient: # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - obj_dict = obj.to_dict() + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ return { key: self.sanitize_for_serialization(val) @@ -438,12 +442,16 @@ class ApiClient: if isinstance(klass, str): if klass.startswith('List['): - sub_kls = re.match(r'List\[(.*)]', klass).group(1) + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) return [self.__deserialize(sub_data, sub_kls) for sub_data in data] if klass.startswith('Dict['): - sub_kls = re.match(r'Dict\[([^,]*), (.*)]', klass).group(2) + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} @@ -461,6 +469,8 @@ class ApiClient: return self.__deserialize_date(data) elif klass == datetime.datetime: return self.__deserialize_datetime(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) else: return self.__deserialize_model(data, klass) @@ -471,7 +481,7 @@ class ApiClient: :param dict collection_formats: Parameter collection formats :return: Parameters as list of tuples, collections formatted """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -501,7 +511,7 @@ class ApiClient: :param dict collection_formats: Parameter collection formats :return: URL query string (e.g. a=Hello%20World&b=123) """ - new_params = [] + new_params: List[Tuple[str, str]] = [] if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: @@ -515,7 +525,7 @@ class ApiClient: if k in collection_formats: collection_format = collection_formats[k] if collection_format == 'multi': - new_params.extend((k, value) for value in v) + new_params.extend((k, str(value)) for value in v) else: if collection_format == 'ssv': delimiter = ' ' @@ -531,33 +541,32 @@ class ApiClient: else: new_params.append((k, quote(str(v)))) - return "&".join(["=".join(item) for item in new_params]) + return "&".join(["=".join(map(str, item)) for item in new_params]) - def files_parameters(self, files=None): + def files_parameters(self, files: Dict[str, Union[str, bytes]]): """Builds form parameters. :param files: File parameters. :return: Form parameters with files. """ params = [] - - if files: - for k, v in files.items(): - if not v: - continue - file_names = v if type(v) is list else [v] - for n in file_names: - with open(n, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -695,10 +704,12 @@ class ApiClient: content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re.search( + m = re.search( r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition - ).group(1) + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: @@ -765,6 +776,24 @@ class ApiClient: ) ) + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/test-requirements.txt b/test-requirements.txt index 3a0d0b9..8e6d8cb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,5 @@ pytest~=7.1.3 pytest-cov>=2.8.1 pytest-randomly>=3.12.0 +mypy>=1.4.1 +types-python-dateutil>=2.8.19 diff --git a/test/test_api_keys_api.py b/test/test_api_keys_api.py index c4b03ca..2ce929c 100644 --- a/test/test_api_keys_api.py +++ b/test/test_api_keys_api.py @@ -17,18 +17,19 @@ import conekta from conekta import ApiClient -from conekta.api.api_keys_api import ApiKeysApi # noqa: E501 +from conekta.api.api_keys_api import ApiKeysApi from conekta.rest import ApiException from test.test_utils import get_base_path - +from conekta.models.get_api_keys_response import GetApiKeysResponse +from conekta.models.api_key_response import ApiKeyResponse class TestApiKeysApi(unittest.TestCase): """ApiKeysApi unit test stubs""" def setUp(self): - self.api = conekta.api.api_keys_api.ApiKeysApi(ApiClient( + self.api = ApiKeysApi(ApiClient( configuration=conekta.Configuration(host=get_base_path()) - )) # noqa: E501 + )) def tearDown(self): pass @@ -72,7 +73,15 @@ def test_get_api_keys(self): """ accept_language = 'es' response = self.api.get_api_keys(accept_language, limit=20) + self.assertIsNotNone(response) + self.assertIsInstance(response, GetApiKeysResponse) + self.assertIsInstance(response.data[0], ApiKeyResponse) + self.assertIsNotNone(response.data) + self.assertTrue(response.data[0].active) + self.assertEqual(1, len(response.data)) + self.assertFalse(response.next_page_url) + self.assertFalse(response.previous_page_url) def test_update_api_key(self): """Test case for update_api_key diff --git a/test/test_customers_api.py b/test/test_customers_api.py index bfc1a84..de9724d 100644 --- a/test/test_customers_api.py +++ b/test/test_customers_api.py @@ -57,7 +57,7 @@ def test_create_customer_fiscal_entities(self): email='foo@foo.com', company_name='Foo Foo', phone='5534343434', - address=conekta.CustomerFiscalEntitiesRequestAddress( + address=conekta.CustomerAddress( street1='street', postal_code='1444', city='CDMX' diff --git a/test/test_orders_api.py b/test/test_orders_api.py index d08418b..9e6f8f7 100644 --- a/test/test_orders_api.py +++ b/test/test_orders_api.py @@ -16,17 +16,19 @@ import conekta from conekta import ApiClient -from conekta.api.orders_api import OrdersApi # noqa: E501 from conekta.rest import ApiException from test.test_utils import get_base_path - +from conekta.models.order_response_charges import OrderResponseCharges +from conekta.models.order_response import OrderResponse +from conekta.api.orders_api import OrdersApi +from conekta.models.payment_method_cash import PaymentMethodCash class TestOrdersApi(unittest.TestCase): """OrdersApi unit test stubs""" def setUp(self): - self.api = conekta.api.orders_api.OrdersApi(ApiClient( - configuration=conekta.Configuration(host=get_base_path()) + self.api = OrdersApi(ApiClient( + configuration=conekta.Configuration(host=get_base_path(),access_token='key_xxxx') )) # noqa: E501 def tearDown(self): @@ -83,7 +85,15 @@ def test_create_order(self): ) ) response = self.api.create_order(rq, accept_language) + self.assertIsNotNone(response) + self.assertIsNotNone(response.charges) + self.assertIsInstance(response.charges, OrderResponseCharges) + self.assertIsInstance(response, OrderResponse) + self.assertEqual('list', response.charges.object) + self.assertEqual(1, len(response.charges.data)) + self.assertIsInstance(response.charges.data[0].payment_method.actual_instance, PaymentMethodCash) + self.assertEqual("oxxo", response.charges.data[0].payment_method.actual_instance.type) def test_get_order_by_id(self): """Test case for get_order_by_id diff --git a/test/test_payout_orders_api.py b/test/test_payout_orders_api.py new file mode 100644 index 0000000..784e62f --- /dev/null +++ b/test/test_payout_orders_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Conekta API + + Conekta sdk + + The version of the OpenAPI document: 2.1.0 + Contact: engineering@conekta.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from conekta.api.payout_orders_api import PayoutOrdersApi + + +class TestPayoutOrdersApi(unittest.TestCase): + """PayoutOrdersApi unit test stubs""" + + def setUp(self) -> None: + self.api = PayoutOrdersApi() + + def tearDown(self) -> None: + pass + + def test_create_payout_order(self) -> None: + """Test case for create_payout_order + + Create payout order + """ + pass + + def test_get_payout_order_by_id(self) -> None: + """Test case for get_payout_order_by_id + + Get Payout Order + """ + pass + + def test_get_payout_orders(self) -> None: + """Test case for get_payout_orders + + Get a list of Payout Orders + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_webhooks_api.py b/test/test_webhooks_api.py index 540b00d..7782e43 100644 --- a/test/test_webhooks_api.py +++ b/test/test_webhooks_api.py @@ -17,7 +17,7 @@ import conekta from conekta import ApiClient -from conekta.api.webhooks_api import WebhooksApi # noqa: E501 +from conekta.api.webhooks_api import WebhooksApi from conekta.rest import ApiException from test.test_utils import get_base_path @@ -26,8 +26,8 @@ class TestWebhooksApi(unittest.TestCase): """WebhooksApi unit test stubs""" def setUp(self): - self.api = conekta.api.webhooks_api.WebhooksApi(ApiClient( - configuration=conekta.Configuration(host=get_base_path()) + self.api = WebhooksApi(ApiClient( + configuration=conekta.Configuration(host=get_base_path(), access_token='key_xxxx') )) # noqa: E501 def tearDown(self):