From 1c783c9a2e00a2dff543bbabba73c4fd940b3821 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 21 Dec 2023 14:43:04 -0500 Subject: [PATCH 1/3] new entities --- .openapi-generator/FILES | 76 +- .openapi-generator/VERSION | 2 +- Makefile | 11 + README.md | 199 +- api/openapi.yaml | 1601 ++++++++++++++++- api_antifraud.go | 54 +- api_api_keys.go | 49 +- api_balances.go | 16 +- api_charges.go | 203 ++- api_companies.go | 25 +- api_customers.go | 65 +- api_discounts.go | 49 +- api_events.go | 33 +- api_logs.go | 25 +- api_orders.go | 73 +- api_payment_link.go | 57 +- api_payment_methods.go | 41 +- api_plans.go | 49 +- api_products.go | 30 +- api_shipping_contacts.go | 30 +- api_shippings.go | 30 +- api_subscriptions.go | 62 +- api_taxes.go | 30 +- api_tokens.go | 14 +- api_transactions.go | 75 +- api_transfers.go | 25 +- api_webhook_keys.go | 49 +- api_webhooks.go | 57 +- client.go | 94 +- config-go.json | 18 + docs/AntifraudApi.md | 54 +- docs/ApiKeysApi.md | 42 +- docs/BalancesApi.md | 10 +- docs/ChargeOrderResponse.md | 26 - docs/ChargeOrderResponsePaymentMethod.md | 16 +- docs/ChargeRequest.md | 26 - docs/ChargeRequestPaymentMethod.md | 26 + docs/ChargeResponse.md | 26 - docs/ChargeResponsePaymentMethod.md | 16 +- docs/ChargeUpdateRequest.md | 56 + docs/ChargesApi.md | 93 +- docs/ChargesDataResponse.md | 26 - docs/CompaniesApi.md | 18 +- docs/CustomerAddress.md | 2 +- docs/CustomerFiscalEntitiesRequestAddress.md | 2 +- docs/CustomerResponse.md | 43 +- docs/CustomerShippingContacts.md | 26 + docs/CustomerShippingContactsDataResponse.md | 26 + docs/CustomerShippingContactsResponse.md | 26 + ...CustomerShippingContactsResponseAddress.md | 12 +- docs/CustomersApi.md | 62 +- docs/DiscountsApi.md | 42 +- docs/EventsApi.md | 26 +- docs/FiscalEntityAddress.md | 197 ++ docs/LogsApi.md | 18 +- docs/OrderCustomerInfoResponse.md | 196 ++ docs/OrderFiscalEntityAddressResponse.md | 223 +++ docs/OrderFiscalEntityAddressResponseAllOf.md | 56 + docs/OrderFiscalEntityRequest.md | 201 +++ docs/OrderFiscalEntityResponse.md | 284 +++ docs/OrderNextActionResponse.md | 82 + docs/OrderNextActionResponseRedirectToUrl.md | 82 + docs/OrderRequest.md | 78 + docs/OrderResponse.md | 44 +- docs/OrderResponseCustomerInfo.md | 36 + docs/OrderResponseShippingContact.md | 26 + docs/OrderUpdateFiscalEntityRequest.md | 201 +++ docs/OrderUpdateRequest.md | 26 + docs/OrdersApi.md | 66 +- docs/PaymentLinkApi.md | 50 +- docs/PaymentMethodBankTransfer.md | 8 +- docs/PaymentMethodCard.md | 8 +- docs/PaymentMethodsApi.md | 34 +- docs/PlansApi.md | 42 +- docs/ProductsApi.md | 26 +- docs/ShippingContactsApi.md | 26 +- docs/ShippingsApi.md | 26 +- docs/SubscriptionsApi.md | 58 +- docs/TaxesApi.md | 26 +- docs/TokensApi.md | 10 +- docs/TransactionsApi.md | 30 +- docs/TransfersApi.md | 18 +- docs/WebhookKeysApi.md | 42 +- docs/WebhookUpdateRequest.md | 26 +- docs/WebhooksApi.md | 50 +- model_api_key_request.go | 38 + model_charge_order_response.go | 36 - model_charge_request.go | 75 +- model_charge_request_payment_method.go | 75 + model_charge_response.go | 36 - model_charge_response_refunds.go | 39 + model_charge_response_refunds_data.go | 41 + model_charge_update_request.go | 128 ++ model_charges_data_response.go | 36 - model_checkout.go | 43 + model_checkout_order_template.go | 39 + model_checkout_request.go | 38 + model_checkout_response.go | 41 + model_checkouts_response.go | 39 + ...reate_customer_fiscal_entities_response.go | 41 + ...ustomer_fiscal_entities_response_all_of.go | 40 + ...reate_customer_payment_methods_response.go | 24 +- model_create_risk_rules_data.go | 40 + model_customer.go | 40 + model_customer_address.go | 44 + ..._customer_fiscal_entities_data_response.go | 41 + model_customer_fiscal_entities_request.go | 38 + ...ustomer_fiscal_entities_request_address.go | 44 + model_customer_fiscal_entities_response.go | 39 + model_customer_info.go | 40 + model_customer_info_just_customer_id.go | 38 + model_customer_payment_method_request.go | 38 + model_customer_payment_methods_data.go | 24 +- model_customer_payment_methods_response.go | 39 + model_customer_response.go | 108 +- model_customer_response_shipping_contacts.go | 39 + model_customer_shipping_contacts.go | 75 + ...ustomer_shipping_contacts_data_response.go | 78 + ..._shipping_contacts_data_response_all_of.go | 40 + model_customer_shipping_contacts_response.go | 37 + ...omer_shipping_contacts_response_address.go | 32 +- model_customers_response.go | 39 + model_discount_lines_data_response.go | 43 + model_discount_lines_response.go | 43 + model_discount_lines_response_all_of.go | 40 + model_email_checkout_request.go | 38 + model_fiscal_entity_address.go | 357 ++++ model_get_api_keys_response.go | 39 + model_get_charges_response.go | 39 + model_get_companies_response.go | 39 + ...t_customer_payment_method_data_response.go | 24 +- model_get_events_response.go | 39 + model_get_order_discount_lines_response.go | 39 + model_get_orders_response.go | 40 + model_get_payment_method_response.go | 39 + model_get_plans_response.go | 39 + model_get_transactions_response.go | 39 + model_get_transfers_response.go | 39 + model_get_webhook_keys_response.go | 39 + model_get_webhooks_response.go | 39 + model_log_response.go | 40 + model_logs_response.go | 8 +- model_order_capture_request.go | 38 + model_order_customer_info_response.go | 322 ++++ model_order_discount_lines_request.go | 40 + model_order_fiscal_entity_address_response.go | 393 ++++ ...r_fiscal_entity_address_response_all_of.go | 127 ++ model_order_fiscal_entity_request.go | 361 ++++ model_order_fiscal_entity_response.go | 467 +++++ model_order_next_action_response.go | 164 ++ ...er_next_action_response_redirect_to_url.go | 165 ++ model_order_refund_request.go | 39 + model_order_request.go | 150 ++ model_order_response.go | 76 +- model_order_response_charges.go | 39 + model_order_response_customer_info.go | 47 + model_order_response_discount_lines.go | 39 + model_order_response_products.go | 39 + model_order_response_shipping_contact.go | 37 + model_order_tax_request.go | 39 + model_order_update_fiscal_entity_request.go | 361 ++++ model_order_update_request.go | 36 + model_orders_response.go | 38 + model_pagination.go | 39 + model_payment_method.go | 38 + model_payment_method_bank_transfer.go | 50 +- model_payment_method_card.go | 50 +- model_payment_method_card_request.go | 39 + model_payment_method_card_response.go | 41 + model_payment_method_cash.go | 38 + model_payment_method_cash_request.go | 38 + model_payment_method_cash_response.go | 41 + model_payment_method_response.go | 41 + model_payment_method_spei_recurrent.go | 41 + model_payment_method_spei_request.go | 38 + model_plan_request.go | 41 + model_product.go | 40 + model_product_data_response.go | 40 + model_product_order_response.go | 40 + model_risk_rules_list.go | 39 + model_shipping_order_response.go | 38 + model_shipping_request.go | 38 + model_sms_checkout_request.go | 38 + model_subscription_events_response.go | 39 + model_subscription_request.go | 38 + model_token_card.go | 42 + model_token_response.go | 41 + model_transaction_response.go | 48 + ...pdate_customer_fiscal_entities_response.go | 41 + ...ustomer_fiscal_entities_response_all_of.go | 40 + ...pdate_customer_payment_methods_response.go | 24 +- model_update_order_tax_response.go | 40 + model_webhook_request.go | 39 + model_webhook_update_request.go | 72 +- templates/go/README.mustache | 267 +++ templates/go/client.mustache | 788 ++++++++ 196 files changed, 12767 insertions(+), 1501 deletions(-) create mode 100644 Makefile create mode 100644 config-go.json create mode 100644 docs/ChargeUpdateRequest.md create mode 100644 docs/FiscalEntityAddress.md create mode 100644 docs/OrderCustomerInfoResponse.md create mode 100644 docs/OrderFiscalEntityAddressResponse.md create mode 100644 docs/OrderFiscalEntityAddressResponseAllOf.md create mode 100644 docs/OrderFiscalEntityRequest.md create mode 100644 docs/OrderFiscalEntityResponse.md create mode 100644 docs/OrderNextActionResponse.md create mode 100644 docs/OrderNextActionResponseRedirectToUrl.md create mode 100644 docs/OrderUpdateFiscalEntityRequest.md create mode 100644 model_charge_update_request.go create mode 100644 model_fiscal_entity_address.go create mode 100644 model_order_customer_info_response.go create mode 100644 model_order_fiscal_entity_address_response.go create mode 100644 model_order_fiscal_entity_address_response_all_of.go create mode 100644 model_order_fiscal_entity_request.go create mode 100644 model_order_fiscal_entity_response.go create mode 100644 model_order_next_action_response.go create mode 100644 model_order_next_action_response_redirect_to_url.go create mode 100644 model_order_update_fiscal_entity_request.go create mode 100644 templates/go/README.mustache create mode 100644 templates/go/client.mustache diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index fce2801..cfb6124 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -29,17 +29,17 @@ api_webhooks.go client.go conekta.png configuration.go -docs/AntifraudApi.md +docs/AntifraudAPI.md docs/ApiKeyCreateResponse.md docs/ApiKeyCreateResponseAllOf.md docs/ApiKeyRequest.md docs/ApiKeyResponse.md docs/ApiKeyResponseOnDelete.md docs/ApiKeyUpdateRequest.md -docs/ApiKeysApi.md +docs/ApiKeysAPI.md docs/BalanceCommonField.md docs/BalanceResponse.md -docs/BalancesApi.md +docs/BalancesAPI.md docs/BlacklistRuleResponse.md docs/ChargeDataPaymentMethodBankTransferResponse.md docs/ChargeDataPaymentMethodCardResponse.md @@ -54,7 +54,8 @@ docs/ChargeResponsePaymentMethod.md docs/ChargeResponseRefunds.md docs/ChargeResponseRefundsAllOf.md docs/ChargeResponseRefundsData.md -docs/ChargesApi.md +docs/ChargeUpdateRequest.md +docs/ChargesAPI.md docs/ChargesDataResponse.md docs/Checkout.md docs/CheckoutOrderTemplate.md @@ -63,7 +64,7 @@ docs/CheckoutRequest.md docs/CheckoutResponse.md docs/CheckoutsResponse.md docs/CheckoutsResponseAllOf.md -docs/CompaniesApi.md +docs/CompaniesAPI.md docs/CompanyFiscalInfoAddressResponse.md docs/CompanyFiscalInfoResponse.md docs/CompanyPayoutDestinationResponse.md @@ -85,7 +86,6 @@ docs/CustomerFiscalEntitiesResponseAllOf.md docs/CustomerInfo.md docs/CustomerInfoJustCustomerId.md docs/CustomerInfoJustCustomerIdResponse.md -docs/CustomerInfoResponse.md docs/CustomerPaymentMethodRequest.md docs/CustomerPaymentMethods.md docs/CustomerPaymentMethodsData.md @@ -102,7 +102,7 @@ docs/CustomerShippingContactsResponse.md docs/CustomerShippingContactsResponseAddress.md docs/CustomerUpdateFiscalEntitiesRequest.md docs/CustomerUpdateShippingContacts.md -docs/CustomersApi.md +docs/CustomersAPI.md docs/CustomersResponse.md docs/CustomersResponseAllOf.md docs/DeleteApiKeysResponse.md @@ -114,12 +114,13 @@ docs/DetailsError.md docs/DiscountLinesDataResponse.md docs/DiscountLinesResponse.md docs/DiscountLinesResponseAllOf.md -docs/DiscountsApi.md +docs/DiscountsAPI.md docs/EmailCheckoutRequest.md docs/ErrorAllOf.md docs/EventResponse.md -docs/EventsApi.md +docs/EventsAPI.md docs/EventsResendResponse.md +docs/FiscalEntityAddress.md docs/GetApiKeysResponse.md docs/GetApiKeysResponseAllOf.md docs/GetChargesResponse.md @@ -145,12 +146,19 @@ docs/GetWebhookKeysResponseAllOf.md docs/GetWebhooksResponse.md docs/GetWebhooksResponseAllOf.md docs/LogResponse.md -docs/LogsApi.md +docs/LogsAPI.md docs/LogsResponse.md docs/LogsResponseData.md docs/ModelError.md docs/OrderCaptureRequest.md +docs/OrderCustomerInfoResponse.md docs/OrderDiscountLinesRequest.md +docs/OrderFiscalEntityAddressResponse.md +docs/OrderFiscalEntityAddressResponseAllOf.md +docs/OrderFiscalEntityRequest.md +docs/OrderFiscalEntityResponse.md +docs/OrderNextActionResponse.md +docs/OrderNextActionResponseRedirectToUrl.md docs/OrderRefundRequest.md docs/OrderRequest.md docs/OrderRequestCustomerInfo.md @@ -162,21 +170,19 @@ docs/OrderResponseCustomerInfo.md docs/OrderResponseCustomerInfoAllOf.md docs/OrderResponseDiscountLines.md docs/OrderResponseDiscountLinesAllOf.md -docs/OrderResponseFiscalEntity.md -docs/OrderResponseFiscalEntityAddress.md -docs/OrderResponseFiscalEntityAddressAllOf.md docs/OrderResponseProducts.md docs/OrderResponseProductsAllOf.md docs/OrderResponseShippingContact.md docs/OrderResponseShippingContactAllOf.md docs/OrderTaxRequest.md +docs/OrderUpdateFiscalEntityRequest.md docs/OrderUpdateRequest.md docs/OrderUpdateRequestCustomerInfo.md -docs/OrdersApi.md +docs/OrdersAPI.md docs/OrdersResponse.md docs/Page.md docs/Pagination.md -docs/PaymentLinkApi.md +docs/PaymentLinkAPI.md docs/PaymentMethod.md docs/PaymentMethodBankTransfer.md docs/PaymentMethodCard.md @@ -193,43 +199,43 @@ docs/PaymentMethodResponse.md docs/PaymentMethodSpeiRecurrent.md docs/PaymentMethodSpeiRecurrentAllOf.md docs/PaymentMethodSpeiRequest.md -docs/PaymentMethodsApi.md +docs/PaymentMethodsAPI.md docs/PlanRequest.md docs/PlanResponse.md docs/PlanUpdateRequest.md -docs/PlansApi.md +docs/PlansAPI.md docs/Product.md docs/ProductDataResponse.md docs/ProductDataResponseAllOf.md docs/ProductOrderResponse.md docs/ProductOrderResponseAllOf.md -docs/ProductsApi.md +docs/ProductsAPI.md docs/RiskRules.md docs/RiskRulesData.md docs/RiskRulesList.md -docs/ShippingContactsApi.md +docs/ShippingContactsAPI.md docs/ShippingOrderResponse.md docs/ShippingRequest.md -docs/ShippingsApi.md +docs/ShippingsAPI.md docs/SmsCheckoutRequest.md docs/SubscriptionEventsResponse.md docs/SubscriptionRequest.md docs/SubscriptionResponse.md docs/SubscriptionUpdateRequest.md -docs/SubscriptionsApi.md -docs/TaxesApi.md +docs/SubscriptionsAPI.md +docs/TaxesAPI.md docs/Token.md docs/TokenCard.md docs/TokenCheckout.md docs/TokenResponse.md docs/TokenResponseCheckout.md -docs/TokensApi.md +docs/TokensAPI.md docs/TransactionResponse.md -docs/TransactionsApi.md +docs/TransactionsAPI.md docs/TransferDestinationResponse.md docs/TransferMethodResponse.md docs/TransferResponse.md -docs/TransfersApi.md +docs/TransfersAPI.md docs/TransfersResponse.md docs/UpdateCustomer.md docs/UpdateCustomerAntifraudInfo.md @@ -247,15 +253,13 @@ docs/WebhookKeyDeleteResponse.md docs/WebhookKeyRequest.md docs/WebhookKeyResponse.md docs/WebhookKeyUpdateRequest.md -docs/WebhookKeysApi.md +docs/WebhookKeysAPI.md docs/WebhookLog.md docs/WebhookRequest.md docs/WebhookResponse.md docs/WebhookUpdateRequest.md -docs/WebhooksApi.md +docs/WebhooksAPI.md docs/WhitelistlistRuleResponse.md -go.mod -go.sum model_api_key_create_response.go model_api_key_create_response_all_of.go model_api_key_request.go @@ -278,6 +282,7 @@ model_charge_response_payment_method.go model_charge_response_refunds.go model_charge_response_refunds_all_of.go model_charge_response_refunds_data.go +model_charge_update_request.go model_charges_data_response.go model_checkout.go model_checkout_order_template.go @@ -307,7 +312,6 @@ model_customer_fiscal_entities_response_all_of.go model_customer_info.go model_customer_info_just_customer_id.go model_customer_info_just_customer_id_response.go -model_customer_info_response.go model_customer_payment_method_request.go model_customer_payment_methods.go model_customer_payment_methods_data.go @@ -340,6 +344,7 @@ model_error.go model_error_all_of.go model_event_response.go model_events_resend_response.go +model_fiscal_entity_address.go model_get_api_keys_response.go model_get_api_keys_response_all_of.go model_get_charges_response.go @@ -368,7 +373,14 @@ model_log_response.go model_logs_response.go model_logs_response_data.go model_order_capture_request.go +model_order_customer_info_response.go model_order_discount_lines_request.go +model_order_fiscal_entity_address_response.go +model_order_fiscal_entity_address_response_all_of.go +model_order_fiscal_entity_request.go +model_order_fiscal_entity_response.go +model_order_next_action_response.go +model_order_next_action_response_redirect_to_url.go model_order_refund_request.go model_order_request.go model_order_request_customer_info.go @@ -380,14 +392,12 @@ model_order_response_customer_info.go model_order_response_customer_info_all_of.go model_order_response_discount_lines.go model_order_response_discount_lines_all_of.go -model_order_response_fiscal_entity.go -model_order_response_fiscal_entity_address.go -model_order_response_fiscal_entity_address_all_of.go model_order_response_products.go model_order_response_products_all_of.go model_order_response_shipping_contact.go model_order_response_shipping_contact_all_of.go model_order_tax_request.go +model_order_update_fiscal_entity_request.go model_order_update_request.go model_order_update_request_customer_info.go model_orders_response.go diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index cd802a1..3769235 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cc40c34 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +go: + rm -rf /docs \ + && rm model_* + docker run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli:v7.1.0 generate \ + -i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \ + -g go \ + -o /local \ + -c /local/config-go.json \ + --global-property modelTests=false \ + --additional-properties=hideGenerationTimestamp=true diff --git a/README.md b/README.md index f4d0558..2539b68 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Conekta sdk This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - API version: 2.1.0 -- Package version: 6.0.2 +- Package version: 6.0.3 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues) @@ -113,97 +113,98 @@ All URIs are relative to *https://api.conekta.io* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AntifraudApi* | [**CreateRuleBlacklist**](docs/AntifraudApi.md#createruleblacklist) | **Post** /antifraud/blacklists | Create blacklisted rule -*AntifraudApi* | [**CreateRuleWhitelist**](docs/AntifraudApi.md#createrulewhitelist) | **Post** /antifraud/whitelists | Create whitelisted rule -*AntifraudApi* | [**DeleteRuleBlacklist**](docs/AntifraudApi.md#deleteruleblacklist) | **Delete** /antifraud/blacklists/{id} | Delete blacklisted rule -*AntifraudApi* | [**DeleteRuleWhitelist**](docs/AntifraudApi.md#deleterulewhitelist) | **Delete** /antifraud/whitelists/{id} | Delete whitelisted rule -*AntifraudApi* | [**GetRuleBlacklist**](docs/AntifraudApi.md#getruleblacklist) | **Get** /antifraud/blacklists | Get list of blacklisted rules -*AntifraudApi* | [**GetRuleWhitelist**](docs/AntifraudApi.md#getrulewhitelist) | **Get** /antifraud/whitelists | Get a list of whitelisted rules -*ApiKeysApi* | [**CreateApiKey**](docs/ApiKeysApi.md#createapikey) | **Post** /api_keys | Create Api Key -*ApiKeysApi* | [**DeleteApiKey**](docs/ApiKeysApi.md#deleteapikey) | **Delete** /api_keys/{id} | Delete Api Key -*ApiKeysApi* | [**GetApiKey**](docs/ApiKeysApi.md#getapikey) | **Get** /api_keys/{id} | Get Api Key -*ApiKeysApi* | [**GetApiKeys**](docs/ApiKeysApi.md#getapikeys) | **Get** /api_keys | Get list of Api Keys -*ApiKeysApi* | [**UpdateApiKey**](docs/ApiKeysApi.md#updateapikey) | **Put** /api_keys/{id} | Update Api Key -*BalancesApi* | [**GetBalance**](docs/BalancesApi.md#getbalance) | **Get** /balances | Get a company's balance -*ChargesApi* | [**GetCharges**](docs/ChargesApi.md#getcharges) | **Get** /charges | Get A List of Charges -*ChargesApi* | [**OrdersCreateCharge**](docs/ChargesApi.md#orderscreatecharge) | **Post** /orders/{id}/charges | Create charge -*CompaniesApi* | [**GetCompanies**](docs/CompaniesApi.md#getcompanies) | **Get** /companies | Get List of Companies -*CompaniesApi* | [**GetCompany**](docs/CompaniesApi.md#getcompany) | **Get** /companies/{id} | Get Company -*CustomersApi* | [**CreateCustomer**](docs/CustomersApi.md#createcustomer) | **Post** /customers | Create customer -*CustomersApi* | [**CreateCustomerFiscalEntities**](docs/CustomersApi.md#createcustomerfiscalentities) | **Post** /customers/{id}/fiscal_entities | Create Fiscal Entity -*CustomersApi* | [**DeleteCustomerById**](docs/CustomersApi.md#deletecustomerbyid) | **Delete** /customers/{id} | Delete Customer -*CustomersApi* | [**GetCustomerById**](docs/CustomersApi.md#getcustomerbyid) | **Get** /customers/{id} | Get Customer -*CustomersApi* | [**GetCustomers**](docs/CustomersApi.md#getcustomers) | **Get** /customers | Get a list of customers -*CustomersApi* | [**UpdateCustomer**](docs/CustomersApi.md#updatecustomer) | **Put** /customers/{id} | Update customer -*CustomersApi* | [**UpdateCustomerFiscalEntities**](docs/CustomersApi.md#updatecustomerfiscalentities) | **Put** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity -*DiscountsApi* | [**OrdersCreateDiscountLine**](docs/DiscountsApi.md#orderscreatediscountline) | **Post** /orders/{id}/discount_lines | Create Discount -*DiscountsApi* | [**OrdersDeleteDiscountLines**](docs/DiscountsApi.md#ordersdeletediscountlines) | **Delete** /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount -*DiscountsApi* | [**OrdersGetDiscountLine**](docs/DiscountsApi.md#ordersgetdiscountline) | **Get** /orders/{id}/discount_lines/{discount_lines_id} | Get Discount -*DiscountsApi* | [**OrdersGetDiscountLines**](docs/DiscountsApi.md#ordersgetdiscountlines) | **Get** /orders/{id}/discount_lines | Get a List of Discount -*DiscountsApi* | [**OrdersUpdateDiscountLines**](docs/DiscountsApi.md#ordersupdatediscountlines) | **Put** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount -*EventsApi* | [**GetEvent**](docs/EventsApi.md#getevent) | **Get** /events/{id} | Get Event -*EventsApi* | [**GetEvents**](docs/EventsApi.md#getevents) | **Get** /events | Get list of Events -*EventsApi* | [**ResendEvent**](docs/EventsApi.md#resendevent) | **Post** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event -*LogsApi* | [**GetLogById**](docs/LogsApi.md#getlogbyid) | **Get** /logs/{id} | Get Log -*LogsApi* | [**GetLogs**](docs/LogsApi.md#getlogs) | **Get** /logs | Get List Of Logs -*OrdersApi* | [**CancelOrder**](docs/OrdersApi.md#cancelorder) | **Post** /orders/{id}/cancel | Cancel Order -*OrdersApi* | [**CreateOrder**](docs/OrdersApi.md#createorder) | **Post** /orders | Create order -*OrdersApi* | [**GetOrderById**](docs/OrdersApi.md#getorderbyid) | **Get** /orders/{id} | Get Order -*OrdersApi* | [**GetOrders**](docs/OrdersApi.md#getorders) | **Get** /orders | Get a list of Orders -*OrdersApi* | [**OrderCancelRefund**](docs/OrdersApi.md#ordercancelrefund) | **Delete** /orders/{id}/refunds/{refund_id} | Cancel Refund -*OrdersApi* | [**OrderRefund**](docs/OrdersApi.md#orderrefund) | **Post** /orders/{id}/refunds | Refund Order -*OrdersApi* | [**OrdersCreateCapture**](docs/OrdersApi.md#orderscreatecapture) | **Post** /orders/{id}/capture | Capture Order -*OrdersApi* | [**UpdateOrder**](docs/OrdersApi.md#updateorder) | **Put** /orders/{id} | Update Order -*PaymentLinkApi* | [**CancelCheckout**](docs/PaymentLinkApi.md#cancelcheckout) | **Put** /checkouts/{id}/cancel | Cancel Payment Link -*PaymentLinkApi* | [**CreateCheckout**](docs/PaymentLinkApi.md#createcheckout) | **Post** /checkouts | Create Unique Payment Link -*PaymentLinkApi* | [**EmailCheckout**](docs/PaymentLinkApi.md#emailcheckout) | **Post** /checkouts/{id}/email | Send an email -*PaymentLinkApi* | [**GetCheckout**](docs/PaymentLinkApi.md#getcheckout) | **Get** /checkouts/{id} | Get a payment link by ID -*PaymentLinkApi* | [**GetCheckouts**](docs/PaymentLinkApi.md#getcheckouts) | **Get** /checkouts | Get a list of payment links -*PaymentLinkApi* | [**SmsCheckout**](docs/PaymentLinkApi.md#smscheckout) | **Post** /checkouts/{id}/sms | Send an sms -*PaymentMethodsApi* | [**CreateCustomerPaymentMethods**](docs/PaymentMethodsApi.md#createcustomerpaymentmethods) | **Post** /customers/{id}/payment_sources | Create Payment Method -*PaymentMethodsApi* | [**DeleteCustomerPaymentMethods**](docs/PaymentMethodsApi.md#deletecustomerpaymentmethods) | **Delete** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method -*PaymentMethodsApi* | [**GetCustomerPaymentMethods**](docs/PaymentMethodsApi.md#getcustomerpaymentmethods) | **Get** /customers/{id}/payment_sources | Get Payment Methods -*PaymentMethodsApi* | [**UpdateCustomerPaymentMethods**](docs/PaymentMethodsApi.md#updatecustomerpaymentmethods) | **Put** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method -*PlansApi* | [**CreatePlan**](docs/PlansApi.md#createplan) | **Post** /plans | Create Plan -*PlansApi* | [**DeletePlan**](docs/PlansApi.md#deleteplan) | **Delete** /plans/{id} | Delete Plan -*PlansApi* | [**GetPlan**](docs/PlansApi.md#getplan) | **Get** /plans/{id} | Get Plan -*PlansApi* | [**GetPlans**](docs/PlansApi.md#getplans) | **Get** /plans | Get A List of Plans -*PlansApi* | [**UpdatePlan**](docs/PlansApi.md#updateplan) | **Put** /plans/{id} | Update Plan -*ProductsApi* | [**OrdersCreateProduct**](docs/ProductsApi.md#orderscreateproduct) | **Post** /orders/{id}/line_items | Create Product -*ProductsApi* | [**OrdersDeleteProduct**](docs/ProductsApi.md#ordersdeleteproduct) | **Delete** /orders/{id}/line_items/{line_item_id} | Delete Product -*ProductsApi* | [**OrdersUpdateProduct**](docs/ProductsApi.md#ordersupdateproduct) | **Put** /orders/{id}/line_items/{line_item_id} | Update Product -*ShippingContactsApi* | [**CreateCustomerShippingContacts**](docs/ShippingContactsApi.md#createcustomershippingcontacts) | **Post** /customers/{id}/shipping_contacts | Create a shipping contacts -*ShippingContactsApi* | [**DeleteCustomerShippingContacts**](docs/ShippingContactsApi.md#deletecustomershippingcontacts) | **Delete** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Delete shipping contacts -*ShippingContactsApi* | [**UpdateCustomerShippingContacts**](docs/ShippingContactsApi.md#updatecustomershippingcontacts) | **Put** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Update shipping contacts -*ShippingsApi* | [**OrdersCreateShipping**](docs/ShippingsApi.md#orderscreateshipping) | **Post** /orders/{id}/shipping_lines | Create Shipping -*ShippingsApi* | [**OrdersDeleteShipping**](docs/ShippingsApi.md#ordersdeleteshipping) | **Delete** /orders/{id}/shipping_lines/{shipping_id} | Delete Shipping -*ShippingsApi* | [**OrdersUpdateShipping**](docs/ShippingsApi.md#ordersupdateshipping) | **Put** /orders/{id}/shipping_lines/{shipping_id} | Update Shipping -*SubscriptionsApi* | [**CancelSubscription**](docs/SubscriptionsApi.md#cancelsubscription) | **Post** /customers/{id}/subscription/cancel | Cancel Subscription -*SubscriptionsApi* | [**CreateSubscription**](docs/SubscriptionsApi.md#createsubscription) | **Post** /customers/{id}/subscription | Create Subscription -*SubscriptionsApi* | [**GetAllEventsFromSubscription**](docs/SubscriptionsApi.md#getalleventsfromsubscription) | **Get** /customers/{id}/subscription/events | Get Events By Subscription -*SubscriptionsApi* | [**GetSubscription**](docs/SubscriptionsApi.md#getsubscription) | **Get** /customers/{id}/subscription | Get Subscription -*SubscriptionsApi* | [**PauseSubscription**](docs/SubscriptionsApi.md#pausesubscription) | **Post** /customers/{id}/subscription/pause | Pause Subscription -*SubscriptionsApi* | [**ResumeSubscription**](docs/SubscriptionsApi.md#resumesubscription) | **Post** /customers/{id}/subscription/resume | Resume Subscription -*SubscriptionsApi* | [**UpdateSubscription**](docs/SubscriptionsApi.md#updatesubscription) | **Put** /customers/{id}/subscription | Update Subscription -*TaxesApi* | [**OrdersCreateTaxes**](docs/TaxesApi.md#orderscreatetaxes) | **Post** /orders/{id}/tax_lines | Create Tax -*TaxesApi* | [**OrdersDeleteTaxes**](docs/TaxesApi.md#ordersdeletetaxes) | **Delete** /orders/{id}/tax_lines/{tax_id} | Delete Tax -*TaxesApi* | [**OrdersUpdateTaxes**](docs/TaxesApi.md#ordersupdatetaxes) | **Put** /orders/{id}/tax_lines/{tax_id} | Update Tax -*TokensApi* | [**CreateToken**](docs/TokensApi.md#createtoken) | **Post** /tokens | Create Token -*TransactionsApi* | [**GetTransaction**](docs/TransactionsApi.md#gettransaction) | **Get** /transactions/{id} | Get transaction -*TransactionsApi* | [**GetTransactions**](docs/TransactionsApi.md#gettransactions) | **Get** /transactions | Get List transactions -*TransfersApi* | [**GetTransfer**](docs/TransfersApi.md#gettransfer) | **Get** /transfers/{id} | Get Transfer -*TransfersApi* | [**GetTransfers**](docs/TransfersApi.md#gettransfers) | **Get** /transfers | Get a list of transfers -*WebhookKeysApi* | [**CreateWebhookKey**](docs/WebhookKeysApi.md#createwebhookkey) | **Post** /webhook_keys | Create Webhook Key -*WebhookKeysApi* | [**DeleteWebhookKey**](docs/WebhookKeysApi.md#deletewebhookkey) | **Delete** /webhook_keys/{id} | Delete Webhook key -*WebhookKeysApi* | [**GetWebhookKey**](docs/WebhookKeysApi.md#getwebhookkey) | **Get** /webhook_keys/{id} | Get Webhook Key -*WebhookKeysApi* | [**GetWebhookKeys**](docs/WebhookKeysApi.md#getwebhookkeys) | **Get** /webhook_keys | Get List of Webhook Keys -*WebhookKeysApi* | [**UpdateWebhookKey**](docs/WebhookKeysApi.md#updatewebhookkey) | **Put** /webhook_keys/{id} | Update Webhook Key -*WebhooksApi* | [**CreateWebhook**](docs/WebhooksApi.md#createwebhook) | **Post** /webhooks | Create Webhook -*WebhooksApi* | [**DeleteWebhook**](docs/WebhooksApi.md#deletewebhook) | **Delete** /webhooks/{id} | Delete Webhook -*WebhooksApi* | [**GetWebhook**](docs/WebhooksApi.md#getwebhook) | **Get** /webhooks/{id} | Get Webhook -*WebhooksApi* | [**GetWebhooks**](docs/WebhooksApi.md#getwebhooks) | **Get** /webhooks | Get List of Webhooks -*WebhooksApi* | [**TestWebhook**](docs/WebhooksApi.md#testwebhook) | **Post** /webhooks/{id}/test | Test Webhook -*WebhooksApi* | [**UpdateWebhook**](docs/WebhooksApi.md#updatewebhook) | **Put** /webhooks/{id} | Update Webhook +*AntifraudAPI* | [**CreateRuleBlacklist**](docs/AntifraudAPI.md#createruleblacklist) | **Post** /antifraud/blacklists | Create blacklisted rule +*AntifraudAPI* | [**CreateRuleWhitelist**](docs/AntifraudAPI.md#createrulewhitelist) | **Post** /antifraud/whitelists | Create whitelisted rule +*AntifraudAPI* | [**DeleteRuleBlacklist**](docs/AntifraudAPI.md#deleteruleblacklist) | **Delete** /antifraud/blacklists/{id} | Delete blacklisted rule +*AntifraudAPI* | [**DeleteRuleWhitelist**](docs/AntifraudAPI.md#deleterulewhitelist) | **Delete** /antifraud/whitelists/{id} | Delete whitelisted rule +*AntifraudAPI* | [**GetRuleBlacklist**](docs/AntifraudAPI.md#getruleblacklist) | **Get** /antifraud/blacklists | Get list of blacklisted rules +*AntifraudAPI* | [**GetRuleWhitelist**](docs/AntifraudAPI.md#getrulewhitelist) | **Get** /antifraud/whitelists | Get a list of whitelisted rules +*ApiKeysAPI* | [**CreateApiKey**](docs/ApiKeysAPI.md#createapikey) | **Post** /api_keys | Create Api Key +*ApiKeysAPI* | [**DeleteApiKey**](docs/ApiKeysAPI.md#deleteapikey) | **Delete** /api_keys/{id} | Delete Api Key +*ApiKeysAPI* | [**GetApiKey**](docs/ApiKeysAPI.md#getapikey) | **Get** /api_keys/{id} | Get Api Key +*ApiKeysAPI* | [**GetApiKeys**](docs/ApiKeysAPI.md#getapikeys) | **Get** /api_keys | Get list of Api Keys +*ApiKeysAPI* | [**UpdateApiKey**](docs/ApiKeysAPI.md#updateapikey) | **Put** /api_keys/{id} | Update Api Key +*BalancesAPI* | [**GetBalance**](docs/BalancesAPI.md#getbalance) | **Get** /balance | Get a company's balance +*ChargesAPI* | [**GetCharges**](docs/ChargesAPI.md#getcharges) | **Get** /charges | Get A List of Charges +*ChargesAPI* | [**OrdersCreateCharge**](docs/ChargesAPI.md#orderscreatecharge) | **Post** /orders/{id}/charges | Create charge +*ChargesAPI* | [**UpdateCharge**](docs/ChargesAPI.md#updatecharge) | **Put** /charges/{id} | Update a charge +*CompaniesAPI* | [**GetCompanies**](docs/CompaniesAPI.md#getcompanies) | **Get** /companies | Get List of Companies +*CompaniesAPI* | [**GetCompany**](docs/CompaniesAPI.md#getcompany) | **Get** /companies/{id} | Get Company +*CustomersAPI* | [**CreateCustomer**](docs/CustomersAPI.md#createcustomer) | **Post** /customers | Create customer +*CustomersAPI* | [**CreateCustomerFiscalEntities**](docs/CustomersAPI.md#createcustomerfiscalentities) | **Post** /customers/{id}/fiscal_entities | Create Fiscal Entity +*CustomersAPI* | [**DeleteCustomerById**](docs/CustomersAPI.md#deletecustomerbyid) | **Delete** /customers/{id} | Delete Customer +*CustomersAPI* | [**GetCustomerById**](docs/CustomersAPI.md#getcustomerbyid) | **Get** /customers/{id} | Get Customer +*CustomersAPI* | [**GetCustomers**](docs/CustomersAPI.md#getcustomers) | **Get** /customers | Get a list of customers +*CustomersAPI* | [**UpdateCustomer**](docs/CustomersAPI.md#updatecustomer) | **Put** /customers/{id} | Update customer +*CustomersAPI* | [**UpdateCustomerFiscalEntities**](docs/CustomersAPI.md#updatecustomerfiscalentities) | **Put** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity +*DiscountsAPI* | [**OrdersCreateDiscountLine**](docs/DiscountsAPI.md#orderscreatediscountline) | **Post** /orders/{id}/discount_lines | Create Discount +*DiscountsAPI* | [**OrdersDeleteDiscountLines**](docs/DiscountsAPI.md#ordersdeletediscountlines) | **Delete** /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount +*DiscountsAPI* | [**OrdersGetDiscountLine**](docs/DiscountsAPI.md#ordersgetdiscountline) | **Get** /orders/{id}/discount_lines/{discount_lines_id} | Get Discount +*DiscountsAPI* | [**OrdersGetDiscountLines**](docs/DiscountsAPI.md#ordersgetdiscountlines) | **Get** /orders/{id}/discount_lines | Get a List of Discount +*DiscountsAPI* | [**OrdersUpdateDiscountLines**](docs/DiscountsAPI.md#ordersupdatediscountlines) | **Put** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount +*EventsAPI* | [**GetEvent**](docs/EventsAPI.md#getevent) | **Get** /events/{id} | Get Event +*EventsAPI* | [**GetEvents**](docs/EventsAPI.md#getevents) | **Get** /events | Get list of Events +*EventsAPI* | [**ResendEvent**](docs/EventsAPI.md#resendevent) | **Post** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event +*LogsAPI* | [**GetLogById**](docs/LogsAPI.md#getlogbyid) | **Get** /logs/{id} | Get Log +*LogsAPI* | [**GetLogs**](docs/LogsAPI.md#getlogs) | **Get** /logs | Get List Of Logs +*OrdersAPI* | [**CancelOrder**](docs/OrdersAPI.md#cancelorder) | **Post** /orders/{id}/cancel | Cancel Order +*OrdersAPI* | [**CreateOrder**](docs/OrdersAPI.md#createorder) | **Post** /orders | Create order +*OrdersAPI* | [**GetOrderById**](docs/OrdersAPI.md#getorderbyid) | **Get** /orders/{id} | Get Order +*OrdersAPI* | [**GetOrders**](docs/OrdersAPI.md#getorders) | **Get** /orders | Get a list of Orders +*OrdersAPI* | [**OrderCancelRefund**](docs/OrdersAPI.md#ordercancelrefund) | **Delete** /orders/{id}/refunds/{refund_id} | Cancel Refund +*OrdersAPI* | [**OrderRefund**](docs/OrdersAPI.md#orderrefund) | **Post** /orders/{id}/refunds | Refund Order +*OrdersAPI* | [**OrdersCreateCapture**](docs/OrdersAPI.md#orderscreatecapture) | **Post** /orders/{id}/capture | Capture Order +*OrdersAPI* | [**UpdateOrder**](docs/OrdersAPI.md#updateorder) | **Put** /orders/{id} | Update Order +*PaymentLinkAPI* | [**CancelCheckout**](docs/PaymentLinkAPI.md#cancelcheckout) | **Put** /checkouts/{id}/cancel | Cancel Payment Link +*PaymentLinkAPI* | [**CreateCheckout**](docs/PaymentLinkAPI.md#createcheckout) | **Post** /checkouts | Create Unique Payment Link +*PaymentLinkAPI* | [**EmailCheckout**](docs/PaymentLinkAPI.md#emailcheckout) | **Post** /checkouts/{id}/email | Send an email +*PaymentLinkAPI* | [**GetCheckout**](docs/PaymentLinkAPI.md#getcheckout) | **Get** /checkouts/{id} | Get a payment link by ID +*PaymentLinkAPI* | [**GetCheckouts**](docs/PaymentLinkAPI.md#getcheckouts) | **Get** /checkouts | Get a list of payment links +*PaymentLinkAPI* | [**SmsCheckout**](docs/PaymentLinkAPI.md#smscheckout) | **Post** /checkouts/{id}/sms | Send an sms +*PaymentMethodsAPI* | [**CreateCustomerPaymentMethods**](docs/PaymentMethodsAPI.md#createcustomerpaymentmethods) | **Post** /customers/{id}/payment_sources | Create Payment Method +*PaymentMethodsAPI* | [**DeleteCustomerPaymentMethods**](docs/PaymentMethodsAPI.md#deletecustomerpaymentmethods) | **Delete** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method +*PaymentMethodsAPI* | [**GetCustomerPaymentMethods**](docs/PaymentMethodsAPI.md#getcustomerpaymentmethods) | **Get** /customers/{id}/payment_sources | Get Payment Methods +*PaymentMethodsAPI* | [**UpdateCustomerPaymentMethods**](docs/PaymentMethodsAPI.md#updatecustomerpaymentmethods) | **Put** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method +*PlansAPI* | [**CreatePlan**](docs/PlansAPI.md#createplan) | **Post** /plans | Create Plan +*PlansAPI* | [**DeletePlan**](docs/PlansAPI.md#deleteplan) | **Delete** /plans/{id} | Delete Plan +*PlansAPI* | [**GetPlan**](docs/PlansAPI.md#getplan) | **Get** /plans/{id} | Get Plan +*PlansAPI* | [**GetPlans**](docs/PlansAPI.md#getplans) | **Get** /plans | Get A List of Plans +*PlansAPI* | [**UpdatePlan**](docs/PlansAPI.md#updateplan) | **Put** /plans/{id} | Update Plan +*ProductsAPI* | [**OrdersCreateProduct**](docs/ProductsAPI.md#orderscreateproduct) | **Post** /orders/{id}/line_items | Create Product +*ProductsAPI* | [**OrdersDeleteProduct**](docs/ProductsAPI.md#ordersdeleteproduct) | **Delete** /orders/{id}/line_items/{line_item_id} | Delete Product +*ProductsAPI* | [**OrdersUpdateProduct**](docs/ProductsAPI.md#ordersupdateproduct) | **Put** /orders/{id}/line_items/{line_item_id} | Update Product +*ShippingContactsAPI* | [**CreateCustomerShippingContacts**](docs/ShippingContactsAPI.md#createcustomershippingcontacts) | **Post** /customers/{id}/shipping_contacts | Create a shipping contacts +*ShippingContactsAPI* | [**DeleteCustomerShippingContacts**](docs/ShippingContactsAPI.md#deletecustomershippingcontacts) | **Delete** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Delete shipping contacts +*ShippingContactsAPI* | [**UpdateCustomerShippingContacts**](docs/ShippingContactsAPI.md#updatecustomershippingcontacts) | **Put** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Update shipping contacts +*ShippingsAPI* | [**OrdersCreateShipping**](docs/ShippingsAPI.md#orderscreateshipping) | **Post** /orders/{id}/shipping_lines | Create Shipping +*ShippingsAPI* | [**OrdersDeleteShipping**](docs/ShippingsAPI.md#ordersdeleteshipping) | **Delete** /orders/{id}/shipping_lines/{shipping_id} | Delete Shipping +*ShippingsAPI* | [**OrdersUpdateShipping**](docs/ShippingsAPI.md#ordersupdateshipping) | **Put** /orders/{id}/shipping_lines/{shipping_id} | Update Shipping +*SubscriptionsAPI* | [**CancelSubscription**](docs/SubscriptionsAPI.md#cancelsubscription) | **Post** /customers/{id}/subscription/cancel | Cancel Subscription +*SubscriptionsAPI* | [**CreateSubscription**](docs/SubscriptionsAPI.md#createsubscription) | **Post** /customers/{id}/subscription | Create Subscription +*SubscriptionsAPI* | [**GetAllEventsFromSubscription**](docs/SubscriptionsAPI.md#getalleventsfromsubscription) | **Get** /customers/{id}/subscription/events | Get Events By Subscription +*SubscriptionsAPI* | [**GetSubscription**](docs/SubscriptionsAPI.md#getsubscription) | **Get** /customers/{id}/subscription | Get Subscription +*SubscriptionsAPI* | [**PauseSubscription**](docs/SubscriptionsAPI.md#pausesubscription) | **Post** /customers/{id}/subscription/pause | Pause Subscription +*SubscriptionsAPI* | [**ResumeSubscription**](docs/SubscriptionsAPI.md#resumesubscription) | **Post** /customers/{id}/subscription/resume | Resume Subscription +*SubscriptionsAPI* | [**UpdateSubscription**](docs/SubscriptionsAPI.md#updatesubscription) | **Put** /customers/{id}/subscription | Update Subscription +*TaxesAPI* | [**OrdersCreateTaxes**](docs/TaxesAPI.md#orderscreatetaxes) | **Post** /orders/{id}/tax_lines | Create Tax +*TaxesAPI* | [**OrdersDeleteTaxes**](docs/TaxesAPI.md#ordersdeletetaxes) | **Delete** /orders/{id}/tax_lines/{tax_id} | Delete Tax +*TaxesAPI* | [**OrdersUpdateTaxes**](docs/TaxesAPI.md#ordersupdatetaxes) | **Put** /orders/{id}/tax_lines/{tax_id} | Update Tax +*TokensAPI* | [**CreateToken**](docs/TokensAPI.md#createtoken) | **Post** /tokens | Create Token +*TransactionsAPI* | [**GetTransaction**](docs/TransactionsAPI.md#gettransaction) | **Get** /transactions/{id} | Get transaction +*TransactionsAPI* | [**GetTransactions**](docs/TransactionsAPI.md#gettransactions) | **Get** /transactions | Get List transactions +*TransfersAPI* | [**GetTransfer**](docs/TransfersAPI.md#gettransfer) | **Get** /transfers/{id} | Get Transfer +*TransfersAPI* | [**GetTransfers**](docs/TransfersAPI.md#gettransfers) | **Get** /transfers | Get a list of transfers +*WebhookKeysAPI* | [**CreateWebhookKey**](docs/WebhookKeysAPI.md#createwebhookkey) | **Post** /webhook_keys | Create Webhook Key +*WebhookKeysAPI* | [**DeleteWebhookKey**](docs/WebhookKeysAPI.md#deletewebhookkey) | **Delete** /webhook_keys/{id} | Delete Webhook key +*WebhookKeysAPI* | [**GetWebhookKey**](docs/WebhookKeysAPI.md#getwebhookkey) | **Get** /webhook_keys/{id} | Get Webhook Key +*WebhookKeysAPI* | [**GetWebhookKeys**](docs/WebhookKeysAPI.md#getwebhookkeys) | **Get** /webhook_keys | Get List of Webhook Keys +*WebhookKeysAPI* | [**UpdateWebhookKey**](docs/WebhookKeysAPI.md#updatewebhookkey) | **Put** /webhook_keys/{id} | Update Webhook Key +*WebhooksAPI* | [**CreateWebhook**](docs/WebhooksAPI.md#createwebhook) | **Post** /webhooks | Create Webhook +*WebhooksAPI* | [**DeleteWebhook**](docs/WebhooksAPI.md#deletewebhook) | **Delete** /webhooks/{id} | Delete Webhook +*WebhooksAPI* | [**GetWebhook**](docs/WebhooksAPI.md#getwebhook) | **Get** /webhooks/{id} | Get Webhook +*WebhooksAPI* | [**GetWebhooks**](docs/WebhooksAPI.md#getwebhooks) | **Get** /webhooks | Get List of Webhooks +*WebhooksAPI* | [**TestWebhook**](docs/WebhooksAPI.md#testwebhook) | **Post** /webhooks/{id}/test | Test Webhook +*WebhooksAPI* | [**UpdateWebhook**](docs/WebhooksAPI.md#updatewebhook) | **Put** /webhooks/{id} | Update Webhook ## Documentation For Models @@ -230,6 +231,7 @@ Class | Method | HTTP request | Description - [ChargeResponseRefunds](docs/ChargeResponseRefunds.md) - [ChargeResponseRefundsAllOf](docs/ChargeResponseRefundsAllOf.md) - [ChargeResponseRefundsData](docs/ChargeResponseRefundsData.md) + - [ChargeUpdateRequest](docs/ChargeUpdateRequest.md) - [ChargesDataResponse](docs/ChargesDataResponse.md) - [Checkout](docs/Checkout.md) - [CheckoutOrderTemplate](docs/CheckoutOrderTemplate.md) @@ -259,7 +261,6 @@ Class | Method | HTTP request | Description - [CustomerInfo](docs/CustomerInfo.md) - [CustomerInfoJustCustomerId](docs/CustomerInfoJustCustomerId.md) - [CustomerInfoJustCustomerIdResponse](docs/CustomerInfoJustCustomerIdResponse.md) - - [CustomerInfoResponse](docs/CustomerInfoResponse.md) - [CustomerPaymentMethodRequest](docs/CustomerPaymentMethodRequest.md) - [CustomerPaymentMethods](docs/CustomerPaymentMethods.md) - [CustomerPaymentMethodsData](docs/CustomerPaymentMethodsData.md) @@ -291,6 +292,7 @@ Class | Method | HTTP request | Description - [ErrorAllOf](docs/ErrorAllOf.md) - [EventResponse](docs/EventResponse.md) - [EventsResendResponse](docs/EventsResendResponse.md) + - [FiscalEntityAddress](docs/FiscalEntityAddress.md) - [GetApiKeysResponse](docs/GetApiKeysResponse.md) - [GetApiKeysResponseAllOf](docs/GetApiKeysResponseAllOf.md) - [GetChargesResponse](docs/GetChargesResponse.md) @@ -320,7 +322,14 @@ Class | Method | HTTP request | Description - [LogsResponseData](docs/LogsResponseData.md) - [ModelError](docs/ModelError.md) - [OrderCaptureRequest](docs/OrderCaptureRequest.md) + - [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) + - [OrderNextActionResponseRedirectToUrl](docs/OrderNextActionResponseRedirectToUrl.md) - [OrderRefundRequest](docs/OrderRefundRequest.md) - [OrderRequest](docs/OrderRequest.md) - [OrderRequestCustomerInfo](docs/OrderRequestCustomerInfo.md) @@ -332,14 +341,12 @@ Class | Method | HTTP request | Description - [OrderResponseCustomerInfoAllOf](docs/OrderResponseCustomerInfoAllOf.md) - [OrderResponseDiscountLines](docs/OrderResponseDiscountLines.md) - [OrderResponseDiscountLinesAllOf](docs/OrderResponseDiscountLinesAllOf.md) - - [OrderResponseFiscalEntity](docs/OrderResponseFiscalEntity.md) - - [OrderResponseFiscalEntityAddress](docs/OrderResponseFiscalEntityAddress.md) - - [OrderResponseFiscalEntityAddressAllOf](docs/OrderResponseFiscalEntityAddressAllOf.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) - [OrderUpdateRequestCustomerInfo](docs/OrderUpdateRequestCustomerInfo.md) - [OrdersResponse](docs/OrdersResponse.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 8941081..4cbbb53 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -29,6 +29,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -38,6 +39,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -105,6 +107,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -114,6 +117,7 @@ paths: - es - en type: string + style: simple requestBody: content: application/json: @@ -181,11 +185,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -194,6 +200,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -203,14 +210,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -296,6 +306,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -305,6 +316,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -357,6 +369,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -366,6 +379,7 @@ paths: - es - en type: string + style: simple requestBody: content: application/json: @@ -420,11 +434,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -433,6 +449,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -442,14 +459,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -520,6 +540,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -529,15 +550,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -547,24 +572,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form - description: "General search, e.g. by id, description, prefix" + explode: true in: query name: search required: false schema: type: string + style: form responses: "200": content: @@ -575,13 +607,17 @@ paths: headers: Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -630,6 +666,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -639,14 +676,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/api_keys_create' responses: @@ -659,13 +699,17 @@ paths: headers: Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -724,11 +768,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -737,6 +783,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -746,6 +793,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -756,13 +804,17 @@ paths: headers: Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -821,11 +873,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -834,6 +888,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -843,14 +898,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -861,13 +919,17 @@ paths: headers: Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -926,11 +988,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -939,6 +1003,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -948,6 +1013,7 @@ paths: - es - en type: string + style: simple requestBody: content: application/json: @@ -1012,7 +1078,7 @@ paths: summary: Update Api Key tags: - Api Keys - /balances: + /balance: get: description: Get a company's balance operationId: getBalance @@ -1025,6 +1091,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1034,6 +1101,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -1044,28 +1112,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -1114,6 +1192,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1123,15 +1202,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -1141,24 +1224,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -1169,28 +1259,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -1227,6 +1327,144 @@ paths: summary: Get A List of Charges tags: - Charges + /charges/{id}: + put: + operationId: updateCharge + parameters: + - description: Identifier of the resource + example: 6307a60c41de27127515a575 + explode: false + in: path + name: id + required: true + schema: + type: string + style: simple + - description: Use for knowing which language to use + examples: + es: + summary: for spanish request/response + value: es + en: + summary: for english request/response + value: en + explode: false + in: header + name: Accept-Language + required: false + schema: + default: es + enum: + - es + - en + type: string + style: simple + - description: "In the case of a holding company, the company id of the child\ + \ company to which will process the request." + example: 6441b6376b60c3a638da80af + explode: false + in: header + name: X-Child-Company-Id + required: false + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/charge_update' + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/charge_response' + description: successful + headers: + Date: + description: The date and time that the response was sent + explode: false + schema: + example: "Fri, 03 Feb 2023 16:57:48 GMT" + type: string + style: simple + Content-Type: + description: The format of the response body + explode: false + schema: + example: application/json; charset=utf-8 + type: string + style: simple + Content-Length: + description: The length of the response body in bytes + explode: false + schema: + example: "2737" + type: string + style: simple + Connection: + description: The type of connection used to transfer the response + explode: false + schema: + example: keep-alive + type: string + style: simple + Conekta-Media-Type: + explode: false + schema: + example: conekta-v2.1.0; format=application/json + type: string + style: simple + "422": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - debug_message: The "custom_field" parameter is not allowed + message: El parametro "custom_field" no está permitido + code: conekta.errors.parameter_validation.whitelist + object: error + type: parameter_validation_error + log_id: 6462aa7c90fef20001633546 + schema: + $ref: '#/components/schemas/error' + description: whitelist validation error + "404": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: The resource was not found. + param: null + code: conekta.errors.resource_not_found.entity + debug_message: The object Webhook "641b1d5662d7e00001eaa46b" could + not be found. + log_id: 641b6c253cd9a50001514fae + object: error + type: resource_not_found_error + schema: + $ref: '#/components/schemas/error' + description: not found entity + "500": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - debug_message: There was a runtime error and Conekta engineers have + been notified. + message: There was a runtime error and Conekta engineers have been + notified. + param: null + code: conekta.errors.api.system.general_failure + object: error + type: api_error + log_id: 641b6f2b3cd9a50001515098 + schema: + $ref: '#/components/schemas/error' + description: internal server error + security: + - bearerAuth: [] + summary: Update a charge + tags: + - Charges /orders/{id}/charges: post: description: Create charge for an existing orden @@ -1234,11 +1472,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -1247,6 +1487,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1256,14 +1497,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/charge_create' responses: @@ -1356,6 +1600,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1365,7 +1610,9 @@ paths: - es - en type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -1375,24 +1622,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -1403,28 +1657,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -1467,11 +1731,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -1480,6 +1746,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1489,6 +1756,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -1499,28 +1767,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -1588,6 +1866,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1597,15 +1876,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -1615,24 +1898,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -1643,28 +1933,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -1715,6 +2015,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1724,14 +2025,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer' responses: @@ -1744,28 +2048,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -1838,11 +2152,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -1851,6 +2167,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1860,14 +2177,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -1948,11 +2268,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -1961,6 +2283,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -1970,14 +2293,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -2043,11 +2369,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2056,6 +2384,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2065,14 +2394,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/update_customer' responses: @@ -2154,11 +2486,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2167,6 +2501,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2176,14 +2511,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer_fiscal_entities' responses: @@ -2267,18 +2605,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: fis_ent_2tQ8HkkfbauaKP9Ho + explode: false in: path name: fiscal_entities_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2287,6 +2629,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2296,14 +2639,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer_update_fiscal_entities' responses: @@ -2387,11 +2733,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2400,6 +2748,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2409,15 +2758,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -2427,24 +2780,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -2494,11 +2854,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2507,6 +2869,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2516,14 +2879,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/discount_line_create' responses: @@ -2592,18 +2958,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: discount_lines_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2612,6 +2982,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2621,14 +2992,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -2709,18 +3083,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: discount_lines_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2729,6 +3107,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2738,14 +3117,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -2826,18 +3208,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: discount_lines_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -2846,6 +3232,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2855,14 +3242,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/discount_line_update' responses: @@ -2951,6 +3341,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -2960,15 +3351,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -2978,24 +3373,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -3006,28 +3408,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -3077,6 +3489,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3086,21 +3499,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -3111,28 +3529,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -3192,18 +3620,22 @@ paths: parameters: - description: event identifier example: 6463d6e35a4c3e001819e760 + explode: false in: path name: event_id required: true schema: type: string + style: simple - description: webhook log identifier example: webhl_2tsv6NzWJHBWCkqGt + explode: false in: path name: webhook_log_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -3212,6 +3644,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3221,6 +3654,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -3293,6 +3727,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3302,15 +3737,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -3320,24 +3759,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -3348,28 +3794,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -3413,11 +3869,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -3426,6 +3884,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3435,14 +3894,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -3515,6 +3977,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3524,15 +3987,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -3542,24 +4009,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -3615,6 +4089,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3624,14 +4099,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/order' responses: @@ -3641,10 +4119,8 @@ paths: examples: cash: $ref: '#/components/examples/order_cash' - value: null card: $ref: '#/components/examples/order_card' - value: null schema: $ref: '#/components/schemas/order_response' description: successful operation @@ -3720,11 +4196,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -3733,6 +4211,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3742,14 +4221,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -3815,11 +4297,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -3828,6 +4312,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3837,6 +4322,7 @@ paths: - es - en type: string + style: simple requestBody: $ref: '#/components/requestBodies/order_update' responses: @@ -3920,11 +4406,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -3933,6 +4421,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -3942,14 +4431,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -4047,11 +4539,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -4060,6 +4554,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4069,14 +4564,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: content: application/json: @@ -4166,11 +4664,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -4179,6 +4679,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4188,14 +4689,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/product_create' responses: @@ -4264,18 +4768,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: line_item_2tQ8HkkfbauaKP9Ho + explode: false in: path name: line_item_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -4284,6 +4792,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4293,14 +4802,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -4381,18 +4893,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: line_item_2tQ8HkkfbauaKP9Ho + explode: false in: path name: line_item_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -4401,6 +4917,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4410,14 +4927,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/product_update' responses: @@ -4502,11 +5022,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -4515,6 +5037,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4524,14 +5047,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/order_refunds_request' responses: @@ -4630,18 +5156,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: refund identifier example: 6407b5bee1329a000175ba11 + explode: false in: path name: refund_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -4650,6 +5180,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4659,14 +5190,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -4768,6 +5302,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4777,15 +5312,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -4795,24 +5334,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -4823,28 +5369,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -4921,6 +5477,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -4930,14 +5487,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/checkout' responses: @@ -4950,30 +5510,40 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: description: The version of the API used to process the request and the format of the response body + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -5051,6 +5621,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5060,21 +5631,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -5085,28 +5661,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -5200,6 +5786,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5209,21 +5796,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -5234,28 +5826,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -5349,6 +5951,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5358,21 +5961,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/checkout_email' responses: @@ -5385,28 +5993,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -5500,6 +6118,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5509,21 +6128,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/checkout_sms' responses: @@ -5536,28 +6160,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -5646,11 +6280,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -5659,6 +6295,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5668,15 +6305,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -5686,24 +6327,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form responses: "200": content: @@ -5793,11 +6441,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -5806,6 +6456,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5815,14 +6466,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer_payment_methods' responses: @@ -5906,18 +6560,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Identifier of the payment method example: src_2tQ974hSHcsdeSZHG + explode: false in: path name: payment_method_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -5926,6 +6584,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -5935,14 +6594,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -6023,18 +6685,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Identifier of the payment method example: src_2tQ974hSHcsdeSZHG + explode: false in: path name: payment_method_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -6043,6 +6709,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6052,14 +6719,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer_update_payment_methods' responses: @@ -6148,6 +6818,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6157,15 +6828,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -6175,24 +6850,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -6203,28 +6885,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -6288,6 +6980,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6297,14 +6990,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/plan' responses: @@ -6317,28 +7013,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -6396,11 +7102,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -6409,6 +7117,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6418,6 +7127,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -6428,28 +7138,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -6522,11 +7242,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -6535,6 +7257,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6544,14 +7267,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -6562,28 +7288,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -6656,11 +7392,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -6669,6 +7407,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6678,14 +7417,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/plan_update' responses: @@ -6698,28 +7440,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -6794,11 +7546,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -6807,6 +7561,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6816,14 +7571,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/shipping_create' responses: @@ -6833,7 +7591,6 @@ paths: examples: sucessfull: $ref: '#/components/examples/shipping' - value: null schema: $ref: '#/components/schemas/shipping_order_response' description: successful @@ -6896,18 +7653,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: ship_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: shipping_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -6916,6 +7677,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -6925,14 +7687,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -7030,18 +7795,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: ship_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: shipping_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7050,6 +7819,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7059,14 +7829,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/shipping_create' responses: @@ -7150,11 +7923,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7163,6 +7938,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7172,14 +7948,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer_shipping_contacts' responses: @@ -7263,18 +8042,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: 6307a60c41de27127515a575 + explode: false in: path name: shipping_contacts_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7283,6 +8066,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7292,14 +8076,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -7380,18 +8167,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: 6307a60c41de27127515a575 + explode: false in: path name: shipping_contacts_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7400,6 +8191,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7409,14 +8201,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/customer_update_shipping_contacts' responses: @@ -7499,11 +8294,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7512,6 +8309,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7521,6 +8319,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -7531,28 +8330,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -7612,11 +8421,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7625,6 +8436,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7634,14 +8446,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/subscription' responses: @@ -7654,28 +8469,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -7750,11 +8575,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7763,6 +8590,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7772,14 +8600,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/subscription_update' responses: @@ -7792,28 +8623,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "422": content: application/vnd.conekta-v2.1.0+json: @@ -7889,11 +8730,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -7902,6 +8745,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -7911,14 +8755,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -7929,28 +8776,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -8011,11 +8868,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -8024,6 +8883,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8033,14 +8893,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -8051,28 +8914,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -8162,11 +9035,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -8175,6 +9050,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8184,14 +9060,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -8202,28 +9081,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -8298,11 +9187,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -8311,6 +9202,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8320,14 +9212,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -8338,28 +9233,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -8448,11 +9353,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -8461,6 +9368,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8470,14 +9378,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/order_tax' responses: @@ -8546,18 +9457,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: tax_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: tax_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -8566,6 +9481,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8575,14 +9491,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -8663,18 +9582,22 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: identifier example: tax_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: tax_id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -8683,6 +9606,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8692,14 +9616,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/order_tax_update' responses: @@ -8790,6 +9717,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8799,6 +9727,7 @@ paths: - es - en type: string + style: simple requestBody: $ref: '#/components/requestBodies/token' responses: @@ -8811,28 +9740,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -8897,6 +9836,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -8906,15 +9846,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -8924,24 +9868,59 @@ paths: maximum: 250 minimum: 1 type: integer - - description: "General order search, e.g. by mail, reference etc." - in: query - name: search - required: false - schema: - type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form + - description: id of the object to be retrieved + explode: true + in: query + name: id + required: false + schema: + example: 65412a893cd69a0001c25892 + type: string + style: form + - description: id of the charge used for filtering + explode: true + in: query + name: charge_id + required: false + schema: + example: 65412a893cd69a0001c25892 + type: string + style: form + - description: type of the object to be retrieved + explode: true + in: query + name: type + required: false + schema: + example: capture + type: string + style: form + - description: currency of the object to be retrieved + explode: true + in: query + name: currency + required: false + schema: + example: MXN + type: string + style: form responses: "200": content: @@ -8952,28 +9931,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9023,6 +10012,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9032,21 +10022,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -9057,28 +10052,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9142,6 +10147,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9151,15 +10157,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -9169,24 +10179,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -9197,28 +10214,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9268,6 +10295,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9277,21 +10305,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple responses: "200": content: @@ -9302,28 +10335,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9387,6 +10430,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9396,15 +10440,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -9414,24 +10462,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -9442,28 +10497,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9512,6 +10577,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9521,6 +10587,7 @@ paths: - es - en type: string + style: simple requestBody: content: application/json: @@ -9575,11 +10642,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -9588,6 +10657,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9597,6 +10667,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -9607,28 +10678,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9686,11 +10767,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -9699,6 +10782,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9708,14 +10792,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -9726,28 +10813,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -9806,11 +10903,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -9819,6 +10918,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9828,6 +10928,7 @@ paths: - es - en type: string + style: simple requestBody: content: application/json: @@ -9906,6 +11007,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -9915,15 +11017,19 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -9933,24 +11039,31 @@ paths: maximum: 250 minimum: 1 type: integer + style: form - description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form - description: next page + explode: true in: query name: next required: false schema: type: string + style: form - description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form responses: "200": content: @@ -9961,28 +11074,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -10035,6 +11158,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -10044,6 +11168,7 @@ paths: - es - en type: string + style: simple requestBody: $ref: '#/components/requestBodies/webhook' responses: @@ -10095,11 +11220,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -10108,6 +11235,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -10117,6 +11245,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -10127,28 +11256,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -10206,11 +11345,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -10219,6 +11360,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -10228,14 +11370,17 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple responses: "200": content: @@ -10246,28 +11391,38 @@ paths: headers: Date: description: The date and time that the response was sent + explode: false schema: example: "Fri, 03 Feb 2023 16:57:48 GMT" type: string + style: simple Content-Type: description: The format of the response body + explode: false schema: example: application/json; charset=utf-8 type: string + style: simple Content-Length: description: The length of the response body in bytes + explode: false schema: example: "2737" type: string + style: simple Connection: description: The type of connection used to transfer the response + explode: false schema: example: keep-alive type: string + style: simple Conekta-Media-Type: + explode: false schema: example: conekta-v2.1.0; format=application/json type: string + style: simple "401": content: application/vnd.conekta-v2.1.0+json: @@ -10332,6 +11487,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -10341,21 +11497,26 @@ paths: - es - en type: string + style: simple - description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple requestBody: $ref: '#/components/requestBodies/webhook_update' responses: @@ -10424,11 +11585,13 @@ paths: parameters: - description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple - description: Use for knowing which language to use examples: es: @@ -10437,6 +11600,7 @@ paths: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -10446,6 +11610,7 @@ paths: - es - en type: string + style: simple responses: "200": content: @@ -10591,6 +11756,22 @@ components: phone: "5522997233" corporate: false object: customer_info + fiscal_entity: + tax_id: "1234567890" + name: Conekta Inc + email: test@gmail.com + phone: "525511223344" + metadata: + test: true + company_id: "123" + address: + street1: Nuevo Leon 254 + street2: Departamento 404 + postal_code: "06100" + city: Ciudad de Mexico + state: Ciudad de Mexico + country: MX + external_number: "123" discount_lines: - amount: 500 code: "123" @@ -10613,17 +11794,19 @@ components: additionalProp2: string additionalProp3: string metadata: - additionalProp1: string - additionalProp2: string - additionalProp3: string + test: true + company_id: "123" pre_authorize: false shipping_contact: phone: "525511223344" receiver: Marvin Fuller between_streets: Ackerman Crescent + metadata: + test: true + company_id: "123" address: - street1: avenida siempre viva - street2: fake street + street1: Nuevo Leon 254 + street2: Departamento 404 postal_code: "06100" city: Ciudad de Mexico state: Ciudad de Mexico @@ -10699,8 +11882,8 @@ components: receiver: Marvin Fuller between_streets: Ackerman Crescent address: - street1: avenida siempre viva - street2: fake street + street1: Nuevo Leon 254 + street2: Departamento 404 postal_code: "06100" city: Ciudad de Mexico state: Ciudad de Mexico @@ -10818,6 +12001,7 @@ components: en: summary: for english request/response value: en + explode: false in: header name: Accept-Language required: false @@ -10827,25 +12011,31 @@ components: - es - en type: string + style: simple id: description: Identifier of the resource example: 6307a60c41de27127515a575 + explode: false in: path name: id required: true schema: type: string + style: simple x_child_company_id: description: "In the case of a holding company, the company id of the child\ \ company to which will process the request." example: 6441b6376b60c3a638da80af + explode: false in: header name: X-Child-Company-Id required: false schema: type: string + style: simple limit: description: "The numbers of items to return, the maximum value is 250" + explode: true in: query name: limit required: false @@ -10855,107 +12045,174 @@ components: maximum: 250 minimum: 1 type: integer + style: form next_page: description: next page + explode: true in: query name: next required: false schema: type: string + style: form previous_page: description: previous page + explode: true in: query name: previous required: false schema: type: string + style: form search: description: "General order search, e.g. by mail, reference etc." + explode: true in: query name: search required: false schema: type: string + style: form fiscal_entities_id: description: identifier example: fis_ent_2tQ8HkkfbauaKP9Ho + explode: false in: path name: fiscal_entities_id required: true schema: type: string + style: simple discount_lines_id: description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: discount_lines_id required: true schema: type: string + style: simple event_id: description: event identifier example: 6463d6e35a4c3e001819e760 + explode: false in: path name: event_id required: true schema: type: string + style: simple webhook_log_id: description: webhook log identifier example: webhl_2tsv6NzWJHBWCkqGt + explode: false in: path name: webhook_log_id required: true schema: type: string + style: simple line_items_id: description: identifier example: line_item_2tQ8HkkfbauaKP9Ho + explode: false in: path name: line_item_id required: true schema: type: string + style: simple refund_id: description: refund identifier example: 6407b5bee1329a000175ba11 + explode: false in: path name: refund_id required: true schema: type: string + style: simple payment_method_id: description: Identifier of the payment method example: src_2tQ974hSHcsdeSZHG + explode: false in: path name: payment_method_id required: true schema: type: string + style: simple shipping_id: description: identifier example: ship_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: shipping_id required: true schema: type: string + style: simple shipping_contacts_id: description: identifier example: 6307a60c41de27127515a575 + explode: false in: path name: shipping_contacts_id required: true schema: type: string + style: simple tax_id: description: identifier example: tax_lin_2tQ974hSHcsdeSZHG + explode: false in: path name: tax_id required: true schema: type: string + style: simple + id_query: + description: id of the object to be retrieved + explode: true + in: query + name: id + required: false + schema: + example: 65412a893cd69a0001c25892 + type: string + style: form + charge_id: + description: id of the charge used for filtering + explode: true + in: query + name: charge_id + required: false + schema: + example: 65412a893cd69a0001c25892 + type: string + style: form + type: + description: type of the object to be retrieved + explode: true + in: query + name: type + required: false + schema: + example: capture + type: string + style: form + currency: + description: currency of the object to be retrieved + explode: true + in: query + name: currency + required: false + schema: + example: MXN + type: string + style: form requestBodies: api_keys_create: content: @@ -10964,6 +12221,13 @@ components: $ref: '#/components/schemas/api_key_request' description: requested field for a api keys required: true + charge_update: + content: + application/json: + schema: + $ref: '#/components/schemas/charge_update_request' + description: requested field for update a charge + required: true charge_create: content: application/json: @@ -11019,19 +12283,14 @@ components: examples: order_with_charges: $ref: '#/components/examples/order_with_charges' - value: null order_with_checkout: $ref: '#/components/examples/order_with_checkout' - value: null split_payment_with_2_card_charges: $ref: '#/components/examples/split_payment_with_2_cards' - value: null split_payment_with_3_cash_charges: $ref: '#/components/examples/split_payment_with_cash' - value: null split_payment_with_cash_card_charges: $ref: '#/components/examples/split_payment_with_cash_card' - value: null schema: $ref: '#/components/schemas/order_request' description: requested field for order @@ -11330,7 +12589,7 @@ components: properties: description: description: Description of the rule - example: this client's email was verified at 20/09/22 by internal process + example: this client email was verified at 20/09/22 by internal process type: string field: description: Field to be used for the rule @@ -11553,9 +12812,6 @@ components: example: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso. type: string - fee: - example: 1160 - type: integer id: example: 63efa757cf65380001aec040 type: string @@ -11614,9 +12870,6 @@ components: example: Este cargo ha sido declinado porque el comportamiento del comprador es sospechoso. type: string - fee: - example: 1160 - type: integer id: example: 63efa757cf65380001aec040 type: string @@ -11693,12 +12946,16 @@ components: antifraud_info: $ref: '#/components/schemas/customer_antifraud_info_response' corporate: + description: true if the customer is a company type: boolean created_at: + description: Creation date of the object example: 1485151007 format: int64 type: integer custom_reference: + description: Custom reference + example: custom_reference type: string default_fiscal_entity_id: example: fis_ent_2tKqqAfqPi21oCmEJ @@ -11718,21 +12975,30 @@ components: fiscal_entities: $ref: '#/components/schemas/customer_fiscal_entities_response' id: + description: Customer's ID example: cus_2tHJfJ79KyUwpxTik type: string livemode: + description: true if the object exists in live mode or the value false if + the object exists in test mode example: true type: boolean name: + description: Customer's name example: Felipe type: string + metadata: + additionalProperties: true + maxProperties: 100 + type: object object: example: customer type: string payment_sources: $ref: '#/components/schemas/customer_payment_methods_response' phone: - example: +5215555555555 + description: Customer's phone number + example: "5215555555555" type: string shipping_contacts: $ref: '#/components/schemas/customer_response_shipping_contacts' @@ -11742,6 +13008,7 @@ components: - created_at - id - livemode + - name - object title: customer response type: object @@ -12029,7 +13296,7 @@ components: discount_lines: $ref: '#/components/schemas/order_response_discount_lines' fiscal_entity: - $ref: '#/components/schemas/order_response_fiscal_entity' + $ref: '#/components/schemas/order_fiscal_entity_response' id: example: ord_2tMtQQpDvfnNjiuFG type: string @@ -12049,6 +13316,8 @@ components: structured format. maxProperties: 100 type: object + next_action: + $ref: '#/components/schemas/order_next_action_response' object: description: String representing the object’s type. Objects of the same type share the same value. @@ -12246,7 +13515,7 @@ components: active or has used in Conekta properties: phone: - example: +525511223344 + example: "525511223344" type: string receiver: example: Marvin Fuller @@ -12269,6 +13538,11 @@ components: example: 1675715413 format: int64 type: integer + metadata: + additionalProperties: true + description: Metadata associated with the shipping contact + maxProperties: 100 + type: object object: example: shipping_contact type: string @@ -12715,17 +13989,21 @@ components: - role title: api_keys_request type: object + charge_update_request: + description: requested field for update a charge + properties: + reference_id: + description: custom reference id + example: "278482642" + type: string + title: charge_update_request + type: object charge_request: description: The charges to be made properties: amount: example: 40000 type: integer - monthly_installments: - description: "How many months without interest to apply, it can be 3, 6,\ - \ 9, 12 or 18" - format: int8 - type: integer payment_method: $ref: '#/components/schemas/charge_request_payment_method' reference_id: @@ -12786,7 +14064,7 @@ components: type: array phone: description: Is the customer's phone number - example: +5215555555555 + example: "5215555555555" type: string plan_id: description: "Contains the ID of a plan, which could together with name,\ @@ -12829,7 +14107,7 @@ components: type: string phone: description: Is the customer's phone number - example: +5215555555555 + example: "5215555555555" type: string plan_id: description: "Contains the ID of a plan, which could together with name,\ @@ -12959,6 +14237,8 @@ components: items: $ref: '#/components/schemas/order_discount_lines_request' type: array + fiscal_entity: + $ref: '#/components/schemas/order_fiscal_entity_request' line_items: description: "List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct)\ \ that are sold in the order. You must have at least one product." @@ -12983,6 +14263,12 @@ components: \ recurrent or validation." example: ecommerce type: string + return_url: + description: Indicates the redirection callback upon completion of the 3DS2 + flow. + example: https://my-website.com + format: uri + type: string shipping_contact: $ref: '#/components/schemas/customer_shipping_contacts' shipping_lines: @@ -12997,6 +14283,9 @@ components: items: $ref: '#/components/schemas/order_tax_request' type: array + three_ds_mode: + description: "Indicates the 3DS2 mode for the order, either smart or strict." + type: string required: - currency - customer_info @@ -13026,6 +14315,8 @@ components: items: $ref: '#/components/schemas/order_discount_lines_request' type: array + fiscal_entity: + $ref: '#/components/schemas/order_update_fiscal_entity_request' line_items: description: "List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct)\ \ that are sold in the order. You must have at least one product." @@ -13368,7 +14659,7 @@ components: properties: phone: description: Phone contact - example: +525511223344 + example: "525511223344" type: string receiver: description: Name of the person who will receive the order @@ -13388,6 +14679,11 @@ components: deleted: nullable: true type: boolean + metadata: + additionalProperties: true + description: Metadata associated with the shipping contact + maxProperties: 100 + type: object required: - address title: customer_shipping_contacts_request @@ -13399,7 +14695,7 @@ components: properties: phone: description: Phone contact - example: +525511223344 + example: "525511223344" type: string receiver: description: Name of the person who will receive the order @@ -13545,7 +14841,7 @@ components: or asynchronous. We recommend asynchronous = false example: false type: boolean - subscribed_events: + events: example: customer.created items: type: string @@ -13652,10 +14948,10 @@ components: customer_address: properties: street1: - example: avenida siempre viva + example: Nuevo Leon 254 type: string street2: - example: fake street + example: Departamento 404 type: string postal_code: example: "06100" @@ -13671,6 +14967,7 @@ components: example: MX type: string residential: + default: false example: true type: boolean external_number: @@ -13680,8 +14977,13 @@ components: - postal_code - street1 type: object - customer_info_response: + order_customer_info_response: properties: + customer_custom_reference: + description: Custom reference + example: custom_reference + nullable: true + type: string name: example: DevTest type: string @@ -13698,7 +15000,7 @@ components: object: example: customer_info type: string - title: customer_info + title: order_customer_info_response type: object customer_info_just_customer_id_response: properties: @@ -13707,6 +15009,46 @@ components: type: string title: customer_info_response type: object + fiscal_entity_address: + description: Address of the fiscal entity + properties: + street1: + description: Street name and number + example: Nuevo Leon 254 + type: string + street2: + description: Street name and number + example: Departamento 404 + nullable: true + type: string + postal_code: + description: Postal code + example: "06100" + type: string + city: + description: City + example: Ciudad de Mexico + type: string + state: + description: State + example: Ciudad de Mexico + type: string + country: + description: "this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)" + example: MX + type: string + external_number: + description: External number + example: "123" + type: string + required: + - city + - country + - external_number + - postal_code + - street1 + title: order_fiscal_entity_address_request + type: object payment_method_response: properties: type: @@ -14867,7 +16209,7 @@ components: order_response_customer_info: allOf: - $ref: '#/components/schemas/order_response_customer_info_allOf' - - $ref: '#/components/schemas/customer_info_response' + - $ref: '#/components/schemas/order_customer_info_response' - $ref: '#/components/schemas/customer_info_just_customer_id_response' discount_lines_data_response: allOf: @@ -14884,29 +16226,69 @@ components: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/order_response_discount_lines_allOf' - order_response_fiscal_entity_address_allOf: + order_fiscal_entity_address_response_allOf: properties: object: example: fiscal_entity_address type: string type: object - order_response_fiscal_entity_address: + order_fiscal_entity_address_response: allOf: - - $ref: '#/components/schemas/customer_address' - - $ref: '#/components/schemas/order_response_fiscal_entity_address_allOf' - order_response_fiscal_entity: + - $ref: '#/components/schemas/fiscal_entity_address' + - $ref: '#/components/schemas/order_fiscal_entity_address_response_allOf' + description: Address of the fiscal entity + title: order_fiscal_entity_address_response + order_fiscal_entity_response: + description: "Fiscal entity of the order, Currently it is a purely informative\ + \ field" + nullable: true properties: address: - $ref: '#/components/schemas/order_response_fiscal_entity_address' + $ref: '#/components/schemas/order_fiscal_entity_address_response' + email: + description: Email of the fiscal entity + example: test@gmail.com + nullable: true + type: string + metadata: + additionalProperties: true + description: Metadata associated with the fiscal entity + maxProperties: 100 + type: object + name: + description: Name of the fiscal entity + example: Conekta Inc + nullable: true + type: string tax_id: + description: Tax ID of the fiscal entity example: "324234234" + nullable: true type: string id: + description: ID of the fiscal entity example: fis_ent_2tN85VYaSMyDvjB3M type: string + created_at: + description: The time at which the object was created in seconds since the + Unix epoch + example: 1676328434 + format: int64 + type: integer object: example: fiscal_entity type: string + phone: + description: Phone of the fiscal entity + example: "525511223344" + nullable: true + type: string + required: + - address + - created_at + - id + - object + title: order_fiscal_entity_response type: object product_data_response_allOf: properties: @@ -14935,6 +16317,35 @@ components: - $ref: '#/components/schemas/page' - $ref: '#/components/schemas/order_response_products_allOf' title: order_response_products + order_next_action_response_redirect_to_url: + description: contains the following attributes that will guide to continue the + flow + properties: + url: + description: "pay.conekta.com/{id} Indicates the url of the Conekta component\ + \ to authenticate the flow through 3DS2." + example: https://pay.conekta.com/6fca054a85194c43971ecea35cc519bb + format: uri + type: string + return_url: + description: "Indicates the url to which the 3DS2 flow returns at the end,\ + \ when the integration is redirected." + example: https://my-website.com" + format: uri + type: string + type: object + order_next_action_response: + description: contains the following attributes that will guide to continue the + flow + properties: + redirect_to_url: + $ref: '#/components/schemas/order_next_action_response_redirect_to_url' + type: + description: Indicates the type of action to be taken + example: redirect_to_url + type: string + title: order_next_action_response + type: object order_response_shipping_contact_allOf: properties: created_at: @@ -15030,10 +16441,10 @@ components: example: shipping_address type: string street1: - example: avenida siempre viva + example: Nuevo Leon 254 type: string street2: - example: fake street + example: Departamento 404 type: string postal_code: example: "06100" @@ -15049,6 +16460,7 @@ components: type: string residential: example: true + nullable: true type: boolean type: object update_order_tax_response_allOf: @@ -15248,6 +16660,11 @@ components: example: 1677196303 format: int64 type: integer + monthly_installments: + description: "How many months without interest to apply, it can be 3, 6,\ + \ 9, 12 or 18" + format: int8 + type: integer type: example: card type: string @@ -15261,8 +16678,6 @@ components: description: Optional id sent to indicate the bank contract for recurrent card charges. example: S781317595 - maxLength: 10 - minLength: 10 type: string required: - type @@ -15301,10 +16716,76 @@ components: oneOf: - $ref: '#/components/schemas/customer_info' - $ref: '#/components/schemas/customer_info_just_customer_id' + order_fiscal_entity_request: + description: "Fiscal entity of the order, Currently it is a purely informative\ + \ field" + properties: + address: + $ref: '#/components/schemas/fiscal_entity_address' + email: + description: Email of the fiscal entity + example: test@gmail.com + type: string + metadata: + additionalProperties: true + description: Metadata associated with the fiscal entity + maxProperties: 100 + type: object + name: + description: Name of the fiscal entity + example: Conekta Inc + nullable: true + type: string + phone: + description: Phone of the fiscal entity + example: "525511223344" + type: string + tax_id: + description: Tax ID of the fiscal entity + example: AAA010101AAA + nullable: true + type: string + required: + - address + title: order_fiscal_entity_request + type: object order_update_request_customer_info: oneOf: - $ref: '#/components/schemas/customer_info' - $ref: '#/components/schemas/customer_info_just_customer_id' + order_update_fiscal_entity_request: + description: "Fiscal entity of the order, Currently it is a purely informative\ + \ field" + properties: + address: + $ref: '#/components/schemas/fiscal_entity_address' + email: + description: Email of the fiscal entity + example: test@gmail.com + type: string + name: + description: Name of the fiscal entity + example: Conekta Inc + nullable: true + type: string + metadata: + additionalProperties: true + description: Metadata associated with the fiscal entity + maxProperties: 100 + type: object + phone: + description: Phone of the fiscal entity + example: "525511223344" + type: string + tax_id: + description: Tax ID of the fiscal entity + example: AAA010101AAA + nullable: true + type: string + required: + - address + title: order_update_fiscal_entity_request + type: object checkout_order_template_customer_info: description: It is the information of the customer who will be created when receiving a new payment. @@ -15365,10 +16846,10 @@ components: description: Address of the person who will receive the order properties: street1: - example: avenida siempre viva + example: Nuevo Leon 254 type: string street2: - example: fake street + example: Departamento 404 type: string postal_code: example: "06100" @@ -15502,8 +16983,6 @@ components: contract_id: description: Id sent for recurrent charges. example: S781317595 - maxLength: 10 - minLength: 10 type: string country: example: MX diff --git a/api_antifraud.go b/api_antifraud.go index a252035..5a2c91a 100644 --- a/api_antifraud.go +++ b/api_antifraud.go @@ -21,7 +21,7 @@ import ( ) -type AntifraudApi interface { +type AntifraudAPI interface { /* CreateRuleBlacklist Create blacklisted rule @@ -102,12 +102,12 @@ type AntifraudApi interface { GetRuleWhitelistExecute(r ApiGetRuleWhitelistRequest) (*RiskRulesList, *http.Response, error) } -// AntifraudApiService AntifraudApi service -type AntifraudApiService service +// AntifraudAPIService AntifraudAPI service +type AntifraudAPIService service type ApiCreateRuleBlacklistRequest struct { ctx context.Context - ApiService AntifraudApi + ApiService AntifraudAPI createRiskRulesData *CreateRiskRulesData acceptLanguage *string } @@ -134,7 +134,7 @@ CreateRuleBlacklist Create blacklisted rule @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateRuleBlacklistRequest */ -func (a *AntifraudApiService) CreateRuleBlacklist(ctx context.Context) ApiCreateRuleBlacklistRequest { +func (a *AntifraudAPIService) CreateRuleBlacklist(ctx context.Context) ApiCreateRuleBlacklistRequest { return ApiCreateRuleBlacklistRequest{ ApiService: a, ctx: ctx, @@ -143,7 +143,7 @@ func (a *AntifraudApiService) CreateRuleBlacklist(ctx context.Context) ApiCreate // Execute executes the request // @return BlacklistRuleResponse -func (a *AntifraudApiService) CreateRuleBlacklistExecute(r ApiCreateRuleBlacklistRequest) (*BlacklistRuleResponse, *http.Response, error) { +func (a *AntifraudAPIService) CreateRuleBlacklistExecute(r ApiCreateRuleBlacklistRequest) (*BlacklistRuleResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -151,7 +151,7 @@ func (a *AntifraudApiService) CreateRuleBlacklistExecute(r ApiCreateRuleBlacklis localVarReturnValue *BlacklistRuleResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudApiService.CreateRuleBlacklist") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudAPIService.CreateRuleBlacklist") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -247,7 +247,7 @@ func (a *AntifraudApiService) CreateRuleBlacklistExecute(r ApiCreateRuleBlacklis type ApiCreateRuleWhitelistRequest struct { ctx context.Context - ApiService AntifraudApi + ApiService AntifraudAPI acceptLanguage *string createRiskRulesData *CreateRiskRulesData } @@ -273,7 +273,7 @@ CreateRuleWhitelist Create whitelisted rule @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateRuleWhitelistRequest */ -func (a *AntifraudApiService) CreateRuleWhitelist(ctx context.Context) ApiCreateRuleWhitelistRequest { +func (a *AntifraudAPIService) CreateRuleWhitelist(ctx context.Context) ApiCreateRuleWhitelistRequest { return ApiCreateRuleWhitelistRequest{ ApiService: a, ctx: ctx, @@ -282,7 +282,7 @@ func (a *AntifraudApiService) CreateRuleWhitelist(ctx context.Context) ApiCreate // Execute executes the request // @return WhitelistlistRuleResponse -func (a *AntifraudApiService) CreateRuleWhitelistExecute(r ApiCreateRuleWhitelistRequest) (*WhitelistlistRuleResponse, *http.Response, error) { +func (a *AntifraudAPIService) CreateRuleWhitelistExecute(r ApiCreateRuleWhitelistRequest) (*WhitelistlistRuleResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -290,7 +290,7 @@ func (a *AntifraudApiService) CreateRuleWhitelistExecute(r ApiCreateRuleWhitelis localVarReturnValue *WhitelistlistRuleResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudApiService.CreateRuleWhitelist") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudAPIService.CreateRuleWhitelist") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -394,7 +394,7 @@ func (a *AntifraudApiService) CreateRuleWhitelistExecute(r ApiCreateRuleWhitelis type ApiDeleteRuleBlacklistRequest struct { ctx context.Context - ApiService AntifraudApi + ApiService AntifraudAPI id string acceptLanguage *string xChildCompanyId *string @@ -423,7 +423,7 @@ DeleteRuleBlacklist Delete blacklisted rule @param id Identifier of the resource @return ApiDeleteRuleBlacklistRequest */ -func (a *AntifraudApiService) DeleteRuleBlacklist(ctx context.Context, id string) ApiDeleteRuleBlacklistRequest { +func (a *AntifraudAPIService) DeleteRuleBlacklist(ctx context.Context, id string) ApiDeleteRuleBlacklistRequest { return ApiDeleteRuleBlacklistRequest{ ApiService: a, ctx: ctx, @@ -433,7 +433,7 @@ func (a *AntifraudApiService) DeleteRuleBlacklist(ctx context.Context, id string // Execute executes the request // @return DeletedBlacklistRuleResponse -func (a *AntifraudApiService) DeleteRuleBlacklistExecute(r ApiDeleteRuleBlacklistRequest) (*DeletedBlacklistRuleResponse, *http.Response, error) { +func (a *AntifraudAPIService) DeleteRuleBlacklistExecute(r ApiDeleteRuleBlacklistRequest) (*DeletedBlacklistRuleResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -441,7 +441,7 @@ func (a *AntifraudApiService) DeleteRuleBlacklistExecute(r ApiDeleteRuleBlacklis localVarReturnValue *DeletedBlacklistRuleResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudApiService.DeleteRuleBlacklist") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudAPIService.DeleteRuleBlacklist") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -547,7 +547,7 @@ func (a *AntifraudApiService) DeleteRuleBlacklistExecute(r ApiDeleteRuleBlacklis type ApiDeleteRuleWhitelistRequest struct { ctx context.Context - ApiService AntifraudApi + ApiService AntifraudAPI id string acceptLanguage *string xChildCompanyId *string @@ -576,7 +576,7 @@ DeleteRuleWhitelist Delete whitelisted rule @param id Identifier of the resource @return ApiDeleteRuleWhitelistRequest */ -func (a *AntifraudApiService) DeleteRuleWhitelist(ctx context.Context, id string) ApiDeleteRuleWhitelistRequest { +func (a *AntifraudAPIService) DeleteRuleWhitelist(ctx context.Context, id string) ApiDeleteRuleWhitelistRequest { return ApiDeleteRuleWhitelistRequest{ ApiService: a, ctx: ctx, @@ -586,7 +586,7 @@ func (a *AntifraudApiService) DeleteRuleWhitelist(ctx context.Context, id string // Execute executes the request // @return DeletedWhitelistRuleResponse -func (a *AntifraudApiService) DeleteRuleWhitelistExecute(r ApiDeleteRuleWhitelistRequest) (*DeletedWhitelistRuleResponse, *http.Response, error) { +func (a *AntifraudAPIService) DeleteRuleWhitelistExecute(r ApiDeleteRuleWhitelistRequest) (*DeletedWhitelistRuleResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -594,7 +594,7 @@ func (a *AntifraudApiService) DeleteRuleWhitelistExecute(r ApiDeleteRuleWhitelis localVarReturnValue *DeletedWhitelistRuleResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudApiService.DeleteRuleWhitelist") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudAPIService.DeleteRuleWhitelist") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -711,7 +711,7 @@ func (a *AntifraudApiService) DeleteRuleWhitelistExecute(r ApiDeleteRuleWhitelis type ApiGetRuleBlacklistRequest struct { ctx context.Context - ApiService AntifraudApi + ApiService AntifraudAPI acceptLanguage *string } @@ -733,7 +733,7 @@ Return all rules @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetRuleBlacklistRequest */ -func (a *AntifraudApiService) GetRuleBlacklist(ctx context.Context) ApiGetRuleBlacklistRequest { +func (a *AntifraudAPIService) GetRuleBlacklist(ctx context.Context) ApiGetRuleBlacklistRequest { return ApiGetRuleBlacklistRequest{ ApiService: a, ctx: ctx, @@ -742,7 +742,7 @@ func (a *AntifraudApiService) GetRuleBlacklist(ctx context.Context) ApiGetRuleBl // Execute executes the request // @return RiskRulesList -func (a *AntifraudApiService) GetRuleBlacklistExecute(r ApiGetRuleBlacklistRequest) (*RiskRulesList, *http.Response, error) { +func (a *AntifraudAPIService) GetRuleBlacklistExecute(r ApiGetRuleBlacklistRequest) (*RiskRulesList, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -750,7 +750,7 @@ func (a *AntifraudApiService) GetRuleBlacklistExecute(r ApiGetRuleBlacklistReque localVarReturnValue *RiskRulesList ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudApiService.GetRuleBlacklist") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudAPIService.GetRuleBlacklist") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -841,7 +841,7 @@ func (a *AntifraudApiService) GetRuleBlacklistExecute(r ApiGetRuleBlacklistReque type ApiGetRuleWhitelistRequest struct { ctx context.Context - ApiService AntifraudApi + ApiService AntifraudAPI acceptLanguage *string } @@ -863,7 +863,7 @@ Return all rules @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetRuleWhitelistRequest */ -func (a *AntifraudApiService) GetRuleWhitelist(ctx context.Context) ApiGetRuleWhitelistRequest { +func (a *AntifraudAPIService) GetRuleWhitelist(ctx context.Context) ApiGetRuleWhitelistRequest { return ApiGetRuleWhitelistRequest{ ApiService: a, ctx: ctx, @@ -872,7 +872,7 @@ func (a *AntifraudApiService) GetRuleWhitelist(ctx context.Context) ApiGetRuleWh // Execute executes the request // @return RiskRulesList -func (a *AntifraudApiService) GetRuleWhitelistExecute(r ApiGetRuleWhitelistRequest) (*RiskRulesList, *http.Response, error) { +func (a *AntifraudAPIService) GetRuleWhitelistExecute(r ApiGetRuleWhitelistRequest) (*RiskRulesList, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -880,7 +880,7 @@ func (a *AntifraudApiService) GetRuleWhitelistExecute(r ApiGetRuleWhitelistReque localVarReturnValue *RiskRulesList ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudApiService.GetRuleWhitelist") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AntifraudAPIService.GetRuleWhitelist") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_api_keys.go b/api_api_keys.go index 3dcc616..f06189e 100644 --- a/api_api_keys.go +++ b/api_api_keys.go @@ -21,7 +21,7 @@ import ( ) -type ApiKeysApi interface { +type ApiKeysAPI interface { /* CreateApiKey Create Api Key @@ -97,12 +97,12 @@ type ApiKeysApi interface { UpdateApiKeyExecute(r ApiUpdateApiKeyRequest) (*ApiKeyResponse, *http.Response, error) } -// ApiKeysApiService ApiKeysApi service -type ApiKeysApiService service +// ApiKeysAPIService ApiKeysAPI service +type ApiKeysAPIService service type ApiCreateApiKeyRequest struct { ctx context.Context - ApiService ApiKeysApi + ApiService ApiKeysAPI apiKeyRequest *ApiKeyRequest acceptLanguage *string xChildCompanyId *string @@ -138,7 +138,7 @@ Create a api key @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateApiKeyRequest */ -func (a *ApiKeysApiService) CreateApiKey(ctx context.Context) ApiCreateApiKeyRequest { +func (a *ApiKeysAPIService) CreateApiKey(ctx context.Context) ApiCreateApiKeyRequest { return ApiCreateApiKeyRequest{ ApiService: a, ctx: ctx, @@ -147,7 +147,7 @@ func (a *ApiKeysApiService) CreateApiKey(ctx context.Context) ApiCreateApiKeyReq // Execute executes the request // @return ApiKeyCreateResponse -func (a *ApiKeysApiService) CreateApiKeyExecute(r ApiCreateApiKeyRequest) (*ApiKeyCreateResponse, *http.Response, error) { +func (a *ApiKeysAPIService) CreateApiKeyExecute(r ApiCreateApiKeyRequest) (*ApiKeyCreateResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -155,7 +155,7 @@ func (a *ApiKeysApiService) CreateApiKeyExecute(r ApiCreateApiKeyRequest) (*ApiK localVarReturnValue *ApiKeyCreateResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysApiService.CreateApiKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysAPIService.CreateApiKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -265,7 +265,7 @@ func (a *ApiKeysApiService) CreateApiKeyExecute(r ApiCreateApiKeyRequest) (*ApiK type ApiDeleteApiKeyRequest struct { ctx context.Context - ApiService ApiKeysApi + ApiService ApiKeysAPI id string acceptLanguage *string } @@ -289,7 +289,7 @@ Deletes a api key that corresponds to a api key ID @param id Identifier of the resource @return ApiDeleteApiKeyRequest */ -func (a *ApiKeysApiService) DeleteApiKey(ctx context.Context, id string) ApiDeleteApiKeyRequest { +func (a *ApiKeysAPIService) DeleteApiKey(ctx context.Context, id string) ApiDeleteApiKeyRequest { return ApiDeleteApiKeyRequest{ ApiService: a, ctx: ctx, @@ -299,7 +299,7 @@ func (a *ApiKeysApiService) DeleteApiKey(ctx context.Context, id string) ApiDele // Execute executes the request // @return DeleteApiKeysResponse -func (a *ApiKeysApiService) DeleteApiKeyExecute(r ApiDeleteApiKeyRequest) (*DeleteApiKeysResponse, *http.Response, error) { +func (a *ApiKeysAPIService) DeleteApiKeyExecute(r ApiDeleteApiKeyRequest) (*DeleteApiKeysResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -307,7 +307,7 @@ func (a *ApiKeysApiService) DeleteApiKeyExecute(r ApiDeleteApiKeyRequest) (*Dele localVarReturnValue *DeleteApiKeysResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysApiService.DeleteApiKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysAPIService.DeleteApiKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -410,7 +410,7 @@ func (a *ApiKeysApiService) DeleteApiKeyExecute(r ApiDeleteApiKeyRequest) (*Dele type ApiGetApiKeyRequest struct { ctx context.Context - ApiService ApiKeysApi + ApiService ApiKeysAPI id string acceptLanguage *string xChildCompanyId *string @@ -441,7 +441,7 @@ Gets a api key that corresponds to a api key ID @param id Identifier of the resource @return ApiGetApiKeyRequest */ -func (a *ApiKeysApiService) GetApiKey(ctx context.Context, id string) ApiGetApiKeyRequest { +func (a *ApiKeysAPIService) GetApiKey(ctx context.Context, id string) ApiGetApiKeyRequest { return ApiGetApiKeyRequest{ ApiService: a, ctx: ctx, @@ -451,7 +451,7 @@ func (a *ApiKeysApiService) GetApiKey(ctx context.Context, id string) ApiGetApiK // Execute executes the request // @return ApiKeyResponse -func (a *ApiKeysApiService) GetApiKeyExecute(r ApiGetApiKeyRequest) (*ApiKeyResponse, *http.Response, error) { +func (a *ApiKeysAPIService) GetApiKeyExecute(r ApiGetApiKeyRequest) (*ApiKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -459,7 +459,7 @@ func (a *ApiKeysApiService) GetApiKeyExecute(r ApiGetApiKeyRequest) (*ApiKeyResp localVarReturnValue *ApiKeyResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysApiService.GetApiKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysAPIService.GetApiKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -565,7 +565,7 @@ func (a *ApiKeysApiService) GetApiKeyExecute(r ApiGetApiKeyRequest) (*ApiKeyResp type ApiGetApiKeysRequest struct { ctx context.Context - ApiService ApiKeysApi + ApiService ApiKeysAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -622,7 +622,7 @@ Consume the list of api keys you have @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetApiKeysRequest */ -func (a *ApiKeysApiService) GetApiKeys(ctx context.Context) ApiGetApiKeysRequest { +func (a *ApiKeysAPIService) GetApiKeys(ctx context.Context) ApiGetApiKeysRequest { return ApiGetApiKeysRequest{ ApiService: a, ctx: ctx, @@ -631,7 +631,7 @@ func (a *ApiKeysApiService) GetApiKeys(ctx context.Context) ApiGetApiKeysRequest // Execute executes the request // @return GetApiKeysResponse -func (a *ApiKeysApiService) GetApiKeysExecute(r ApiGetApiKeysRequest) (*GetApiKeysResponse, *http.Response, error) { +func (a *ApiKeysAPIService) GetApiKeysExecute(r ApiGetApiKeysRequest) (*GetApiKeysResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -639,7 +639,7 @@ func (a *ApiKeysApiService) GetApiKeysExecute(r ApiGetApiKeysRequest) (*GetApiKe localVarReturnValue *GetApiKeysResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysApiService.GetApiKeys") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysAPIService.GetApiKeys") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -652,6 +652,9 @@ func (a *ApiKeysApiService) GetApiKeysExecute(r ApiGetApiKeysRequest) (*GetApiKe if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.next != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "next", r.next, "") @@ -745,7 +748,7 @@ func (a *ApiKeysApiService) GetApiKeysExecute(r ApiGetApiKeysRequest) (*GetApiKe type ApiUpdateApiKeyRequest struct { ctx context.Context - ApiService ApiKeysApi + ApiService ApiKeysAPI id string acceptLanguage *string apiKeyUpdateRequest *ApiKeyUpdateRequest @@ -775,7 +778,7 @@ Update an existing api key @param id Identifier of the resource @return ApiUpdateApiKeyRequest */ -func (a *ApiKeysApiService) UpdateApiKey(ctx context.Context, id string) ApiUpdateApiKeyRequest { +func (a *ApiKeysAPIService) UpdateApiKey(ctx context.Context, id string) ApiUpdateApiKeyRequest { return ApiUpdateApiKeyRequest{ ApiService: a, ctx: ctx, @@ -785,7 +788,7 @@ func (a *ApiKeysApiService) UpdateApiKey(ctx context.Context, id string) ApiUpda // Execute executes the request // @return ApiKeyResponse -func (a *ApiKeysApiService) UpdateApiKeyExecute(r ApiUpdateApiKeyRequest) (*ApiKeyResponse, *http.Response, error) { +func (a *ApiKeysAPIService) UpdateApiKeyExecute(r ApiUpdateApiKeyRequest) (*ApiKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -793,7 +796,7 @@ func (a *ApiKeysApiService) UpdateApiKeyExecute(r ApiUpdateApiKeyRequest) (*ApiK localVarReturnValue *ApiKeyResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysApiService.UpdateApiKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ApiKeysAPIService.UpdateApiKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_balances.go b/api_balances.go index 8fc6ea6..ae245f7 100644 --- a/api_balances.go +++ b/api_balances.go @@ -20,7 +20,7 @@ import ( ) -type BalancesApi interface { +type BalancesAPI interface { /* GetBalance Get a company's balance @@ -37,12 +37,12 @@ type BalancesApi interface { GetBalanceExecute(r ApiGetBalanceRequest) (*BalanceResponse, *http.Response, error) } -// BalancesApiService BalancesApi service -type BalancesApiService service +// BalancesAPIService BalancesAPI service +type BalancesAPIService service type ApiGetBalanceRequest struct { ctx context.Context - ApiService BalancesApi + ApiService BalancesAPI acceptLanguage *string } @@ -64,7 +64,7 @@ Get a company's balance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetBalanceRequest */ -func (a *BalancesApiService) GetBalance(ctx context.Context) ApiGetBalanceRequest { +func (a *BalancesAPIService) GetBalance(ctx context.Context) ApiGetBalanceRequest { return ApiGetBalanceRequest{ ApiService: a, ctx: ctx, @@ -73,7 +73,7 @@ func (a *BalancesApiService) GetBalance(ctx context.Context) ApiGetBalanceReques // Execute executes the request // @return BalanceResponse -func (a *BalancesApiService) GetBalanceExecute(r ApiGetBalanceRequest) (*BalanceResponse, *http.Response, error) { +func (a *BalancesAPIService) GetBalanceExecute(r ApiGetBalanceRequest) (*BalanceResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -81,12 +81,12 @@ func (a *BalancesApiService) GetBalanceExecute(r ApiGetBalanceRequest) (*Balance localVarReturnValue *BalanceResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BalancesApiService.GetBalance") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BalancesAPIService.GetBalance") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/balances" + localVarPath := localBasePath + "/balance" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} diff --git a/api_charges.go b/api_charges.go index f7d6097..e563b72 100644 --- a/api_charges.go +++ b/api_charges.go @@ -21,7 +21,7 @@ import ( ) -type ChargesApi interface { +type ChargesAPI interface { /* GetCharges Get A List of Charges @@ -49,14 +49,27 @@ type ChargesApi interface { // OrdersCreateChargeExecute executes the request // @return ChargeOrderResponse OrdersCreateChargeExecute(r ApiOrdersCreateChargeRequest) (*ChargeOrderResponse, *http.Response, error) + + /* + UpdateCharge Update a charge + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Identifier of the resource + @return ApiUpdateChargeRequest + */ + UpdateCharge(ctx context.Context, id string) ApiUpdateChargeRequest + + // UpdateChargeExecute executes the request + // @return ChargeResponse + UpdateChargeExecute(r ApiUpdateChargeRequest) (*ChargeResponse, *http.Response, error) } -// ChargesApiService ChargesApi service -type ChargesApiService service +// ChargesAPIService ChargesAPI service +type ChargesAPIService service type ApiGetChargesRequest struct { ctx context.Context - ApiService ChargesApi + ApiService ChargesAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -111,7 +124,7 @@ GetCharges Get A List of Charges @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetChargesRequest */ -func (a *ChargesApiService) GetCharges(ctx context.Context) ApiGetChargesRequest { +func (a *ChargesAPIService) GetCharges(ctx context.Context) ApiGetChargesRequest { return ApiGetChargesRequest{ ApiService: a, ctx: ctx, @@ -120,7 +133,7 @@ func (a *ChargesApiService) GetCharges(ctx context.Context) ApiGetChargesRequest // Execute executes the request // @return GetChargesResponse -func (a *ChargesApiService) GetChargesExecute(r ApiGetChargesRequest) (*GetChargesResponse, *http.Response, error) { +func (a *ChargesAPIService) GetChargesExecute(r ApiGetChargesRequest) (*GetChargesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -128,7 +141,7 @@ func (a *ChargesApiService) GetChargesExecute(r ApiGetChargesRequest) (*GetCharg localVarReturnValue *GetChargesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChargesApiService.GetCharges") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChargesAPIService.GetCharges") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -141,6 +154,9 @@ func (a *ChargesApiService) GetChargesExecute(r ApiGetChargesRequest) (*GetCharg if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -234,7 +250,7 @@ func (a *ChargesApiService) GetChargesExecute(r ApiGetChargesRequest) (*GetCharg type ApiOrdersCreateChargeRequest struct { ctx context.Context - ApiService ChargesApi + ApiService ChargesAPI id string chargeRequest *ChargeRequest acceptLanguage *string @@ -272,7 +288,7 @@ Create charge for an existing orden @param id Identifier of the resource @return ApiOrdersCreateChargeRequest */ -func (a *ChargesApiService) OrdersCreateCharge(ctx context.Context, id string) ApiOrdersCreateChargeRequest { +func (a *ChargesAPIService) OrdersCreateCharge(ctx context.Context, id string) ApiOrdersCreateChargeRequest { return ApiOrdersCreateChargeRequest{ ApiService: a, ctx: ctx, @@ -282,7 +298,7 @@ func (a *ChargesApiService) OrdersCreateCharge(ctx context.Context, id string) A // Execute executes the request // @return ChargeOrderResponse -func (a *ChargesApiService) OrdersCreateChargeExecute(r ApiOrdersCreateChargeRequest) (*ChargeOrderResponse, *http.Response, error) { +func (a *ChargesAPIService) OrdersCreateChargeExecute(r ApiOrdersCreateChargeRequest) (*ChargeOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -290,7 +306,7 @@ func (a *ChargesApiService) OrdersCreateChargeExecute(r ApiOrdersCreateChargeReq localVarReturnValue *ChargeOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChargesApiService.OrdersCreateCharge") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChargesAPIService.OrdersCreateCharge") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -409,3 +425,168 @@ func (a *ChargesApiService) OrdersCreateChargeExecute(r ApiOrdersCreateChargeReq return localVarReturnValue, localVarHTTPResponse, nil } + +type ApiUpdateChargeRequest struct { + ctx context.Context + ApiService ChargesAPI + id string + chargeUpdateRequest *ChargeUpdateRequest + acceptLanguage *string + xChildCompanyId *string +} + +// requested field for update a charge +func (r ApiUpdateChargeRequest) ChargeUpdateRequest(chargeUpdateRequest ChargeUpdateRequest) ApiUpdateChargeRequest { + r.chargeUpdateRequest = &chargeUpdateRequest + return r +} + +// Use for knowing which language to use +func (r ApiUpdateChargeRequest) AcceptLanguage(acceptLanguage string) ApiUpdateChargeRequest { + r.acceptLanguage = &acceptLanguage + return r +} + +// In the case of a holding company, the company id of the child company to which will process the request. +func (r ApiUpdateChargeRequest) XChildCompanyId(xChildCompanyId string) ApiUpdateChargeRequest { + r.xChildCompanyId = &xChildCompanyId + return r +} + +func (r ApiUpdateChargeRequest) Execute() (*ChargeResponse, *http.Response, error) { + return r.ApiService.UpdateChargeExecute(r) +} + +/* +UpdateCharge Update a charge + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id Identifier of the resource + @return ApiUpdateChargeRequest +*/ +func (a *ChargesAPIService) UpdateCharge(ctx context.Context, id string) ApiUpdateChargeRequest { + return ApiUpdateChargeRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return ChargeResponse +func (a *ChargesAPIService) UpdateChargeExecute(r ApiUpdateChargeRequest) (*ChargeResponse, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ChargeResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChargesAPIService.UpdateCharge") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/charges/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.chargeUpdateRequest == nil { + return localVarReturnValue, nil, reportError("chargeUpdateRequest is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/vnd.conekta-v2.1.0+json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.acceptLanguage != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "Accept-Language", r.acceptLanguage, "") + } + if r.xChildCompanyId != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "X-Child-Company-Id", r.xChildCompanyId, "") + } + // body params + localVarPostBody = r.chargeUpdateRequest + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v ModelError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/api_companies.go b/api_companies.go index 75bc2c1..9d25e06 100644 --- a/api_companies.go +++ b/api_companies.go @@ -21,7 +21,7 @@ import ( ) -type CompaniesApi interface { +type CompaniesAPI interface { /* GetCompanies Get List of Companies @@ -51,12 +51,12 @@ type CompaniesApi interface { GetCompanyExecute(r ApiGetCompanyRequest) (*CompanyResponse, *http.Response, error) } -// CompaniesApiService CompaniesApi service -type CompaniesApiService service +// CompaniesAPIService CompaniesAPI service +type CompaniesAPIService service type ApiGetCompaniesRequest struct { ctx context.Context - ApiService CompaniesApi + ApiService CompaniesAPI acceptLanguage *string limit *int32 search *string @@ -106,7 +106,7 @@ Consume the list of child companies. This is used for holding companies with se @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetCompaniesRequest */ -func (a *CompaniesApiService) GetCompanies(ctx context.Context) ApiGetCompaniesRequest { +func (a *CompaniesAPIService) GetCompanies(ctx context.Context) ApiGetCompaniesRequest { return ApiGetCompaniesRequest{ ApiService: a, ctx: ctx, @@ -115,7 +115,7 @@ func (a *CompaniesApiService) GetCompanies(ctx context.Context) ApiGetCompaniesR // Execute executes the request // @return GetCompaniesResponse -func (a *CompaniesApiService) GetCompaniesExecute(r ApiGetCompaniesRequest) (*GetCompaniesResponse, *http.Response, error) { +func (a *CompaniesAPIService) GetCompaniesExecute(r ApiGetCompaniesRequest) (*GetCompaniesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -123,7 +123,7 @@ func (a *CompaniesApiService) GetCompaniesExecute(r ApiGetCompaniesRequest) (*Ge localVarReturnValue *GetCompaniesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CompaniesApiService.GetCompanies") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CompaniesAPIService.GetCompanies") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -136,6 +136,9 @@ func (a *CompaniesApiService) GetCompaniesExecute(r ApiGetCompaniesRequest) (*Ge if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -226,7 +229,7 @@ func (a *CompaniesApiService) GetCompaniesExecute(r ApiGetCompaniesRequest) (*Ge type ApiGetCompanyRequest struct { ctx context.Context - ApiService CompaniesApi + ApiService CompaniesAPI id string acceptLanguage *string } @@ -248,7 +251,7 @@ GetCompany Get Company @param id Identifier of the resource @return ApiGetCompanyRequest */ -func (a *CompaniesApiService) GetCompany(ctx context.Context, id string) ApiGetCompanyRequest { +func (a *CompaniesAPIService) GetCompany(ctx context.Context, id string) ApiGetCompanyRequest { return ApiGetCompanyRequest{ ApiService: a, ctx: ctx, @@ -258,7 +261,7 @@ func (a *CompaniesApiService) GetCompany(ctx context.Context, id string) ApiGetC // Execute executes the request // @return CompanyResponse -func (a *CompaniesApiService) GetCompanyExecute(r ApiGetCompanyRequest) (*CompanyResponse, *http.Response, error) { +func (a *CompaniesAPIService) GetCompanyExecute(r ApiGetCompanyRequest) (*CompanyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -266,7 +269,7 @@ func (a *CompaniesApiService) GetCompanyExecute(r ApiGetCompanyRequest) (*Compan localVarReturnValue *CompanyResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CompaniesApiService.GetCompany") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CompaniesAPIService.GetCompany") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_customers.go b/api_customers.go index 77433f2..670e8b9 100644 --- a/api_customers.go +++ b/api_customers.go @@ -21,7 +21,7 @@ import ( ) -type CustomersApi interface { +type CustomersAPI interface { /* CreateCustomer Create customer @@ -130,12 +130,12 @@ Remember the credit and debit card tokenization process: [https://developers.con UpdateCustomerFiscalEntitiesExecute(r ApiUpdateCustomerFiscalEntitiesRequest) (*UpdateCustomerFiscalEntitiesResponse, *http.Response, error) } -// CustomersApiService CustomersApi service -type CustomersApiService service +// CustomersAPIService CustomersAPI service +type CustomersAPIService service type ApiCreateCustomerRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI customer *Customer acceptLanguage *string xChildCompanyId *string @@ -173,7 +173,7 @@ Remember the credit and debit card tokenization process: [https://developers.con @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateCustomerRequest */ -func (a *CustomersApiService) CreateCustomer(ctx context.Context) ApiCreateCustomerRequest { +func (a *CustomersAPIService) CreateCustomer(ctx context.Context) ApiCreateCustomerRequest { return ApiCreateCustomerRequest{ ApiService: a, ctx: ctx, @@ -182,7 +182,7 @@ func (a *CustomersApiService) CreateCustomer(ctx context.Context) ApiCreateCusto // Execute executes the request // @return CustomerResponse -func (a *CustomersApiService) CreateCustomerExecute(r ApiCreateCustomerRequest) (*CustomerResponse, *http.Response, error) { +func (a *CustomersAPIService) CreateCustomerExecute(r ApiCreateCustomerRequest) (*CustomerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -190,7 +190,7 @@ func (a *CustomersApiService) CreateCustomerExecute(r ApiCreateCustomerRequest) localVarReturnValue *CustomerResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.CreateCustomer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.CreateCustomer") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -311,7 +311,7 @@ func (a *CustomersApiService) CreateCustomerExecute(r ApiCreateCustomerRequest) type ApiCreateCustomerFiscalEntitiesRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI id string customerFiscalEntitiesRequest *CustomerFiscalEntitiesRequest acceptLanguage *string @@ -349,7 +349,7 @@ Create Fiscal entity resource that corresponds to a customer ID. @param id Identifier of the resource @return ApiCreateCustomerFiscalEntitiesRequest */ -func (a *CustomersApiService) CreateCustomerFiscalEntities(ctx context.Context, id string) ApiCreateCustomerFiscalEntitiesRequest { +func (a *CustomersAPIService) CreateCustomerFiscalEntities(ctx context.Context, id string) ApiCreateCustomerFiscalEntitiesRequest { return ApiCreateCustomerFiscalEntitiesRequest{ ApiService: a, ctx: ctx, @@ -359,7 +359,7 @@ func (a *CustomersApiService) CreateCustomerFiscalEntities(ctx context.Context, // Execute executes the request // @return CreateCustomerFiscalEntitiesResponse -func (a *CustomersApiService) CreateCustomerFiscalEntitiesExecute(r ApiCreateCustomerFiscalEntitiesRequest) (*CreateCustomerFiscalEntitiesResponse, *http.Response, error) { +func (a *CustomersAPIService) CreateCustomerFiscalEntitiesExecute(r ApiCreateCustomerFiscalEntitiesRequest) (*CreateCustomerFiscalEntitiesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -367,7 +367,7 @@ func (a *CustomersApiService) CreateCustomerFiscalEntitiesExecute(r ApiCreateCus localVarReturnValue *CreateCustomerFiscalEntitiesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.CreateCustomerFiscalEntities") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.CreateCustomerFiscalEntities") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -489,7 +489,7 @@ func (a *CustomersApiService) CreateCustomerFiscalEntitiesExecute(r ApiCreateCus type ApiDeleteCustomerByIdRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI id string acceptLanguage *string xChildCompanyId *string @@ -520,7 +520,7 @@ Deleted a customer resource that corresponds to a customer ID. @param id Identifier of the resource @return ApiDeleteCustomerByIdRequest */ -func (a *CustomersApiService) DeleteCustomerById(ctx context.Context, id string) ApiDeleteCustomerByIdRequest { +func (a *CustomersAPIService) DeleteCustomerById(ctx context.Context, id string) ApiDeleteCustomerByIdRequest { return ApiDeleteCustomerByIdRequest{ ApiService: a, ctx: ctx, @@ -530,7 +530,7 @@ func (a *CustomersApiService) DeleteCustomerById(ctx context.Context, id string) // Execute executes the request // @return CustomerResponse -func (a *CustomersApiService) DeleteCustomerByIdExecute(r ApiDeleteCustomerByIdRequest) (*CustomerResponse, *http.Response, error) { +func (a *CustomersAPIService) DeleteCustomerByIdExecute(r ApiDeleteCustomerByIdRequest) (*CustomerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -538,7 +538,7 @@ func (a *CustomersApiService) DeleteCustomerByIdExecute(r ApiDeleteCustomerByIdR localVarReturnValue *CustomerResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.DeleteCustomerById") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.DeleteCustomerById") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -655,7 +655,7 @@ func (a *CustomersApiService) DeleteCustomerByIdExecute(r ApiDeleteCustomerByIdR type ApiGetCustomerByIdRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI id string acceptLanguage *string xChildCompanyId *string @@ -686,7 +686,7 @@ Gets a customer resource that corresponds to a customer ID. @param id Identifier of the resource @return ApiGetCustomerByIdRequest */ -func (a *CustomersApiService) GetCustomerById(ctx context.Context, id string) ApiGetCustomerByIdRequest { +func (a *CustomersAPIService) GetCustomerById(ctx context.Context, id string) ApiGetCustomerByIdRequest { return ApiGetCustomerByIdRequest{ ApiService: a, ctx: ctx, @@ -696,7 +696,7 @@ func (a *CustomersApiService) GetCustomerById(ctx context.Context, id string) Ap // Execute executes the request // @return CustomerResponse -func (a *CustomersApiService) GetCustomerByIdExecute(r ApiGetCustomerByIdRequest) (*CustomerResponse, *http.Response, error) { +func (a *CustomersAPIService) GetCustomerByIdExecute(r ApiGetCustomerByIdRequest) (*CustomerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -704,7 +704,7 @@ func (a *CustomersApiService) GetCustomerByIdExecute(r ApiGetCustomerByIdRequest localVarReturnValue *CustomerResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.GetCustomerById") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.GetCustomerById") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -810,7 +810,7 @@ func (a *CustomersApiService) GetCustomerByIdExecute(r ApiGetCustomerByIdRequest type ApiGetCustomersRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -867,7 +867,7 @@ The purpose of business is to create and maintain a client, you will learn what @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetCustomersRequest */ -func (a *CustomersApiService) GetCustomers(ctx context.Context) ApiGetCustomersRequest { +func (a *CustomersAPIService) GetCustomers(ctx context.Context) ApiGetCustomersRequest { return ApiGetCustomersRequest{ ApiService: a, ctx: ctx, @@ -876,7 +876,7 @@ func (a *CustomersApiService) GetCustomers(ctx context.Context) ApiGetCustomersR // Execute executes the request // @return CustomersResponse -func (a *CustomersApiService) GetCustomersExecute(r ApiGetCustomersRequest) (*CustomersResponse, *http.Response, error) { +func (a *CustomersAPIService) GetCustomersExecute(r ApiGetCustomersRequest) (*CustomersResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -884,7 +884,7 @@ func (a *CustomersApiService) GetCustomersExecute(r ApiGetCustomersRequest) (*Cu localVarReturnValue *CustomersResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.GetCustomers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.GetCustomers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -897,6 +897,9 @@ func (a *CustomersApiService) GetCustomersExecute(r ApiGetCustomersRequest) (*Cu if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -990,7 +993,7 @@ func (a *CustomersApiService) GetCustomersExecute(r ApiGetCustomersRequest) (*Cu type ApiUpdateCustomerRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI id string updateCustomer *UpdateCustomer acceptLanguage *string @@ -1028,7 +1031,7 @@ You can update customer-related data @param id Identifier of the resource @return ApiUpdateCustomerRequest */ -func (a *CustomersApiService) UpdateCustomer(ctx context.Context, id string) ApiUpdateCustomerRequest { +func (a *CustomersAPIService) UpdateCustomer(ctx context.Context, id string) ApiUpdateCustomerRequest { return ApiUpdateCustomerRequest{ ApiService: a, ctx: ctx, @@ -1038,7 +1041,7 @@ func (a *CustomersApiService) UpdateCustomer(ctx context.Context, id string) Api // Execute executes the request // @return CustomerResponse -func (a *CustomersApiService) UpdateCustomerExecute(r ApiUpdateCustomerRequest) (*CustomerResponse, *http.Response, error) { +func (a *CustomersAPIService) UpdateCustomerExecute(r ApiUpdateCustomerRequest) (*CustomerResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1046,7 +1049,7 @@ func (a *CustomersApiService) UpdateCustomerExecute(r ApiUpdateCustomerRequest) localVarReturnValue *CustomerResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.UpdateCustomer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.UpdateCustomer") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1168,7 +1171,7 @@ func (a *CustomersApiService) UpdateCustomerExecute(r ApiUpdateCustomerRequest) type ApiUpdateCustomerFiscalEntitiesRequest struct { ctx context.Context - ApiService CustomersApi + ApiService CustomersAPI id string fiscalEntitiesId string customerUpdateFiscalEntitiesRequest *CustomerUpdateFiscalEntitiesRequest @@ -1208,7 +1211,7 @@ Update Fiscal Entity resource that corresponds to a customer ID. @param fiscalEntitiesId identifier @return ApiUpdateCustomerFiscalEntitiesRequest */ -func (a *CustomersApiService) UpdateCustomerFiscalEntities(ctx context.Context, id string, fiscalEntitiesId string) ApiUpdateCustomerFiscalEntitiesRequest { +func (a *CustomersAPIService) UpdateCustomerFiscalEntities(ctx context.Context, id string, fiscalEntitiesId string) ApiUpdateCustomerFiscalEntitiesRequest { return ApiUpdateCustomerFiscalEntitiesRequest{ ApiService: a, ctx: ctx, @@ -1219,7 +1222,7 @@ func (a *CustomersApiService) UpdateCustomerFiscalEntities(ctx context.Context, // Execute executes the request // @return UpdateCustomerFiscalEntitiesResponse -func (a *CustomersApiService) UpdateCustomerFiscalEntitiesExecute(r ApiUpdateCustomerFiscalEntitiesRequest) (*UpdateCustomerFiscalEntitiesResponse, *http.Response, error) { +func (a *CustomersAPIService) UpdateCustomerFiscalEntitiesExecute(r ApiUpdateCustomerFiscalEntitiesRequest) (*UpdateCustomerFiscalEntitiesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1227,7 +1230,7 @@ func (a *CustomersApiService) UpdateCustomerFiscalEntitiesExecute(r ApiUpdateCus localVarReturnValue *UpdateCustomerFiscalEntitiesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersApiService.UpdateCustomerFiscalEntities") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "CustomersAPIService.UpdateCustomerFiscalEntities") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_discounts.go b/api_discounts.go index e715f35..755786a 100644 --- a/api_discounts.go +++ b/api_discounts.go @@ -21,7 +21,7 @@ import ( ) -type DiscountsApi interface { +type DiscountsAPI interface { /* OrdersCreateDiscountLine Create Discount @@ -102,12 +102,12 @@ type DiscountsApi interface { OrdersUpdateDiscountLinesExecute(r ApiOrdersUpdateDiscountLinesRequest) (*DiscountLinesResponse, *http.Response, error) } -// DiscountsApiService DiscountsApi service -type DiscountsApiService service +// DiscountsAPIService DiscountsAPI service +type DiscountsAPIService service type ApiOrdersCreateDiscountLineRequest struct { ctx context.Context - ApiService DiscountsApi + ApiService DiscountsAPI id string orderDiscountLinesRequest *OrderDiscountLinesRequest acceptLanguage *string @@ -145,7 +145,7 @@ Create discount lines for an existing orden @param id Identifier of the resource @return ApiOrdersCreateDiscountLineRequest */ -func (a *DiscountsApiService) OrdersCreateDiscountLine(ctx context.Context, id string) ApiOrdersCreateDiscountLineRequest { +func (a *DiscountsAPIService) OrdersCreateDiscountLine(ctx context.Context, id string) ApiOrdersCreateDiscountLineRequest { return ApiOrdersCreateDiscountLineRequest{ ApiService: a, ctx: ctx, @@ -155,7 +155,7 @@ func (a *DiscountsApiService) OrdersCreateDiscountLine(ctx context.Context, id s // Execute executes the request // @return DiscountLinesResponse -func (a *DiscountsApiService) OrdersCreateDiscountLineExecute(r ApiOrdersCreateDiscountLineRequest) (*DiscountLinesResponse, *http.Response, error) { +func (a *DiscountsAPIService) OrdersCreateDiscountLineExecute(r ApiOrdersCreateDiscountLineRequest) (*DiscountLinesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -163,7 +163,7 @@ func (a *DiscountsApiService) OrdersCreateDiscountLineExecute(r ApiOrdersCreateD localVarReturnValue *DiscountLinesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsApiService.OrdersCreateDiscountLine") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsAPIService.OrdersCreateDiscountLine") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -274,7 +274,7 @@ func (a *DiscountsApiService) OrdersCreateDiscountLineExecute(r ApiOrdersCreateD type ApiOrdersDeleteDiscountLinesRequest struct { ctx context.Context - ApiService DiscountsApi + ApiService DiscountsAPI id string discountLinesId string acceptLanguage *string @@ -307,7 +307,7 @@ Delete an existing discount lines for an existing orden @param discountLinesId discount line id identifier @return ApiOrdersDeleteDiscountLinesRequest */ -func (a *DiscountsApiService) OrdersDeleteDiscountLines(ctx context.Context, id string, discountLinesId string) ApiOrdersDeleteDiscountLinesRequest { +func (a *DiscountsAPIService) OrdersDeleteDiscountLines(ctx context.Context, id string, discountLinesId string) ApiOrdersDeleteDiscountLinesRequest { return ApiOrdersDeleteDiscountLinesRequest{ ApiService: a, ctx: ctx, @@ -318,7 +318,7 @@ func (a *DiscountsApiService) OrdersDeleteDiscountLines(ctx context.Context, id // Execute executes the request // @return DiscountLinesResponse -func (a *DiscountsApiService) OrdersDeleteDiscountLinesExecute(r ApiOrdersDeleteDiscountLinesRequest) (*DiscountLinesResponse, *http.Response, error) { +func (a *DiscountsAPIService) OrdersDeleteDiscountLinesExecute(r ApiOrdersDeleteDiscountLinesRequest) (*DiscountLinesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -326,7 +326,7 @@ func (a *DiscountsApiService) OrdersDeleteDiscountLinesExecute(r ApiOrdersDelete localVarReturnValue *DiscountLinesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsApiService.OrdersDeleteDiscountLines") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsAPIService.OrdersDeleteDiscountLines") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -444,7 +444,7 @@ func (a *DiscountsApiService) OrdersDeleteDiscountLinesExecute(r ApiOrdersDelete type ApiOrdersGetDiscountLineRequest struct { ctx context.Context - ApiService DiscountsApi + ApiService DiscountsAPI id string discountLinesId string acceptLanguage *string @@ -477,7 +477,7 @@ Get an existing discount lines for an existing orden @param discountLinesId discount line id identifier @return ApiOrdersGetDiscountLineRequest */ -func (a *DiscountsApiService) OrdersGetDiscountLine(ctx context.Context, id string, discountLinesId string) ApiOrdersGetDiscountLineRequest { +func (a *DiscountsAPIService) OrdersGetDiscountLine(ctx context.Context, id string, discountLinesId string) ApiOrdersGetDiscountLineRequest { return ApiOrdersGetDiscountLineRequest{ ApiService: a, ctx: ctx, @@ -488,7 +488,7 @@ func (a *DiscountsApiService) OrdersGetDiscountLine(ctx context.Context, id stri // Execute executes the request // @return DiscountLinesResponse -func (a *DiscountsApiService) OrdersGetDiscountLineExecute(r ApiOrdersGetDiscountLineRequest) (*DiscountLinesResponse, *http.Response, error) { +func (a *DiscountsAPIService) OrdersGetDiscountLineExecute(r ApiOrdersGetDiscountLineRequest) (*DiscountLinesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -496,7 +496,7 @@ func (a *DiscountsApiService) OrdersGetDiscountLineExecute(r ApiOrdersGetDiscoun localVarReturnValue *DiscountLinesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsApiService.OrdersGetDiscountLine") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsAPIService.OrdersGetDiscountLine") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -614,7 +614,7 @@ func (a *DiscountsApiService) OrdersGetDiscountLineExecute(r ApiOrdersGetDiscoun type ApiOrdersGetDiscountLinesRequest struct { ctx context.Context - ApiService DiscountsApi + ApiService DiscountsAPI id string acceptLanguage *string xChildCompanyId *string @@ -673,7 +673,7 @@ Get discount lines for an existing orden @param id Identifier of the resource @return ApiOrdersGetDiscountLinesRequest */ -func (a *DiscountsApiService) OrdersGetDiscountLines(ctx context.Context, id string) ApiOrdersGetDiscountLinesRequest { +func (a *DiscountsAPIService) OrdersGetDiscountLines(ctx context.Context, id string) ApiOrdersGetDiscountLinesRequest { return ApiOrdersGetDiscountLinesRequest{ ApiService: a, ctx: ctx, @@ -683,7 +683,7 @@ func (a *DiscountsApiService) OrdersGetDiscountLines(ctx context.Context, id str // Execute executes the request // @return GetOrderDiscountLinesResponse -func (a *DiscountsApiService) OrdersGetDiscountLinesExecute(r ApiOrdersGetDiscountLinesRequest) (*GetOrderDiscountLinesResponse, *http.Response, error) { +func (a *DiscountsAPIService) OrdersGetDiscountLinesExecute(r ApiOrdersGetDiscountLinesRequest) (*GetOrderDiscountLinesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -691,7 +691,7 @@ func (a *DiscountsApiService) OrdersGetDiscountLinesExecute(r ApiOrdersGetDiscou localVarReturnValue *GetOrderDiscountLinesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsApiService.OrdersGetDiscountLines") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsAPIService.OrdersGetDiscountLines") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -705,6 +705,9 @@ func (a *DiscountsApiService) OrdersGetDiscountLinesExecute(r ApiOrdersGetDiscou if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -798,7 +801,7 @@ func (a *DiscountsApiService) OrdersGetDiscountLinesExecute(r ApiOrdersGetDiscou type ApiOrdersUpdateDiscountLinesRequest struct { ctx context.Context - ApiService DiscountsApi + ApiService DiscountsAPI id string discountLinesId string updateOrderDiscountLinesRequest *UpdateOrderDiscountLinesRequest @@ -838,7 +841,7 @@ Update an existing discount lines for an existing orden @param discountLinesId discount line id identifier @return ApiOrdersUpdateDiscountLinesRequest */ -func (a *DiscountsApiService) OrdersUpdateDiscountLines(ctx context.Context, id string, discountLinesId string) ApiOrdersUpdateDiscountLinesRequest { +func (a *DiscountsAPIService) OrdersUpdateDiscountLines(ctx context.Context, id string, discountLinesId string) ApiOrdersUpdateDiscountLinesRequest { return ApiOrdersUpdateDiscountLinesRequest{ ApiService: a, ctx: ctx, @@ -849,7 +852,7 @@ func (a *DiscountsApiService) OrdersUpdateDiscountLines(ctx context.Context, id // Execute executes the request // @return DiscountLinesResponse -func (a *DiscountsApiService) OrdersUpdateDiscountLinesExecute(r ApiOrdersUpdateDiscountLinesRequest) (*DiscountLinesResponse, *http.Response, error) { +func (a *DiscountsAPIService) OrdersUpdateDiscountLinesExecute(r ApiOrdersUpdateDiscountLinesRequest) (*DiscountLinesResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -857,7 +860,7 @@ func (a *DiscountsApiService) OrdersUpdateDiscountLinesExecute(r ApiOrdersUpdate localVarReturnValue *DiscountLinesResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsApiService.OrdersUpdateDiscountLines") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscountsAPIService.OrdersUpdateDiscountLines") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_events.go b/api_events.go index e77bfed..04d04e9 100644 --- a/api_events.go +++ b/api_events.go @@ -21,7 +21,7 @@ import ( ) -type EventsApi interface { +type EventsAPI interface { /* GetEvent Get Event @@ -67,12 +67,12 @@ type EventsApi interface { ResendEventExecute(r ApiResendEventRequest) (*EventsResendResponse, *http.Response, error) } -// EventsApiService EventsApi service -type EventsApiService service +// EventsAPIService EventsAPI service +type EventsAPIService service type ApiGetEventRequest struct { ctx context.Context - ApiService EventsApi + ApiService EventsAPI id string acceptLanguage *string xChildCompanyId *string @@ -103,7 +103,7 @@ Returns a single event @param id Identifier of the resource @return ApiGetEventRequest */ -func (a *EventsApiService) GetEvent(ctx context.Context, id string) ApiGetEventRequest { +func (a *EventsAPIService) GetEvent(ctx context.Context, id string) ApiGetEventRequest { return ApiGetEventRequest{ ApiService: a, ctx: ctx, @@ -113,7 +113,7 @@ func (a *EventsApiService) GetEvent(ctx context.Context, id string) ApiGetEventR // Execute executes the request // @return EventResponse -func (a *EventsApiService) GetEventExecute(r ApiGetEventRequest) (*EventResponse, *http.Response, error) { +func (a *EventsAPIService) GetEventExecute(r ApiGetEventRequest) (*EventResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -121,7 +121,7 @@ func (a *EventsApiService) GetEventExecute(r ApiGetEventRequest) (*EventResponse localVarReturnValue *EventResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEvent") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsAPIService.GetEvent") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -227,7 +227,7 @@ func (a *EventsApiService) GetEventExecute(r ApiGetEventRequest) (*EventResponse type ApiGetEventsRequest struct { ctx context.Context - ApiService EventsApi + ApiService EventsAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -282,7 +282,7 @@ GetEvents Get list of Events @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetEventsRequest */ -func (a *EventsApiService) GetEvents(ctx context.Context) ApiGetEventsRequest { +func (a *EventsAPIService) GetEvents(ctx context.Context) ApiGetEventsRequest { return ApiGetEventsRequest{ ApiService: a, ctx: ctx, @@ -291,7 +291,7 @@ func (a *EventsApiService) GetEvents(ctx context.Context) ApiGetEventsRequest { // Execute executes the request // @return GetEventsResponse -func (a *EventsApiService) GetEventsExecute(r ApiGetEventsRequest) (*GetEventsResponse, *http.Response, error) { +func (a *EventsAPIService) GetEventsExecute(r ApiGetEventsRequest) (*GetEventsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -299,7 +299,7 @@ func (a *EventsApiService) GetEventsExecute(r ApiGetEventsRequest) (*GetEventsRe localVarReturnValue *GetEventsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.GetEvents") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsAPIService.GetEvents") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -312,6 +312,9 @@ func (a *EventsApiService) GetEventsExecute(r ApiGetEventsRequest) (*GetEventsRe if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -405,7 +408,7 @@ func (a *EventsApiService) GetEventsExecute(r ApiGetEventsRequest) (*GetEventsRe type ApiResendEventRequest struct { ctx context.Context - ApiService EventsApi + ApiService EventsAPI eventId string webhookLogId string acceptLanguage *string @@ -431,7 +434,7 @@ Try to send an event @param webhookLogId webhook log identifier @return ApiResendEventRequest */ -func (a *EventsApiService) ResendEvent(ctx context.Context, eventId string, webhookLogId string) ApiResendEventRequest { +func (a *EventsAPIService) ResendEvent(ctx context.Context, eventId string, webhookLogId string) ApiResendEventRequest { return ApiResendEventRequest{ ApiService: a, ctx: ctx, @@ -442,7 +445,7 @@ func (a *EventsApiService) ResendEvent(ctx context.Context, eventId string, webh // Execute executes the request // @return EventsResendResponse -func (a *EventsApiService) ResendEventExecute(r ApiResendEventRequest) (*EventsResendResponse, *http.Response, error) { +func (a *EventsAPIService) ResendEventExecute(r ApiResendEventRequest) (*EventsResendResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -450,7 +453,7 @@ func (a *EventsApiService) ResendEventExecute(r ApiResendEventRequest) (*EventsR localVarReturnValue *EventsResendResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsApiService.ResendEvent") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "EventsAPIService.ResendEvent") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_logs.go b/api_logs.go index b5e617f..5864ef0 100644 --- a/api_logs.go +++ b/api_logs.go @@ -21,7 +21,7 @@ import ( ) -type LogsApi interface { +type LogsAPI interface { /* GetLogById Get Log @@ -53,12 +53,12 @@ type LogsApi interface { GetLogsExecute(r ApiGetLogsRequest) (*LogsResponse, *http.Response, error) } -// LogsApiService LogsApi service -type LogsApiService service +// LogsAPIService LogsAPI service +type LogsAPIService service type ApiGetLogByIdRequest struct { ctx context.Context - ApiService LogsApi + ApiService LogsAPI id string acceptLanguage *string xChildCompanyId *string @@ -89,7 +89,7 @@ Get the details of a specific log @param id Identifier of the resource @return ApiGetLogByIdRequest */ -func (a *LogsApiService) GetLogById(ctx context.Context, id string) ApiGetLogByIdRequest { +func (a *LogsAPIService) GetLogById(ctx context.Context, id string) ApiGetLogByIdRequest { return ApiGetLogByIdRequest{ ApiService: a, ctx: ctx, @@ -99,7 +99,7 @@ func (a *LogsApiService) GetLogById(ctx context.Context, id string) ApiGetLogByI // Execute executes the request // @return LogResponse -func (a *LogsApiService) GetLogByIdExecute(r ApiGetLogByIdRequest) (*LogResponse, *http.Response, error) { +func (a *LogsAPIService) GetLogByIdExecute(r ApiGetLogByIdRequest) (*LogResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -107,7 +107,7 @@ func (a *LogsApiService) GetLogByIdExecute(r ApiGetLogByIdRequest) (*LogResponse localVarReturnValue *LogResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsApiService.GetLogById") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.GetLogById") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -213,7 +213,7 @@ func (a *LogsApiService) GetLogByIdExecute(r ApiGetLogByIdRequest) (*LogResponse type ApiGetLogsRequest struct { ctx context.Context - ApiService LogsApi + ApiService LogsAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -270,7 +270,7 @@ Get log details in the form of a list @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetLogsRequest */ -func (a *LogsApiService) GetLogs(ctx context.Context) ApiGetLogsRequest { +func (a *LogsAPIService) GetLogs(ctx context.Context) ApiGetLogsRequest { return ApiGetLogsRequest{ ApiService: a, ctx: ctx, @@ -279,7 +279,7 @@ func (a *LogsApiService) GetLogs(ctx context.Context) ApiGetLogsRequest { // Execute executes the request // @return LogsResponse -func (a *LogsApiService) GetLogsExecute(r ApiGetLogsRequest) (*LogsResponse, *http.Response, error) { +func (a *LogsAPIService) GetLogsExecute(r ApiGetLogsRequest) (*LogsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -287,7 +287,7 @@ func (a *LogsApiService) GetLogsExecute(r ApiGetLogsRequest) (*LogsResponse, *ht localVarReturnValue *LogsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsApiService.GetLogs") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "LogsAPIService.GetLogs") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -300,6 +300,9 @@ func (a *LogsApiService) GetLogsExecute(r ApiGetLogsRequest) (*LogsResponse, *ht if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") diff --git a/api_orders.go b/api_orders.go index 026e9ed..f1291b6 100644 --- a/api_orders.go +++ b/api_orders.go @@ -21,7 +21,7 @@ import ( ) -type OrdersApi interface { +type OrdersAPI interface { /* CancelOrder Cancel Order @@ -143,12 +143,12 @@ type OrdersApi interface { UpdateOrderExecute(r ApiUpdateOrderRequest) (*OrderResponse, *http.Response, error) } -// OrdersApiService OrdersApi service -type OrdersApiService service +// OrdersAPIService OrdersAPI service +type OrdersAPIService service type ApiCancelOrderRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI id string acceptLanguage *string xChildCompanyId *string @@ -179,7 +179,7 @@ Cancel an order that has been previously created. @param id Identifier of the resource @return ApiCancelOrderRequest */ -func (a *OrdersApiService) CancelOrder(ctx context.Context, id string) ApiCancelOrderRequest { +func (a *OrdersAPIService) CancelOrder(ctx context.Context, id string) ApiCancelOrderRequest { return ApiCancelOrderRequest{ ApiService: a, ctx: ctx, @@ -189,7 +189,7 @@ func (a *OrdersApiService) CancelOrder(ctx context.Context, id string) ApiCancel // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) CancelOrderExecute(r ApiCancelOrderRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) CancelOrderExecute(r ApiCancelOrderRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -197,7 +197,7 @@ func (a *OrdersApiService) CancelOrderExecute(r ApiCancelOrderRequest) (*OrderRe localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.CancelOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.CancelOrder") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -325,7 +325,7 @@ func (a *OrdersApiService) CancelOrderExecute(r ApiCancelOrderRequest) (*OrderRe type ApiCreateOrderRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI orderRequest *OrderRequest acceptLanguage *string xChildCompanyId *string @@ -361,7 +361,7 @@ Create a new order. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateOrderRequest */ -func (a *OrdersApiService) CreateOrder(ctx context.Context) ApiCreateOrderRequest { +func (a *OrdersAPIService) CreateOrder(ctx context.Context) ApiCreateOrderRequest { return ApiCreateOrderRequest{ ApiService: a, ctx: ctx, @@ -370,7 +370,7 @@ func (a *OrdersApiService) CreateOrder(ctx context.Context) ApiCreateOrderReques // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) CreateOrderExecute(r ApiCreateOrderRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) CreateOrderExecute(r ApiCreateOrderRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -378,7 +378,7 @@ func (a *OrdersApiService) CreateOrderExecute(r ApiCreateOrderRequest) (*OrderRe localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.CreateOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.CreateOrder") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -499,7 +499,7 @@ func (a *OrdersApiService) CreateOrderExecute(r ApiCreateOrderRequest) (*OrderRe type ApiGetOrderByIdRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI id string acceptLanguage *string xChildCompanyId *string @@ -530,7 +530,7 @@ Info for a specific order @param id Identifier of the resource @return ApiGetOrderByIdRequest */ -func (a *OrdersApiService) GetOrderById(ctx context.Context, id string) ApiGetOrderByIdRequest { +func (a *OrdersAPIService) GetOrderById(ctx context.Context, id string) ApiGetOrderByIdRequest { return ApiGetOrderByIdRequest{ ApiService: a, ctx: ctx, @@ -540,7 +540,7 @@ func (a *OrdersApiService) GetOrderById(ctx context.Context, id string) ApiGetOr // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -548,7 +548,7 @@ func (a *OrdersApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.GetOrderById") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.GetOrderById") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -654,7 +654,7 @@ func (a *OrdersApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order type ApiGetOrdersRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -711,7 +711,7 @@ Get order details in the form of a list @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetOrdersRequest */ -func (a *OrdersApiService) GetOrders(ctx context.Context) ApiGetOrdersRequest { +func (a *OrdersAPIService) GetOrders(ctx context.Context) ApiGetOrdersRequest { return ApiGetOrdersRequest{ ApiService: a, ctx: ctx, @@ -720,7 +720,7 @@ func (a *OrdersApiService) GetOrders(ctx context.Context) ApiGetOrdersRequest { // Execute executes the request // @return GetOrdersResponse -func (a *OrdersApiService) GetOrdersExecute(r ApiGetOrdersRequest) (*GetOrdersResponse, *http.Response, error) { +func (a *OrdersAPIService) GetOrdersExecute(r ApiGetOrdersRequest) (*GetOrdersResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -728,7 +728,7 @@ func (a *OrdersApiService) GetOrdersExecute(r ApiGetOrdersRequest) (*GetOrdersRe localVarReturnValue *GetOrdersResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.GetOrders") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.GetOrders") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -741,6 +741,9 @@ func (a *OrdersApiService) GetOrdersExecute(r ApiGetOrdersRequest) (*GetOrdersRe if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -834,7 +837,7 @@ func (a *OrdersApiService) GetOrdersExecute(r ApiGetOrdersRequest) (*GetOrdersRe type ApiOrderCancelRefundRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI id string refundId string acceptLanguage *string @@ -867,7 +870,7 @@ A refunded order describes the items, amount, and reason an order is being refun @param refundId refund identifier @return ApiOrderCancelRefundRequest */ -func (a *OrdersApiService) OrderCancelRefund(ctx context.Context, id string, refundId string) ApiOrderCancelRefundRequest { +func (a *OrdersAPIService) OrderCancelRefund(ctx context.Context, id string, refundId string) ApiOrderCancelRefundRequest { return ApiOrderCancelRefundRequest{ ApiService: a, ctx: ctx, @@ -878,7 +881,7 @@ func (a *OrdersApiService) OrderCancelRefund(ctx context.Context, id string, ref // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) OrderCancelRefundExecute(r ApiOrderCancelRefundRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) OrderCancelRefundExecute(r ApiOrderCancelRefundRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -886,7 +889,7 @@ func (a *OrdersApiService) OrderCancelRefundExecute(r ApiOrderCancelRefundReques localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.OrderCancelRefund") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.OrderCancelRefund") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1015,7 +1018,7 @@ func (a *OrdersApiService) OrderCancelRefundExecute(r ApiOrderCancelRefundReques type ApiOrderRefundRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI id string orderRefundRequest *OrderRefundRequest acceptLanguage *string @@ -1053,7 +1056,7 @@ A refunded order describes the items, amount, and reason an order is being refun @param id Identifier of the resource @return ApiOrderRefundRequest */ -func (a *OrdersApiService) OrderRefund(ctx context.Context, id string) ApiOrderRefundRequest { +func (a *OrdersAPIService) OrderRefund(ctx context.Context, id string) ApiOrderRefundRequest { return ApiOrderRefundRequest{ ApiService: a, ctx: ctx, @@ -1063,7 +1066,7 @@ func (a *OrdersApiService) OrderRefund(ctx context.Context, id string) ApiOrderR // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) OrderRefundExecute(r ApiOrderRefundRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) OrderRefundExecute(r ApiOrderRefundRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1071,7 +1074,7 @@ func (a *OrdersApiService) OrderRefundExecute(r ApiOrderRefundRequest) (*OrderRe localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.OrderRefund") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.OrderRefund") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1204,7 +1207,7 @@ func (a *OrdersApiService) OrderRefundExecute(r ApiOrderRefundRequest) (*OrderRe type ApiOrdersCreateCaptureRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI id string acceptLanguage *string xChildCompanyId *string @@ -1242,7 +1245,7 @@ Processes an order that has been previously authorized. @param id Identifier of the resource @return ApiOrdersCreateCaptureRequest */ -func (a *OrdersApiService) OrdersCreateCapture(ctx context.Context, id string) ApiOrdersCreateCaptureRequest { +func (a *OrdersAPIService) OrdersCreateCapture(ctx context.Context, id string) ApiOrdersCreateCaptureRequest { return ApiOrdersCreateCaptureRequest{ ApiService: a, ctx: ctx, @@ -1252,7 +1255,7 @@ func (a *OrdersApiService) OrdersCreateCapture(ctx context.Context, id string) A // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) OrdersCreateCaptureExecute(r ApiOrdersCreateCaptureRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) OrdersCreateCaptureExecute(r ApiOrdersCreateCaptureRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1260,7 +1263,7 @@ func (a *OrdersApiService) OrdersCreateCaptureExecute(r ApiOrdersCreateCaptureRe localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.OrdersCreateCapture") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.OrdersCreateCapture") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1379,7 +1382,7 @@ func (a *OrdersApiService) OrdersCreateCaptureExecute(r ApiOrdersCreateCaptureRe type ApiUpdateOrderRequest struct { ctx context.Context - ApiService OrdersApi + ApiService OrdersAPI id string orderUpdateRequest *OrderUpdateRequest acceptLanguage *string @@ -1410,7 +1413,7 @@ Update an existing Order. @param id Identifier of the resource @return ApiUpdateOrderRequest */ -func (a *OrdersApiService) UpdateOrder(ctx context.Context, id string) ApiUpdateOrderRequest { +func (a *OrdersAPIService) UpdateOrder(ctx context.Context, id string) ApiUpdateOrderRequest { return ApiUpdateOrderRequest{ ApiService: a, ctx: ctx, @@ -1420,7 +1423,7 @@ func (a *OrdersApiService) UpdateOrder(ctx context.Context, id string) ApiUpdate // Execute executes the request // @return OrderResponse -func (a *OrdersApiService) UpdateOrderExecute(r ApiUpdateOrderRequest) (*OrderResponse, *http.Response, error) { +func (a *OrdersAPIService) UpdateOrderExecute(r ApiUpdateOrderRequest) (*OrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1428,7 +1431,7 @@ func (a *OrdersApiService) UpdateOrderExecute(r ApiUpdateOrderRequest) (*OrderRe localVarReturnValue *OrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersApiService.UpdateOrder") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "OrdersAPIService.UpdateOrder") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_payment_link.go b/api_payment_link.go index fc570e0..e34d1c7 100644 --- a/api_payment_link.go +++ b/api_payment_link.go @@ -21,7 +21,7 @@ import ( ) -type PaymentLinkApi interface { +type PaymentLinkAPI interface { /* CancelCheckout Cancel Payment Link @@ -102,12 +102,12 @@ type PaymentLinkApi interface { SmsCheckoutExecute(r ApiSmsCheckoutRequest) (*CheckoutResponse, *http.Response, error) } -// PaymentLinkApiService PaymentLinkApi service -type PaymentLinkApiService service +// PaymentLinkAPIService PaymentLinkAPI service +type PaymentLinkAPIService service type ApiCancelCheckoutRequest struct { ctx context.Context - ApiService PaymentLinkApi + ApiService PaymentLinkAPI id string acceptLanguage *string xChildCompanyId *string @@ -136,7 +136,7 @@ CancelCheckout Cancel Payment Link @param id Identifier of the resource @return ApiCancelCheckoutRequest */ -func (a *PaymentLinkApiService) CancelCheckout(ctx context.Context, id string) ApiCancelCheckoutRequest { +func (a *PaymentLinkAPIService) CancelCheckout(ctx context.Context, id string) ApiCancelCheckoutRequest { return ApiCancelCheckoutRequest{ ApiService: a, ctx: ctx, @@ -146,7 +146,7 @@ func (a *PaymentLinkApiService) CancelCheckout(ctx context.Context, id string) A // Execute executes the request // @return CheckoutResponse -func (a *PaymentLinkApiService) CancelCheckoutExecute(r ApiCancelCheckoutRequest) (*CheckoutResponse, *http.Response, error) { +func (a *PaymentLinkAPIService) CancelCheckoutExecute(r ApiCancelCheckoutRequest) (*CheckoutResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -154,7 +154,7 @@ func (a *PaymentLinkApiService) CancelCheckoutExecute(r ApiCancelCheckoutRequest localVarReturnValue *CheckoutResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkApiService.CancelCheckout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkAPIService.CancelCheckout") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -282,7 +282,7 @@ func (a *PaymentLinkApiService) CancelCheckoutExecute(r ApiCancelCheckoutRequest type ApiCreateCheckoutRequest struct { ctx context.Context - ApiService PaymentLinkApi + ApiService PaymentLinkAPI checkout *Checkout acceptLanguage *string xChildCompanyId *string @@ -316,7 +316,7 @@ CreateCheckout Create Unique Payment Link @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateCheckoutRequest */ -func (a *PaymentLinkApiService) CreateCheckout(ctx context.Context) ApiCreateCheckoutRequest { +func (a *PaymentLinkAPIService) CreateCheckout(ctx context.Context) ApiCreateCheckoutRequest { return ApiCreateCheckoutRequest{ ApiService: a, ctx: ctx, @@ -325,7 +325,7 @@ func (a *PaymentLinkApiService) CreateCheckout(ctx context.Context) ApiCreateChe // Execute executes the request // @return CheckoutResponse -func (a *PaymentLinkApiService) CreateCheckoutExecute(r ApiCreateCheckoutRequest) (*CheckoutResponse, *http.Response, error) { +func (a *PaymentLinkAPIService) CreateCheckoutExecute(r ApiCreateCheckoutRequest) (*CheckoutResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -333,7 +333,7 @@ func (a *PaymentLinkApiService) CreateCheckoutExecute(r ApiCreateCheckoutRequest localVarReturnValue *CheckoutResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkApiService.CreateCheckout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkAPIService.CreateCheckout") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -454,7 +454,7 @@ func (a *PaymentLinkApiService) CreateCheckoutExecute(r ApiCreateCheckoutRequest type ApiEmailCheckoutRequest struct { ctx context.Context - ApiService PaymentLinkApi + ApiService PaymentLinkAPI id string emailCheckoutRequest *EmailCheckoutRequest acceptLanguage *string @@ -490,7 +490,7 @@ EmailCheckout Send an email @param id Identifier of the resource @return ApiEmailCheckoutRequest */ -func (a *PaymentLinkApiService) EmailCheckout(ctx context.Context, id string) ApiEmailCheckoutRequest { +func (a *PaymentLinkAPIService) EmailCheckout(ctx context.Context, id string) ApiEmailCheckoutRequest { return ApiEmailCheckoutRequest{ ApiService: a, ctx: ctx, @@ -500,7 +500,7 @@ func (a *PaymentLinkApiService) EmailCheckout(ctx context.Context, id string) Ap // Execute executes the request // @return CheckoutResponse -func (a *PaymentLinkApiService) EmailCheckoutExecute(r ApiEmailCheckoutRequest) (*CheckoutResponse, *http.Response, error) { +func (a *PaymentLinkAPIService) EmailCheckoutExecute(r ApiEmailCheckoutRequest) (*CheckoutResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -508,7 +508,7 @@ func (a *PaymentLinkApiService) EmailCheckoutExecute(r ApiEmailCheckoutRequest) localVarReturnValue *CheckoutResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkApiService.EmailCheckout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkAPIService.EmailCheckout") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -641,7 +641,7 @@ func (a *PaymentLinkApiService) EmailCheckoutExecute(r ApiEmailCheckoutRequest) type ApiGetCheckoutRequest struct { ctx context.Context - ApiService PaymentLinkApi + ApiService PaymentLinkAPI id string acceptLanguage *string xChildCompanyId *string @@ -670,7 +670,7 @@ GetCheckout Get a payment link by ID @param id Identifier of the resource @return ApiGetCheckoutRequest */ -func (a *PaymentLinkApiService) GetCheckout(ctx context.Context, id string) ApiGetCheckoutRequest { +func (a *PaymentLinkAPIService) GetCheckout(ctx context.Context, id string) ApiGetCheckoutRequest { return ApiGetCheckoutRequest{ ApiService: a, ctx: ctx, @@ -680,7 +680,7 @@ func (a *PaymentLinkApiService) GetCheckout(ctx context.Context, id string) ApiG // Execute executes the request // @return CheckoutResponse -func (a *PaymentLinkApiService) GetCheckoutExecute(r ApiGetCheckoutRequest) (*CheckoutResponse, *http.Response, error) { +func (a *PaymentLinkAPIService) GetCheckoutExecute(r ApiGetCheckoutRequest) (*CheckoutResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -688,7 +688,7 @@ func (a *PaymentLinkApiService) GetCheckoutExecute(r ApiGetCheckoutRequest) (*Ch localVarReturnValue *CheckoutResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkApiService.GetCheckout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkAPIService.GetCheckout") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -816,7 +816,7 @@ func (a *PaymentLinkApiService) GetCheckoutExecute(r ApiGetCheckoutRequest) (*Ch type ApiGetCheckoutsRequest struct { ctx context.Context - ApiService PaymentLinkApi + ApiService PaymentLinkAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -873,7 +873,7 @@ Returns a list of links generated by the merchant @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetCheckoutsRequest */ -func (a *PaymentLinkApiService) GetCheckouts(ctx context.Context) ApiGetCheckoutsRequest { +func (a *PaymentLinkAPIService) GetCheckouts(ctx context.Context) ApiGetCheckoutsRequest { return ApiGetCheckoutsRequest{ ApiService: a, ctx: ctx, @@ -882,7 +882,7 @@ func (a *PaymentLinkApiService) GetCheckouts(ctx context.Context) ApiGetCheckout // Execute executes the request // @return CheckoutsResponse -func (a *PaymentLinkApiService) GetCheckoutsExecute(r ApiGetCheckoutsRequest) (*CheckoutsResponse, *http.Response, error) { +func (a *PaymentLinkAPIService) GetCheckoutsExecute(r ApiGetCheckoutsRequest) (*CheckoutsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -890,7 +890,7 @@ func (a *PaymentLinkApiService) GetCheckoutsExecute(r ApiGetCheckoutsRequest) (* localVarReturnValue *CheckoutsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkApiService.GetCheckouts") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkAPIService.GetCheckouts") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -903,6 +903,9 @@ func (a *PaymentLinkApiService) GetCheckoutsExecute(r ApiGetCheckoutsRequest) (* if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -1018,7 +1021,7 @@ func (a *PaymentLinkApiService) GetCheckoutsExecute(r ApiGetCheckoutsRequest) (* type ApiSmsCheckoutRequest struct { ctx context.Context - ApiService PaymentLinkApi + ApiService PaymentLinkAPI id string smsCheckoutRequest *SmsCheckoutRequest acceptLanguage *string @@ -1054,7 +1057,7 @@ SmsCheckout Send an sms @param id Identifier of the resource @return ApiSmsCheckoutRequest */ -func (a *PaymentLinkApiService) SmsCheckout(ctx context.Context, id string) ApiSmsCheckoutRequest { +func (a *PaymentLinkAPIService) SmsCheckout(ctx context.Context, id string) ApiSmsCheckoutRequest { return ApiSmsCheckoutRequest{ ApiService: a, ctx: ctx, @@ -1064,7 +1067,7 @@ func (a *PaymentLinkApiService) SmsCheckout(ctx context.Context, id string) ApiS // Execute executes the request // @return CheckoutResponse -func (a *PaymentLinkApiService) SmsCheckoutExecute(r ApiSmsCheckoutRequest) (*CheckoutResponse, *http.Response, error) { +func (a *PaymentLinkAPIService) SmsCheckoutExecute(r ApiSmsCheckoutRequest) (*CheckoutResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1072,7 +1075,7 @@ func (a *PaymentLinkApiService) SmsCheckoutExecute(r ApiSmsCheckoutRequest) (*Ch localVarReturnValue *CheckoutResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkApiService.SmsCheckout") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentLinkAPIService.SmsCheckout") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_payment_methods.go b/api_payment_methods.go index 336ec50..894578a 100644 --- a/api_payment_methods.go +++ b/api_payment_methods.go @@ -21,7 +21,7 @@ import ( ) -type PaymentMethodsApi interface { +type PaymentMethodsAPI interface { /* CreateCustomerPaymentMethods Create Payment Method @@ -86,12 +86,12 @@ type PaymentMethodsApi interface { UpdateCustomerPaymentMethodsExecute(r ApiUpdateCustomerPaymentMethodsRequest) (*UpdateCustomerPaymentMethodsResponse, *http.Response, error) } -// PaymentMethodsApiService PaymentMethodsApi service -type PaymentMethodsApiService service +// PaymentMethodsAPIService PaymentMethodsAPI service +type PaymentMethodsAPIService service type ApiCreateCustomerPaymentMethodsRequest struct { ctx context.Context - ApiService PaymentMethodsApi + ApiService PaymentMethodsAPI id string createCustomerPaymentMethodsRequest *CreateCustomerPaymentMethodsRequest acceptLanguage *string @@ -129,7 +129,7 @@ Create a payment method for a customer. @param id Identifier of the resource @return ApiCreateCustomerPaymentMethodsRequest */ -func (a *PaymentMethodsApiService) CreateCustomerPaymentMethods(ctx context.Context, id string) ApiCreateCustomerPaymentMethodsRequest { +func (a *PaymentMethodsAPIService) CreateCustomerPaymentMethods(ctx context.Context, id string) ApiCreateCustomerPaymentMethodsRequest { return ApiCreateCustomerPaymentMethodsRequest{ ApiService: a, ctx: ctx, @@ -139,7 +139,7 @@ func (a *PaymentMethodsApiService) CreateCustomerPaymentMethods(ctx context.Cont // Execute executes the request // @return CreateCustomerPaymentMethodsResponse -func (a *PaymentMethodsApiService) CreateCustomerPaymentMethodsExecute(r ApiCreateCustomerPaymentMethodsRequest) (*CreateCustomerPaymentMethodsResponse, *http.Response, error) { +func (a *PaymentMethodsAPIService) CreateCustomerPaymentMethodsExecute(r ApiCreateCustomerPaymentMethodsRequest) (*CreateCustomerPaymentMethodsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -147,7 +147,7 @@ func (a *PaymentMethodsApiService) CreateCustomerPaymentMethodsExecute(r ApiCrea localVarReturnValue *CreateCustomerPaymentMethodsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsApiService.CreateCustomerPaymentMethods") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsAPIService.CreateCustomerPaymentMethods") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -269,7 +269,7 @@ func (a *PaymentMethodsApiService) CreateCustomerPaymentMethodsExecute(r ApiCrea type ApiDeleteCustomerPaymentMethodsRequest struct { ctx context.Context - ApiService PaymentMethodsApi + ApiService PaymentMethodsAPI id string paymentMethodId string acceptLanguage *string @@ -302,7 +302,7 @@ Delete an existing payment method @param paymentMethodId Identifier of the payment method @return ApiDeleteCustomerPaymentMethodsRequest */ -func (a *PaymentMethodsApiService) DeleteCustomerPaymentMethods(ctx context.Context, id string, paymentMethodId string) ApiDeleteCustomerPaymentMethodsRequest { +func (a *PaymentMethodsAPIService) DeleteCustomerPaymentMethods(ctx context.Context, id string, paymentMethodId string) ApiDeleteCustomerPaymentMethodsRequest { return ApiDeleteCustomerPaymentMethodsRequest{ ApiService: a, ctx: ctx, @@ -313,7 +313,7 @@ func (a *PaymentMethodsApiService) DeleteCustomerPaymentMethods(ctx context.Cont // Execute executes the request // @return UpdateCustomerPaymentMethodsResponse -func (a *PaymentMethodsApiService) DeleteCustomerPaymentMethodsExecute(r ApiDeleteCustomerPaymentMethodsRequest) (*UpdateCustomerPaymentMethodsResponse, *http.Response, error) { +func (a *PaymentMethodsAPIService) DeleteCustomerPaymentMethodsExecute(r ApiDeleteCustomerPaymentMethodsRequest) (*UpdateCustomerPaymentMethodsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -321,7 +321,7 @@ func (a *PaymentMethodsApiService) DeleteCustomerPaymentMethodsExecute(r ApiDele localVarReturnValue *UpdateCustomerPaymentMethodsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsApiService.DeleteCustomerPaymentMethods") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsAPIService.DeleteCustomerPaymentMethods") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -439,7 +439,7 @@ func (a *PaymentMethodsApiService) DeleteCustomerPaymentMethodsExecute(r ApiDele type ApiGetCustomerPaymentMethodsRequest struct { ctx context.Context - ApiService PaymentMethodsApi + ApiService PaymentMethodsAPI id string acceptLanguage *string xChildCompanyId *string @@ -498,7 +498,7 @@ Get a list of Payment Methods @param id Identifier of the resource @return ApiGetCustomerPaymentMethodsRequest */ -func (a *PaymentMethodsApiService) GetCustomerPaymentMethods(ctx context.Context, id string) ApiGetCustomerPaymentMethodsRequest { +func (a *PaymentMethodsAPIService) GetCustomerPaymentMethods(ctx context.Context, id string) ApiGetCustomerPaymentMethodsRequest { return ApiGetCustomerPaymentMethodsRequest{ ApiService: a, ctx: ctx, @@ -508,7 +508,7 @@ func (a *PaymentMethodsApiService) GetCustomerPaymentMethods(ctx context.Context // Execute executes the request // @return GetPaymentMethodResponse -func (a *PaymentMethodsApiService) GetCustomerPaymentMethodsExecute(r ApiGetCustomerPaymentMethodsRequest) (*GetPaymentMethodResponse, *http.Response, error) { +func (a *PaymentMethodsAPIService) GetCustomerPaymentMethodsExecute(r ApiGetCustomerPaymentMethodsRequest) (*GetPaymentMethodResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -516,7 +516,7 @@ func (a *PaymentMethodsApiService) GetCustomerPaymentMethodsExecute(r ApiGetCust localVarReturnValue *GetPaymentMethodResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsApiService.GetCustomerPaymentMethods") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsAPIService.GetCustomerPaymentMethods") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -530,6 +530,9 @@ func (a *PaymentMethodsApiService) GetCustomerPaymentMethodsExecute(r ApiGetCust if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.next != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "next", r.next, "") @@ -634,7 +637,7 @@ func (a *PaymentMethodsApiService) GetCustomerPaymentMethodsExecute(r ApiGetCust type ApiUpdateCustomerPaymentMethodsRequest struct { ctx context.Context - ApiService PaymentMethodsApi + ApiService PaymentMethodsAPI id string paymentMethodId string updatePaymentMethods *UpdatePaymentMethods @@ -674,7 +677,7 @@ Gets a payment Method that corresponds to a customer ID. @param paymentMethodId Identifier of the payment method @return ApiUpdateCustomerPaymentMethodsRequest */ -func (a *PaymentMethodsApiService) UpdateCustomerPaymentMethods(ctx context.Context, id string, paymentMethodId string) ApiUpdateCustomerPaymentMethodsRequest { +func (a *PaymentMethodsAPIService) UpdateCustomerPaymentMethods(ctx context.Context, id string, paymentMethodId string) ApiUpdateCustomerPaymentMethodsRequest { return ApiUpdateCustomerPaymentMethodsRequest{ ApiService: a, ctx: ctx, @@ -685,7 +688,7 @@ func (a *PaymentMethodsApiService) UpdateCustomerPaymentMethods(ctx context.Cont // Execute executes the request // @return UpdateCustomerPaymentMethodsResponse -func (a *PaymentMethodsApiService) UpdateCustomerPaymentMethodsExecute(r ApiUpdateCustomerPaymentMethodsRequest) (*UpdateCustomerPaymentMethodsResponse, *http.Response, error) { +func (a *PaymentMethodsAPIService) UpdateCustomerPaymentMethodsExecute(r ApiUpdateCustomerPaymentMethodsRequest) (*UpdateCustomerPaymentMethodsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -693,7 +696,7 @@ func (a *PaymentMethodsApiService) UpdateCustomerPaymentMethodsExecute(r ApiUpda localVarReturnValue *UpdateCustomerPaymentMethodsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsApiService.UpdateCustomerPaymentMethods") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PaymentMethodsAPIService.UpdateCustomerPaymentMethods") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_plans.go b/api_plans.go index e5a6efb..1ba6222 100644 --- a/api_plans.go +++ b/api_plans.go @@ -21,7 +21,7 @@ import ( ) -type PlansApi interface { +type PlansAPI interface { /* CreatePlan Create Plan @@ -89,12 +89,12 @@ type PlansApi interface { UpdatePlanExecute(r ApiUpdatePlanRequest) (*PlanResponse, *http.Response, error) } -// PlansApiService PlansApi service -type PlansApiService service +// PlansAPIService PlansAPI service +type PlansAPIService service type ApiCreatePlanRequest struct { ctx context.Context - ApiService PlansApi + ApiService PlansAPI planRequest *PlanRequest acceptLanguage *string xChildCompanyId *string @@ -130,7 +130,7 @@ Create a new plan for an existing order @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreatePlanRequest */ -func (a *PlansApiService) CreatePlan(ctx context.Context) ApiCreatePlanRequest { +func (a *PlansAPIService) CreatePlan(ctx context.Context) ApiCreatePlanRequest { return ApiCreatePlanRequest{ ApiService: a, ctx: ctx, @@ -139,7 +139,7 @@ func (a *PlansApiService) CreatePlan(ctx context.Context) ApiCreatePlanRequest { // Execute executes the request // @return PlanResponse -func (a *PlansApiService) CreatePlanExecute(r ApiCreatePlanRequest) (*PlanResponse, *http.Response, error) { +func (a *PlansAPIService) CreatePlanExecute(r ApiCreatePlanRequest) (*PlanResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -147,7 +147,7 @@ func (a *PlansApiService) CreatePlanExecute(r ApiCreatePlanRequest) (*PlanRespon localVarReturnValue *PlanResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansApiService.CreatePlan") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansAPIService.CreatePlan") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -257,7 +257,7 @@ func (a *PlansApiService) CreatePlanExecute(r ApiCreatePlanRequest) (*PlanRespon type ApiDeletePlanRequest struct { ctx context.Context - ApiService PlansApi + ApiService PlansAPI id string acceptLanguage *string } @@ -279,7 +279,7 @@ DeletePlan Delete Plan @param id Identifier of the resource @return ApiDeletePlanRequest */ -func (a *PlansApiService) DeletePlan(ctx context.Context, id string) ApiDeletePlanRequest { +func (a *PlansAPIService) DeletePlan(ctx context.Context, id string) ApiDeletePlanRequest { return ApiDeletePlanRequest{ ApiService: a, ctx: ctx, @@ -289,7 +289,7 @@ func (a *PlansApiService) DeletePlan(ctx context.Context, id string) ApiDeletePl // Execute executes the request // @return PlanResponse -func (a *PlansApiService) DeletePlanExecute(r ApiDeletePlanRequest) (*PlanResponse, *http.Response, error) { +func (a *PlansAPIService) DeletePlanExecute(r ApiDeletePlanRequest) (*PlanResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -297,7 +297,7 @@ func (a *PlansApiService) DeletePlanExecute(r ApiDeletePlanRequest) (*PlanRespon localVarReturnValue *PlanResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansApiService.DeletePlan") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansAPIService.DeletePlan") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -411,7 +411,7 @@ func (a *PlansApiService) DeletePlanExecute(r ApiDeletePlanRequest) (*PlanRespon type ApiGetPlanRequest struct { ctx context.Context - ApiService PlansApi + ApiService PlansAPI id string acceptLanguage *string xChildCompanyId *string @@ -440,7 +440,7 @@ GetPlan Get Plan @param id Identifier of the resource @return ApiGetPlanRequest */ -func (a *PlansApiService) GetPlan(ctx context.Context, id string) ApiGetPlanRequest { +func (a *PlansAPIService) GetPlan(ctx context.Context, id string) ApiGetPlanRequest { return ApiGetPlanRequest{ ApiService: a, ctx: ctx, @@ -450,7 +450,7 @@ func (a *PlansApiService) GetPlan(ctx context.Context, id string) ApiGetPlanRequ // Execute executes the request // @return PlanResponse -func (a *PlansApiService) GetPlanExecute(r ApiGetPlanRequest) (*PlanResponse, *http.Response, error) { +func (a *PlansAPIService) GetPlanExecute(r ApiGetPlanRequest) (*PlanResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -458,7 +458,7 @@ func (a *PlansApiService) GetPlanExecute(r ApiGetPlanRequest) (*PlanResponse, *h localVarReturnValue *PlanResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansApiService.GetPlan") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansAPIService.GetPlan") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -575,7 +575,7 @@ func (a *PlansApiService) GetPlanExecute(r ApiGetPlanRequest) (*PlanResponse, *h type ApiGetPlansRequest struct { ctx context.Context - ApiService PlansApi + ApiService PlansAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -630,7 +630,7 @@ GetPlans Get A List of Plans @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetPlansRequest */ -func (a *PlansApiService) GetPlans(ctx context.Context) ApiGetPlansRequest { +func (a *PlansAPIService) GetPlans(ctx context.Context) ApiGetPlansRequest { return ApiGetPlansRequest{ ApiService: a, ctx: ctx, @@ -639,7 +639,7 @@ func (a *PlansApiService) GetPlans(ctx context.Context) ApiGetPlansRequest { // Execute executes the request // @return GetPlansResponse -func (a *PlansApiService) GetPlansExecute(r ApiGetPlansRequest) (*GetPlansResponse, *http.Response, error) { +func (a *PlansAPIService) GetPlansExecute(r ApiGetPlansRequest) (*GetPlansResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -647,7 +647,7 @@ func (a *PlansApiService) GetPlansExecute(r ApiGetPlansRequest) (*GetPlansRespon localVarReturnValue *GetPlansResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansApiService.GetPlans") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansAPIService.GetPlans") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -660,6 +660,9 @@ func (a *PlansApiService) GetPlansExecute(r ApiGetPlansRequest) (*GetPlansRespon if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -764,7 +767,7 @@ func (a *PlansApiService) GetPlansExecute(r ApiGetPlansRequest) (*GetPlansRespon type ApiUpdatePlanRequest struct { ctx context.Context - ApiService PlansApi + ApiService PlansAPI id string planUpdateRequest *PlanUpdateRequest acceptLanguage *string @@ -800,7 +803,7 @@ UpdatePlan Update Plan @param id Identifier of the resource @return ApiUpdatePlanRequest */ -func (a *PlansApiService) UpdatePlan(ctx context.Context, id string) ApiUpdatePlanRequest { +func (a *PlansAPIService) UpdatePlan(ctx context.Context, id string) ApiUpdatePlanRequest { return ApiUpdatePlanRequest{ ApiService: a, ctx: ctx, @@ -810,7 +813,7 @@ func (a *PlansApiService) UpdatePlan(ctx context.Context, id string) ApiUpdatePl // Execute executes the request // @return PlanResponse -func (a *PlansApiService) UpdatePlanExecute(r ApiUpdatePlanRequest) (*PlanResponse, *http.Response, error) { +func (a *PlansAPIService) UpdatePlanExecute(r ApiUpdatePlanRequest) (*PlanResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -818,7 +821,7 @@ func (a *PlansApiService) UpdatePlanExecute(r ApiUpdatePlanRequest) (*PlanRespon localVarReturnValue *PlanResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansApiService.UpdatePlan") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PlansAPIService.UpdatePlan") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_products.go b/api_products.go index d5bdf93..96ef5ef 100644 --- a/api_products.go +++ b/api_products.go @@ -21,7 +21,7 @@ import ( ) -type ProductsApi interface { +type ProductsAPI interface { /* OrdersCreateProduct Create Product @@ -71,12 +71,12 @@ type ProductsApi interface { OrdersUpdateProductExecute(r ApiOrdersUpdateProductRequest) (*ProductOrderResponse, *http.Response, error) } -// ProductsApiService ProductsApi service -type ProductsApiService service +// ProductsAPIService ProductsAPI service +type ProductsAPIService service type ApiOrdersCreateProductRequest struct { ctx context.Context - ApiService ProductsApi + ApiService ProductsAPI id string product *Product acceptLanguage *string @@ -114,7 +114,7 @@ Create a new product for an existing order. @param id Identifier of the resource @return ApiOrdersCreateProductRequest */ -func (a *ProductsApiService) OrdersCreateProduct(ctx context.Context, id string) ApiOrdersCreateProductRequest { +func (a *ProductsAPIService) OrdersCreateProduct(ctx context.Context, id string) ApiOrdersCreateProductRequest { return ApiOrdersCreateProductRequest{ ApiService: a, ctx: ctx, @@ -124,7 +124,7 @@ func (a *ProductsApiService) OrdersCreateProduct(ctx context.Context, id string) // Execute executes the request // @return ProductOrderResponse -func (a *ProductsApiService) OrdersCreateProductExecute(r ApiOrdersCreateProductRequest) (*ProductOrderResponse, *http.Response, error) { +func (a *ProductsAPIService) OrdersCreateProductExecute(r ApiOrdersCreateProductRequest) (*ProductOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -132,7 +132,7 @@ func (a *ProductsApiService) OrdersCreateProductExecute(r ApiOrdersCreateProduct localVarReturnValue *ProductOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.OrdersCreateProduct") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsAPIService.OrdersCreateProduct") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -243,7 +243,7 @@ func (a *ProductsApiService) OrdersCreateProductExecute(r ApiOrdersCreateProduct type ApiOrdersDeleteProductRequest struct { ctx context.Context - ApiService ProductsApi + ApiService ProductsAPI id string lineItemId string acceptLanguage *string @@ -276,7 +276,7 @@ Delete product for an existing orden @param lineItemId identifier @return ApiOrdersDeleteProductRequest */ -func (a *ProductsApiService) OrdersDeleteProduct(ctx context.Context, id string, lineItemId string) ApiOrdersDeleteProductRequest { +func (a *ProductsAPIService) OrdersDeleteProduct(ctx context.Context, id string, lineItemId string) ApiOrdersDeleteProductRequest { return ApiOrdersDeleteProductRequest{ ApiService: a, ctx: ctx, @@ -287,7 +287,7 @@ func (a *ProductsApiService) OrdersDeleteProduct(ctx context.Context, id string, // Execute executes the request // @return ProductOrderResponse -func (a *ProductsApiService) OrdersDeleteProductExecute(r ApiOrdersDeleteProductRequest) (*ProductOrderResponse, *http.Response, error) { +func (a *ProductsAPIService) OrdersDeleteProductExecute(r ApiOrdersDeleteProductRequest) (*ProductOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -295,7 +295,7 @@ func (a *ProductsApiService) OrdersDeleteProductExecute(r ApiOrdersDeleteProduct localVarReturnValue *ProductOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.OrdersDeleteProduct") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsAPIService.OrdersDeleteProduct") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -413,7 +413,7 @@ func (a *ProductsApiService) OrdersDeleteProductExecute(r ApiOrdersDeleteProduct type ApiOrdersUpdateProductRequest struct { ctx context.Context - ApiService ProductsApi + ApiService ProductsAPI id string lineItemId string updateProduct *UpdateProduct @@ -453,7 +453,7 @@ Update an existing product for an existing orden @param lineItemId identifier @return ApiOrdersUpdateProductRequest */ -func (a *ProductsApiService) OrdersUpdateProduct(ctx context.Context, id string, lineItemId string) ApiOrdersUpdateProductRequest { +func (a *ProductsAPIService) OrdersUpdateProduct(ctx context.Context, id string, lineItemId string) ApiOrdersUpdateProductRequest { return ApiOrdersUpdateProductRequest{ ApiService: a, ctx: ctx, @@ -464,7 +464,7 @@ func (a *ProductsApiService) OrdersUpdateProduct(ctx context.Context, id string, // Execute executes the request // @return ProductOrderResponse -func (a *ProductsApiService) OrdersUpdateProductExecute(r ApiOrdersUpdateProductRequest) (*ProductOrderResponse, *http.Response, error) { +func (a *ProductsAPIService) OrdersUpdateProductExecute(r ApiOrdersUpdateProductRequest) (*ProductOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -472,7 +472,7 @@ func (a *ProductsApiService) OrdersUpdateProductExecute(r ApiOrdersUpdateProduct localVarReturnValue *ProductOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsApiService.OrdersUpdateProduct") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProductsAPIService.OrdersUpdateProduct") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_shipping_contacts.go b/api_shipping_contacts.go index 1f4357d..dabab6c 100644 --- a/api_shipping_contacts.go +++ b/api_shipping_contacts.go @@ -21,7 +21,7 @@ import ( ) -type ShippingContactsApi interface { +type ShippingContactsAPI interface { /* CreateCustomerShippingContacts Create a shipping contacts @@ -71,12 +71,12 @@ type ShippingContactsApi interface { UpdateCustomerShippingContactsExecute(r ApiUpdateCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) } -// ShippingContactsApiService ShippingContactsApi service -type ShippingContactsApiService service +// ShippingContactsAPIService ShippingContactsAPI service +type ShippingContactsAPIService service type ApiCreateCustomerShippingContactsRequest struct { ctx context.Context - ApiService ShippingContactsApi + ApiService ShippingContactsAPI id string customerShippingContacts *CustomerShippingContacts acceptLanguage *string @@ -114,7 +114,7 @@ Create a shipping contacts for a customer. @param id Identifier of the resource @return ApiCreateCustomerShippingContactsRequest */ -func (a *ShippingContactsApiService) CreateCustomerShippingContacts(ctx context.Context, id string) ApiCreateCustomerShippingContactsRequest { +func (a *ShippingContactsAPIService) CreateCustomerShippingContacts(ctx context.Context, id string) ApiCreateCustomerShippingContactsRequest { return ApiCreateCustomerShippingContactsRequest{ ApiService: a, ctx: ctx, @@ -124,7 +124,7 @@ func (a *ShippingContactsApiService) CreateCustomerShippingContacts(ctx context. // Execute executes the request // @return CustomerShippingContactsResponse -func (a *ShippingContactsApiService) CreateCustomerShippingContactsExecute(r ApiCreateCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) { +func (a *ShippingContactsAPIService) CreateCustomerShippingContactsExecute(r ApiCreateCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -132,7 +132,7 @@ func (a *ShippingContactsApiService) CreateCustomerShippingContactsExecute(r Api localVarReturnValue *CustomerShippingContactsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingContactsApiService.CreateCustomerShippingContacts") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingContactsAPIService.CreateCustomerShippingContacts") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -254,7 +254,7 @@ func (a *ShippingContactsApiService) CreateCustomerShippingContactsExecute(r Api type ApiDeleteCustomerShippingContactsRequest struct { ctx context.Context - ApiService ShippingContactsApi + ApiService ShippingContactsAPI id string shippingContactsId string acceptLanguage *string @@ -287,7 +287,7 @@ Delete shipping contact that corresponds to a customer ID. @param shippingContactsId identifier @return ApiDeleteCustomerShippingContactsRequest */ -func (a *ShippingContactsApiService) DeleteCustomerShippingContacts(ctx context.Context, id string, shippingContactsId string) ApiDeleteCustomerShippingContactsRequest { +func (a *ShippingContactsAPIService) DeleteCustomerShippingContacts(ctx context.Context, id string, shippingContactsId string) ApiDeleteCustomerShippingContactsRequest { return ApiDeleteCustomerShippingContactsRequest{ ApiService: a, ctx: ctx, @@ -298,7 +298,7 @@ func (a *ShippingContactsApiService) DeleteCustomerShippingContacts(ctx context. // Execute executes the request // @return CustomerShippingContactsResponse -func (a *ShippingContactsApiService) DeleteCustomerShippingContactsExecute(r ApiDeleteCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) { +func (a *ShippingContactsAPIService) DeleteCustomerShippingContactsExecute(r ApiDeleteCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -306,7 +306,7 @@ func (a *ShippingContactsApiService) DeleteCustomerShippingContactsExecute(r Api localVarReturnValue *CustomerShippingContactsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingContactsApiService.DeleteCustomerShippingContacts") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingContactsAPIService.DeleteCustomerShippingContacts") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -424,7 +424,7 @@ func (a *ShippingContactsApiService) DeleteCustomerShippingContactsExecute(r Api type ApiUpdateCustomerShippingContactsRequest struct { ctx context.Context - ApiService ShippingContactsApi + ApiService ShippingContactsAPI id string shippingContactsId string customerUpdateShippingContacts *CustomerUpdateShippingContacts @@ -464,7 +464,7 @@ Update shipping contact that corresponds to a customer ID. @param shippingContactsId identifier @return ApiUpdateCustomerShippingContactsRequest */ -func (a *ShippingContactsApiService) UpdateCustomerShippingContacts(ctx context.Context, id string, shippingContactsId string) ApiUpdateCustomerShippingContactsRequest { +func (a *ShippingContactsAPIService) UpdateCustomerShippingContacts(ctx context.Context, id string, shippingContactsId string) ApiUpdateCustomerShippingContactsRequest { return ApiUpdateCustomerShippingContactsRequest{ ApiService: a, ctx: ctx, @@ -475,7 +475,7 @@ func (a *ShippingContactsApiService) UpdateCustomerShippingContacts(ctx context. // Execute executes the request // @return CustomerShippingContactsResponse -func (a *ShippingContactsApiService) UpdateCustomerShippingContactsExecute(r ApiUpdateCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) { +func (a *ShippingContactsAPIService) UpdateCustomerShippingContactsExecute(r ApiUpdateCustomerShippingContactsRequest) (*CustomerShippingContactsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -483,7 +483,7 @@ func (a *ShippingContactsApiService) UpdateCustomerShippingContactsExecute(r Api localVarReturnValue *CustomerShippingContactsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingContactsApiService.UpdateCustomerShippingContacts") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingContactsAPIService.UpdateCustomerShippingContacts") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_shippings.go b/api_shippings.go index 49cf240..636f25c 100644 --- a/api_shippings.go +++ b/api_shippings.go @@ -21,7 +21,7 @@ import ( ) -type ShippingsApi interface { +type ShippingsAPI interface { /* OrdersCreateShipping Create Shipping @@ -71,12 +71,12 @@ type ShippingsApi interface { OrdersUpdateShippingExecute(r ApiOrdersUpdateShippingRequest) (*ShippingOrderResponse, *http.Response, error) } -// ShippingsApiService ShippingsApi service -type ShippingsApiService service +// ShippingsAPIService ShippingsAPI service +type ShippingsAPIService service type ApiOrdersCreateShippingRequest struct { ctx context.Context - ApiService ShippingsApi + ApiService ShippingsAPI id string shippingRequest *ShippingRequest acceptLanguage *string @@ -114,7 +114,7 @@ Create new shipping for an existing orden @param id Identifier of the resource @return ApiOrdersCreateShippingRequest */ -func (a *ShippingsApiService) OrdersCreateShipping(ctx context.Context, id string) ApiOrdersCreateShippingRequest { +func (a *ShippingsAPIService) OrdersCreateShipping(ctx context.Context, id string) ApiOrdersCreateShippingRequest { return ApiOrdersCreateShippingRequest{ ApiService: a, ctx: ctx, @@ -124,7 +124,7 @@ func (a *ShippingsApiService) OrdersCreateShipping(ctx context.Context, id strin // Execute executes the request // @return ShippingOrderResponse -func (a *ShippingsApiService) OrdersCreateShippingExecute(r ApiOrdersCreateShippingRequest) (*ShippingOrderResponse, *http.Response, error) { +func (a *ShippingsAPIService) OrdersCreateShippingExecute(r ApiOrdersCreateShippingRequest) (*ShippingOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -132,7 +132,7 @@ func (a *ShippingsApiService) OrdersCreateShippingExecute(r ApiOrdersCreateShipp localVarReturnValue *ShippingOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingsApiService.OrdersCreateShipping") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingsAPIService.OrdersCreateShipping") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -243,7 +243,7 @@ func (a *ShippingsApiService) OrdersCreateShippingExecute(r ApiOrdersCreateShipp type ApiOrdersDeleteShippingRequest struct { ctx context.Context - ApiService ShippingsApi + ApiService ShippingsAPI id string shippingId string acceptLanguage *string @@ -276,7 +276,7 @@ Delete shipping @param shippingId identifier @return ApiOrdersDeleteShippingRequest */ -func (a *ShippingsApiService) OrdersDeleteShipping(ctx context.Context, id string, shippingId string) ApiOrdersDeleteShippingRequest { +func (a *ShippingsAPIService) OrdersDeleteShipping(ctx context.Context, id string, shippingId string) ApiOrdersDeleteShippingRequest { return ApiOrdersDeleteShippingRequest{ ApiService: a, ctx: ctx, @@ -287,7 +287,7 @@ func (a *ShippingsApiService) OrdersDeleteShipping(ctx context.Context, id strin // Execute executes the request // @return ShippingOrderResponse -func (a *ShippingsApiService) OrdersDeleteShippingExecute(r ApiOrdersDeleteShippingRequest) (*ShippingOrderResponse, *http.Response, error) { +func (a *ShippingsAPIService) OrdersDeleteShippingExecute(r ApiOrdersDeleteShippingRequest) (*ShippingOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -295,7 +295,7 @@ func (a *ShippingsApiService) OrdersDeleteShippingExecute(r ApiOrdersDeleteShipp localVarReturnValue *ShippingOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingsApiService.OrdersDeleteShipping") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingsAPIService.OrdersDeleteShipping") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -424,7 +424,7 @@ func (a *ShippingsApiService) OrdersDeleteShippingExecute(r ApiOrdersDeleteShipp type ApiOrdersUpdateShippingRequest struct { ctx context.Context - ApiService ShippingsApi + ApiService ShippingsAPI id string shippingId string shippingRequest *ShippingRequest @@ -464,7 +464,7 @@ Update existing shipping for an existing orden @param shippingId identifier @return ApiOrdersUpdateShippingRequest */ -func (a *ShippingsApiService) OrdersUpdateShipping(ctx context.Context, id string, shippingId string) ApiOrdersUpdateShippingRequest { +func (a *ShippingsAPIService) OrdersUpdateShipping(ctx context.Context, id string, shippingId string) ApiOrdersUpdateShippingRequest { return ApiOrdersUpdateShippingRequest{ ApiService: a, ctx: ctx, @@ -475,7 +475,7 @@ func (a *ShippingsApiService) OrdersUpdateShipping(ctx context.Context, id strin // Execute executes the request // @return ShippingOrderResponse -func (a *ShippingsApiService) OrdersUpdateShippingExecute(r ApiOrdersUpdateShippingRequest) (*ShippingOrderResponse, *http.Response, error) { +func (a *ShippingsAPIService) OrdersUpdateShippingExecute(r ApiOrdersUpdateShippingRequest) (*ShippingOrderResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -483,7 +483,7 @@ func (a *ShippingsApiService) OrdersUpdateShippingExecute(r ApiOrdersUpdateShipp localVarReturnValue *ShippingOrderResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingsApiService.OrdersUpdateShipping") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ShippingsAPIService.OrdersUpdateShipping") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_subscriptions.go b/api_subscriptions.go index cedbc74..c08b8e5 100644 --- a/api_subscriptions.go +++ b/api_subscriptions.go @@ -21,7 +21,7 @@ import ( ) -type SubscriptionsApi interface { +type SubscriptionsAPI interface { /* CancelSubscription Cancel Subscription @@ -127,12 +127,12 @@ type SubscriptionsApi interface { UpdateSubscriptionExecute(r ApiUpdateSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) } -// SubscriptionsApiService SubscriptionsApi service -type SubscriptionsApiService service +// SubscriptionsAPIService SubscriptionsAPI service +type SubscriptionsAPIService service type ApiCancelSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string acceptLanguage *string xChildCompanyId *string @@ -163,7 +163,7 @@ You can cancel the subscription to stop the plans that your customers consume @param id Identifier of the resource @return ApiCancelSubscriptionRequest */ -func (a *SubscriptionsApiService) CancelSubscription(ctx context.Context, id string) ApiCancelSubscriptionRequest { +func (a *SubscriptionsAPIService) CancelSubscription(ctx context.Context, id string) ApiCancelSubscriptionRequest { return ApiCancelSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -173,7 +173,7 @@ func (a *SubscriptionsApiService) CancelSubscription(ctx context.Context, id str // Execute executes the request // @return SubscriptionResponse -func (a *SubscriptionsApiService) CancelSubscriptionExecute(r ApiCancelSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) CancelSubscriptionExecute(r ApiCancelSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -181,7 +181,7 @@ func (a *SubscriptionsApiService) CancelSubscriptionExecute(r ApiCancelSubscript localVarReturnValue *SubscriptionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.CancelSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.CancelSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -287,7 +287,7 @@ func (a *SubscriptionsApiService) CancelSubscriptionExecute(r ApiCancelSubscript type ApiCreateSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string subscriptionRequest *SubscriptionRequest acceptLanguage *string @@ -325,7 +325,7 @@ You can create the subscription to include the plans that your customers consume @param id Identifier of the resource @return ApiCreateSubscriptionRequest */ -func (a *SubscriptionsApiService) CreateSubscription(ctx context.Context, id string) ApiCreateSubscriptionRequest { +func (a *SubscriptionsAPIService) CreateSubscription(ctx context.Context, id string) ApiCreateSubscriptionRequest { return ApiCreateSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -335,7 +335,7 @@ func (a *SubscriptionsApiService) CreateSubscription(ctx context.Context, id str // Execute executes the request // @return SubscriptionResponse -func (a *SubscriptionsApiService) CreateSubscriptionExecute(r ApiCreateSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) CreateSubscriptionExecute(r ApiCreateSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -343,7 +343,7 @@ func (a *SubscriptionsApiService) CreateSubscriptionExecute(r ApiCreateSubscript localVarReturnValue *SubscriptionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.CreateSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.CreateSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -465,7 +465,7 @@ func (a *SubscriptionsApiService) CreateSubscriptionExecute(r ApiCreateSubscript type ApiGetAllEventsFromSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string acceptLanguage *string xChildCompanyId *string @@ -496,7 +496,7 @@ You can get the events of the subscription(s) of a client, with the customer id @param id Identifier of the resource @return ApiGetAllEventsFromSubscriptionRequest */ -func (a *SubscriptionsApiService) GetAllEventsFromSubscription(ctx context.Context, id string) ApiGetAllEventsFromSubscriptionRequest { +func (a *SubscriptionsAPIService) GetAllEventsFromSubscription(ctx context.Context, id string) ApiGetAllEventsFromSubscriptionRequest { return ApiGetAllEventsFromSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -506,7 +506,7 @@ func (a *SubscriptionsApiService) GetAllEventsFromSubscription(ctx context.Conte // Execute executes the request // @return SubscriptionEventsResponse -func (a *SubscriptionsApiService) GetAllEventsFromSubscriptionExecute(r ApiGetAllEventsFromSubscriptionRequest) (*SubscriptionEventsResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) GetAllEventsFromSubscriptionExecute(r ApiGetAllEventsFromSubscriptionRequest) (*SubscriptionEventsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -514,7 +514,7 @@ func (a *SubscriptionsApiService) GetAllEventsFromSubscriptionExecute(r ApiGetAl localVarReturnValue *SubscriptionEventsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.GetAllEventsFromSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.GetAllEventsFromSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -642,7 +642,7 @@ func (a *SubscriptionsApiService) GetAllEventsFromSubscriptionExecute(r ApiGetAl type ApiGetSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string acceptLanguage *string } @@ -664,7 +664,7 @@ GetSubscription Get Subscription @param id Identifier of the resource @return ApiGetSubscriptionRequest */ -func (a *SubscriptionsApiService) GetSubscription(ctx context.Context, id string) ApiGetSubscriptionRequest { +func (a *SubscriptionsAPIService) GetSubscription(ctx context.Context, id string) ApiGetSubscriptionRequest { return ApiGetSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -674,7 +674,7 @@ func (a *SubscriptionsApiService) GetSubscription(ctx context.Context, id string // Execute executes the request // @return SubscriptionResponse -func (a *SubscriptionsApiService) GetSubscriptionExecute(r ApiGetSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) GetSubscriptionExecute(r ApiGetSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -682,7 +682,7 @@ func (a *SubscriptionsApiService) GetSubscriptionExecute(r ApiGetSubscriptionReq localVarReturnValue *SubscriptionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.GetSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.GetSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -785,7 +785,7 @@ func (a *SubscriptionsApiService) GetSubscriptionExecute(r ApiGetSubscriptionReq type ApiPauseSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string acceptLanguage *string xChildCompanyId *string @@ -816,7 +816,7 @@ You can pause the subscription to stop the plans that your customers consume @param id Identifier of the resource @return ApiPauseSubscriptionRequest */ -func (a *SubscriptionsApiService) PauseSubscription(ctx context.Context, id string) ApiPauseSubscriptionRequest { +func (a *SubscriptionsAPIService) PauseSubscription(ctx context.Context, id string) ApiPauseSubscriptionRequest { return ApiPauseSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -826,7 +826,7 @@ func (a *SubscriptionsApiService) PauseSubscription(ctx context.Context, id stri // Execute executes the request // @return SubscriptionResponse -func (a *SubscriptionsApiService) PauseSubscriptionExecute(r ApiPauseSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) PauseSubscriptionExecute(r ApiPauseSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -834,7 +834,7 @@ func (a *SubscriptionsApiService) PauseSubscriptionExecute(r ApiPauseSubscriptio localVarReturnValue *SubscriptionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.PauseSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.PauseSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -951,7 +951,7 @@ func (a *SubscriptionsApiService) PauseSubscriptionExecute(r ApiPauseSubscriptio type ApiResumeSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string acceptLanguage *string xChildCompanyId *string @@ -982,7 +982,7 @@ You can resume the subscription to start the plans that your customers consume @param id Identifier of the resource @return ApiResumeSubscriptionRequest */ -func (a *SubscriptionsApiService) ResumeSubscription(ctx context.Context, id string) ApiResumeSubscriptionRequest { +func (a *SubscriptionsAPIService) ResumeSubscription(ctx context.Context, id string) ApiResumeSubscriptionRequest { return ApiResumeSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -992,7 +992,7 @@ func (a *SubscriptionsApiService) ResumeSubscription(ctx context.Context, id str // Execute executes the request // @return SubscriptionResponse -func (a *SubscriptionsApiService) ResumeSubscriptionExecute(r ApiResumeSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) ResumeSubscriptionExecute(r ApiResumeSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -1000,7 +1000,7 @@ func (a *SubscriptionsApiService) ResumeSubscriptionExecute(r ApiResumeSubscript localVarReturnValue *SubscriptionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.ResumeSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.ResumeSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1128,7 +1128,7 @@ func (a *SubscriptionsApiService) ResumeSubscriptionExecute(r ApiResumeSubscript type ApiUpdateSubscriptionRequest struct { ctx context.Context - ApiService SubscriptionsApi + ApiService SubscriptionsAPI id string subscriptionUpdateRequest *SubscriptionUpdateRequest acceptLanguage *string @@ -1166,7 +1166,7 @@ You can modify the subscription to change the plans that your customers consume @param id Identifier of the resource @return ApiUpdateSubscriptionRequest */ -func (a *SubscriptionsApiService) UpdateSubscription(ctx context.Context, id string) ApiUpdateSubscriptionRequest { +func (a *SubscriptionsAPIService) UpdateSubscription(ctx context.Context, id string) ApiUpdateSubscriptionRequest { return ApiUpdateSubscriptionRequest{ ApiService: a, ctx: ctx, @@ -1176,7 +1176,7 @@ func (a *SubscriptionsApiService) UpdateSubscription(ctx context.Context, id str // Execute executes the request // @return SubscriptionResponse -func (a *SubscriptionsApiService) UpdateSubscriptionExecute(r ApiUpdateSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { +func (a *SubscriptionsAPIService) UpdateSubscriptionExecute(r ApiUpdateSubscriptionRequest) (*SubscriptionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1184,7 +1184,7 @@ func (a *SubscriptionsApiService) UpdateSubscriptionExecute(r ApiUpdateSubscript localVarReturnValue *SubscriptionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsApiService.UpdateSubscription") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SubscriptionsAPIService.UpdateSubscription") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_taxes.go b/api_taxes.go index ff3d480..018afe3 100644 --- a/api_taxes.go +++ b/api_taxes.go @@ -21,7 +21,7 @@ import ( ) -type TaxesApi interface { +type TaxesAPI interface { /* OrdersCreateTaxes Create Tax @@ -71,12 +71,12 @@ type TaxesApi interface { OrdersUpdateTaxesExecute(r ApiOrdersUpdateTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) } -// TaxesApiService TaxesApi service -type TaxesApiService service +// TaxesAPIService TaxesAPI service +type TaxesAPIService service type ApiOrdersCreateTaxesRequest struct { ctx context.Context - ApiService TaxesApi + ApiService TaxesAPI id string orderTaxRequest *OrderTaxRequest acceptLanguage *string @@ -114,7 +114,7 @@ Create new taxes for an existing orden @param id Identifier of the resource @return ApiOrdersCreateTaxesRequest */ -func (a *TaxesApiService) OrdersCreateTaxes(ctx context.Context, id string) ApiOrdersCreateTaxesRequest { +func (a *TaxesAPIService) OrdersCreateTaxes(ctx context.Context, id string) ApiOrdersCreateTaxesRequest { return ApiOrdersCreateTaxesRequest{ ApiService: a, ctx: ctx, @@ -124,7 +124,7 @@ func (a *TaxesApiService) OrdersCreateTaxes(ctx context.Context, id string) ApiO // Execute executes the request // @return UpdateOrderTaxResponse -func (a *TaxesApiService) OrdersCreateTaxesExecute(r ApiOrdersCreateTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) { +func (a *TaxesAPIService) OrdersCreateTaxesExecute(r ApiOrdersCreateTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -132,7 +132,7 @@ func (a *TaxesApiService) OrdersCreateTaxesExecute(r ApiOrdersCreateTaxesRequest localVarReturnValue *UpdateOrderTaxResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.OrdersCreateTaxes") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesAPIService.OrdersCreateTaxes") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -243,7 +243,7 @@ func (a *TaxesApiService) OrdersCreateTaxesExecute(r ApiOrdersCreateTaxesRequest type ApiOrdersDeleteTaxesRequest struct { ctx context.Context - ApiService TaxesApi + ApiService TaxesAPI id string taxId string acceptLanguage *string @@ -276,7 +276,7 @@ Delete taxes for an existing orden @param taxId identifier @return ApiOrdersDeleteTaxesRequest */ -func (a *TaxesApiService) OrdersDeleteTaxes(ctx context.Context, id string, taxId string) ApiOrdersDeleteTaxesRequest { +func (a *TaxesAPIService) OrdersDeleteTaxes(ctx context.Context, id string, taxId string) ApiOrdersDeleteTaxesRequest { return ApiOrdersDeleteTaxesRequest{ ApiService: a, ctx: ctx, @@ -287,7 +287,7 @@ func (a *TaxesApiService) OrdersDeleteTaxes(ctx context.Context, id string, taxI // Execute executes the request // @return UpdateOrderTaxResponse -func (a *TaxesApiService) OrdersDeleteTaxesExecute(r ApiOrdersDeleteTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) { +func (a *TaxesAPIService) OrdersDeleteTaxesExecute(r ApiOrdersDeleteTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -295,7 +295,7 @@ func (a *TaxesApiService) OrdersDeleteTaxesExecute(r ApiOrdersDeleteTaxesRequest localVarReturnValue *UpdateOrderTaxResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.OrdersDeleteTaxes") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesAPIService.OrdersDeleteTaxes") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -413,7 +413,7 @@ func (a *TaxesApiService) OrdersDeleteTaxesExecute(r ApiOrdersDeleteTaxesRequest type ApiOrdersUpdateTaxesRequest struct { ctx context.Context - ApiService TaxesApi + ApiService TaxesAPI id string taxId string updateOrderTaxRequest *UpdateOrderTaxRequest @@ -453,7 +453,7 @@ Update taxes for an existing orden @param taxId identifier @return ApiOrdersUpdateTaxesRequest */ -func (a *TaxesApiService) OrdersUpdateTaxes(ctx context.Context, id string, taxId string) ApiOrdersUpdateTaxesRequest { +func (a *TaxesAPIService) OrdersUpdateTaxes(ctx context.Context, id string, taxId string) ApiOrdersUpdateTaxesRequest { return ApiOrdersUpdateTaxesRequest{ ApiService: a, ctx: ctx, @@ -464,7 +464,7 @@ func (a *TaxesApiService) OrdersUpdateTaxes(ctx context.Context, id string, taxI // Execute executes the request // @return UpdateOrderTaxResponse -func (a *TaxesApiService) OrdersUpdateTaxesExecute(r ApiOrdersUpdateTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) { +func (a *TaxesAPIService) OrdersUpdateTaxesExecute(r ApiOrdersUpdateTaxesRequest) (*UpdateOrderTaxResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -472,7 +472,7 @@ func (a *TaxesApiService) OrdersUpdateTaxesExecute(r ApiOrdersUpdateTaxesRequest localVarReturnValue *UpdateOrderTaxResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesApiService.OrdersUpdateTaxes") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TaxesAPIService.OrdersUpdateTaxes") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_tokens.go b/api_tokens.go index 123ad1b..9929e13 100644 --- a/api_tokens.go +++ b/api_tokens.go @@ -20,7 +20,7 @@ import ( ) -type TokensApi interface { +type TokensAPI interface { /* CreateToken Create Token @@ -38,12 +38,12 @@ type TokensApi interface { CreateTokenExecute(r ApiCreateTokenRequest) (*TokenResponse, *http.Response, error) } -// TokensApiService TokensApi service -type TokensApiService service +// TokensAPIService TokensAPI service +type TokensAPIService service type ApiCreateTokenRequest struct { ctx context.Context - ApiService TokensApi + ApiService TokensAPI token *Token acceptLanguage *string } @@ -73,7 +73,7 @@ Generate a payment token, to associate it with a card @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateTokenRequest */ -func (a *TokensApiService) CreateToken(ctx context.Context) ApiCreateTokenRequest { +func (a *TokensAPIService) CreateToken(ctx context.Context) ApiCreateTokenRequest { return ApiCreateTokenRequest{ ApiService: a, ctx: ctx, @@ -82,7 +82,7 @@ func (a *TokensApiService) CreateToken(ctx context.Context) ApiCreateTokenReques // Execute executes the request // @return TokenResponse -func (a *TokensApiService) CreateTokenExecute(r ApiCreateTokenRequest) (*TokenResponse, *http.Response, error) { +func (a *TokensAPIService) CreateTokenExecute(r ApiCreateTokenRequest) (*TokenResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -90,7 +90,7 @@ func (a *TokensApiService) CreateTokenExecute(r ApiCreateTokenRequest) (*TokenRe localVarReturnValue *TokenResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokensApiService.CreateToken") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokensAPIService.CreateToken") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_transactions.go b/api_transactions.go index fdb8337..4a7f963 100644 --- a/api_transactions.go +++ b/api_transactions.go @@ -21,7 +21,7 @@ import ( ) -type TransactionsApi interface { +type TransactionsAPI interface { /* GetTransaction Get transaction @@ -53,12 +53,12 @@ type TransactionsApi interface { GetTransactionsExecute(r ApiGetTransactionsRequest) (*GetTransactionsResponse, *http.Response, error) } -// TransactionsApiService TransactionsApi service -type TransactionsApiService service +// TransactionsAPIService TransactionsAPI service +type TransactionsAPIService service type ApiGetTransactionRequest struct { ctx context.Context - ApiService TransactionsApi + ApiService TransactionsAPI id string acceptLanguage *string xChildCompanyId *string @@ -89,7 +89,7 @@ Get the details of a transaction @param id Identifier of the resource @return ApiGetTransactionRequest */ -func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string) ApiGetTransactionRequest { +func (a *TransactionsAPIService) GetTransaction(ctx context.Context, id string) ApiGetTransactionRequest { return ApiGetTransactionRequest{ ApiService: a, ctx: ctx, @@ -99,7 +99,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string) // Execute executes the request // @return TransactionResponse -func (a *TransactionsApiService) GetTransactionExecute(r ApiGetTransactionRequest) (*TransactionResponse, *http.Response, error) { +func (a *TransactionsAPIService) GetTransactionExecute(r ApiGetTransactionRequest) (*TransactionResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -107,7 +107,7 @@ func (a *TransactionsApiService) GetTransactionExecute(r ApiGetTransactionReques localVarReturnValue *TransactionResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsApiService.GetTransaction") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsAPIService.GetTransaction") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -213,13 +213,16 @@ func (a *TransactionsApiService) GetTransactionExecute(r ApiGetTransactionReques type ApiGetTransactionsRequest struct { ctx context.Context - ApiService TransactionsApi + ApiService TransactionsAPI acceptLanguage *string xChildCompanyId *string limit *int32 - search *string next *string previous *string + id *string + chargeId *string + type_ *string + currency *string } // Use for knowing which language to use @@ -240,12 +243,6 @@ func (r ApiGetTransactionsRequest) Limit(limit int32) ApiGetTransactionsRequest return r } -// General order search, e.g. by mail, reference etc. -func (r ApiGetTransactionsRequest) Search(search string) ApiGetTransactionsRequest { - r.search = &search - return r -} - // next page func (r ApiGetTransactionsRequest) Next(next string) ApiGetTransactionsRequest { r.next = &next @@ -258,6 +255,30 @@ func (r ApiGetTransactionsRequest) Previous(previous string) ApiGetTransactionsR return r } +// id of the object to be retrieved +func (r ApiGetTransactionsRequest) Id(id string) ApiGetTransactionsRequest { + r.id = &id + return r +} + +// id of the charge used for filtering +func (r ApiGetTransactionsRequest) ChargeId(chargeId string) ApiGetTransactionsRequest { + r.chargeId = &chargeId + return r +} + +// type of the object to be retrieved +func (r ApiGetTransactionsRequest) Type_(type_ string) ApiGetTransactionsRequest { + r.type_ = &type_ + return r +} + +// currency of the object to be retrieved +func (r ApiGetTransactionsRequest) Currency(currency string) ApiGetTransactionsRequest { + r.currency = ¤cy + return r +} + func (r ApiGetTransactionsRequest) Execute() (*GetTransactionsResponse, *http.Response, error) { return r.ApiService.GetTransactionsExecute(r) } @@ -270,7 +291,7 @@ Get transaction details in the form of a list @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetTransactionsRequest */ -func (a *TransactionsApiService) GetTransactions(ctx context.Context) ApiGetTransactionsRequest { +func (a *TransactionsAPIService) GetTransactions(ctx context.Context) ApiGetTransactionsRequest { return ApiGetTransactionsRequest{ ApiService: a, ctx: ctx, @@ -279,7 +300,7 @@ func (a *TransactionsApiService) GetTransactions(ctx context.Context) ApiGetTran // Execute executes the request // @return GetTransactionsResponse -func (a *TransactionsApiService) GetTransactionsExecute(r ApiGetTransactionsRequest) (*GetTransactionsResponse, *http.Response, error) { +func (a *TransactionsAPIService) GetTransactionsExecute(r ApiGetTransactionsRequest) (*GetTransactionsResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -287,7 +308,7 @@ func (a *TransactionsApiService) GetTransactionsExecute(r ApiGetTransactionsRequ localVarReturnValue *GetTransactionsResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsApiService.GetTransactions") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransactionsAPIService.GetTransactions") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -300,9 +321,9 @@ func (a *TransactionsApiService) GetTransactionsExecute(r ApiGetTransactionsRequ if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") - } - if r.search != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.next != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "next", r.next, "") @@ -310,6 +331,18 @@ func (a *TransactionsApiService) GetTransactionsExecute(r ApiGetTransactionsRequ if r.previous != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "previous", r.previous, "") } + if r.id != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "id", r.id, "") + } + if r.chargeId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "charge_id", r.chargeId, "") + } + if r.type_ != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "type", r.type_, "") + } + if r.currency != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "currency", r.currency, "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api_transfers.go b/api_transfers.go index 882d8bf..4b3fc62 100644 --- a/api_transfers.go +++ b/api_transfers.go @@ -21,7 +21,7 @@ import ( ) -type TransfersApi interface { +type TransfersAPI interface { /* GetTransfer Get Transfer @@ -53,12 +53,12 @@ type TransfersApi interface { GetTransfersExecute(r ApiGetTransfersRequest) (*GetTransfersResponse, *http.Response, error) } -// TransfersApiService TransfersApi service -type TransfersApiService service +// TransfersAPIService TransfersAPI service +type TransfersAPIService service type ApiGetTransferRequest struct { ctx context.Context - ApiService TransfersApi + ApiService TransfersAPI id string acceptLanguage *string xChildCompanyId *string @@ -89,7 +89,7 @@ Get the details of a Transfer @param id Identifier of the resource @return ApiGetTransferRequest */ -func (a *TransfersApiService) GetTransfer(ctx context.Context, id string) ApiGetTransferRequest { +func (a *TransfersAPIService) GetTransfer(ctx context.Context, id string) ApiGetTransferRequest { return ApiGetTransferRequest{ ApiService: a, ctx: ctx, @@ -99,7 +99,7 @@ func (a *TransfersApiService) GetTransfer(ctx context.Context, id string) ApiGet // Execute executes the request // @return TransferResponse -func (a *TransfersApiService) GetTransferExecute(r ApiGetTransferRequest) (*TransferResponse, *http.Response, error) { +func (a *TransfersAPIService) GetTransferExecute(r ApiGetTransferRequest) (*TransferResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -107,7 +107,7 @@ func (a *TransfersApiService) GetTransferExecute(r ApiGetTransferRequest) (*Tran localVarReturnValue *TransferResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransfersApiService.GetTransfer") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransfersAPIService.GetTransfer") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -213,7 +213,7 @@ func (a *TransfersApiService) GetTransferExecute(r ApiGetTransferRequest) (*Tran type ApiGetTransfersRequest struct { ctx context.Context - ApiService TransfersApi + ApiService TransfersAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -270,7 +270,7 @@ Get transfers details in the form of a list @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetTransfersRequest */ -func (a *TransfersApiService) GetTransfers(ctx context.Context) ApiGetTransfersRequest { +func (a *TransfersAPIService) GetTransfers(ctx context.Context) ApiGetTransfersRequest { return ApiGetTransfersRequest{ ApiService: a, ctx: ctx, @@ -279,7 +279,7 @@ func (a *TransfersApiService) GetTransfers(ctx context.Context) ApiGetTransfersR // Execute executes the request // @return GetTransfersResponse -func (a *TransfersApiService) GetTransfersExecute(r ApiGetTransfersRequest) (*GetTransfersResponse, *http.Response, error) { +func (a *TransfersAPIService) GetTransfersExecute(r ApiGetTransfersRequest) (*GetTransfersResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -287,7 +287,7 @@ func (a *TransfersApiService) GetTransfersExecute(r ApiGetTransfersRequest) (*Ge localVarReturnValue *GetTransfersResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransfersApiService.GetTransfers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TransfersAPIService.GetTransfers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -300,6 +300,9 @@ func (a *TransfersApiService) GetTransfersExecute(r ApiGetTransfersRequest) (*Ge if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") diff --git a/api_webhook_keys.go b/api_webhook_keys.go index be3ee57..d6236ac 100644 --- a/api_webhook_keys.go +++ b/api_webhook_keys.go @@ -21,7 +21,7 @@ import ( ) -type WebhookKeysApi interface { +type WebhookKeysAPI interface { /* CreateWebhookKey Create Webhook Key @@ -93,12 +93,12 @@ type WebhookKeysApi interface { UpdateWebhookKeyExecute(r ApiUpdateWebhookKeyRequest) (*WebhookKeyResponse, *http.Response, error) } -// WebhookKeysApiService WebhookKeysApi service -type WebhookKeysApiService service +// WebhookKeysAPIService WebhookKeysAPI service +type WebhookKeysAPIService service type ApiCreateWebhookKeyRequest struct { ctx context.Context - ApiService WebhookKeysApi + ApiService WebhookKeysAPI acceptLanguage *string webhookKeyRequest *WebhookKeyRequest } @@ -126,7 +126,7 @@ Create a webhook key @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateWebhookKeyRequest */ -func (a *WebhookKeysApiService) CreateWebhookKey(ctx context.Context) ApiCreateWebhookKeyRequest { +func (a *WebhookKeysAPIService) CreateWebhookKey(ctx context.Context) ApiCreateWebhookKeyRequest { return ApiCreateWebhookKeyRequest{ ApiService: a, ctx: ctx, @@ -135,7 +135,7 @@ func (a *WebhookKeysApiService) CreateWebhookKey(ctx context.Context) ApiCreateW // Execute executes the request // @return WebhookKeyCreateResponse -func (a *WebhookKeysApiService) CreateWebhookKeyExecute(r ApiCreateWebhookKeyRequest) (*WebhookKeyCreateResponse, *http.Response, error) { +func (a *WebhookKeysAPIService) CreateWebhookKeyExecute(r ApiCreateWebhookKeyRequest) (*WebhookKeyCreateResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -143,7 +143,7 @@ func (a *WebhookKeysApiService) CreateWebhookKeyExecute(r ApiCreateWebhookKeyReq localVarReturnValue *WebhookKeyCreateResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysApiService.CreateWebhookKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysAPIService.CreateWebhookKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -236,7 +236,7 @@ func (a *WebhookKeysApiService) CreateWebhookKeyExecute(r ApiCreateWebhookKeyReq type ApiDeleteWebhookKeyRequest struct { ctx context.Context - ApiService WebhookKeysApi + ApiService WebhookKeysAPI id string acceptLanguage *string } @@ -258,7 +258,7 @@ DeleteWebhookKey Delete Webhook key @param id Identifier of the resource @return ApiDeleteWebhookKeyRequest */ -func (a *WebhookKeysApiService) DeleteWebhookKey(ctx context.Context, id string) ApiDeleteWebhookKeyRequest { +func (a *WebhookKeysAPIService) DeleteWebhookKey(ctx context.Context, id string) ApiDeleteWebhookKeyRequest { return ApiDeleteWebhookKeyRequest{ ApiService: a, ctx: ctx, @@ -268,7 +268,7 @@ func (a *WebhookKeysApiService) DeleteWebhookKey(ctx context.Context, id string) // Execute executes the request // @return WebhookKeyDeleteResponse -func (a *WebhookKeysApiService) DeleteWebhookKeyExecute(r ApiDeleteWebhookKeyRequest) (*WebhookKeyDeleteResponse, *http.Response, error) { +func (a *WebhookKeysAPIService) DeleteWebhookKeyExecute(r ApiDeleteWebhookKeyRequest) (*WebhookKeyDeleteResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -276,7 +276,7 @@ func (a *WebhookKeysApiService) DeleteWebhookKeyExecute(r ApiDeleteWebhookKeyReq localVarReturnValue *WebhookKeyDeleteResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysApiService.DeleteWebhookKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysAPIService.DeleteWebhookKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -379,7 +379,7 @@ func (a *WebhookKeysApiService) DeleteWebhookKeyExecute(r ApiDeleteWebhookKeyReq type ApiGetWebhookKeyRequest struct { ctx context.Context - ApiService WebhookKeysApi + ApiService WebhookKeysAPI id string acceptLanguage *string xChildCompanyId *string @@ -408,7 +408,7 @@ GetWebhookKey Get Webhook Key @param id Identifier of the resource @return ApiGetWebhookKeyRequest */ -func (a *WebhookKeysApiService) GetWebhookKey(ctx context.Context, id string) ApiGetWebhookKeyRequest { +func (a *WebhookKeysAPIService) GetWebhookKey(ctx context.Context, id string) ApiGetWebhookKeyRequest { return ApiGetWebhookKeyRequest{ ApiService: a, ctx: ctx, @@ -418,7 +418,7 @@ func (a *WebhookKeysApiService) GetWebhookKey(ctx context.Context, id string) Ap // Execute executes the request // @return WebhookKeyResponse -func (a *WebhookKeysApiService) GetWebhookKeyExecute(r ApiGetWebhookKeyRequest) (*WebhookKeyResponse, *http.Response, error) { +func (a *WebhookKeysAPIService) GetWebhookKeyExecute(r ApiGetWebhookKeyRequest) (*WebhookKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -426,7 +426,7 @@ func (a *WebhookKeysApiService) GetWebhookKeyExecute(r ApiGetWebhookKeyRequest) localVarReturnValue *WebhookKeyResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysApiService.GetWebhookKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysAPIService.GetWebhookKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -532,7 +532,7 @@ func (a *WebhookKeysApiService) GetWebhookKeyExecute(r ApiGetWebhookKeyRequest) type ApiGetWebhookKeysRequest struct { ctx context.Context - ApiService WebhookKeysApi + ApiService WebhookKeysAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -589,7 +589,7 @@ Consume the list of webhook keys you have @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetWebhookKeysRequest */ -func (a *WebhookKeysApiService) GetWebhookKeys(ctx context.Context) ApiGetWebhookKeysRequest { +func (a *WebhookKeysAPIService) GetWebhookKeys(ctx context.Context) ApiGetWebhookKeysRequest { return ApiGetWebhookKeysRequest{ ApiService: a, ctx: ctx, @@ -598,7 +598,7 @@ func (a *WebhookKeysApiService) GetWebhookKeys(ctx context.Context) ApiGetWebhoo // Execute executes the request // @return GetWebhookKeysResponse -func (a *WebhookKeysApiService) GetWebhookKeysExecute(r ApiGetWebhookKeysRequest) (*GetWebhookKeysResponse, *http.Response, error) { +func (a *WebhookKeysAPIService) GetWebhookKeysExecute(r ApiGetWebhookKeysRequest) (*GetWebhookKeysResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -606,7 +606,7 @@ func (a *WebhookKeysApiService) GetWebhookKeysExecute(r ApiGetWebhookKeysRequest localVarReturnValue *GetWebhookKeysResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysApiService.GetWebhookKeys") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysAPIService.GetWebhookKeys") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -619,6 +619,9 @@ func (a *WebhookKeysApiService) GetWebhookKeysExecute(r ApiGetWebhookKeysRequest if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -712,7 +715,7 @@ func (a *WebhookKeysApiService) GetWebhookKeysExecute(r ApiGetWebhookKeysRequest type ApiUpdateWebhookKeyRequest struct { ctx context.Context - ApiService WebhookKeysApi + ApiService WebhookKeysAPI id string acceptLanguage *string webhookKeyUpdateRequest *WebhookKeyUpdateRequest @@ -742,7 +745,7 @@ updates an existing webhook key @param id Identifier of the resource @return ApiUpdateWebhookKeyRequest */ -func (a *WebhookKeysApiService) UpdateWebhookKey(ctx context.Context, id string) ApiUpdateWebhookKeyRequest { +func (a *WebhookKeysAPIService) UpdateWebhookKey(ctx context.Context, id string) ApiUpdateWebhookKeyRequest { return ApiUpdateWebhookKeyRequest{ ApiService: a, ctx: ctx, @@ -752,7 +755,7 @@ func (a *WebhookKeysApiService) UpdateWebhookKey(ctx context.Context, id string) // Execute executes the request // @return WebhookKeyResponse -func (a *WebhookKeysApiService) UpdateWebhookKeyExecute(r ApiUpdateWebhookKeyRequest) (*WebhookKeyResponse, *http.Response, error) { +func (a *WebhookKeysAPIService) UpdateWebhookKeyExecute(r ApiUpdateWebhookKeyRequest) (*WebhookKeyResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -760,7 +763,7 @@ func (a *WebhookKeysApiService) UpdateWebhookKeyExecute(r ApiUpdateWebhookKeyReq localVarReturnValue *WebhookKeyResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysApiService.UpdateWebhookKey") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhookKeysAPIService.UpdateWebhookKey") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/api_webhooks.go b/api_webhooks.go index a054c82..689be52 100644 --- a/api_webhooks.go +++ b/api_webhooks.go @@ -21,7 +21,7 @@ import ( ) -type WebhooksApi interface { +type WebhooksAPI interface { /* CreateWebhook Create Webhook @@ -108,12 +108,12 @@ type WebhooksApi interface { UpdateWebhookExecute(r ApiUpdateWebhookRequest) (*WebhookResponse, *http.Response, error) } -// WebhooksApiService WebhooksApi service -type WebhooksApiService service +// WebhooksAPIService WebhooksAPI service +type WebhooksAPIService service type ApiCreateWebhookRequest struct { ctx context.Context - ApiService WebhooksApi + ApiService WebhooksAPI webhookRequest *WebhookRequest acceptLanguage *string } @@ -142,7 +142,7 @@ What we do at Conekta translates into events. For example, an event of interest @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateWebhookRequest */ -func (a *WebhooksApiService) CreateWebhook(ctx context.Context) ApiCreateWebhookRequest { +func (a *WebhooksAPIService) CreateWebhook(ctx context.Context) ApiCreateWebhookRequest { return ApiCreateWebhookRequest{ ApiService: a, ctx: ctx, @@ -151,7 +151,7 @@ func (a *WebhooksApiService) CreateWebhook(ctx context.Context) ApiCreateWebhook // Execute executes the request // @return WebhookResponse -func (a *WebhooksApiService) CreateWebhookExecute(r ApiCreateWebhookRequest) (*WebhookResponse, *http.Response, error) { +func (a *WebhooksAPIService) CreateWebhookExecute(r ApiCreateWebhookRequest) (*WebhookResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -159,7 +159,7 @@ func (a *WebhooksApiService) CreateWebhookExecute(r ApiCreateWebhookRequest) (*W localVarReturnValue *WebhookResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksApiService.CreateWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.CreateWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -255,7 +255,7 @@ func (a *WebhooksApiService) CreateWebhookExecute(r ApiCreateWebhookRequest) (*W type ApiDeleteWebhookRequest struct { ctx context.Context - ApiService WebhooksApi + ApiService WebhooksAPI id string acceptLanguage *string } @@ -277,7 +277,7 @@ DeleteWebhook Delete Webhook @param id Identifier of the resource @return ApiDeleteWebhookRequest */ -func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string) ApiDeleteWebhookRequest { +func (a *WebhooksAPIService) DeleteWebhook(ctx context.Context, id string) ApiDeleteWebhookRequest { return ApiDeleteWebhookRequest{ ApiService: a, ctx: ctx, @@ -287,7 +287,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string) ApiDe // Execute executes the request // @return WebhookResponse -func (a *WebhooksApiService) DeleteWebhookExecute(r ApiDeleteWebhookRequest) (*WebhookResponse, *http.Response, error) { +func (a *WebhooksAPIService) DeleteWebhookExecute(r ApiDeleteWebhookRequest) (*WebhookResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -295,7 +295,7 @@ func (a *WebhooksApiService) DeleteWebhookExecute(r ApiDeleteWebhookRequest) (*W localVarReturnValue *WebhookResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksApiService.DeleteWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.DeleteWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -398,7 +398,7 @@ func (a *WebhooksApiService) DeleteWebhookExecute(r ApiDeleteWebhookRequest) (*W type ApiGetWebhookRequest struct { ctx context.Context - ApiService WebhooksApi + ApiService WebhooksAPI id string acceptLanguage *string xChildCompanyId *string @@ -427,7 +427,7 @@ GetWebhook Get Webhook @param id Identifier of the resource @return ApiGetWebhookRequest */ -func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string) ApiGetWebhookRequest { +func (a *WebhooksAPIService) GetWebhook(ctx context.Context, id string) ApiGetWebhookRequest { return ApiGetWebhookRequest{ ApiService: a, ctx: ctx, @@ -437,7 +437,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string) ApiGetWe // Execute executes the request // @return WebhookResponse -func (a *WebhooksApiService) GetWebhookExecute(r ApiGetWebhookRequest) (*WebhookResponse, *http.Response, error) { +func (a *WebhooksAPIService) GetWebhookExecute(r ApiGetWebhookRequest) (*WebhookResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -445,7 +445,7 @@ func (a *WebhooksApiService) GetWebhookExecute(r ApiGetWebhookRequest) (*Webhook localVarReturnValue *WebhookResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksApiService.GetWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.GetWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -551,7 +551,7 @@ func (a *WebhooksApiService) GetWebhookExecute(r ApiGetWebhookRequest) (*Webhook type ApiGetWebhooksRequest struct { ctx context.Context - ApiService WebhooksApi + ApiService WebhooksAPI acceptLanguage *string xChildCompanyId *string limit *int32 @@ -608,7 +608,7 @@ Consume the list of webhooks you have, each environment supports 10 webhooks (Fo @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiGetWebhooksRequest */ -func (a *WebhooksApiService) GetWebhooks(ctx context.Context) ApiGetWebhooksRequest { +func (a *WebhooksAPIService) GetWebhooks(ctx context.Context) ApiGetWebhooksRequest { return ApiGetWebhooksRequest{ ApiService: a, ctx: ctx, @@ -617,7 +617,7 @@ func (a *WebhooksApiService) GetWebhooks(ctx context.Context) ApiGetWebhooksRequ // Execute executes the request // @return GetWebhooksResponse -func (a *WebhooksApiService) GetWebhooksExecute(r ApiGetWebhooksRequest) (*GetWebhooksResponse, *http.Response, error) { +func (a *WebhooksAPIService) GetWebhooksExecute(r ApiGetWebhooksRequest) (*GetWebhooksResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -625,7 +625,7 @@ func (a *WebhooksApiService) GetWebhooksExecute(r ApiGetWebhooksRequest) (*GetWe localVarReturnValue *GetWebhooksResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksApiService.GetWebhooks") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.GetWebhooks") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -638,6 +638,9 @@ func (a *WebhooksApiService) GetWebhooksExecute(r ApiGetWebhooksRequest) (*GetWe if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "") + } else { + var defaultValue int32 = 20 + r.limit = &defaultValue } if r.search != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "") @@ -731,7 +734,7 @@ func (a *WebhooksApiService) GetWebhooksExecute(r ApiGetWebhooksRequest) (*GetWe type ApiTestWebhookRequest struct { ctx context.Context - ApiService WebhooksApi + ApiService WebhooksAPI id string acceptLanguage *string } @@ -755,7 +758,7 @@ Send a webhook.ping event @param id Identifier of the resource @return ApiTestWebhookRequest */ -func (a *WebhooksApiService) TestWebhook(ctx context.Context, id string) ApiTestWebhookRequest { +func (a *WebhooksAPIService) TestWebhook(ctx context.Context, id string) ApiTestWebhookRequest { return ApiTestWebhookRequest{ ApiService: a, ctx: ctx, @@ -765,7 +768,7 @@ func (a *WebhooksApiService) TestWebhook(ctx context.Context, id string) ApiTest // Execute executes the request // @return WebhookResponse -func (a *WebhooksApiService) TestWebhookExecute(r ApiTestWebhookRequest) (*WebhookResponse, *http.Response, error) { +func (a *WebhooksAPIService) TestWebhookExecute(r ApiTestWebhookRequest) (*WebhookResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -773,7 +776,7 @@ func (a *WebhooksApiService) TestWebhookExecute(r ApiTestWebhookRequest) (*Webho localVarReturnValue *WebhookResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksApiService.TestWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.TestWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -876,7 +879,7 @@ func (a *WebhooksApiService) TestWebhookExecute(r ApiTestWebhookRequest) (*Webho type ApiUpdateWebhookRequest struct { ctx context.Context - ApiService WebhooksApi + ApiService WebhooksAPI id string webhookUpdateRequest *WebhookUpdateRequest acceptLanguage *string @@ -914,7 +917,7 @@ updates an existing webhook @param id Identifier of the resource @return ApiUpdateWebhookRequest */ -func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, id string) ApiUpdateWebhookRequest { +func (a *WebhooksAPIService) UpdateWebhook(ctx context.Context, id string) ApiUpdateWebhookRequest { return ApiUpdateWebhookRequest{ ApiService: a, ctx: ctx, @@ -924,7 +927,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, id string) ApiUp // Execute executes the request // @return WebhookResponse -func (a *WebhooksApiService) UpdateWebhookExecute(r ApiUpdateWebhookRequest) (*WebhookResponse, *http.Response, error) { +func (a *WebhooksAPIService) UpdateWebhookExecute(r ApiUpdateWebhookRequest) (*WebhookResponse, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -932,7 +935,7 @@ func (a *WebhooksApiService) UpdateWebhookExecute(r ApiUpdateWebhookRequest) (*W localVarReturnValue *WebhookResponse ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksApiService.UpdateWebhook") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WebhooksAPIService.UpdateWebhook") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/client.go b/client.go index 46c6d18..7b3d936 100644 --- a/client.go +++ b/client.go @@ -58,51 +58,51 @@ type APIClient struct { // API Services - AntifraudApi AntifraudApi + AntifraudAPI AntifraudAPI - ApiKeysApi ApiKeysApi + ApiKeysAPI ApiKeysAPI - BalancesApi BalancesApi + BalancesAPI BalancesAPI - ChargesApi ChargesApi + ChargesAPI ChargesAPI - CompaniesApi CompaniesApi + CompaniesAPI CompaniesAPI - CustomersApi CustomersApi + CustomersAPI CustomersAPI - DiscountsApi DiscountsApi + DiscountsAPI DiscountsAPI - EventsApi EventsApi + EventsAPI EventsAPI - LogsApi LogsApi + LogsAPI LogsAPI - OrdersApi OrdersApi + OrdersAPI OrdersAPI - PaymentLinkApi PaymentLinkApi + PaymentLinkAPI PaymentLinkAPI - PaymentMethodsApi PaymentMethodsApi + PaymentMethodsAPI PaymentMethodsAPI - PlansApi PlansApi + PlansAPI PlansAPI - ProductsApi ProductsApi + ProductsAPI ProductsAPI - ShippingContactsApi ShippingContactsApi + ShippingContactsAPI ShippingContactsAPI - ShippingsApi ShippingsApi + ShippingsAPI ShippingsAPI - SubscriptionsApi SubscriptionsApi + SubscriptionsAPI SubscriptionsAPI - TaxesApi TaxesApi + TaxesAPI TaxesAPI - TokensApi TokensApi + TokensAPI TokensAPI - TransactionsApi TransactionsApi + TransactionsAPI TransactionsAPI - TransfersApi TransfersApi + TransfersAPI TransfersAPI - WebhookKeysApi WebhookKeysApi + WebhookKeysAPI WebhookKeysAPI - WebhooksApi WebhooksApi + WebhooksAPI WebhooksAPI } @@ -112,7 +112,7 @@ func init() { func initUserAgent() { data := map[string]string{ - "bindings_version": "6.0.2", + "bindings_version": "6.0.3", "lang": "go", "lang_version": runtime.Version(), "publisher": "conekta", @@ -159,29 +159,29 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AntifraudApi = (*AntifraudApiService)(&c.common) - c.ApiKeysApi = (*ApiKeysApiService)(&c.common) - c.BalancesApi = (*BalancesApiService)(&c.common) - c.ChargesApi = (*ChargesApiService)(&c.common) - c.CompaniesApi = (*CompaniesApiService)(&c.common) - c.CustomersApi = (*CustomersApiService)(&c.common) - c.DiscountsApi = (*DiscountsApiService)(&c.common) - c.EventsApi = (*EventsApiService)(&c.common) - c.LogsApi = (*LogsApiService)(&c.common) - c.OrdersApi = (*OrdersApiService)(&c.common) - c.PaymentLinkApi = (*PaymentLinkApiService)(&c.common) - c.PaymentMethodsApi = (*PaymentMethodsApiService)(&c.common) - c.PlansApi = (*PlansApiService)(&c.common) - c.ProductsApi = (*ProductsApiService)(&c.common) - c.ShippingContactsApi = (*ShippingContactsApiService)(&c.common) - c.ShippingsApi = (*ShippingsApiService)(&c.common) - c.SubscriptionsApi = (*SubscriptionsApiService)(&c.common) - c.TaxesApi = (*TaxesApiService)(&c.common) - c.TokensApi = (*TokensApiService)(&c.common) - c.TransactionsApi = (*TransactionsApiService)(&c.common) - c.TransfersApi = (*TransfersApiService)(&c.common) - c.WebhookKeysApi = (*WebhookKeysApiService)(&c.common) - c.WebhooksApi = (*WebhooksApiService)(&c.common) + c.AntifraudAPI = (*AntifraudAPIService)(&c.common) + c.ApiKeysAPI = (*ApiKeysAPIService)(&c.common) + c.BalancesAPI = (*BalancesAPIService)(&c.common) + c.ChargesAPI = (*ChargesAPIService)(&c.common) + c.CompaniesAPI = (*CompaniesAPIService)(&c.common) + c.CustomersAPI = (*CustomersAPIService)(&c.common) + c.DiscountsAPI = (*DiscountsAPIService)(&c.common) + c.EventsAPI = (*EventsAPIService)(&c.common) + c.LogsAPI = (*LogsAPIService)(&c.common) + c.OrdersAPI = (*OrdersAPIService)(&c.common) + c.PaymentLinkAPI = (*PaymentLinkAPIService)(&c.common) + c.PaymentMethodsAPI = (*PaymentMethodsAPIService)(&c.common) + c.PlansAPI = (*PlansAPIService)(&c.common) + c.ProductsAPI = (*ProductsAPIService)(&c.common) + c.ShippingContactsAPI = (*ShippingContactsAPIService)(&c.common) + c.ShippingsAPI = (*ShippingsAPIService)(&c.common) + c.SubscriptionsAPI = (*SubscriptionsAPIService)(&c.common) + c.TaxesAPI = (*TaxesAPIService)(&c.common) + c.TokensAPI = (*TokensAPIService)(&c.common) + c.TransactionsAPI = (*TransactionsAPIService)(&c.common) + c.TransfersAPI = (*TransfersAPIService)(&c.common) + c.WebhookKeysAPI = (*WebhookKeysAPIService)(&c.common) + c.WebhooksAPI = (*WebhooksAPIService)(&c.common) return c } diff --git a/config-go.json b/config-go.json new file mode 100644 index 0000000..7cb30ff --- /dev/null +++ b/config-go.json @@ -0,0 +1,18 @@ +{ + "packageVersion": "6.0.3", + "packageName": "conekta", + "hideGenerationTimestamp": false, + "generateInterfaces": true, + "disallowAdditionalPropertiesIfNotPresent": true, + "gitUserId": "conekta", + "gitRepoId": "conekta-go", + "httpUserAgent": "Conekta/v2 GoBindings/6.0.2", + "files": { + "/local/CODE_OF_CONDUCT.md" : {}, + "/local/AUTHORS.md": {}, + "/local/LICENSE": {}, + "/local/conekta.png" : {} + }, + "templateDir": "/local/templates/go", + "useOneOfDiscriminatorLookup": true +} \ No newline at end of file diff --git a/docs/AntifraudApi.md b/docs/AntifraudApi.md index 7811356..b81beea 100644 --- a/docs/AntifraudApi.md +++ b/docs/AntifraudApi.md @@ -1,15 +1,15 @@ -# \AntifraudApi +# \AntifraudAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateRuleBlacklist**](AntifraudApi.md#CreateRuleBlacklist) | **Post** /antifraud/blacklists | Create blacklisted rule -[**CreateRuleWhitelist**](AntifraudApi.md#CreateRuleWhitelist) | **Post** /antifraud/whitelists | Create whitelisted rule -[**DeleteRuleBlacklist**](AntifraudApi.md#DeleteRuleBlacklist) | **Delete** /antifraud/blacklists/{id} | Delete blacklisted rule -[**DeleteRuleWhitelist**](AntifraudApi.md#DeleteRuleWhitelist) | **Delete** /antifraud/whitelists/{id} | Delete whitelisted rule -[**GetRuleBlacklist**](AntifraudApi.md#GetRuleBlacklist) | **Get** /antifraud/blacklists | Get list of blacklisted rules -[**GetRuleWhitelist**](AntifraudApi.md#GetRuleWhitelist) | **Get** /antifraud/whitelists | Get a list of whitelisted rules +[**CreateRuleBlacklist**](AntifraudAPI.md#CreateRuleBlacklist) | **Post** /antifraud/blacklists | Create blacklisted rule +[**CreateRuleWhitelist**](AntifraudAPI.md#CreateRuleWhitelist) | **Post** /antifraud/whitelists | Create whitelisted rule +[**DeleteRuleBlacklist**](AntifraudAPI.md#DeleteRuleBlacklist) | **Delete** /antifraud/blacklists/{id} | Delete blacklisted rule +[**DeleteRuleWhitelist**](AntifraudAPI.md#DeleteRuleWhitelist) | **Delete** /antifraud/whitelists/{id} | Delete whitelisted rule +[**GetRuleBlacklist**](AntifraudAPI.md#GetRuleBlacklist) | **Get** /antifraud/blacklists | Get list of blacklisted rules +[**GetRuleWhitelist**](AntifraudAPI.md#GetRuleWhitelist) | **Get** /antifraud/whitelists | Get a list of whitelisted rules @@ -32,18 +32,18 @@ import ( ) func main() { - createRiskRulesData := *openapiclient.NewCreateRiskRulesData("this client's email was verified at 20/09/22 by internal process", "email | phone | card_token", "email@example.com | 818081808180 | src_2qUCNd5AyQqfPMBuV") // CreateRiskRulesData | requested field for blacklist rule + createRiskRulesData := *openapiclient.NewCreateRiskRulesData("this client email was verified at 20/09/22 by internal process", "email | phone | card_token", "email@example.com | 818081808180 | src_2qUCNd5AyQqfPMBuV") // CreateRiskRulesData | requested field for blacklist rule acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AntifraudApi.CreateRuleBlacklist(context.Background()).CreateRiskRulesData(createRiskRulesData).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.AntifraudAPI.CreateRuleBlacklist(context.Background()).CreateRiskRulesData(createRiskRulesData).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AntifraudApi.CreateRuleBlacklist``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `AntifraudAPI.CreateRuleBlacklist``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateRuleBlacklist`: BlacklistRuleResponse - fmt.Fprintf(os.Stdout, "Response from `AntifraudApi.CreateRuleBlacklist`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `AntifraudAPI.CreateRuleBlacklist`: %v\n", resp) } ``` @@ -99,17 +99,17 @@ import ( func main() { acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") - createRiskRulesData := *openapiclient.NewCreateRiskRulesData("this client's email was verified at 20/09/22 by internal process", "email | phone | card_token", "email@example.com | 818081808180 | src_2qUCNd5AyQqfPMBuV") // CreateRiskRulesData | (optional) + createRiskRulesData := *openapiclient.NewCreateRiskRulesData("this client email was verified at 20/09/22 by internal process", "email | phone | card_token", "email@example.com | 818081808180 | src_2qUCNd5AyQqfPMBuV") // CreateRiskRulesData | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AntifraudApi.CreateRuleWhitelist(context.Background()).AcceptLanguage(acceptLanguage).CreateRiskRulesData(createRiskRulesData).Execute() + resp, r, err := apiClient.AntifraudAPI.CreateRuleWhitelist(context.Background()).AcceptLanguage(acceptLanguage).CreateRiskRulesData(createRiskRulesData).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AntifraudApi.CreateRuleWhitelist``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `AntifraudAPI.CreateRuleWhitelist``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateRuleWhitelist`: WhitelistlistRuleResponse - fmt.Fprintf(os.Stdout, "Response from `AntifraudApi.CreateRuleWhitelist`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `AntifraudAPI.CreateRuleWhitelist`: %v\n", resp) } ``` @@ -170,13 +170,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AntifraudApi.DeleteRuleBlacklist(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.AntifraudAPI.DeleteRuleBlacklist(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AntifraudApi.DeleteRuleBlacklist``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `AntifraudAPI.DeleteRuleBlacklist``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteRuleBlacklist`: DeletedBlacklistRuleResponse - fmt.Fprintf(os.Stdout, "Response from `AntifraudApi.DeleteRuleBlacklist`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `AntifraudAPI.DeleteRuleBlacklist`: %v\n", resp) } ``` @@ -242,13 +242,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AntifraudApi.DeleteRuleWhitelist(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.AntifraudAPI.DeleteRuleWhitelist(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AntifraudApi.DeleteRuleWhitelist``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `AntifraudAPI.DeleteRuleWhitelist``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteRuleWhitelist`: DeletedWhitelistRuleResponse - fmt.Fprintf(os.Stdout, "Response from `AntifraudApi.DeleteRuleWhitelist`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `AntifraudAPI.DeleteRuleWhitelist`: %v\n", resp) } ``` @@ -314,13 +314,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AntifraudApi.GetRuleBlacklist(context.Background()).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.AntifraudAPI.GetRuleBlacklist(context.Background()).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AntifraudApi.GetRuleBlacklist``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `AntifraudAPI.GetRuleBlacklist``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetRuleBlacklist`: RiskRulesList - fmt.Fprintf(os.Stdout, "Response from `AntifraudApi.GetRuleBlacklist`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `AntifraudAPI.GetRuleBlacklist`: %v\n", resp) } ``` @@ -380,13 +380,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AntifraudApi.GetRuleWhitelist(context.Background()).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.AntifraudAPI.GetRuleWhitelist(context.Background()).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AntifraudApi.GetRuleWhitelist``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `AntifraudAPI.GetRuleWhitelist``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetRuleWhitelist`: RiskRulesList - fmt.Fprintf(os.Stdout, "Response from `AntifraudApi.GetRuleWhitelist`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `AntifraudAPI.GetRuleWhitelist`: %v\n", resp) } ``` diff --git a/docs/ApiKeysApi.md b/docs/ApiKeysApi.md index 9637a27..bb0b007 100644 --- a/docs/ApiKeysApi.md +++ b/docs/ApiKeysApi.md @@ -1,14 +1,14 @@ -# \ApiKeysApi +# \ApiKeysAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateApiKey**](ApiKeysApi.md#CreateApiKey) | **Post** /api_keys | Create Api Key -[**DeleteApiKey**](ApiKeysApi.md#DeleteApiKey) | **Delete** /api_keys/{id} | Delete Api Key -[**GetApiKey**](ApiKeysApi.md#GetApiKey) | **Get** /api_keys/{id} | Get Api Key -[**GetApiKeys**](ApiKeysApi.md#GetApiKeys) | **Get** /api_keys | Get list of Api Keys -[**UpdateApiKey**](ApiKeysApi.md#UpdateApiKey) | **Put** /api_keys/{id} | Update Api Key +[**CreateApiKey**](ApiKeysAPI.md#CreateApiKey) | **Post** /api_keys | Create Api Key +[**DeleteApiKey**](ApiKeysAPI.md#DeleteApiKey) | **Delete** /api_keys/{id} | Delete Api Key +[**GetApiKey**](ApiKeysAPI.md#GetApiKey) | **Get** /api_keys/{id} | Get Api Key +[**GetApiKeys**](ApiKeysAPI.md#GetApiKeys) | **Get** /api_keys | Get list of Api Keys +[**UpdateApiKey**](ApiKeysAPI.md#UpdateApiKey) | **Put** /api_keys/{id} | Update Api Key @@ -39,13 +39,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ApiKeysApi.CreateApiKey(context.Background()).ApiKeyRequest(apiKeyRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ApiKeysAPI.CreateApiKey(context.Background()).ApiKeyRequest(apiKeyRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysApi.CreateApiKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysAPI.CreateApiKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateApiKey`: ApiKeyCreateResponse - fmt.Fprintf(os.Stdout, "Response from `ApiKeysApi.CreateApiKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ApiKeysAPI.CreateApiKey`: %v\n", resp) } ``` @@ -108,13 +108,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ApiKeysApi.DeleteApiKey(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.ApiKeysAPI.DeleteApiKey(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysApi.DeleteApiKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysAPI.DeleteApiKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteApiKey`: DeleteApiKeysResponse - fmt.Fprintf(os.Stdout, "Response from `ApiKeysApi.DeleteApiKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ApiKeysAPI.DeleteApiKey`: %v\n", resp) } ``` @@ -181,13 +181,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ApiKeysApi.GetApiKey(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ApiKeysAPI.GetApiKey(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysApi.GetApiKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysAPI.GetApiKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetApiKey`: ApiKeyResponse - fmt.Fprintf(os.Stdout, "Response from `ApiKeysApi.GetApiKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ApiKeysAPI.GetApiKey`: %v\n", resp) } ``` @@ -258,13 +258,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ApiKeysApi.GetApiKeys(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Next(next).Previous(previous).Search(search).Execute() + resp, r, err := apiClient.ApiKeysAPI.GetApiKeys(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Next(next).Previous(previous).Search(search).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysApi.GetApiKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysAPI.GetApiKeys``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetApiKeys`: GetApiKeysResponse - fmt.Fprintf(os.Stdout, "Response from `ApiKeysApi.GetApiKeys`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ApiKeysAPI.GetApiKeys`: %v\n", resp) } ``` @@ -331,13 +331,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ApiKeysApi.UpdateApiKey(context.Background(), id).AcceptLanguage(acceptLanguage).ApiKeyUpdateRequest(apiKeyUpdateRequest).Execute() + resp, r, err := apiClient.ApiKeysAPI.UpdateApiKey(context.Background(), id).AcceptLanguage(acceptLanguage).ApiKeyUpdateRequest(apiKeyUpdateRequest).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysApi.UpdateApiKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ApiKeysAPI.UpdateApiKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateApiKey`: ApiKeyResponse - fmt.Fprintf(os.Stdout, "Response from `ApiKeysApi.UpdateApiKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ApiKeysAPI.UpdateApiKey`: %v\n", resp) } ``` diff --git a/docs/BalancesApi.md b/docs/BalancesApi.md index f3c7efd..f0bf59c 100644 --- a/docs/BalancesApi.md +++ b/docs/BalancesApi.md @@ -1,10 +1,10 @@ -# \BalancesApi +# \BalancesAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetBalance**](BalancesApi.md#GetBalance) | **Get** /balances | Get a company's balance +[**GetBalance**](BalancesAPI.md#GetBalance) | **Get** /balance | Get a company's balance @@ -33,13 +33,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.BalancesApi.GetBalance(context.Background()).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.BalancesAPI.GetBalance(context.Background()).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `BalancesApi.GetBalance``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `BalancesAPI.GetBalance``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetBalance`: BalanceResponse - fmt.Fprintf(os.Stdout, "Response from `BalancesApi.GetBalance`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `BalancesAPI.GetBalance`: %v\n", resp) } ``` diff --git a/docs/ChargeOrderResponse.md b/docs/ChargeOrderResponse.md index 9e21a7c..4e05db8 100644 --- a/docs/ChargeOrderResponse.md +++ b/docs/ChargeOrderResponse.md @@ -13,7 +13,6 @@ Name | Type | Description | Notes **DeviceFingerprint** | Pointer to **NullableString** | | [optional] **FailureCode** | Pointer to **string** | | [optional] **FailureMessage** | Pointer to **string** | | [optional] -**Fee** | Pointer to **int32** | | [optional] **Id** | Pointer to **string** | | [optional] **Livemode** | Pointer to **bool** | | [optional] **MonthlyInstallments** | Pointer to **NullableInt32** | | [optional] @@ -279,31 +278,6 @@ SetFailureMessage sets FailureMessage field to given value. HasFailureMessage returns a boolean if a field has been set. -### GetFee - -`func (o *ChargeOrderResponse) GetFee() int32` - -GetFee returns the Fee field if non-nil, zero value otherwise. - -### GetFeeOk - -`func (o *ChargeOrderResponse) GetFeeOk() (*int32, bool)` - -GetFeeOk returns a tuple with the Fee field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFee - -`func (o *ChargeOrderResponse) SetFee(v int32)` - -SetFee sets Fee field to given value. - -### HasFee - -`func (o *ChargeOrderResponse) HasFee() bool` - -HasFee returns a boolean if a field has been set. - ### GetId `func (o *ChargeOrderResponse) GetId() string` diff --git a/docs/ChargeOrderResponsePaymentMethod.md b/docs/ChargeOrderResponsePaymentMethod.md index c1c8d49..5e5f006 100644 --- a/docs/ChargeOrderResponsePaymentMethod.md +++ b/docs/ChargeOrderResponsePaymentMethod.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **Country** | Pointer to **string** | | [optional] **ExpMonth** | Pointer to **string** | | [optional] **ExpYear** | Pointer to **string** | | [optional] -**FraudIndicators** | Pointer to **[]interface{}** | | [optional] +**FraudIndicators** | Pointer to **[]map[string]interface{}** | | [optional] **Issuer** | Pointer to **string** | | [optional] **Last4** | Pointer to **string** | | [optional] **Name** | Pointer to **string** | | [optional] @@ -32,7 +32,7 @@ Name | Type | Description | Notes **IssuingAccountNumber** | Pointer to **NullableString** | | [optional] **IssuingAccountHolderName** | Pointer to **NullableString** | | [optional] **IssuingAccountTaxId** | Pointer to **NullableString** | | [optional] -**PaymentAttempts** | Pointer to **[]interface{}** | | [optional] +**PaymentAttempts** | Pointer to **[]map[string]interface{}** | | [optional] **ReceivingAccountHolderName** | Pointer to **NullableString** | | [optional] **ReceivingAccountNumber** | Pointer to **string** | | [optional] **ReceivingAccountBank** | Pointer to **string** | | [optional] @@ -476,20 +476,20 @@ HasExpYear returns a boolean if a field has been set. ### GetFraudIndicators -`func (o *ChargeOrderResponsePaymentMethod) GetFraudIndicators() []interface{}` +`func (o *ChargeOrderResponsePaymentMethod) GetFraudIndicators() []map[string]interface{}` GetFraudIndicators returns the FraudIndicators field if non-nil, zero value otherwise. ### GetFraudIndicatorsOk -`func (o *ChargeOrderResponsePaymentMethod) GetFraudIndicatorsOk() (*[]interface{}, bool)` +`func (o *ChargeOrderResponsePaymentMethod) GetFraudIndicatorsOk() (*[]map[string]interface{}, bool)` GetFraudIndicatorsOk returns a tuple with the FraudIndicators field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFraudIndicators -`func (o *ChargeOrderResponsePaymentMethod) SetFraudIndicators(v []interface{})` +`func (o *ChargeOrderResponsePaymentMethod) SetFraudIndicators(v []map[string]interface{})` SetFraudIndicators sets FraudIndicators field to given value. @@ -836,20 +836,20 @@ HasIssuingAccountTaxId returns a boolean if a field has been set. UnsetIssuingAccountTaxId ensures that no value is present for IssuingAccountTaxId, not even an explicit nil ### GetPaymentAttempts -`func (o *ChargeOrderResponsePaymentMethod) GetPaymentAttempts() []interface{}` +`func (o *ChargeOrderResponsePaymentMethod) GetPaymentAttempts() []map[string]interface{}` GetPaymentAttempts returns the PaymentAttempts field if non-nil, zero value otherwise. ### GetPaymentAttemptsOk -`func (o *ChargeOrderResponsePaymentMethod) GetPaymentAttemptsOk() (*[]interface{}, bool)` +`func (o *ChargeOrderResponsePaymentMethod) GetPaymentAttemptsOk() (*[]map[string]interface{}, bool)` GetPaymentAttemptsOk returns a tuple with the PaymentAttempts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPaymentAttempts -`func (o *ChargeOrderResponsePaymentMethod) SetPaymentAttempts(v []interface{})` +`func (o *ChargeOrderResponsePaymentMethod) SetPaymentAttempts(v []map[string]interface{})` SetPaymentAttempts sets PaymentAttempts field to given value. diff --git a/docs/ChargeRequest.md b/docs/ChargeRequest.md index 3977464..39a1e0a 100644 --- a/docs/ChargeRequest.md +++ b/docs/ChargeRequest.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Amount** | Pointer to **int32** | | [optional] -**MonthlyInstallments** | Pointer to **int32** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] **PaymentMethod** | [**ChargeRequestPaymentMethod**](ChargeRequestPaymentMethod.md) | | **ReferenceId** | Pointer to **string** | Custom reference to add to the charge | [optional] @@ -53,31 +52,6 @@ SetAmount sets Amount field to given value. HasAmount returns a boolean if a field has been set. -### GetMonthlyInstallments - -`func (o *ChargeRequest) GetMonthlyInstallments() int32` - -GetMonthlyInstallments returns the MonthlyInstallments field if non-nil, zero value otherwise. - -### GetMonthlyInstallmentsOk - -`func (o *ChargeRequest) GetMonthlyInstallmentsOk() (*int32, bool)` - -GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMonthlyInstallments - -`func (o *ChargeRequest) SetMonthlyInstallments(v int32)` - -SetMonthlyInstallments sets MonthlyInstallments field to given value. - -### HasMonthlyInstallments - -`func (o *ChargeRequest) HasMonthlyInstallments() bool` - -HasMonthlyInstallments returns a boolean if a field has been set. - ### GetPaymentMethod `func (o *ChargeRequest) GetPaymentMethod() ChargeRequestPaymentMethod` diff --git a/docs/ChargeRequestPaymentMethod.md b/docs/ChargeRequestPaymentMethod.md index 05061e4..6b9bfea 100644 --- a/docs/ChargeRequestPaymentMethod.md +++ b/docs/ChargeRequestPaymentMethod.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ExpiresAt** | Pointer to **int64** | Method expiration date as unix timestamp | [optional] +**MonthlyInstallments** | Pointer to **int32** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] **Type** | **string** | | **TokenId** | Pointer to **string** | | [optional] **PaymentSourceId** | Pointer to **string** | | [optional] @@ -54,6 +55,31 @@ SetExpiresAt sets ExpiresAt field to given value. HasExpiresAt returns a boolean if a field has been set. +### GetMonthlyInstallments + +`func (o *ChargeRequestPaymentMethod) GetMonthlyInstallments() int32` + +GetMonthlyInstallments returns the MonthlyInstallments field if non-nil, zero value otherwise. + +### GetMonthlyInstallmentsOk + +`func (o *ChargeRequestPaymentMethod) GetMonthlyInstallmentsOk() (*int32, bool)` + +GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMonthlyInstallments + +`func (o *ChargeRequestPaymentMethod) SetMonthlyInstallments(v int32)` + +SetMonthlyInstallments sets MonthlyInstallments field to given value. + +### HasMonthlyInstallments + +`func (o *ChargeRequestPaymentMethod) HasMonthlyInstallments() bool` + +HasMonthlyInstallments returns a boolean if a field has been set. + ### GetType `func (o *ChargeRequestPaymentMethod) GetType() string` diff --git a/docs/ChargeResponse.md b/docs/ChargeResponse.md index fa9405c..ff6ac7d 100644 --- a/docs/ChargeResponse.md +++ b/docs/ChargeResponse.md @@ -13,7 +13,6 @@ Name | Type | Description | Notes **DeviceFingerprint** | Pointer to **string** | | [optional] **FailureCode** | Pointer to **string** | | [optional] **FailureMessage** | Pointer to **string** | | [optional] -**Fee** | Pointer to **int32** | | [optional] **Id** | Pointer to **string** | | [optional] **Livemode** | Pointer to **bool** | | [optional] **Object** | Pointer to **string** | | [optional] @@ -268,31 +267,6 @@ SetFailureMessage sets FailureMessage field to given value. HasFailureMessage returns a boolean if a field has been set. -### GetFee - -`func (o *ChargeResponse) GetFee() int32` - -GetFee returns the Fee field if non-nil, zero value otherwise. - -### GetFeeOk - -`func (o *ChargeResponse) GetFeeOk() (*int32, bool)` - -GetFeeOk returns a tuple with the Fee field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFee - -`func (o *ChargeResponse) SetFee(v int32)` - -SetFee sets Fee field to given value. - -### HasFee - -`func (o *ChargeResponse) HasFee() bool` - -HasFee returns a boolean if a field has been set. - ### GetId `func (o *ChargeResponse) GetId() string` diff --git a/docs/ChargeResponsePaymentMethod.md b/docs/ChargeResponsePaymentMethod.md index f3849c3..b12f73a 100644 --- a/docs/ChargeResponsePaymentMethod.md +++ b/docs/ChargeResponsePaymentMethod.md @@ -20,7 +20,7 @@ Name | Type | Description | Notes **Country** | Pointer to **string** | | [optional] **ExpMonth** | Pointer to **string** | | [optional] **ExpYear** | Pointer to **string** | | [optional] -**FraudIndicators** | Pointer to **[]interface{}** | | [optional] +**FraudIndicators** | Pointer to **[]map[string]interface{}** | | [optional] **Issuer** | Pointer to **string** | | [optional] **Last4** | Pointer to **string** | | [optional] **Name** | Pointer to **string** | | [optional] @@ -32,7 +32,7 @@ Name | Type | Description | Notes **IssuingAccountNumber** | Pointer to **NullableString** | | [optional] **IssuingAccountHolderName** | Pointer to **NullableString** | | [optional] **IssuingAccountTaxId** | Pointer to **NullableString** | | [optional] -**PaymentAttempts** | Pointer to **[]interface{}** | | [optional] +**PaymentAttempts** | Pointer to **[]map[string]interface{}** | | [optional] **ReceivingAccountHolderName** | Pointer to **NullableString** | | [optional] **ReceivingAccountNumber** | Pointer to **string** | | [optional] **ReceivingAccountBank** | Pointer to **string** | | [optional] @@ -476,20 +476,20 @@ HasExpYear returns a boolean if a field has been set. ### GetFraudIndicators -`func (o *ChargeResponsePaymentMethod) GetFraudIndicators() []interface{}` +`func (o *ChargeResponsePaymentMethod) GetFraudIndicators() []map[string]interface{}` GetFraudIndicators returns the FraudIndicators field if non-nil, zero value otherwise. ### GetFraudIndicatorsOk -`func (o *ChargeResponsePaymentMethod) GetFraudIndicatorsOk() (*[]interface{}, bool)` +`func (o *ChargeResponsePaymentMethod) GetFraudIndicatorsOk() (*[]map[string]interface{}, bool)` GetFraudIndicatorsOk returns a tuple with the FraudIndicators field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFraudIndicators -`func (o *ChargeResponsePaymentMethod) SetFraudIndicators(v []interface{})` +`func (o *ChargeResponsePaymentMethod) SetFraudIndicators(v []map[string]interface{})` SetFraudIndicators sets FraudIndicators field to given value. @@ -836,20 +836,20 @@ HasIssuingAccountTaxId returns a boolean if a field has been set. UnsetIssuingAccountTaxId ensures that no value is present for IssuingAccountTaxId, not even an explicit nil ### GetPaymentAttempts -`func (o *ChargeResponsePaymentMethod) GetPaymentAttempts() []interface{}` +`func (o *ChargeResponsePaymentMethod) GetPaymentAttempts() []map[string]interface{}` GetPaymentAttempts returns the PaymentAttempts field if non-nil, zero value otherwise. ### GetPaymentAttemptsOk -`func (o *ChargeResponsePaymentMethod) GetPaymentAttemptsOk() (*[]interface{}, bool)` +`func (o *ChargeResponsePaymentMethod) GetPaymentAttemptsOk() (*[]map[string]interface{}, bool)` GetPaymentAttemptsOk returns a tuple with the PaymentAttempts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPaymentAttempts -`func (o *ChargeResponsePaymentMethod) SetPaymentAttempts(v []interface{})` +`func (o *ChargeResponsePaymentMethod) SetPaymentAttempts(v []map[string]interface{})` SetPaymentAttempts sets PaymentAttempts field to given value. diff --git a/docs/ChargeUpdateRequest.md b/docs/ChargeUpdateRequest.md new file mode 100644 index 0000000..42920aa --- /dev/null +++ b/docs/ChargeUpdateRequest.md @@ -0,0 +1,56 @@ +# ChargeUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ReferenceId** | Pointer to **string** | custom reference id | [optional] + +## Methods + +### NewChargeUpdateRequest + +`func NewChargeUpdateRequest() *ChargeUpdateRequest` + +NewChargeUpdateRequest instantiates a new ChargeUpdateRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChargeUpdateRequestWithDefaults + +`func NewChargeUpdateRequestWithDefaults() *ChargeUpdateRequest` + +NewChargeUpdateRequestWithDefaults instantiates a new ChargeUpdateRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetReferenceId + +`func (o *ChargeUpdateRequest) GetReferenceId() string` + +GetReferenceId returns the ReferenceId field if non-nil, zero value otherwise. + +### GetReferenceIdOk + +`func (o *ChargeUpdateRequest) GetReferenceIdOk() (*string, bool)` + +GetReferenceIdOk returns a tuple with the ReferenceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReferenceId + +`func (o *ChargeUpdateRequest) SetReferenceId(v string)` + +SetReferenceId sets ReferenceId field to given value. + +### HasReferenceId + +`func (o *ChargeUpdateRequest) HasReferenceId() bool` + +HasReferenceId returns a boolean if a field has been set. + + +[[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 efb471e..2e15d7e 100644 --- a/docs/ChargesApi.md +++ b/docs/ChargesApi.md @@ -1,11 +1,12 @@ -# \ChargesApi +# \ChargesAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetCharges**](ChargesApi.md#GetCharges) | **Get** /charges | Get A List of Charges -[**OrdersCreateCharge**](ChargesApi.md#OrdersCreateCharge) | **Post** /orders/{id}/charges | Create charge +[**GetCharges**](ChargesAPI.md#GetCharges) | **Get** /charges | Get A List of Charges +[**OrdersCreateCharge**](ChargesAPI.md#OrdersCreateCharge) | **Post** /orders/{id}/charges | Create charge +[**UpdateCharge**](ChargesAPI.md#UpdateCharge) | **Put** /charges/{id} | Update a charge @@ -37,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ChargesApi.GetCharges(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.ChargesAPI.GetCharges(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChargesApi.GetCharges``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ChargesAPI.GetCharges``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCharges`: GetChargesResponse - fmt.Fprintf(os.Stdout, "Response from `ChargesApi.GetCharges`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ChargesAPI.GetCharges`: %v\n", resp) } ``` @@ -111,13 +112,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ChargesApi.OrdersCreateCharge(context.Background(), id).ChargeRequest(chargeRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ChargesAPI.OrdersCreateCharge(context.Background(), id).ChargeRequest(chargeRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ChargesApi.OrdersCreateCharge``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ChargesAPI.OrdersCreateCharge``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersCreateCharge`: ChargeOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ChargesApi.OrdersCreateCharge`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ChargesAPI.OrdersCreateCharge`: %v\n", resp) } ``` @@ -158,3 +159,77 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## UpdateCharge + +> ChargeResponse UpdateCharge(ctx, id).ChargeUpdateRequest(chargeUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + +Update a charge + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/conekta/conekta-go" +) + +func main() { + id := "6307a60c41de27127515a575" // string | Identifier of the resource + chargeUpdateRequest := *openapiclient.NewChargeUpdateRequest() // ChargeUpdateRequest | requested field for update a charge + acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") + xChildCompanyId := "6441b6376b60c3a638da80af" // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ChargesAPI.UpdateCharge(context.Background(), id).ChargeUpdateRequest(chargeUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChargesAPI.UpdateCharge``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `UpdateCharge`: ChargeResponse + fmt.Fprintf(os.Stdout, "Response from `ChargesAPI.UpdateCharge`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**id** | **string** | Identifier of the resource | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateChargeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **chargeUpdateRequest** | [**ChargeUpdateRequest**](ChargeUpdateRequest.md) | requested field for update a charge | + **acceptLanguage** | **string** | Use for knowing which language to use | [default to "es"] + **xChildCompanyId** | **string** | In the case of a holding company, the company id of the child company to which will process the request. | + +### Return type + +[**ChargeResponse**](ChargeResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/vnd.conekta-v2.1.0+json + +[[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/ChargesDataResponse.md b/docs/ChargesDataResponse.md index 6f7f511..fd4e200 100644 --- a/docs/ChargesDataResponse.md +++ b/docs/ChargesDataResponse.md @@ -13,7 +13,6 @@ Name | Type | Description | Notes **DeviceFingerprint** | Pointer to **string** | | [optional] **FailureCode** | Pointer to **string** | | [optional] **FailureMessage** | Pointer to **string** | | [optional] -**Fee** | Pointer to **int32** | | [optional] **Id** | Pointer to **string** | | [optional] **Livemode** | Pointer to **bool** | | [optional] **Object** | Pointer to **string** | | [optional] @@ -268,31 +267,6 @@ SetFailureMessage sets FailureMessage field to given value. HasFailureMessage returns a boolean if a field has been set. -### GetFee - -`func (o *ChargesDataResponse) GetFee() int32` - -GetFee returns the Fee field if non-nil, zero value otherwise. - -### GetFeeOk - -`func (o *ChargesDataResponse) GetFeeOk() (*int32, bool)` - -GetFeeOk returns a tuple with the Fee field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFee - -`func (o *ChargesDataResponse) SetFee(v int32)` - -SetFee sets Fee field to given value. - -### HasFee - -`func (o *ChargesDataResponse) HasFee() bool` - -HasFee returns a boolean if a field has been set. - ### GetId `func (o *ChargesDataResponse) GetId() string` diff --git a/docs/CompaniesApi.md b/docs/CompaniesApi.md index e8c8ca4..06a0b46 100644 --- a/docs/CompaniesApi.md +++ b/docs/CompaniesApi.md @@ -1,11 +1,11 @@ -# \CompaniesApi +# \CompaniesAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetCompanies**](CompaniesApi.md#GetCompanies) | **Get** /companies | Get List of Companies -[**GetCompany**](CompaniesApi.md#GetCompany) | **Get** /companies/{id} | Get Company +[**GetCompanies**](CompaniesAPI.md#GetCompanies) | **Get** /companies | Get List of Companies +[**GetCompany**](CompaniesAPI.md#GetCompany) | **Get** /companies/{id} | Get Company @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CompaniesApi.GetCompanies(context.Background()).AcceptLanguage(acceptLanguage).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.CompaniesAPI.GetCompanies(context.Background()).AcceptLanguage(acceptLanguage).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CompaniesApi.GetCompanies``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CompaniesAPI.GetCompanies``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCompanies`: GetCompaniesResponse - fmt.Fprintf(os.Stdout, "Response from `CompaniesApi.GetCompanies`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CompaniesAPI.GetCompanies`: %v\n", resp) } ``` @@ -107,13 +107,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CompaniesApi.GetCompany(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.CompaniesAPI.GetCompany(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CompaniesApi.GetCompany``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CompaniesAPI.GetCompany``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCompany`: CompanyResponse - fmt.Fprintf(os.Stdout, "Response from `CompaniesApi.GetCompany`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CompaniesAPI.GetCompany`: %v\n", resp) } ``` diff --git a/docs/CustomerAddress.md b/docs/CustomerAddress.md index df9a96f..39464b1 100644 --- a/docs/CustomerAddress.md +++ b/docs/CustomerAddress.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **City** | **string** | | **State** | Pointer to **string** | | [optional] **Country** | Pointer to **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**Residential** | Pointer to **bool** | | [optional] +**Residential** | Pointer to **bool** | | [optional] [default to false] **ExternalNumber** | Pointer to **string** | | [optional] ## Methods diff --git a/docs/CustomerFiscalEntitiesRequestAddress.md b/docs/CustomerFiscalEntitiesRequestAddress.md index 3c8cd2d..7daa7c4 100644 --- a/docs/CustomerFiscalEntitiesRequestAddress.md +++ b/docs/CustomerFiscalEntitiesRequestAddress.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **City** | **string** | | **State** | Pointer to **string** | | [optional] **Country** | Pointer to **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**Residential** | Pointer to **bool** | | [optional] +**Residential** | Pointer to **bool** | | [optional] [default to false] **ExternalNumber** | Pointer to **string** | | [optional] ## Methods diff --git a/docs/CustomerResponse.md b/docs/CustomerResponse.md index 1fc18f3..4d8a40b 100644 --- a/docs/CustomerResponse.md +++ b/docs/CustomerResponse.md @@ -5,20 +5,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AntifraudInfo** | Pointer to [**NullableCustomerAntifraudInfoResponse**](CustomerAntifraudInfoResponse.md) | | [optional] -**Corporate** | Pointer to **bool** | | [optional] -**CreatedAt** | **int64** | | -**CustomReference** | Pointer to **string** | | [optional] +**Corporate** | Pointer to **bool** | true if the customer is a company | [optional] +**CreatedAt** | **int64** | Creation date of the object | +**CustomReference** | Pointer to **string** | Custom reference | [optional] **DefaultFiscalEntityId** | Pointer to **NullableString** | | [optional] **DefaultShippingContactId** | Pointer to **string** | | [optional] **DefaultPaymentSourceId** | Pointer to **NullableString** | | [optional] **Email** | Pointer to **string** | | [optional] **FiscalEntities** | Pointer to [**CustomerFiscalEntitiesResponse**](CustomerFiscalEntitiesResponse.md) | | [optional] -**Id** | **string** | | -**Livemode** | **bool** | | -**Name** | Pointer to **string** | | [optional] +**Id** | **string** | Customer's ID | +**Livemode** | **bool** | true if the object exists in live mode or the value false if the object exists in test mode | +**Name** | **string** | Customer's name | +**Metadata** | Pointer to **map[string]interface{}** | | [optional] **Object** | **string** | | **PaymentSources** | Pointer to [**CustomerPaymentMethodsResponse**](CustomerPaymentMethodsResponse.md) | | [optional] -**Phone** | Pointer to **string** | | [optional] +**Phone** | Pointer to **string** | Customer's phone number | [optional] **ShippingContacts** | Pointer to [**CustomerResponseShippingContacts**](CustomerResponseShippingContacts.md) | | [optional] **Subscription** | Pointer to [**SubscriptionResponse**](SubscriptionResponse.md) | | [optional] @@ -26,7 +27,7 @@ Name | Type | Description | Notes ### NewCustomerResponse -`func NewCustomerResponse(createdAt int64, id string, livemode bool, object string, ) *CustomerResponse` +`func NewCustomerResponse(createdAt int64, id string, livemode bool, name string, object string, ) *CustomerResponse` NewCustomerResponse instantiates a new CustomerResponse object This constructor will assign default values to properties that have it defined, @@ -350,11 +351,31 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. -### HasName -`func (o *CustomerResponse) HasName() bool` +### GetMetadata -HasName returns a boolean if a field has been set. +`func (o *CustomerResponse) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *CustomerResponse) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *CustomerResponse) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *CustomerResponse) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. ### GetObject diff --git a/docs/CustomerShippingContacts.md b/docs/CustomerShippingContacts.md index f173084..068c8fb 100644 --- a/docs/CustomerShippingContacts.md +++ b/docs/CustomerShippingContacts.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **ParentId** | Pointer to **string** | | [optional] **Default** | Pointer to **NullableBool** | | [optional] **Deleted** | Pointer to **NullableBool** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the shipping contact | [optional] ## Methods @@ -221,6 +222,31 @@ HasDeleted returns a boolean if a field has been set. `func (o *CustomerShippingContacts) UnsetDeleted()` UnsetDeleted ensures that no value is present for Deleted, not even an explicit nil +### GetMetadata + +`func (o *CustomerShippingContacts) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *CustomerShippingContacts) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *CustomerShippingContacts) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *CustomerShippingContacts) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + [[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 d28924d..255bd49 100644 --- a/docs/CustomerShippingContactsDataResponse.md +++ b/docs/CustomerShippingContactsDataResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **ParentId** | Pointer to **string** | | [optional] **Default** | Pointer to **NullableBool** | | [optional] **Deleted** | Pointer to **NullableBool** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the shipping contact | [optional] **Id** | **string** | | **Object** | **string** | | **CreatedAt** | **int64** | | @@ -224,6 +225,31 @@ HasDeleted returns a boolean if a field has been set. `func (o *CustomerShippingContactsDataResponse) UnsetDeleted()` UnsetDeleted ensures that no value is present for Deleted, not even an explicit nil +### GetMetadata + +`func (o *CustomerShippingContactsDataResponse) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *CustomerShippingContactsDataResponse) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *CustomerShippingContactsDataResponse) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *CustomerShippingContactsDataResponse) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + ### GetId `func (o *CustomerShippingContactsDataResponse) GetId() string` diff --git a/docs/CustomerShippingContactsResponse.md b/docs/CustomerShippingContactsResponse.md index 4611d25..13e4dee 100644 --- a/docs/CustomerShippingContactsResponse.md +++ b/docs/CustomerShippingContactsResponse.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **Default** | Pointer to **bool** | | [optional] **Id** | Pointer to **string** | | [optional] **CreatedAt** | Pointer to **int64** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the shipping contact | [optional] **Object** | Pointer to **string** | | [optional] **Deleted** | Pointer to **bool** | | [optional] @@ -244,6 +245,31 @@ SetCreatedAt sets CreatedAt field to given value. HasCreatedAt returns a boolean if a field has been set. +### GetMetadata + +`func (o *CustomerShippingContactsResponse) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *CustomerShippingContactsResponse) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *CustomerShippingContactsResponse) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *CustomerShippingContactsResponse) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + ### GetObject `func (o *CustomerShippingContactsResponse) GetObject() string` diff --git a/docs/CustomerShippingContactsResponseAddress.md b/docs/CustomerShippingContactsResponseAddress.md index 932d339..31d5e2b 100644 --- a/docs/CustomerShippingContactsResponseAddress.md +++ b/docs/CustomerShippingContactsResponseAddress.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **City** | Pointer to **string** | | [optional] **State** | Pointer to **string** | | [optional] **Country** | Pointer to **string** | | [optional] -**Residential** | Pointer to **bool** | | [optional] +**Residential** | Pointer to **NullableBool** | | [optional] ## Methods @@ -232,6 +232,16 @@ SetResidential sets Residential field to given value. HasResidential returns a boolean if a field has been set. +### SetResidentialNil + +`func (o *CustomerShippingContactsResponseAddress) SetResidentialNil(b bool)` + + SetResidentialNil sets the value for Residential to be an explicit nil + +### UnsetResidential +`func (o *CustomerShippingContactsResponseAddress) UnsetResidential()` + +UnsetResidential ensures that no value is present for Residential, not even an explicit nil [[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 e011f9b..0adc987 100644 --- a/docs/CustomersApi.md +++ b/docs/CustomersApi.md @@ -1,16 +1,16 @@ -# \CustomersApi +# \CustomersAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateCustomer**](CustomersApi.md#CreateCustomer) | **Post** /customers | Create customer -[**CreateCustomerFiscalEntities**](CustomersApi.md#CreateCustomerFiscalEntities) | **Post** /customers/{id}/fiscal_entities | Create Fiscal Entity -[**DeleteCustomerById**](CustomersApi.md#DeleteCustomerById) | **Delete** /customers/{id} | Delete Customer -[**GetCustomerById**](CustomersApi.md#GetCustomerById) | **Get** /customers/{id} | Get Customer -[**GetCustomers**](CustomersApi.md#GetCustomers) | **Get** /customers | Get a list of customers -[**UpdateCustomer**](CustomersApi.md#UpdateCustomer) | **Put** /customers/{id} | Update customer -[**UpdateCustomerFiscalEntities**](CustomersApi.md#UpdateCustomerFiscalEntities) | **Put** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity +[**CreateCustomer**](CustomersAPI.md#CreateCustomer) | **Post** /customers | Create customer +[**CreateCustomerFiscalEntities**](CustomersAPI.md#CreateCustomerFiscalEntities) | **Post** /customers/{id}/fiscal_entities | Create Fiscal Entity +[**DeleteCustomerById**](CustomersAPI.md#DeleteCustomerById) | **Delete** /customers/{id} | Delete Customer +[**GetCustomerById**](CustomersAPI.md#GetCustomerById) | **Get** /customers/{id} | Get Customer +[**GetCustomers**](CustomersAPI.md#GetCustomers) | **Get** /customers | Get a list of customers +[**UpdateCustomer**](CustomersAPI.md#UpdateCustomer) | **Put** /customers/{id} | Update customer +[**UpdateCustomerFiscalEntities**](CustomersAPI.md#UpdateCustomerFiscalEntities) | **Put** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity @@ -35,19 +35,19 @@ import ( ) func main() { - customer := *openapiclient.NewCustomer("miguel@gmail.com", "miguel", "+5215555555555") // Customer | requested field for customer + customer := *openapiclient.NewCustomer("miguel@gmail.com", "miguel", "5215555555555") // Customer | requested field for customer acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") xChildCompanyId := "6441b6376b60c3a638da80af" // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.CreateCustomer(context.Background()).Customer(customer).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.CustomersAPI.CreateCustomer(context.Background()).Customer(customer).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.CreateCustomer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.CreateCustomer``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateCustomer`: CustomerResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.CreateCustomer`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.CreateCustomer`: %v\n", resp) } ``` @@ -106,19 +106,19 @@ import ( func main() { id := "6307a60c41de27127515a575" // string | Identifier of the resource - customerFiscalEntitiesRequest := *openapiclient.NewCustomerFiscalEntitiesRequest(*openapiclient.NewCustomerFiscalEntitiesRequestAddress("avenida siempre viva", "06100", "Ciudad de Mexico")) // CustomerFiscalEntitiesRequest | requested field for customer fiscal entities + customerFiscalEntitiesRequest := *openapiclient.NewCustomerFiscalEntitiesRequest(*openapiclient.NewCustomerFiscalEntitiesRequestAddress("Nuevo Leon 254", "06100", "Ciudad de Mexico")) // CustomerFiscalEntitiesRequest | requested field for customer fiscal entities acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") xChildCompanyId := "6441b6376b60c3a638da80af" // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.CreateCustomerFiscalEntities(context.Background(), id).CustomerFiscalEntitiesRequest(customerFiscalEntitiesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.CustomersAPI.CreateCustomerFiscalEntities(context.Background(), id).CustomerFiscalEntitiesRequest(customerFiscalEntitiesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.CreateCustomerFiscalEntities``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.CreateCustomerFiscalEntities``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateCustomerFiscalEntities`: CreateCustomerFiscalEntitiesResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.CreateCustomerFiscalEntities`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.CreateCustomerFiscalEntities`: %v\n", resp) } ``` @@ -187,13 +187,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.DeleteCustomerById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.CustomersAPI.DeleteCustomerById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.DeleteCustomerById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.DeleteCustomerById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteCustomerById`: CustomerResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.DeleteCustomerById`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.DeleteCustomerById`: %v\n", resp) } ``` @@ -261,13 +261,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.GetCustomerById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.CustomersAPI.GetCustomerById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.GetCustomerById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.GetCustomerById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCustomerById`: CustomerResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.GetCustomerById`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.GetCustomerById`: %v\n", resp) } ``` @@ -338,13 +338,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.GetCustomers(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.CustomersAPI.GetCustomers(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.GetCustomers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.GetCustomers``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCustomers`: CustomersResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.GetCustomers`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.GetCustomers`: %v\n", resp) } ``` @@ -412,13 +412,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.UpdateCustomer(context.Background(), id).UpdateCustomer(updateCustomer).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.CustomersAPI.UpdateCustomer(context.Background(), id).UpdateCustomer(updateCustomer).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.UpdateCustomer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.UpdateCustomer``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateCustomer`: CustomerResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.UpdateCustomer`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.UpdateCustomer`: %v\n", resp) } ``` @@ -489,13 +489,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.CustomersApi.UpdateCustomerFiscalEntities(context.Background(), id, fiscalEntitiesId).CustomerUpdateFiscalEntitiesRequest(customerUpdateFiscalEntitiesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.CustomersAPI.UpdateCustomerFiscalEntities(context.Background(), id, fiscalEntitiesId).CustomerUpdateFiscalEntitiesRequest(customerUpdateFiscalEntitiesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `CustomersApi.UpdateCustomerFiscalEntities``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `CustomersAPI.UpdateCustomerFiscalEntities``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateCustomerFiscalEntities`: UpdateCustomerFiscalEntitiesResponse - fmt.Fprintf(os.Stdout, "Response from `CustomersApi.UpdateCustomerFiscalEntities`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `CustomersAPI.UpdateCustomerFiscalEntities`: %v\n", resp) } ``` diff --git a/docs/DiscountsApi.md b/docs/DiscountsApi.md index bc77948..c387280 100644 --- a/docs/DiscountsApi.md +++ b/docs/DiscountsApi.md @@ -1,14 +1,14 @@ -# \DiscountsApi +# \DiscountsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrdersCreateDiscountLine**](DiscountsApi.md#OrdersCreateDiscountLine) | **Post** /orders/{id}/discount_lines | Create Discount -[**OrdersDeleteDiscountLines**](DiscountsApi.md#OrdersDeleteDiscountLines) | **Delete** /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount -[**OrdersGetDiscountLine**](DiscountsApi.md#OrdersGetDiscountLine) | **Get** /orders/{id}/discount_lines/{discount_lines_id} | Get Discount -[**OrdersGetDiscountLines**](DiscountsApi.md#OrdersGetDiscountLines) | **Get** /orders/{id}/discount_lines | Get a List of Discount -[**OrdersUpdateDiscountLines**](DiscountsApi.md#OrdersUpdateDiscountLines) | **Put** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount +[**OrdersCreateDiscountLine**](DiscountsAPI.md#OrdersCreateDiscountLine) | **Post** /orders/{id}/discount_lines | Create Discount +[**OrdersDeleteDiscountLines**](DiscountsAPI.md#OrdersDeleteDiscountLines) | **Delete** /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount +[**OrdersGetDiscountLine**](DiscountsAPI.md#OrdersGetDiscountLine) | **Get** /orders/{id}/discount_lines/{discount_lines_id} | Get Discount +[**OrdersGetDiscountLines**](DiscountsAPI.md#OrdersGetDiscountLines) | **Get** /orders/{id}/discount_lines | Get a List of Discount +[**OrdersUpdateDiscountLines**](DiscountsAPI.md#OrdersUpdateDiscountLines) | **Put** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount @@ -40,13 +40,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DiscountsApi.OrdersCreateDiscountLine(context.Background(), id).OrderDiscountLinesRequest(orderDiscountLinesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.DiscountsAPI.OrdersCreateDiscountLine(context.Background(), id).OrderDiscountLinesRequest(orderDiscountLinesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DiscountsApi.OrdersCreateDiscountLine``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DiscountsAPI.OrdersCreateDiscountLine``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersCreateDiscountLine`: DiscountLinesResponse - fmt.Fprintf(os.Stdout, "Response from `DiscountsApi.OrdersCreateDiscountLine`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `DiscountsAPI.OrdersCreateDiscountLine`: %v\n", resp) } ``` @@ -116,13 +116,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DiscountsApi.OrdersDeleteDiscountLines(context.Background(), id, discountLinesId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.DiscountsAPI.OrdersDeleteDiscountLines(context.Background(), id, discountLinesId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DiscountsApi.OrdersDeleteDiscountLines``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DiscountsAPI.OrdersDeleteDiscountLines``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersDeleteDiscountLines`: DiscountLinesResponse - fmt.Fprintf(os.Stdout, "Response from `DiscountsApi.OrdersDeleteDiscountLines`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `DiscountsAPI.OrdersDeleteDiscountLines`: %v\n", resp) } ``` @@ -193,13 +193,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DiscountsApi.OrdersGetDiscountLine(context.Background(), id, discountLinesId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.DiscountsAPI.OrdersGetDiscountLine(context.Background(), id, discountLinesId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DiscountsApi.OrdersGetDiscountLine``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DiscountsAPI.OrdersGetDiscountLine``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersGetDiscountLine`: DiscountLinesResponse - fmt.Fprintf(os.Stdout, "Response from `DiscountsApi.OrdersGetDiscountLine`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `DiscountsAPI.OrdersGetDiscountLine`: %v\n", resp) } ``` @@ -273,13 +273,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DiscountsApi.OrdersGetDiscountLines(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.DiscountsAPI.OrdersGetDiscountLines(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DiscountsApi.OrdersGetDiscountLines``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DiscountsAPI.OrdersGetDiscountLines``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersGetDiscountLines`: GetOrderDiscountLinesResponse - fmt.Fprintf(os.Stdout, "Response from `DiscountsApi.OrdersGetDiscountLines`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `DiscountsAPI.OrdersGetDiscountLines`: %v\n", resp) } ``` @@ -353,13 +353,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DiscountsApi.OrdersUpdateDiscountLines(context.Background(), id, discountLinesId).UpdateOrderDiscountLinesRequest(updateOrderDiscountLinesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.DiscountsAPI.OrdersUpdateDiscountLines(context.Background(), id, discountLinesId).UpdateOrderDiscountLinesRequest(updateOrderDiscountLinesRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DiscountsApi.OrdersUpdateDiscountLines``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DiscountsAPI.OrdersUpdateDiscountLines``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersUpdateDiscountLines`: DiscountLinesResponse - fmt.Fprintf(os.Stdout, "Response from `DiscountsApi.OrdersUpdateDiscountLines`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `DiscountsAPI.OrdersUpdateDiscountLines`: %v\n", resp) } ``` diff --git a/docs/EventsApi.md b/docs/EventsApi.md index 53915b8..35390b6 100644 --- a/docs/EventsApi.md +++ b/docs/EventsApi.md @@ -1,12 +1,12 @@ -# \EventsApi +# \EventsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetEvent**](EventsApi.md#GetEvent) | **Get** /events/{id} | Get Event -[**GetEvents**](EventsApi.md#GetEvents) | **Get** /events | Get list of Events -[**ResendEvent**](EventsApi.md#ResendEvent) | **Post** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event +[**GetEvent**](EventsAPI.md#GetEvent) | **Get** /events/{id} | Get Event +[**GetEvents**](EventsAPI.md#GetEvents) | **Get** /events | Get list of Events +[**ResendEvent**](EventsAPI.md#ResendEvent) | **Post** /events/{event_id}/webhook_logs/{webhook_log_id}/resend | Resend Event @@ -37,13 +37,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.GetEvent(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.EventsAPI.GetEvent(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEvent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `EventsAPI.GetEvent``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetEvent`: EventResponse - fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEvent`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `EventsAPI.GetEvent`: %v\n", resp) } ``` @@ -112,13 +112,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.GetEvents(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.EventsAPI.GetEvents(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetEvents``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `EventsAPI.GetEvents``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetEvents`: GetEventsResponse - fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetEvents`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `EventsAPI.GetEvents`: %v\n", resp) } ``` @@ -185,13 +185,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.EventsApi.ResendEvent(context.Background(), eventId, webhookLogId).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.EventsAPI.ResendEvent(context.Background(), eventId, webhookLogId).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.ResendEvent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `EventsAPI.ResendEvent``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ResendEvent`: EventsResendResponse - fmt.Fprintf(os.Stdout, "Response from `EventsApi.ResendEvent`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `EventsAPI.ResendEvent`: %v\n", resp) } ``` diff --git a/docs/FiscalEntityAddress.md b/docs/FiscalEntityAddress.md new file mode 100644 index 0000000..85c9944 --- /dev/null +++ b/docs/FiscalEntityAddress.md @@ -0,0 +1,197 @@ +# FiscalEntityAddress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Street1** | **string** | Street name and number | +**Street2** | Pointer to **NullableString** | Street name and number | [optional] +**PostalCode** | **string** | Postal code | +**City** | **string** | City | +**State** | Pointer to **string** | State | [optional] +**Country** | **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | +**ExternalNumber** | **string** | External number | + +## Methods + +### NewFiscalEntityAddress + +`func NewFiscalEntityAddress(street1 string, postalCode string, city string, country string, externalNumber string, ) *FiscalEntityAddress` + +NewFiscalEntityAddress instantiates a new FiscalEntityAddress object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFiscalEntityAddressWithDefaults + +`func NewFiscalEntityAddressWithDefaults() *FiscalEntityAddress` + +NewFiscalEntityAddressWithDefaults instantiates a new FiscalEntityAddress object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStreet1 + +`func (o *FiscalEntityAddress) GetStreet1() string` + +GetStreet1 returns the Street1 field if non-nil, zero value otherwise. + +### GetStreet1Ok + +`func (o *FiscalEntityAddress) GetStreet1Ok() (*string, bool)` + +GetStreet1Ok returns a tuple with the Street1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreet1 + +`func (o *FiscalEntityAddress) SetStreet1(v string)` + +SetStreet1 sets Street1 field to given value. + + +### GetStreet2 + +`func (o *FiscalEntityAddress) GetStreet2() string` + +GetStreet2 returns the Street2 field if non-nil, zero value otherwise. + +### GetStreet2Ok + +`func (o *FiscalEntityAddress) GetStreet2Ok() (*string, bool)` + +GetStreet2Ok returns a tuple with the Street2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreet2 + +`func (o *FiscalEntityAddress) SetStreet2(v string)` + +SetStreet2 sets Street2 field to given value. + +### HasStreet2 + +`func (o *FiscalEntityAddress) HasStreet2() bool` + +HasStreet2 returns a boolean if a field has been set. + +### SetStreet2Nil + +`func (o *FiscalEntityAddress) SetStreet2Nil(b bool)` + + SetStreet2Nil sets the value for Street2 to be an explicit nil + +### UnsetStreet2 +`func (o *FiscalEntityAddress) UnsetStreet2()` + +UnsetStreet2 ensures that no value is present for Street2, not even an explicit nil +### GetPostalCode + +`func (o *FiscalEntityAddress) GetPostalCode() string` + +GetPostalCode returns the PostalCode field if non-nil, zero value otherwise. + +### GetPostalCodeOk + +`func (o *FiscalEntityAddress) GetPostalCodeOk() (*string, bool)` + +GetPostalCodeOk returns a tuple with the PostalCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostalCode + +`func (o *FiscalEntityAddress) SetPostalCode(v string)` + +SetPostalCode sets PostalCode field to given value. + + +### GetCity + +`func (o *FiscalEntityAddress) GetCity() string` + +GetCity returns the City field if non-nil, zero value otherwise. + +### GetCityOk + +`func (o *FiscalEntityAddress) GetCityOk() (*string, bool)` + +GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCity + +`func (o *FiscalEntityAddress) SetCity(v string)` + +SetCity sets City field to given value. + + +### GetState + +`func (o *FiscalEntityAddress) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *FiscalEntityAddress) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *FiscalEntityAddress) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *FiscalEntityAddress) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetCountry + +`func (o *FiscalEntityAddress) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *FiscalEntityAddress) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *FiscalEntityAddress) SetCountry(v string)` + +SetCountry sets Country field to given value. + + +### GetExternalNumber + +`func (o *FiscalEntityAddress) GetExternalNumber() string` + +GetExternalNumber returns the ExternalNumber field if non-nil, zero value otherwise. + +### GetExternalNumberOk + +`func (o *FiscalEntityAddress) GetExternalNumberOk() (*string, bool)` + +GetExternalNumberOk returns a tuple with the ExternalNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalNumber + +`func (o *FiscalEntityAddress) SetExternalNumber(v string)` + +SetExternalNumber sets ExternalNumber field to given value. + + + +[[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 1cdf15a..aaec79c 100644 --- a/docs/LogsApi.md +++ b/docs/LogsApi.md @@ -1,11 +1,11 @@ -# \LogsApi +# \LogsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetLogById**](LogsApi.md#GetLogById) | **Get** /logs/{id} | Get Log -[**GetLogs**](LogsApi.md#GetLogs) | **Get** /logs | Get List Of Logs +[**GetLogById**](LogsAPI.md#GetLogById) | **Get** /logs/{id} | Get Log +[**GetLogs**](LogsAPI.md#GetLogs) | **Get** /logs | Get List Of Logs @@ -36,13 +36,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LogsApi.GetLogById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.LogsAPI.GetLogById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LogsApi.GetLogById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.GetLogById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetLogById`: LogResponse - fmt.Fprintf(os.Stdout, "Response from `LogsApi.GetLogById`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `LogsAPI.GetLogById`: %v\n", resp) } ``` @@ -113,13 +113,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.LogsApi.GetLogs(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.LogsAPI.GetLogs(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `LogsApi.GetLogs``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `LogsAPI.GetLogs``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetLogs`: LogsResponse - fmt.Fprintf(os.Stdout, "Response from `LogsApi.GetLogs`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `LogsAPI.GetLogs`: %v\n", resp) } ``` diff --git a/docs/OrderCustomerInfoResponse.md b/docs/OrderCustomerInfoResponse.md new file mode 100644 index 0000000..f96939d --- /dev/null +++ b/docs/OrderCustomerInfoResponse.md @@ -0,0 +1,196 @@ +# OrderCustomerInfoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerCustomReference** | Pointer to **NullableString** | Custom reference | [optional] +**Name** | Pointer to **string** | | [optional] +**Email** | Pointer to **string** | | [optional] +**Phone** | Pointer to **string** | | [optional] +**Corporate** | Pointer to **bool** | | [optional] [default to false] +**Object** | Pointer to **string** | | [optional] + +## Methods + +### NewOrderCustomerInfoResponse + +`func NewOrderCustomerInfoResponse() *OrderCustomerInfoResponse` + +NewOrderCustomerInfoResponse instantiates a new OrderCustomerInfoResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderCustomerInfoResponseWithDefaults + +`func NewOrderCustomerInfoResponseWithDefaults() *OrderCustomerInfoResponse` + +NewOrderCustomerInfoResponseWithDefaults instantiates a new OrderCustomerInfoResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCustomerCustomReference + +`func (o *OrderCustomerInfoResponse) GetCustomerCustomReference() string` + +GetCustomerCustomReference returns the CustomerCustomReference field if non-nil, zero value otherwise. + +### GetCustomerCustomReferenceOk + +`func (o *OrderCustomerInfoResponse) GetCustomerCustomReferenceOk() (*string, bool)` + +GetCustomerCustomReferenceOk returns a tuple with the CustomerCustomReference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerCustomReference + +`func (o *OrderCustomerInfoResponse) SetCustomerCustomReference(v string)` + +SetCustomerCustomReference sets CustomerCustomReference field to given value. + +### HasCustomerCustomReference + +`func (o *OrderCustomerInfoResponse) HasCustomerCustomReference() bool` + +HasCustomerCustomReference returns a boolean if a field has been set. + +### SetCustomerCustomReferenceNil + +`func (o *OrderCustomerInfoResponse) SetCustomerCustomReferenceNil(b bool)` + + SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil + +### UnsetCustomerCustomReference +`func (o *OrderCustomerInfoResponse) UnsetCustomerCustomReference()` + +UnsetCustomerCustomReference ensures that no value is present for CustomerCustomReference, not even an explicit nil +### GetName + +`func (o *OrderCustomerInfoResponse) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OrderCustomerInfoResponse) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OrderCustomerInfoResponse) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OrderCustomerInfoResponse) HasName() bool` + +HasName returns a boolean if a field has been set. + +### GetEmail + +`func (o *OrderCustomerInfoResponse) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *OrderCustomerInfoResponse) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *OrderCustomerInfoResponse) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *OrderCustomerInfoResponse) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetPhone + +`func (o *OrderCustomerInfoResponse) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *OrderCustomerInfoResponse) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *OrderCustomerInfoResponse) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *OrderCustomerInfoResponse) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetCorporate + +`func (o *OrderCustomerInfoResponse) GetCorporate() bool` + +GetCorporate returns the Corporate field if non-nil, zero value otherwise. + +### GetCorporateOk + +`func (o *OrderCustomerInfoResponse) GetCorporateOk() (*bool, bool)` + +GetCorporateOk returns a tuple with the Corporate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCorporate + +`func (o *OrderCustomerInfoResponse) SetCorporate(v bool)` + +SetCorporate sets Corporate field to given value. + +### HasCorporate + +`func (o *OrderCustomerInfoResponse) HasCorporate() bool` + +HasCorporate returns a boolean if a field has been set. + +### GetObject + +`func (o *OrderCustomerInfoResponse) GetObject() string` + +GetObject returns the Object field if non-nil, zero value otherwise. + +### GetObjectOk + +`func (o *OrderCustomerInfoResponse) GetObjectOk() (*string, bool)` + +GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObject + +`func (o *OrderCustomerInfoResponse) SetObject(v string)` + +SetObject sets Object field to given value. + +### HasObject + +`func (o *OrderCustomerInfoResponse) HasObject() bool` + +HasObject returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..3675520 --- /dev/null +++ b/docs/OrderFiscalEntityAddressResponse.md @@ -0,0 +1,223 @@ +# OrderFiscalEntityAddressResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Street1** | **string** | Street name and number | +**Street2** | Pointer to **NullableString** | Street name and number | [optional] +**PostalCode** | **string** | Postal code | +**City** | **string** | City | +**State** | Pointer to **string** | State | [optional] +**Country** | **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | +**ExternalNumber** | **string** | External number | +**Object** | Pointer to **string** | | [optional] + +## Methods + +### NewOrderFiscalEntityAddressResponse + +`func NewOrderFiscalEntityAddressResponse(street1 string, postalCode string, city string, country string, externalNumber string, ) *OrderFiscalEntityAddressResponse` + +NewOrderFiscalEntityAddressResponse instantiates a new OrderFiscalEntityAddressResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderFiscalEntityAddressResponseWithDefaults + +`func NewOrderFiscalEntityAddressResponseWithDefaults() *OrderFiscalEntityAddressResponse` + +NewOrderFiscalEntityAddressResponseWithDefaults instantiates a new OrderFiscalEntityAddressResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetStreet1 + +`func (o *OrderFiscalEntityAddressResponse) GetStreet1() string` + +GetStreet1 returns the Street1 field if non-nil, zero value otherwise. + +### GetStreet1Ok + +`func (o *OrderFiscalEntityAddressResponse) GetStreet1Ok() (*string, bool)` + +GetStreet1Ok returns a tuple with the Street1 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreet1 + +`func (o *OrderFiscalEntityAddressResponse) SetStreet1(v string)` + +SetStreet1 sets Street1 field to given value. + + +### GetStreet2 + +`func (o *OrderFiscalEntityAddressResponse) GetStreet2() string` + +GetStreet2 returns the Street2 field if non-nil, zero value otherwise. + +### GetStreet2Ok + +`func (o *OrderFiscalEntityAddressResponse) GetStreet2Ok() (*string, bool)` + +GetStreet2Ok returns a tuple with the Street2 field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetStreet2 + +`func (o *OrderFiscalEntityAddressResponse) SetStreet2(v string)` + +SetStreet2 sets Street2 field to given value. + +### HasStreet2 + +`func (o *OrderFiscalEntityAddressResponse) HasStreet2() bool` + +HasStreet2 returns a boolean if a field has been set. + +### SetStreet2Nil + +`func (o *OrderFiscalEntityAddressResponse) SetStreet2Nil(b bool)` + + SetStreet2Nil sets the value for Street2 to be an explicit nil + +### UnsetStreet2 +`func (o *OrderFiscalEntityAddressResponse) UnsetStreet2()` + +UnsetStreet2 ensures that no value is present for Street2, not even an explicit nil +### GetPostalCode + +`func (o *OrderFiscalEntityAddressResponse) GetPostalCode() string` + +GetPostalCode returns the PostalCode field if non-nil, zero value otherwise. + +### GetPostalCodeOk + +`func (o *OrderFiscalEntityAddressResponse) GetPostalCodeOk() (*string, bool)` + +GetPostalCodeOk returns a tuple with the PostalCode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPostalCode + +`func (o *OrderFiscalEntityAddressResponse) SetPostalCode(v string)` + +SetPostalCode sets PostalCode field to given value. + + +### GetCity + +`func (o *OrderFiscalEntityAddressResponse) GetCity() string` + +GetCity returns the City field if non-nil, zero value otherwise. + +### GetCityOk + +`func (o *OrderFiscalEntityAddressResponse) GetCityOk() (*string, bool)` + +GetCityOk returns a tuple with the City field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCity + +`func (o *OrderFiscalEntityAddressResponse) SetCity(v string)` + +SetCity sets City field to given value. + + +### GetState + +`func (o *OrderFiscalEntityAddressResponse) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *OrderFiscalEntityAddressResponse) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *OrderFiscalEntityAddressResponse) SetState(v string)` + +SetState sets State field to given value. + +### HasState + +`func (o *OrderFiscalEntityAddressResponse) HasState() bool` + +HasState returns a boolean if a field has been set. + +### GetCountry + +`func (o *OrderFiscalEntityAddressResponse) GetCountry() string` + +GetCountry returns the Country field if non-nil, zero value otherwise. + +### GetCountryOk + +`func (o *OrderFiscalEntityAddressResponse) GetCountryOk() (*string, bool)` + +GetCountryOk returns a tuple with the Country field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCountry + +`func (o *OrderFiscalEntityAddressResponse) SetCountry(v string)` + +SetCountry sets Country field to given value. + + +### GetExternalNumber + +`func (o *OrderFiscalEntityAddressResponse) GetExternalNumber() string` + +GetExternalNumber returns the ExternalNumber field if non-nil, zero value otherwise. + +### GetExternalNumberOk + +`func (o *OrderFiscalEntityAddressResponse) GetExternalNumberOk() (*string, bool)` + +GetExternalNumberOk returns a tuple with the ExternalNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExternalNumber + +`func (o *OrderFiscalEntityAddressResponse) SetExternalNumber(v string)` + +SetExternalNumber sets ExternalNumber field to given value. + + +### GetObject + +`func (o *OrderFiscalEntityAddressResponse) GetObject() string` + +GetObject returns the Object field if non-nil, zero value otherwise. + +### GetObjectOk + +`func (o *OrderFiscalEntityAddressResponse) GetObjectOk() (*string, bool)` + +GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObject + +`func (o *OrderFiscalEntityAddressResponse) SetObject(v string)` + +SetObject sets Object field to given value. + +### HasObject + +`func (o *OrderFiscalEntityAddressResponse) HasObject() bool` + +HasObject returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..2827d9f --- /dev/null +++ b/docs/OrderFiscalEntityAddressResponseAllOf.md @@ -0,0 +1,56 @@ +# OrderFiscalEntityAddressResponseAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Object** | Pointer to **string** | | [optional] + +## Methods + +### NewOrderFiscalEntityAddressResponseAllOf + +`func NewOrderFiscalEntityAddressResponseAllOf() *OrderFiscalEntityAddressResponseAllOf` + +NewOrderFiscalEntityAddressResponseAllOf instantiates a new OrderFiscalEntityAddressResponseAllOf object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderFiscalEntityAddressResponseAllOfWithDefaults + +`func NewOrderFiscalEntityAddressResponseAllOfWithDefaults() *OrderFiscalEntityAddressResponseAllOf` + +NewOrderFiscalEntityAddressResponseAllOfWithDefaults instantiates a new OrderFiscalEntityAddressResponseAllOf object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetObject + +`func (o *OrderFiscalEntityAddressResponseAllOf) GetObject() string` + +GetObject returns the Object field if non-nil, zero value otherwise. + +### GetObjectOk + +`func (o *OrderFiscalEntityAddressResponseAllOf) GetObjectOk() (*string, bool)` + +GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObject + +`func (o *OrderFiscalEntityAddressResponseAllOf) SetObject(v string)` + +SetObject sets Object field to given value. + +### HasObject + +`func (o *OrderFiscalEntityAddressResponseAllOf) HasObject() bool` + +HasObject returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..4874fc7 --- /dev/null +++ b/docs/OrderFiscalEntityRequest.md @@ -0,0 +1,201 @@ +# OrderFiscalEntityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | +**Email** | Pointer to **string** | Email of the fiscal entity | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the fiscal entity | [optional] +**Name** | Pointer to **NullableString** | Name of the fiscal entity | [optional] +**Phone** | Pointer to **string** | Phone of the fiscal entity | [optional] +**TaxId** | Pointer to **NullableString** | Tax ID of the fiscal entity | [optional] + +## Methods + +### NewOrderFiscalEntityRequest + +`func NewOrderFiscalEntityRequest(address FiscalEntityAddress, ) *OrderFiscalEntityRequest` + +NewOrderFiscalEntityRequest instantiates a new OrderFiscalEntityRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderFiscalEntityRequestWithDefaults + +`func NewOrderFiscalEntityRequestWithDefaults() *OrderFiscalEntityRequest` + +NewOrderFiscalEntityRequestWithDefaults instantiates a new OrderFiscalEntityRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *OrderFiscalEntityRequest) GetAddress() FiscalEntityAddress` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *OrderFiscalEntityRequest) GetAddressOk() (*FiscalEntityAddress, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *OrderFiscalEntityRequest) SetAddress(v FiscalEntityAddress)` + +SetAddress sets Address field to given value. + + +### GetEmail + +`func (o *OrderFiscalEntityRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *OrderFiscalEntityRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *OrderFiscalEntityRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *OrderFiscalEntityRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetMetadata + +`func (o *OrderFiscalEntityRequest) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *OrderFiscalEntityRequest) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *OrderFiscalEntityRequest) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *OrderFiscalEntityRequest) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetName + +`func (o *OrderFiscalEntityRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OrderFiscalEntityRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OrderFiscalEntityRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OrderFiscalEntityRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *OrderFiscalEntityRequest) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *OrderFiscalEntityRequest) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetPhone + +`func (o *OrderFiscalEntityRequest) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *OrderFiscalEntityRequest) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *OrderFiscalEntityRequest) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *OrderFiscalEntityRequest) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetTaxId + +`func (o *OrderFiscalEntityRequest) GetTaxId() string` + +GetTaxId returns the TaxId field if non-nil, zero value otherwise. + +### GetTaxIdOk + +`func (o *OrderFiscalEntityRequest) GetTaxIdOk() (*string, bool)` + +GetTaxIdOk returns a tuple with the TaxId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTaxId + +`func (o *OrderFiscalEntityRequest) SetTaxId(v string)` + +SetTaxId sets TaxId field to given value. + +### HasTaxId + +`func (o *OrderFiscalEntityRequest) HasTaxId() bool` + +HasTaxId returns a boolean if a field has been set. + +### SetTaxIdNil + +`func (o *OrderFiscalEntityRequest) SetTaxIdNil(b bool)` + + SetTaxIdNil sets the value for TaxId to be an explicit nil + +### UnsetTaxId +`func (o *OrderFiscalEntityRequest) UnsetTaxId()` + +UnsetTaxId ensures that no value is present for TaxId, not even an explicit nil + +[[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 new file mode 100644 index 0000000..0992085 --- /dev/null +++ b/docs/OrderFiscalEntityResponse.md @@ -0,0 +1,284 @@ +# OrderFiscalEntityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | [**OrderFiscalEntityAddressResponse**](OrderFiscalEntityAddressResponse.md) | | +**Email** | Pointer to **NullableString** | Email of the fiscal entity | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the fiscal entity | [optional] +**Name** | Pointer to **NullableString** | Name of the fiscal entity | [optional] +**TaxId** | Pointer to **NullableString** | Tax ID of the fiscal entity | [optional] +**Id** | **string** | ID of the fiscal entity | +**CreatedAt** | **int64** | The time at which the object was created in seconds since the Unix epoch | +**Object** | **string** | | +**Phone** | Pointer to **NullableString** | Phone of the fiscal entity | [optional] + +## Methods + +### NewOrderFiscalEntityResponse + +`func NewOrderFiscalEntityResponse(address OrderFiscalEntityAddressResponse, id string, createdAt int64, object string, ) *OrderFiscalEntityResponse` + +NewOrderFiscalEntityResponse instantiates a new OrderFiscalEntityResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderFiscalEntityResponseWithDefaults + +`func NewOrderFiscalEntityResponseWithDefaults() *OrderFiscalEntityResponse` + +NewOrderFiscalEntityResponseWithDefaults instantiates a new OrderFiscalEntityResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *OrderFiscalEntityResponse) GetAddress() OrderFiscalEntityAddressResponse` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *OrderFiscalEntityResponse) GetAddressOk() (*OrderFiscalEntityAddressResponse, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *OrderFiscalEntityResponse) SetAddress(v OrderFiscalEntityAddressResponse)` + +SetAddress sets Address field to given value. + + +### GetEmail + +`func (o *OrderFiscalEntityResponse) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *OrderFiscalEntityResponse) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *OrderFiscalEntityResponse) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *OrderFiscalEntityResponse) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmailNil + +`func (o *OrderFiscalEntityResponse) SetEmailNil(b bool)` + + SetEmailNil sets the value for Email to be an explicit nil + +### UnsetEmail +`func (o *OrderFiscalEntityResponse) UnsetEmail()` + +UnsetEmail ensures that no value is present for Email, not even an explicit nil +### GetMetadata + +`func (o *OrderFiscalEntityResponse) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *OrderFiscalEntityResponse) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *OrderFiscalEntityResponse) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *OrderFiscalEntityResponse) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetName + +`func (o *OrderFiscalEntityResponse) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OrderFiscalEntityResponse) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OrderFiscalEntityResponse) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OrderFiscalEntityResponse) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *OrderFiscalEntityResponse) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *OrderFiscalEntityResponse) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetTaxId + +`func (o *OrderFiscalEntityResponse) GetTaxId() string` + +GetTaxId returns the TaxId field if non-nil, zero value otherwise. + +### GetTaxIdOk + +`func (o *OrderFiscalEntityResponse) GetTaxIdOk() (*string, bool)` + +GetTaxIdOk returns a tuple with the TaxId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTaxId + +`func (o *OrderFiscalEntityResponse) SetTaxId(v string)` + +SetTaxId sets TaxId field to given value. + +### HasTaxId + +`func (o *OrderFiscalEntityResponse) HasTaxId() bool` + +HasTaxId returns a boolean if a field has been set. + +### SetTaxIdNil + +`func (o *OrderFiscalEntityResponse) SetTaxIdNil(b bool)` + + SetTaxIdNil sets the value for TaxId to be an explicit nil + +### UnsetTaxId +`func (o *OrderFiscalEntityResponse) UnsetTaxId()` + +UnsetTaxId ensures that no value is present for TaxId, not even an explicit nil +### GetId + +`func (o *OrderFiscalEntityResponse) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *OrderFiscalEntityResponse) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *OrderFiscalEntityResponse) SetId(v string)` + +SetId sets Id field to given value. + + +### GetCreatedAt + +`func (o *OrderFiscalEntityResponse) GetCreatedAt() int64` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *OrderFiscalEntityResponse) GetCreatedAtOk() (*int64, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *OrderFiscalEntityResponse) SetCreatedAt(v int64)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetObject + +`func (o *OrderFiscalEntityResponse) GetObject() string` + +GetObject returns the Object field if non-nil, zero value otherwise. + +### GetObjectOk + +`func (o *OrderFiscalEntityResponse) GetObjectOk() (*string, bool)` + +GetObjectOk returns a tuple with the Object field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetObject + +`func (o *OrderFiscalEntityResponse) SetObject(v string)` + +SetObject sets Object field to given value. + + +### GetPhone + +`func (o *OrderFiscalEntityResponse) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *OrderFiscalEntityResponse) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *OrderFiscalEntityResponse) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *OrderFiscalEntityResponse) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### SetPhoneNil + +`func (o *OrderFiscalEntityResponse) SetPhoneNil(b bool)` + + SetPhoneNil sets the value for Phone to be an explicit nil + +### UnsetPhone +`func (o *OrderFiscalEntityResponse) UnsetPhone()` + +UnsetPhone ensures that no value is present for Phone, not even an explicit nil + +[[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 new file mode 100644 index 0000000..5df4e55 --- /dev/null +++ b/docs/OrderNextActionResponse.md @@ -0,0 +1,82 @@ +# OrderNextActionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RedirectToUrl** | Pointer to [**OrderNextActionResponseRedirectToUrl**](OrderNextActionResponseRedirectToUrl.md) | | [optional] +**Type** | Pointer to **string** | Indicates the type of action to be taken | [optional] + +## Methods + +### NewOrderNextActionResponse + +`func NewOrderNextActionResponse() *OrderNextActionResponse` + +NewOrderNextActionResponse instantiates a new OrderNextActionResponse object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderNextActionResponseWithDefaults + +`func NewOrderNextActionResponseWithDefaults() *OrderNextActionResponse` + +NewOrderNextActionResponseWithDefaults instantiates a new OrderNextActionResponse object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetRedirectToUrl + +`func (o *OrderNextActionResponse) GetRedirectToUrl() OrderNextActionResponseRedirectToUrl` + +GetRedirectToUrl returns the RedirectToUrl field if non-nil, zero value otherwise. + +### GetRedirectToUrlOk + +`func (o *OrderNextActionResponse) GetRedirectToUrlOk() (*OrderNextActionResponseRedirectToUrl, bool)` + +GetRedirectToUrlOk returns a tuple with the RedirectToUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRedirectToUrl + +`func (o *OrderNextActionResponse) SetRedirectToUrl(v OrderNextActionResponseRedirectToUrl)` + +SetRedirectToUrl sets RedirectToUrl field to given value. + +### HasRedirectToUrl + +`func (o *OrderNextActionResponse) HasRedirectToUrl() bool` + +HasRedirectToUrl returns a boolean if a field has been set. + +### GetType + +`func (o *OrderNextActionResponse) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *OrderNextActionResponse) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *OrderNextActionResponse) SetType(v string)` + +SetType sets Type field to given value. + +### HasType + +`func (o *OrderNextActionResponse) HasType() bool` + +HasType returns a boolean if a field has been set. + + +[[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 new file mode 100644 index 0000000..a7132d7 --- /dev/null +++ b/docs/OrderNextActionResponseRedirectToUrl.md @@ -0,0 +1,82 @@ +# OrderNextActionResponseRedirectToUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | Pointer to **string** | pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. | [optional] +**ReturnUrl** | Pointer to **string** | Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. | [optional] + +## Methods + +### NewOrderNextActionResponseRedirectToUrl + +`func NewOrderNextActionResponseRedirectToUrl() *OrderNextActionResponseRedirectToUrl` + +NewOrderNextActionResponseRedirectToUrl instantiates a new OrderNextActionResponseRedirectToUrl object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderNextActionResponseRedirectToUrlWithDefaults + +`func NewOrderNextActionResponseRedirectToUrlWithDefaults() *OrderNextActionResponseRedirectToUrl` + +NewOrderNextActionResponseRedirectToUrlWithDefaults instantiates a new OrderNextActionResponseRedirectToUrl object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetUrl + +`func (o *OrderNextActionResponseRedirectToUrl) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *OrderNextActionResponseRedirectToUrl) GetUrlOk() (*string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUrl + +`func (o *OrderNextActionResponseRedirectToUrl) SetUrl(v string)` + +SetUrl sets Url field to given value. + +### HasUrl + +`func (o *OrderNextActionResponseRedirectToUrl) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### GetReturnUrl + +`func (o *OrderNextActionResponseRedirectToUrl) GetReturnUrl() string` + +GetReturnUrl returns the ReturnUrl field if non-nil, zero value otherwise. + +### GetReturnUrlOk + +`func (o *OrderNextActionResponseRedirectToUrl) GetReturnUrlOk() (*string, bool)` + +GetReturnUrlOk returns a tuple with the ReturnUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReturnUrl + +`func (o *OrderNextActionResponseRedirectToUrl) SetReturnUrl(v string)` + +SetReturnUrl sets ReturnUrl field to given value. + +### HasReturnUrl + +`func (o *OrderNextActionResponseRedirectToUrl) HasReturnUrl() bool` + +HasReturnUrl returns a boolean if a field has been set. + + +[[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 7e8b44a..3f69613 100644 --- a/docs/OrderRequest.md +++ b/docs/OrderRequest.md @@ -9,14 +9,17 @@ Name | Type | Description | Notes **Currency** | **string** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | **CustomerInfo** | [**OrderRequestCustomerInfo**](OrderRequestCustomerInfo.md) | | **DiscountLines** | Pointer to [**[]OrderDiscountLinesRequest**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] +**FiscalEntity** | Pointer to [**OrderFiscalEntityRequest**](OrderFiscalEntityRequest.md) | | [optional] **LineItems** | [**[]Product**](Product.md) | List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | **Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the order | [optional] **NeedsShippingContact** | Pointer to **bool** | Allows you to fill out the shipping information at checkout | [optional] **PreAuthorize** | Pointer to **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to false] **ProcessingMode** | Pointer to **string** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] +**ReturnUrl** | Pointer to **string** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] **ShippingContact** | Pointer to [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] **ShippingLines** | Pointer to [**[]ShippingRequest**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] **TaxLines** | Pointer to [**[]OrderTaxRequest**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] +**ThreeDsMode** | Pointer to **string** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional] ## Methods @@ -152,6 +155,31 @@ SetDiscountLines sets DiscountLines field to given value. HasDiscountLines returns a boolean if a field has been set. +### GetFiscalEntity + +`func (o *OrderRequest) GetFiscalEntity() OrderFiscalEntityRequest` + +GetFiscalEntity returns the FiscalEntity field if non-nil, zero value otherwise. + +### GetFiscalEntityOk + +`func (o *OrderRequest) GetFiscalEntityOk() (*OrderFiscalEntityRequest, bool)` + +GetFiscalEntityOk returns a tuple with the FiscalEntity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFiscalEntity + +`func (o *OrderRequest) SetFiscalEntity(v OrderFiscalEntityRequest)` + +SetFiscalEntity sets FiscalEntity field to given value. + +### HasFiscalEntity + +`func (o *OrderRequest) HasFiscalEntity() bool` + +HasFiscalEntity returns a boolean if a field has been set. + ### GetLineItems `func (o *OrderRequest) GetLineItems() []Product` @@ -272,6 +300,31 @@ SetProcessingMode sets ProcessingMode field to given value. HasProcessingMode returns a boolean if a field has been set. +### GetReturnUrl + +`func (o *OrderRequest) GetReturnUrl() string` + +GetReturnUrl returns the ReturnUrl field if non-nil, zero value otherwise. + +### GetReturnUrlOk + +`func (o *OrderRequest) GetReturnUrlOk() (*string, bool)` + +GetReturnUrlOk returns a tuple with the ReturnUrl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReturnUrl + +`func (o *OrderRequest) SetReturnUrl(v string)` + +SetReturnUrl sets ReturnUrl field to given value. + +### HasReturnUrl + +`func (o *OrderRequest) HasReturnUrl() bool` + +HasReturnUrl returns a boolean if a field has been set. + ### GetShippingContact `func (o *OrderRequest) GetShippingContact() CustomerShippingContacts` @@ -347,6 +400,31 @@ SetTaxLines sets TaxLines field to given value. HasTaxLines returns a boolean if a field has been set. +### GetThreeDsMode + +`func (o *OrderRequest) GetThreeDsMode() string` + +GetThreeDsMode returns the ThreeDsMode field if non-nil, zero value otherwise. + +### GetThreeDsModeOk + +`func (o *OrderRequest) GetThreeDsModeOk() (*string, bool)` + +GetThreeDsModeOk returns a tuple with the ThreeDsMode field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetThreeDsMode + +`func (o *OrderRequest) SetThreeDsMode(v string)` + +SetThreeDsMode sets ThreeDsMode field to given value. + +### HasThreeDsMode + +`func (o *OrderRequest) HasThreeDsMode() bool` + +HasThreeDsMode returns a boolean if a field has been set. + [[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 b59204a..8e26b8d 100644 --- a/docs/OrderResponse.md +++ b/docs/OrderResponse.md @@ -13,12 +13,13 @@ Name | Type | Description | Notes **Currency** | Pointer to **string** | The three-letter ISO 4217 currency code. The currency of the order. | [optional] **CustomerInfo** | Pointer to [**OrderResponseCustomerInfo**](OrderResponseCustomerInfo.md) | | [optional] **DiscountLines** | Pointer to [**OrderResponseDiscountLines**](OrderResponseDiscountLines.md) | | [optional] -**FiscalEntity** | Pointer to [**OrderResponseFiscalEntity**](OrderResponseFiscalEntity.md) | | [optional] +**FiscalEntity** | Pointer to [**NullableOrderFiscalEntityResponse**](OrderFiscalEntityResponse.md) | | [optional] **Id** | Pointer to **string** | | [optional] **IsRefundable** | Pointer to **bool** | | [optional] **LineItems** | Pointer to [**OrderResponseProducts**](OrderResponseProducts.md) | | [optional] **Livemode** | Pointer to **bool** | Whether the object exists in live mode or test mode | [optional] **Metadata** | Pointer to **map[string]interface{}** | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. | [optional] +**NextAction** | Pointer to [**OrderNextActionResponse**](OrderNextActionResponse.md) | | [optional] **Object** | Pointer to **string** | String representing the object’s type. Objects of the same type share the same value. | [optional] **PaymentStatus** | Pointer to **string** | The payment status of the order. | [optional] **ProcessingMode** | Pointer to **string** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] @@ -271,20 +272,20 @@ HasDiscountLines returns a boolean if a field has been set. ### GetFiscalEntity -`func (o *OrderResponse) GetFiscalEntity() OrderResponseFiscalEntity` +`func (o *OrderResponse) GetFiscalEntity() OrderFiscalEntityResponse` GetFiscalEntity returns the FiscalEntity field if non-nil, zero value otherwise. ### GetFiscalEntityOk -`func (o *OrderResponse) GetFiscalEntityOk() (*OrderResponseFiscalEntity, bool)` +`func (o *OrderResponse) GetFiscalEntityOk() (*OrderFiscalEntityResponse, bool)` GetFiscalEntityOk returns a tuple with the FiscalEntity field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFiscalEntity -`func (o *OrderResponse) SetFiscalEntity(v OrderResponseFiscalEntity)` +`func (o *OrderResponse) SetFiscalEntity(v OrderFiscalEntityResponse)` SetFiscalEntity sets FiscalEntity field to given value. @@ -294,6 +295,16 @@ SetFiscalEntity sets FiscalEntity field to given value. HasFiscalEntity returns a boolean if a field has been set. +### SetFiscalEntityNil + +`func (o *OrderResponse) SetFiscalEntityNil(b bool)` + + SetFiscalEntityNil sets the value for FiscalEntity to be an explicit nil + +### UnsetFiscalEntity +`func (o *OrderResponse) UnsetFiscalEntity()` + +UnsetFiscalEntity ensures that no value is present for FiscalEntity, not even an explicit nil ### GetId `func (o *OrderResponse) GetId() string` @@ -419,6 +430,31 @@ SetMetadata sets Metadata field to given value. HasMetadata returns a boolean if a field has been set. +### GetNextAction + +`func (o *OrderResponse) GetNextAction() OrderNextActionResponse` + +GetNextAction returns the NextAction field if non-nil, zero value otherwise. + +### GetNextActionOk + +`func (o *OrderResponse) GetNextActionOk() (*OrderNextActionResponse, bool)` + +GetNextActionOk returns a tuple with the NextAction field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextAction + +`func (o *OrderResponse) SetNextAction(v OrderNextActionResponse)` + +SetNextAction sets NextAction field to given value. + +### HasNextAction + +`func (o *OrderResponse) HasNextAction() bool` + +HasNextAction returns a boolean if a field has been set. + ### GetObject `func (o *OrderResponse) GetObject() string` diff --git a/docs/OrderResponseCustomerInfo.md b/docs/OrderResponseCustomerInfo.md index cac2710..b4aa235 100644 --- a/docs/OrderResponseCustomerInfo.md +++ b/docs/OrderResponseCustomerInfo.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Object** | Pointer to **string** | | [optional] +**CustomerCustomReference** | Pointer to **NullableString** | Custom reference | [optional] **Name** | Pointer to **string** | | [optional] **Email** | Pointer to **string** | | [optional] **Phone** | Pointer to **string** | | [optional] @@ -55,6 +56,41 @@ SetObject sets Object field to given value. HasObject returns a boolean if a field has been set. +### GetCustomerCustomReference + +`func (o *OrderResponseCustomerInfo) GetCustomerCustomReference() string` + +GetCustomerCustomReference returns the CustomerCustomReference field if non-nil, zero value otherwise. + +### GetCustomerCustomReferenceOk + +`func (o *OrderResponseCustomerInfo) GetCustomerCustomReferenceOk() (*string, bool)` + +GetCustomerCustomReferenceOk returns a tuple with the CustomerCustomReference field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCustomerCustomReference + +`func (o *OrderResponseCustomerInfo) SetCustomerCustomReference(v string)` + +SetCustomerCustomReference sets CustomerCustomReference field to given value. + +### HasCustomerCustomReference + +`func (o *OrderResponseCustomerInfo) HasCustomerCustomReference() bool` + +HasCustomerCustomReference returns a boolean if a field has been set. + +### SetCustomerCustomReferenceNil + +`func (o *OrderResponseCustomerInfo) SetCustomerCustomReferenceNil(b bool)` + + SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil + +### UnsetCustomerCustomReference +`func (o *OrderResponseCustomerInfo) UnsetCustomerCustomReference()` + +UnsetCustomerCustomReference ensures that no value is present for CustomerCustomReference, not even an explicit nil ### GetName `func (o *OrderResponseCustomerInfo) GetName() string` diff --git a/docs/OrderResponseShippingContact.md b/docs/OrderResponseShippingContact.md index bed593b..519b226 100644 --- a/docs/OrderResponseShippingContact.md +++ b/docs/OrderResponseShippingContact.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **Address** | Pointer to [**CustomerShippingContactsResponseAddress**](CustomerShippingContactsResponseAddress.md) | | [optional] **ParentId** | Pointer to **string** | | [optional] **Default** | Pointer to **bool** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the shipping contact | [optional] **Deleted** | Pointer to **bool** | | [optional] ## Methods @@ -269,6 +270,31 @@ SetDefault sets Default field to given value. HasDefault returns a boolean if a field has been set. +### GetMetadata + +`func (o *OrderResponseShippingContact) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *OrderResponseShippingContact) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *OrderResponseShippingContact) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *OrderResponseShippingContact) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + ### GetDeleted `func (o *OrderResponseShippingContact) GetDeleted() bool` diff --git a/docs/OrderUpdateFiscalEntityRequest.md b/docs/OrderUpdateFiscalEntityRequest.md new file mode 100644 index 0000000..fcf391f --- /dev/null +++ b/docs/OrderUpdateFiscalEntityRequest.md @@ -0,0 +1,201 @@ +# OrderUpdateFiscalEntityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | +**Email** | Pointer to **string** | Email of the fiscal entity | [optional] +**Name** | Pointer to **NullableString** | Name of the fiscal entity | [optional] +**Metadata** | Pointer to **map[string]interface{}** | Metadata associated with the fiscal entity | [optional] +**Phone** | Pointer to **string** | Phone of the fiscal entity | [optional] +**TaxId** | Pointer to **NullableString** | Tax ID of the fiscal entity | [optional] + +## Methods + +### NewOrderUpdateFiscalEntityRequest + +`func NewOrderUpdateFiscalEntityRequest(address FiscalEntityAddress, ) *OrderUpdateFiscalEntityRequest` + +NewOrderUpdateFiscalEntityRequest instantiates a new OrderUpdateFiscalEntityRequest object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewOrderUpdateFiscalEntityRequestWithDefaults + +`func NewOrderUpdateFiscalEntityRequestWithDefaults() *OrderUpdateFiscalEntityRequest` + +NewOrderUpdateFiscalEntityRequestWithDefaults instantiates a new OrderUpdateFiscalEntityRequest object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetAddress + +`func (o *OrderUpdateFiscalEntityRequest) GetAddress() FiscalEntityAddress` + +GetAddress returns the Address field if non-nil, zero value otherwise. + +### GetAddressOk + +`func (o *OrderUpdateFiscalEntityRequest) GetAddressOk() (*FiscalEntityAddress, bool)` + +GetAddressOk returns a tuple with the Address field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetAddress + +`func (o *OrderUpdateFiscalEntityRequest) SetAddress(v FiscalEntityAddress)` + +SetAddress sets Address field to given value. + + +### GetEmail + +`func (o *OrderUpdateFiscalEntityRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *OrderUpdateFiscalEntityRequest) GetEmailOk() (*string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetEmail + +`func (o *OrderUpdateFiscalEntityRequest) SetEmail(v string)` + +SetEmail sets Email field to given value. + +### HasEmail + +`func (o *OrderUpdateFiscalEntityRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### GetName + +`func (o *OrderUpdateFiscalEntityRequest) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *OrderUpdateFiscalEntityRequest) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *OrderUpdateFiscalEntityRequest) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *OrderUpdateFiscalEntityRequest) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *OrderUpdateFiscalEntityRequest) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *OrderUpdateFiscalEntityRequest) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetMetadata + +`func (o *OrderUpdateFiscalEntityRequest) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *OrderUpdateFiscalEntityRequest) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *OrderUpdateFiscalEntityRequest) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *OrderUpdateFiscalEntityRequest) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetPhone + +`func (o *OrderUpdateFiscalEntityRequest) GetPhone() string` + +GetPhone returns the Phone field if non-nil, zero value otherwise. + +### GetPhoneOk + +`func (o *OrderUpdateFiscalEntityRequest) GetPhoneOk() (*string, bool)` + +GetPhoneOk returns a tuple with the Phone field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPhone + +`func (o *OrderUpdateFiscalEntityRequest) SetPhone(v string)` + +SetPhone sets Phone field to given value. + +### HasPhone + +`func (o *OrderUpdateFiscalEntityRequest) HasPhone() bool` + +HasPhone returns a boolean if a field has been set. + +### GetTaxId + +`func (o *OrderUpdateFiscalEntityRequest) GetTaxId() string` + +GetTaxId returns the TaxId field if non-nil, zero value otherwise. + +### GetTaxIdOk + +`func (o *OrderUpdateFiscalEntityRequest) GetTaxIdOk() (*string, bool)` + +GetTaxIdOk returns a tuple with the TaxId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetTaxId + +`func (o *OrderUpdateFiscalEntityRequest) SetTaxId(v string)` + +SetTaxId sets TaxId field to given value. + +### HasTaxId + +`func (o *OrderUpdateFiscalEntityRequest) HasTaxId() bool` + +HasTaxId returns a boolean if a field has been set. + +### SetTaxIdNil + +`func (o *OrderUpdateFiscalEntityRequest) SetTaxIdNil(b bool)` + + SetTaxIdNil sets the value for TaxId to be an explicit nil + +### UnsetTaxId +`func (o *OrderUpdateFiscalEntityRequest) UnsetTaxId()` + +UnsetTaxId ensures that no value is present for TaxId, not even an explicit nil + +[[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 1ef795e..8eda56a 100644 --- a/docs/OrderUpdateRequest.md +++ b/docs/OrderUpdateRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **Currency** | Pointer to **string** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | [optional] **CustomerInfo** | Pointer to [**OrderUpdateRequestCustomerInfo**](OrderUpdateRequestCustomerInfo.md) | | [optional] **DiscountLines** | Pointer to [**[]OrderDiscountLinesRequest**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] +**FiscalEntity** | Pointer to [**OrderUpdateFiscalEntityRequest**](OrderUpdateFiscalEntityRequest.md) | | [optional] **LineItems** | Pointer to [**[]Product**](Product.md) | List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | [optional] **Metadata** | Pointer to **map[string]string** | | [optional] **PreAuthorize** | Pointer to **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to false] @@ -160,6 +161,31 @@ SetDiscountLines sets DiscountLines field to given value. HasDiscountLines returns a boolean if a field has been set. +### GetFiscalEntity + +`func (o *OrderUpdateRequest) GetFiscalEntity() OrderUpdateFiscalEntityRequest` + +GetFiscalEntity returns the FiscalEntity field if non-nil, zero value otherwise. + +### GetFiscalEntityOk + +`func (o *OrderUpdateRequest) GetFiscalEntityOk() (*OrderUpdateFiscalEntityRequest, bool)` + +GetFiscalEntityOk returns a tuple with the FiscalEntity field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFiscalEntity + +`func (o *OrderUpdateRequest) SetFiscalEntity(v OrderUpdateFiscalEntityRequest)` + +SetFiscalEntity sets FiscalEntity field to given value. + +### HasFiscalEntity + +`func (o *OrderUpdateRequest) HasFiscalEntity() bool` + +HasFiscalEntity returns a boolean if a field has been set. + ### GetLineItems `func (o *OrderUpdateRequest) GetLineItems() []Product` diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md index e118a14..422b178 100644 --- a/docs/OrdersApi.md +++ b/docs/OrdersApi.md @@ -1,17 +1,17 @@ -# \OrdersApi +# \OrdersAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CancelOrder**](OrdersApi.md#CancelOrder) | **Post** /orders/{id}/cancel | Cancel Order -[**CreateOrder**](OrdersApi.md#CreateOrder) | **Post** /orders | Create order -[**GetOrderById**](OrdersApi.md#GetOrderById) | **Get** /orders/{id} | Get Order -[**GetOrders**](OrdersApi.md#GetOrders) | **Get** /orders | Get a list of Orders -[**OrderCancelRefund**](OrdersApi.md#OrderCancelRefund) | **Delete** /orders/{id}/refunds/{refund_id} | Cancel Refund -[**OrderRefund**](OrdersApi.md#OrderRefund) | **Post** /orders/{id}/refunds | Refund Order -[**OrdersCreateCapture**](OrdersApi.md#OrdersCreateCapture) | **Post** /orders/{id}/capture | Capture Order -[**UpdateOrder**](OrdersApi.md#UpdateOrder) | **Put** /orders/{id} | Update Order +[**CancelOrder**](OrdersAPI.md#CancelOrder) | **Post** /orders/{id}/cancel | Cancel Order +[**CreateOrder**](OrdersAPI.md#CreateOrder) | **Post** /orders | Create order +[**GetOrderById**](OrdersAPI.md#GetOrderById) | **Get** /orders/{id} | Get Order +[**GetOrders**](OrdersAPI.md#GetOrders) | **Get** /orders | Get a list of Orders +[**OrderCancelRefund**](OrdersAPI.md#OrderCancelRefund) | **Delete** /orders/{id}/refunds/{refund_id} | Cancel Refund +[**OrderRefund**](OrdersAPI.md#OrderRefund) | **Post** /orders/{id}/refunds | Refund Order +[**OrdersCreateCapture**](OrdersAPI.md#OrdersCreateCapture) | **Post** /orders/{id}/capture | Capture Order +[**UpdateOrder**](OrdersAPI.md#UpdateOrder) | **Put** /orders/{id} | Update Order @@ -42,13 +42,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.CancelOrder(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.OrdersAPI.CancelOrder(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.CancelOrder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.CancelOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CancelOrder`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.CancelOrder`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.CancelOrder`: %v\n", resp) } ``` @@ -116,13 +116,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.CreateOrder(context.Background()).OrderRequest(orderRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.OrdersAPI.CreateOrder(context.Background()).OrderRequest(orderRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.CreateOrder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.CreateOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateOrder`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.CreateOrder`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.CreateOrder`: %v\n", resp) } ``` @@ -186,13 +186,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.GetOrderById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.OrdersAPI.GetOrderById(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.GetOrderById``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.GetOrderById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetOrderById`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.GetOrderById`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.GetOrderById`: %v\n", resp) } ``` @@ -263,13 +263,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.GetOrders(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.OrdersAPI.GetOrders(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.GetOrders``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.GetOrders``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetOrders`: GetOrdersResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.GetOrders`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.GetOrders`: %v\n", resp) } ``` @@ -337,13 +337,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.OrderCancelRefund(context.Background(), id, refundId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.OrdersAPI.OrderCancelRefund(context.Background(), id, refundId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.OrderCancelRefund``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.OrderCancelRefund``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrderCancelRefund`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.OrderCancelRefund`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.OrderCancelRefund`: %v\n", resp) } ``` @@ -414,13 +414,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.OrderRefund(context.Background(), id).OrderRefundRequest(orderRefundRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.OrdersAPI.OrderRefund(context.Background(), id).OrderRefundRequest(orderRefundRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.OrderRefund``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.OrderRefund``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrderRefund`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.OrderRefund`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.OrderRefund`: %v\n", resp) } ``` @@ -490,13 +490,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.OrdersCreateCapture(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).OrderCaptureRequest(orderCaptureRequest).Execute() + resp, r, err := apiClient.OrdersAPI.OrdersCreateCapture(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).OrderCaptureRequest(orderCaptureRequest).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.OrdersCreateCapture``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.OrdersCreateCapture``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersCreateCapture`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.OrdersCreateCapture`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.OrdersCreateCapture`: %v\n", resp) } ``` @@ -565,13 +565,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.OrdersApi.UpdateOrder(context.Background(), id).OrderUpdateRequest(orderUpdateRequest).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.OrdersAPI.UpdateOrder(context.Background(), id).OrderUpdateRequest(orderUpdateRequest).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `OrdersApi.UpdateOrder``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `OrdersAPI.UpdateOrder``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateOrder`: OrderResponse - fmt.Fprintf(os.Stdout, "Response from `OrdersApi.UpdateOrder`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `OrdersAPI.UpdateOrder`: %v\n", resp) } ``` diff --git a/docs/PaymentLinkApi.md b/docs/PaymentLinkApi.md index 48bf1c6..620a3e0 100644 --- a/docs/PaymentLinkApi.md +++ b/docs/PaymentLinkApi.md @@ -1,15 +1,15 @@ -# \PaymentLinkApi +# \PaymentLinkAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CancelCheckout**](PaymentLinkApi.md#CancelCheckout) | **Put** /checkouts/{id}/cancel | Cancel Payment Link -[**CreateCheckout**](PaymentLinkApi.md#CreateCheckout) | **Post** /checkouts | Create Unique Payment Link -[**EmailCheckout**](PaymentLinkApi.md#EmailCheckout) | **Post** /checkouts/{id}/email | Send an email -[**GetCheckout**](PaymentLinkApi.md#GetCheckout) | **Get** /checkouts/{id} | Get a payment link by ID -[**GetCheckouts**](PaymentLinkApi.md#GetCheckouts) | **Get** /checkouts | Get a list of payment links -[**SmsCheckout**](PaymentLinkApi.md#SmsCheckout) | **Post** /checkouts/{id}/sms | Send an sms +[**CancelCheckout**](PaymentLinkAPI.md#CancelCheckout) | **Put** /checkouts/{id}/cancel | Cancel Payment Link +[**CreateCheckout**](PaymentLinkAPI.md#CreateCheckout) | **Post** /checkouts | Create Unique Payment Link +[**EmailCheckout**](PaymentLinkAPI.md#EmailCheckout) | **Post** /checkouts/{id}/email | Send an email +[**GetCheckout**](PaymentLinkAPI.md#GetCheckout) | **Get** /checkouts/{id} | Get a payment link by ID +[**GetCheckouts**](PaymentLinkAPI.md#GetCheckouts) | **Get** /checkouts | Get a list of payment links +[**SmsCheckout**](PaymentLinkAPI.md#SmsCheckout) | **Post** /checkouts/{id}/sms | Send an sms @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentLinkApi.CancelCheckout(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentLinkAPI.CancelCheckout(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkApi.CancelCheckout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkAPI.CancelCheckout``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CancelCheckout`: CheckoutResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentLinkApi.CancelCheckout`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentLinkAPI.CancelCheckout`: %v\n", resp) } ``` @@ -110,13 +110,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentLinkApi.CreateCheckout(context.Background()).Checkout(checkout).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentLinkAPI.CreateCheckout(context.Background()).Checkout(checkout).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkApi.CreateCheckout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkAPI.CreateCheckout``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateCheckout`: CheckoutResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentLinkApi.CreateCheckout`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentLinkAPI.CreateCheckout`: %v\n", resp) } ``` @@ -179,13 +179,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentLinkApi.EmailCheckout(context.Background(), id).EmailCheckoutRequest(emailCheckoutRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentLinkAPI.EmailCheckout(context.Background(), id).EmailCheckoutRequest(emailCheckoutRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkApi.EmailCheckout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkAPI.EmailCheckout``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `EmailCheckout`: CheckoutResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentLinkApi.EmailCheckout`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentLinkAPI.EmailCheckout`: %v\n", resp) } ``` @@ -252,13 +252,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentLinkApi.GetCheckout(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentLinkAPI.GetCheckout(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkApi.GetCheckout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkAPI.GetCheckout``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCheckout`: CheckoutResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentLinkApi.GetCheckout`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentLinkAPI.GetCheckout`: %v\n", resp) } ``` @@ -329,13 +329,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentLinkApi.GetCheckouts(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.PaymentLinkAPI.GetCheckouts(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkApi.GetCheckouts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkAPI.GetCheckouts``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCheckouts`: CheckoutsResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentLinkApi.GetCheckouts`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentLinkAPI.GetCheckouts`: %v\n", resp) } ``` @@ -401,13 +401,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentLinkApi.SmsCheckout(context.Background(), id).SmsCheckoutRequest(smsCheckoutRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentLinkAPI.SmsCheckout(context.Background(), id).SmsCheckoutRequest(smsCheckoutRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkApi.SmsCheckout``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentLinkAPI.SmsCheckout``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `SmsCheckout`: CheckoutResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentLinkApi.SmsCheckout`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentLinkAPI.SmsCheckout`: %v\n", resp) } ``` diff --git a/docs/PaymentMethodBankTransfer.md b/docs/PaymentMethodBankTransfer.md index 6dcad66..083bd1e 100644 --- a/docs/PaymentMethodBankTransfer.md +++ b/docs/PaymentMethodBankTransfer.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **IssuingAccountNumber** | Pointer to **NullableString** | | [optional] **IssuingAccountHolderName** | Pointer to **NullableString** | | [optional] **IssuingAccountTaxId** | Pointer to **NullableString** | | [optional] -**PaymentAttempts** | Pointer to **[]interface{}** | | [optional] +**PaymentAttempts** | Pointer to **[]map[string]interface{}** | | [optional] **ReceivingAccountHolderName** | Pointer to **NullableString** | | [optional] **ReceivingAccountNumber** | Pointer to **string** | | [optional] **ReceivingAccountBank** | Pointer to **string** | | [optional] @@ -374,20 +374,20 @@ HasIssuingAccountTaxId returns a boolean if a field has been set. UnsetIssuingAccountTaxId ensures that no value is present for IssuingAccountTaxId, not even an explicit nil ### GetPaymentAttempts -`func (o *PaymentMethodBankTransfer) GetPaymentAttempts() []interface{}` +`func (o *PaymentMethodBankTransfer) GetPaymentAttempts() []map[string]interface{}` GetPaymentAttempts returns the PaymentAttempts field if non-nil, zero value otherwise. ### GetPaymentAttemptsOk -`func (o *PaymentMethodBankTransfer) GetPaymentAttemptsOk() (*[]interface{}, bool)` +`func (o *PaymentMethodBankTransfer) GetPaymentAttemptsOk() (*[]map[string]interface{}, bool)` GetPaymentAttemptsOk returns a tuple with the PaymentAttempts field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetPaymentAttempts -`func (o *PaymentMethodBankTransfer) SetPaymentAttempts(v []interface{})` +`func (o *PaymentMethodBankTransfer) SetPaymentAttempts(v []map[string]interface{})` SetPaymentAttempts sets PaymentAttempts field to given value. diff --git a/docs/PaymentMethodCard.md b/docs/PaymentMethodCard.md index 3109451..6e81317 100644 --- a/docs/PaymentMethodCard.md +++ b/docs/PaymentMethodCard.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **Country** | Pointer to **string** | | [optional] **ExpMonth** | Pointer to **string** | | [optional] **ExpYear** | Pointer to **string** | | [optional] -**FraudIndicators** | Pointer to **[]interface{}** | | [optional] +**FraudIndicators** | Pointer to **[]map[string]interface{}** | | [optional] **Issuer** | Pointer to **string** | | [optional] **Last4** | Pointer to **string** | | [optional] **Name** | Pointer to **string** | | [optional] @@ -259,20 +259,20 @@ HasExpYear returns a boolean if a field has been set. ### GetFraudIndicators -`func (o *PaymentMethodCard) GetFraudIndicators() []interface{}` +`func (o *PaymentMethodCard) GetFraudIndicators() []map[string]interface{}` GetFraudIndicators returns the FraudIndicators field if non-nil, zero value otherwise. ### GetFraudIndicatorsOk -`func (o *PaymentMethodCard) GetFraudIndicatorsOk() (*[]interface{}, bool)` +`func (o *PaymentMethodCard) GetFraudIndicatorsOk() (*[]map[string]interface{}, bool)` GetFraudIndicatorsOk returns a tuple with the FraudIndicators field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetFraudIndicators -`func (o *PaymentMethodCard) SetFraudIndicators(v []interface{})` +`func (o *PaymentMethodCard) SetFraudIndicators(v []map[string]interface{})` SetFraudIndicators sets FraudIndicators field to given value. diff --git a/docs/PaymentMethodsApi.md b/docs/PaymentMethodsApi.md index 196814c..37061a5 100644 --- a/docs/PaymentMethodsApi.md +++ b/docs/PaymentMethodsApi.md @@ -1,13 +1,13 @@ -# \PaymentMethodsApi +# \PaymentMethodsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateCustomerPaymentMethods**](PaymentMethodsApi.md#CreateCustomerPaymentMethods) | **Post** /customers/{id}/payment_sources | Create Payment Method -[**DeleteCustomerPaymentMethods**](PaymentMethodsApi.md#DeleteCustomerPaymentMethods) | **Delete** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method -[**GetCustomerPaymentMethods**](PaymentMethodsApi.md#GetCustomerPaymentMethods) | **Get** /customers/{id}/payment_sources | Get Payment Methods -[**UpdateCustomerPaymentMethods**](PaymentMethodsApi.md#UpdateCustomerPaymentMethods) | **Put** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method +[**CreateCustomerPaymentMethods**](PaymentMethodsAPI.md#CreateCustomerPaymentMethods) | **Post** /customers/{id}/payment_sources | Create Payment Method +[**DeleteCustomerPaymentMethods**](PaymentMethodsAPI.md#DeleteCustomerPaymentMethods) | **Delete** /customers/{id}/payment_sources/{payment_method_id} | Delete Payment Method +[**GetCustomerPaymentMethods**](PaymentMethodsAPI.md#GetCustomerPaymentMethods) | **Get** /customers/{id}/payment_sources | Get Payment Methods +[**UpdateCustomerPaymentMethods**](PaymentMethodsAPI.md#UpdateCustomerPaymentMethods) | **Put** /customers/{id}/payment_sources/{payment_method_id} | Update Payment Method @@ -39,13 +39,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentMethodsApi.CreateCustomerPaymentMethods(context.Background(), id).CreateCustomerPaymentMethodsRequest(createCustomerPaymentMethodsRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentMethodsAPI.CreateCustomerPaymentMethods(context.Background(), id).CreateCustomerPaymentMethodsRequest(createCustomerPaymentMethodsRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.CreateCustomerPaymentMethods``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsAPI.CreateCustomerPaymentMethods``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateCustomerPaymentMethods`: CreateCustomerPaymentMethodsResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.CreateCustomerPaymentMethods`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsAPI.CreateCustomerPaymentMethods`: %v\n", resp) } ``` @@ -115,13 +115,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentMethodsApi.DeleteCustomerPaymentMethods(context.Background(), id, paymentMethodId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentMethodsAPI.DeleteCustomerPaymentMethods(context.Background(), id, paymentMethodId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.DeleteCustomerPaymentMethods``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsAPI.DeleteCustomerPaymentMethods``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteCustomerPaymentMethods`: UpdateCustomerPaymentMethodsResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.DeleteCustomerPaymentMethods`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsAPI.DeleteCustomerPaymentMethods`: %v\n", resp) } ``` @@ -195,13 +195,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentMethodsApi.GetCustomerPaymentMethods(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Next(next).Previous(previous).Search(search).Execute() + resp, r, err := apiClient.PaymentMethodsAPI.GetCustomerPaymentMethods(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Next(next).Previous(previous).Search(search).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.GetCustomerPaymentMethods``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsAPI.GetCustomerPaymentMethods``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetCustomerPaymentMethods`: GetPaymentMethodResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.GetCustomerPaymentMethods`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsAPI.GetCustomerPaymentMethods`: %v\n", resp) } ``` @@ -275,13 +275,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PaymentMethodsApi.UpdateCustomerPaymentMethods(context.Background(), id, paymentMethodId).UpdatePaymentMethods(updatePaymentMethods).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PaymentMethodsAPI.UpdateCustomerPaymentMethods(context.Background(), id, paymentMethodId).UpdatePaymentMethods(updatePaymentMethods).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsApi.UpdateCustomerPaymentMethods``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PaymentMethodsAPI.UpdateCustomerPaymentMethods``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateCustomerPaymentMethods`: UpdateCustomerPaymentMethodsResponse - fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsApi.UpdateCustomerPaymentMethods`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PaymentMethodsAPI.UpdateCustomerPaymentMethods`: %v\n", resp) } ``` diff --git a/docs/PlansApi.md b/docs/PlansApi.md index 2c3deba..e23a038 100644 --- a/docs/PlansApi.md +++ b/docs/PlansApi.md @@ -1,14 +1,14 @@ -# \PlansApi +# \PlansAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreatePlan**](PlansApi.md#CreatePlan) | **Post** /plans | Create Plan -[**DeletePlan**](PlansApi.md#DeletePlan) | **Delete** /plans/{id} | Delete Plan -[**GetPlan**](PlansApi.md#GetPlan) | **Get** /plans/{id} | Get Plan -[**GetPlans**](PlansApi.md#GetPlans) | **Get** /plans | Get A List of Plans -[**UpdatePlan**](PlansApi.md#UpdatePlan) | **Put** /plans/{id} | Update Plan +[**CreatePlan**](PlansAPI.md#CreatePlan) | **Post** /plans | Create Plan +[**DeletePlan**](PlansAPI.md#DeletePlan) | **Delete** /plans/{id} | Delete Plan +[**GetPlan**](PlansAPI.md#GetPlan) | **Get** /plans/{id} | Get Plan +[**GetPlans**](PlansAPI.md#GetPlans) | **Get** /plans | Get A List of Plans +[**UpdatePlan**](PlansAPI.md#UpdatePlan) | **Put** /plans/{id} | Update Plan @@ -39,13 +39,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlansApi.CreatePlan(context.Background()).PlanRequest(planRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PlansAPI.CreatePlan(context.Background()).PlanRequest(planRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlansApi.CreatePlan``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PlansAPI.CreatePlan``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreatePlan`: PlanResponse - fmt.Fprintf(os.Stdout, "Response from `PlansApi.CreatePlan`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PlansAPI.CreatePlan`: %v\n", resp) } ``` @@ -106,13 +106,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlansApi.DeletePlan(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.PlansAPI.DeletePlan(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlansApi.DeletePlan``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PlansAPI.DeletePlan``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeletePlan`: PlanResponse - fmt.Fprintf(os.Stdout, "Response from `PlansApi.DeletePlan`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PlansAPI.DeletePlan`: %v\n", resp) } ``` @@ -177,13 +177,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlansApi.GetPlan(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PlansAPI.GetPlan(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlansApi.GetPlan``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PlansAPI.GetPlan``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetPlan`: PlanResponse - fmt.Fprintf(os.Stdout, "Response from `PlansApi.GetPlan`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PlansAPI.GetPlan`: %v\n", resp) } ``` @@ -252,13 +252,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlansApi.GetPlans(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.PlansAPI.GetPlans(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlansApi.GetPlans``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PlansAPI.GetPlans``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetPlans`: GetPlansResponse - fmt.Fprintf(os.Stdout, "Response from `PlansApi.GetPlans`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PlansAPI.GetPlans`: %v\n", resp) } ``` @@ -324,13 +324,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.PlansApi.UpdatePlan(context.Background(), id).PlanUpdateRequest(planUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.PlansAPI.UpdatePlan(context.Background(), id).PlanUpdateRequest(planUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `PlansApi.UpdatePlan``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `PlansAPI.UpdatePlan``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdatePlan`: PlanResponse - fmt.Fprintf(os.Stdout, "Response from `PlansApi.UpdatePlan`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `PlansAPI.UpdatePlan`: %v\n", resp) } ``` diff --git a/docs/ProductsApi.md b/docs/ProductsApi.md index 81aacfe..ec98610 100644 --- a/docs/ProductsApi.md +++ b/docs/ProductsApi.md @@ -1,12 +1,12 @@ -# \ProductsApi +# \ProductsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrdersCreateProduct**](ProductsApi.md#OrdersCreateProduct) | **Post** /orders/{id}/line_items | Create Product -[**OrdersDeleteProduct**](ProductsApi.md#OrdersDeleteProduct) | **Delete** /orders/{id}/line_items/{line_item_id} | Delete Product -[**OrdersUpdateProduct**](ProductsApi.md#OrdersUpdateProduct) | **Put** /orders/{id}/line_items/{line_item_id} | Update Product +[**OrdersCreateProduct**](ProductsAPI.md#OrdersCreateProduct) | **Post** /orders/{id}/line_items | Create Product +[**OrdersDeleteProduct**](ProductsAPI.md#OrdersDeleteProduct) | **Delete** /orders/{id}/line_items/{line_item_id} | Delete Product +[**OrdersUpdateProduct**](ProductsAPI.md#OrdersUpdateProduct) | **Put** /orders/{id}/line_items/{line_item_id} | Update Product @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProductsApi.OrdersCreateProduct(context.Background(), id).Product(product).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ProductsAPI.OrdersCreateProduct(context.Background(), id).Product(product).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ProductsApi.OrdersCreateProduct``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ProductsAPI.OrdersCreateProduct``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersCreateProduct`: ProductOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ProductsApi.OrdersCreateProduct`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ProductsAPI.OrdersCreateProduct`: %v\n", resp) } ``` @@ -114,13 +114,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProductsApi.OrdersDeleteProduct(context.Background(), id, lineItemId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ProductsAPI.OrdersDeleteProduct(context.Background(), id, lineItemId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ProductsApi.OrdersDeleteProduct``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ProductsAPI.OrdersDeleteProduct``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersDeleteProduct`: ProductOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ProductsApi.OrdersDeleteProduct`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ProductsAPI.OrdersDeleteProduct`: %v\n", resp) } ``` @@ -192,13 +192,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ProductsApi.OrdersUpdateProduct(context.Background(), id, lineItemId).UpdateProduct(updateProduct).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ProductsAPI.OrdersUpdateProduct(context.Background(), id, lineItemId).UpdateProduct(updateProduct).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ProductsApi.OrdersUpdateProduct``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ProductsAPI.OrdersUpdateProduct``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersUpdateProduct`: ProductOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ProductsApi.OrdersUpdateProduct`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ProductsAPI.OrdersUpdateProduct`: %v\n", resp) } ``` diff --git a/docs/ShippingContactsApi.md b/docs/ShippingContactsApi.md index df0c8b0..beaea88 100644 --- a/docs/ShippingContactsApi.md +++ b/docs/ShippingContactsApi.md @@ -1,12 +1,12 @@ -# \ShippingContactsApi +# \ShippingContactsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateCustomerShippingContacts**](ShippingContactsApi.md#CreateCustomerShippingContacts) | **Post** /customers/{id}/shipping_contacts | Create a shipping contacts -[**DeleteCustomerShippingContacts**](ShippingContactsApi.md#DeleteCustomerShippingContacts) | **Delete** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Delete shipping contacts -[**UpdateCustomerShippingContacts**](ShippingContactsApi.md#UpdateCustomerShippingContacts) | **Put** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Update shipping contacts +[**CreateCustomerShippingContacts**](ShippingContactsAPI.md#CreateCustomerShippingContacts) | **Post** /customers/{id}/shipping_contacts | Create a shipping contacts +[**DeleteCustomerShippingContacts**](ShippingContactsAPI.md#DeleteCustomerShippingContacts) | **Delete** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Delete shipping contacts +[**UpdateCustomerShippingContacts**](ShippingContactsAPI.md#UpdateCustomerShippingContacts) | **Put** /customers/{id}/shipping_contacts/{shipping_contacts_id} | Update shipping contacts @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ShippingContactsApi.CreateCustomerShippingContacts(context.Background(), id).CustomerShippingContacts(customerShippingContacts).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ShippingContactsAPI.CreateCustomerShippingContacts(context.Background(), id).CustomerShippingContacts(customerShippingContacts).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ShippingContactsApi.CreateCustomerShippingContacts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ShippingContactsAPI.CreateCustomerShippingContacts``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateCustomerShippingContacts`: CustomerShippingContactsResponse - fmt.Fprintf(os.Stdout, "Response from `ShippingContactsApi.CreateCustomerShippingContacts`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ShippingContactsAPI.CreateCustomerShippingContacts`: %v\n", resp) } ``` @@ -114,13 +114,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ShippingContactsApi.DeleteCustomerShippingContacts(context.Background(), id, shippingContactsId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ShippingContactsAPI.DeleteCustomerShippingContacts(context.Background(), id, shippingContactsId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ShippingContactsApi.DeleteCustomerShippingContacts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ShippingContactsAPI.DeleteCustomerShippingContacts``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteCustomerShippingContacts`: CustomerShippingContactsResponse - fmt.Fprintf(os.Stdout, "Response from `ShippingContactsApi.DeleteCustomerShippingContacts`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ShippingContactsAPI.DeleteCustomerShippingContacts`: %v\n", resp) } ``` @@ -192,13 +192,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ShippingContactsApi.UpdateCustomerShippingContacts(context.Background(), id, shippingContactsId).CustomerUpdateShippingContacts(customerUpdateShippingContacts).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ShippingContactsAPI.UpdateCustomerShippingContacts(context.Background(), id, shippingContactsId).CustomerUpdateShippingContacts(customerUpdateShippingContacts).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ShippingContactsApi.UpdateCustomerShippingContacts``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ShippingContactsAPI.UpdateCustomerShippingContacts``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateCustomerShippingContacts`: CustomerShippingContactsResponse - fmt.Fprintf(os.Stdout, "Response from `ShippingContactsApi.UpdateCustomerShippingContacts`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ShippingContactsAPI.UpdateCustomerShippingContacts`: %v\n", resp) } ``` diff --git a/docs/ShippingsApi.md b/docs/ShippingsApi.md index 55b0f3a..e1c943c 100644 --- a/docs/ShippingsApi.md +++ b/docs/ShippingsApi.md @@ -1,12 +1,12 @@ -# \ShippingsApi +# \ShippingsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrdersCreateShipping**](ShippingsApi.md#OrdersCreateShipping) | **Post** /orders/{id}/shipping_lines | Create Shipping -[**OrdersDeleteShipping**](ShippingsApi.md#OrdersDeleteShipping) | **Delete** /orders/{id}/shipping_lines/{shipping_id} | Delete Shipping -[**OrdersUpdateShipping**](ShippingsApi.md#OrdersUpdateShipping) | **Put** /orders/{id}/shipping_lines/{shipping_id} | Update Shipping +[**OrdersCreateShipping**](ShippingsAPI.md#OrdersCreateShipping) | **Post** /orders/{id}/shipping_lines | Create Shipping +[**OrdersDeleteShipping**](ShippingsAPI.md#OrdersDeleteShipping) | **Delete** /orders/{id}/shipping_lines/{shipping_id} | Delete Shipping +[**OrdersUpdateShipping**](ShippingsAPI.md#OrdersUpdateShipping) | **Put** /orders/{id}/shipping_lines/{shipping_id} | Update Shipping @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ShippingsApi.OrdersCreateShipping(context.Background(), id).ShippingRequest(shippingRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ShippingsAPI.OrdersCreateShipping(context.Background(), id).ShippingRequest(shippingRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ShippingsApi.OrdersCreateShipping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ShippingsAPI.OrdersCreateShipping``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersCreateShipping`: ShippingOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ShippingsApi.OrdersCreateShipping`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ShippingsAPI.OrdersCreateShipping`: %v\n", resp) } ``` @@ -114,13 +114,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ShippingsApi.OrdersDeleteShipping(context.Background(), id, shippingId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ShippingsAPI.OrdersDeleteShipping(context.Background(), id, shippingId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ShippingsApi.OrdersDeleteShipping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ShippingsAPI.OrdersDeleteShipping``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersDeleteShipping`: ShippingOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ShippingsApi.OrdersDeleteShipping`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ShippingsAPI.OrdersDeleteShipping`: %v\n", resp) } ``` @@ -192,13 +192,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.ShippingsApi.OrdersUpdateShipping(context.Background(), id, shippingId).ShippingRequest(shippingRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.ShippingsAPI.OrdersUpdateShipping(context.Background(), id, shippingId).ShippingRequest(shippingRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `ShippingsApi.OrdersUpdateShipping``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `ShippingsAPI.OrdersUpdateShipping``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersUpdateShipping`: ShippingOrderResponse - fmt.Fprintf(os.Stdout, "Response from `ShippingsApi.OrdersUpdateShipping`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `ShippingsAPI.OrdersUpdateShipping`: %v\n", resp) } ``` diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md index 157c2f0..f8f3c3f 100644 --- a/docs/SubscriptionsApi.md +++ b/docs/SubscriptionsApi.md @@ -1,16 +1,16 @@ -# \SubscriptionsApi +# \SubscriptionsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CancelSubscription**](SubscriptionsApi.md#CancelSubscription) | **Post** /customers/{id}/subscription/cancel | Cancel Subscription -[**CreateSubscription**](SubscriptionsApi.md#CreateSubscription) | **Post** /customers/{id}/subscription | Create Subscription -[**GetAllEventsFromSubscription**](SubscriptionsApi.md#GetAllEventsFromSubscription) | **Get** /customers/{id}/subscription/events | Get Events By Subscription -[**GetSubscription**](SubscriptionsApi.md#GetSubscription) | **Get** /customers/{id}/subscription | Get Subscription -[**PauseSubscription**](SubscriptionsApi.md#PauseSubscription) | **Post** /customers/{id}/subscription/pause | Pause Subscription -[**ResumeSubscription**](SubscriptionsApi.md#ResumeSubscription) | **Post** /customers/{id}/subscription/resume | Resume Subscription -[**UpdateSubscription**](SubscriptionsApi.md#UpdateSubscription) | **Put** /customers/{id}/subscription | Update Subscription +[**CancelSubscription**](SubscriptionsAPI.md#CancelSubscription) | **Post** /customers/{id}/subscription/cancel | Cancel Subscription +[**CreateSubscription**](SubscriptionsAPI.md#CreateSubscription) | **Post** /customers/{id}/subscription | Create Subscription +[**GetAllEventsFromSubscription**](SubscriptionsAPI.md#GetAllEventsFromSubscription) | **Get** /customers/{id}/subscription/events | Get Events By Subscription +[**GetSubscription**](SubscriptionsAPI.md#GetSubscription) | **Get** /customers/{id}/subscription | Get Subscription +[**PauseSubscription**](SubscriptionsAPI.md#PauseSubscription) | **Post** /customers/{id}/subscription/pause | Pause Subscription +[**ResumeSubscription**](SubscriptionsAPI.md#ResumeSubscription) | **Post** /customers/{id}/subscription/resume | Resume Subscription +[**UpdateSubscription**](SubscriptionsAPI.md#UpdateSubscription) | **Put** /customers/{id}/subscription | Update Subscription @@ -41,13 +41,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.CancelSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.SubscriptionsAPI.CancelSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.CancelSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.CancelSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CancelSubscription`: SubscriptionResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.CancelSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.CancelSubscription`: %v\n", resp) } ``` @@ -116,13 +116,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.CreateSubscription(context.Background(), id).SubscriptionRequest(subscriptionRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.SubscriptionsAPI.CreateSubscription(context.Background(), id).SubscriptionRequest(subscriptionRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.CreateSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.CreateSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateSubscription`: SubscriptionResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.CreateSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.CreateSubscription`: %v\n", resp) } ``` @@ -191,13 +191,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.GetAllEventsFromSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.SubscriptionsAPI.GetAllEventsFromSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.GetAllEventsFromSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.GetAllEventsFromSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetAllEventsFromSubscription`: SubscriptionEventsResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.GetAllEventsFromSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.GetAllEventsFromSubscription`: %v\n", resp) } ``` @@ -262,13 +262,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.GetSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.SubscriptionsAPI.GetSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.GetSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.GetSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetSubscription`: SubscriptionResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.GetSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.GetSubscription`: %v\n", resp) } ``` @@ -335,13 +335,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.PauseSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.SubscriptionsAPI.PauseSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.PauseSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.PauseSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PauseSubscription`: SubscriptionResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.PauseSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.PauseSubscription`: %v\n", resp) } ``` @@ -409,13 +409,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.ResumeSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.SubscriptionsAPI.ResumeSubscription(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.ResumeSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.ResumeSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `ResumeSubscription`: SubscriptionResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.ResumeSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.ResumeSubscription`: %v\n", resp) } ``` @@ -484,13 +484,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.SubscriptionsApi.UpdateSubscription(context.Background(), id).SubscriptionUpdateRequest(subscriptionUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.SubscriptionsAPI.UpdateSubscription(context.Background(), id).SubscriptionUpdateRequest(subscriptionUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsApi.UpdateSubscription``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionsAPI.UpdateSubscription``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateSubscription`: SubscriptionResponse - fmt.Fprintf(os.Stdout, "Response from `SubscriptionsApi.UpdateSubscription`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `SubscriptionsAPI.UpdateSubscription`: %v\n", resp) } ``` diff --git a/docs/TaxesApi.md b/docs/TaxesApi.md index bfe2c9f..c5b75d8 100644 --- a/docs/TaxesApi.md +++ b/docs/TaxesApi.md @@ -1,12 +1,12 @@ -# \TaxesApi +# \TaxesAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**OrdersCreateTaxes**](TaxesApi.md#OrdersCreateTaxes) | **Post** /orders/{id}/tax_lines | Create Tax -[**OrdersDeleteTaxes**](TaxesApi.md#OrdersDeleteTaxes) | **Delete** /orders/{id}/tax_lines/{tax_id} | Delete Tax -[**OrdersUpdateTaxes**](TaxesApi.md#OrdersUpdateTaxes) | **Put** /orders/{id}/tax_lines/{tax_id} | Update Tax +[**OrdersCreateTaxes**](TaxesAPI.md#OrdersCreateTaxes) | **Post** /orders/{id}/tax_lines | Create Tax +[**OrdersDeleteTaxes**](TaxesAPI.md#OrdersDeleteTaxes) | **Delete** /orders/{id}/tax_lines/{tax_id} | Delete Tax +[**OrdersUpdateTaxes**](TaxesAPI.md#OrdersUpdateTaxes) | **Put** /orders/{id}/tax_lines/{tax_id} | Update Tax @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TaxesApi.OrdersCreateTaxes(context.Background(), id).OrderTaxRequest(orderTaxRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.TaxesAPI.OrdersCreateTaxes(context.Background(), id).OrderTaxRequest(orderTaxRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TaxesApi.OrdersCreateTaxes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TaxesAPI.OrdersCreateTaxes``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersCreateTaxes`: UpdateOrderTaxResponse - fmt.Fprintf(os.Stdout, "Response from `TaxesApi.OrdersCreateTaxes`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TaxesAPI.OrdersCreateTaxes`: %v\n", resp) } ``` @@ -114,13 +114,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TaxesApi.OrdersDeleteTaxes(context.Background(), id, taxId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.TaxesAPI.OrdersDeleteTaxes(context.Background(), id, taxId).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TaxesApi.OrdersDeleteTaxes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TaxesAPI.OrdersDeleteTaxes``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersDeleteTaxes`: UpdateOrderTaxResponse - fmt.Fprintf(os.Stdout, "Response from `TaxesApi.OrdersDeleteTaxes`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TaxesAPI.OrdersDeleteTaxes`: %v\n", resp) } ``` @@ -192,13 +192,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TaxesApi.OrdersUpdateTaxes(context.Background(), id, taxId).UpdateOrderTaxRequest(updateOrderTaxRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.TaxesAPI.OrdersUpdateTaxes(context.Background(), id, taxId).UpdateOrderTaxRequest(updateOrderTaxRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TaxesApi.OrdersUpdateTaxes``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TaxesAPI.OrdersUpdateTaxes``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `OrdersUpdateTaxes`: UpdateOrderTaxResponse - fmt.Fprintf(os.Stdout, "Response from `TaxesApi.OrdersUpdateTaxes`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TaxesAPI.OrdersUpdateTaxes`: %v\n", resp) } ``` diff --git a/docs/TokensApi.md b/docs/TokensApi.md index 4956310..29b19aa 100644 --- a/docs/TokensApi.md +++ b/docs/TokensApi.md @@ -1,10 +1,10 @@ -# \TokensApi +# \TokensAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateToken**](TokensApi.md#CreateToken) | **Post** /tokens | Create Token +[**CreateToken**](TokensAPI.md#CreateToken) | **Post** /tokens | Create Token @@ -34,13 +34,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TokensApi.CreateToken(context.Background()).Token(token).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.TokensAPI.CreateToken(context.Background()).Token(token).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TokensApi.CreateToken``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TokensAPI.CreateToken``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateToken`: TokenResponse - fmt.Fprintf(os.Stdout, "Response from `TokensApi.CreateToken`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TokensAPI.CreateToken`: %v\n", resp) } ``` diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 7b133b6..667d114 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -1,11 +1,11 @@ -# \TransactionsApi +# \TransactionsAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetTransaction**](TransactionsApi.md#GetTransaction) | **Get** /transactions/{id} | Get transaction -[**GetTransactions**](TransactionsApi.md#GetTransactions) | **Get** /transactions | Get List transactions +[**GetTransaction**](TransactionsAPI.md#GetTransaction) | **Get** /transactions/{id} | Get transaction +[**GetTransactions**](TransactionsAPI.md#GetTransactions) | **Get** /transactions | Get List transactions @@ -36,13 +36,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransactionsApi.GetTransaction(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.TransactionsAPI.GetTransaction(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.GetTransaction``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.GetTransaction``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetTransaction`: TransactionResponse - fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.GetTransaction`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.GetTransaction`: %v\n", resp) } ``` @@ -85,7 +85,7 @@ Name | Type | Description | Notes ## GetTransactions -> GetTransactionsResponse GetTransactions(ctx).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() +> GetTransactionsResponse GetTransactions(ctx).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Next(next).Previous(previous).Id(id).ChargeId(chargeId).Type_(type_).Currency(currency).Execute() Get List transactions @@ -107,19 +107,22 @@ func main() { acceptLanguage := "es" // string | Use for knowing which language to use (optional) (default to "es") xChildCompanyId := "6441b6376b60c3a638da80af" // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) limit := int32(56) // int32 | The numbers of items to return, the maximum value is 250 (optional) (default to 20) - search := "search_example" // string | General order search, e.g. by mail, reference etc. (optional) next := "next_example" // string | next page (optional) previous := "previous_example" // string | previous page (optional) + id := "65412a893cd69a0001c25892" // string | id of the object to be retrieved (optional) + chargeId := "65412a893cd69a0001c25892" // string | id of the charge used for filtering (optional) + type_ := "capture" // string | type of the object to be retrieved (optional) + currency := "MXN" // string | currency of the object to be retrieved (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransactionsApi.GetTransactions(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.TransactionsAPI.GetTransactions(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Next(next).Previous(previous).Id(id).ChargeId(chargeId).Type_(type_).Currency(currency).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransactionsApi.GetTransactions``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TransactionsAPI.GetTransactions``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetTransactions`: GetTransactionsResponse - fmt.Fprintf(os.Stdout, "Response from `TransactionsApi.GetTransactions`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TransactionsAPI.GetTransactions`: %v\n", resp) } ``` @@ -137,9 +140,12 @@ Name | Type | Description | Notes **acceptLanguage** | **string** | Use for knowing which language to use | [default to "es"] **xChildCompanyId** | **string** | In the case of a holding company, the company id of the child company to which will process the request. | **limit** | **int32** | The numbers of items to return, the maximum value is 250 | [default to 20] - **search** | **string** | General order search, e.g. by mail, reference etc. | **next** | **string** | next page | **previous** | **string** | previous page | + **id** | **string** | id of the object to be retrieved | + **chargeId** | **string** | id of the charge used for filtering | + **type_** | **string** | type of the object to be retrieved | + **currency** | **string** | currency of the object to be retrieved | ### Return type diff --git a/docs/TransfersApi.md b/docs/TransfersApi.md index c64bd56..4621368 100644 --- a/docs/TransfersApi.md +++ b/docs/TransfersApi.md @@ -1,11 +1,11 @@ -# \TransfersApi +# \TransfersAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetTransfer**](TransfersApi.md#GetTransfer) | **Get** /transfers/{id} | Get Transfer -[**GetTransfers**](TransfersApi.md#GetTransfers) | **Get** /transfers | Get a list of transfers +[**GetTransfer**](TransfersAPI.md#GetTransfer) | **Get** /transfers/{id} | Get Transfer +[**GetTransfers**](TransfersAPI.md#GetTransfers) | **Get** /transfers | Get a list of transfers @@ -36,13 +36,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransfersApi.GetTransfer(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.TransfersAPI.GetTransfer(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransfersApi.GetTransfer``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TransfersAPI.GetTransfer``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetTransfer`: TransferResponse - fmt.Fprintf(os.Stdout, "Response from `TransfersApi.GetTransfer`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TransfersAPI.GetTransfer`: %v\n", resp) } ``` @@ -113,13 +113,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TransfersApi.GetTransfers(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.TransfersAPI.GetTransfers(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TransfersApi.GetTransfers``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `TransfersAPI.GetTransfers``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetTransfers`: GetTransfersResponse - fmt.Fprintf(os.Stdout, "Response from `TransfersApi.GetTransfers`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `TransfersAPI.GetTransfers`: %v\n", resp) } ``` diff --git a/docs/WebhookKeysApi.md b/docs/WebhookKeysApi.md index f881a00..bb71160 100644 --- a/docs/WebhookKeysApi.md +++ b/docs/WebhookKeysApi.md @@ -1,14 +1,14 @@ -# \WebhookKeysApi +# \WebhookKeysAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateWebhookKey**](WebhookKeysApi.md#CreateWebhookKey) | **Post** /webhook_keys | Create Webhook Key -[**DeleteWebhookKey**](WebhookKeysApi.md#DeleteWebhookKey) | **Delete** /webhook_keys/{id} | Delete Webhook key -[**GetWebhookKey**](WebhookKeysApi.md#GetWebhookKey) | **Get** /webhook_keys/{id} | Get Webhook Key -[**GetWebhookKeys**](WebhookKeysApi.md#GetWebhookKeys) | **Get** /webhook_keys | Get List of Webhook Keys -[**UpdateWebhookKey**](WebhookKeysApi.md#UpdateWebhookKey) | **Put** /webhook_keys/{id} | Update Webhook Key +[**CreateWebhookKey**](WebhookKeysAPI.md#CreateWebhookKey) | **Post** /webhook_keys | Create Webhook Key +[**DeleteWebhookKey**](WebhookKeysAPI.md#DeleteWebhookKey) | **Delete** /webhook_keys/{id} | Delete Webhook key +[**GetWebhookKey**](WebhookKeysAPI.md#GetWebhookKey) | **Get** /webhook_keys/{id} | Get Webhook Key +[**GetWebhookKeys**](WebhookKeysAPI.md#GetWebhookKeys) | **Get** /webhook_keys | Get List of Webhook Keys +[**UpdateWebhookKey**](WebhookKeysAPI.md#UpdateWebhookKey) | **Put** /webhook_keys/{id} | Update Webhook Key @@ -38,13 +38,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookKeysApi.CreateWebhookKey(context.Background()).AcceptLanguage(acceptLanguage).WebhookKeyRequest(webhookKeyRequest).Execute() + resp, r, err := apiClient.WebhookKeysAPI.CreateWebhookKey(context.Background()).AcceptLanguage(acceptLanguage).WebhookKeyRequest(webhookKeyRequest).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysApi.CreateWebhookKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysAPI.CreateWebhookKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateWebhookKey`: WebhookKeyCreateResponse - fmt.Fprintf(os.Stdout, "Response from `WebhookKeysApi.CreateWebhookKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhookKeysAPI.CreateWebhookKey`: %v\n", resp) } ``` @@ -104,13 +104,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookKeysApi.DeleteWebhookKey(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.WebhookKeysAPI.DeleteWebhookKey(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysApi.DeleteWebhookKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysAPI.DeleteWebhookKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteWebhookKey`: WebhookKeyDeleteResponse - fmt.Fprintf(os.Stdout, "Response from `WebhookKeysApi.DeleteWebhookKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhookKeysAPI.DeleteWebhookKey`: %v\n", resp) } ``` @@ -175,13 +175,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookKeysApi.GetWebhookKey(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.WebhookKeysAPI.GetWebhookKey(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysApi.GetWebhookKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysAPI.GetWebhookKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetWebhookKey`: WebhookKeyResponse - fmt.Fprintf(os.Stdout, "Response from `WebhookKeysApi.GetWebhookKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhookKeysAPI.GetWebhookKey`: %v\n", resp) } ``` @@ -252,13 +252,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookKeysApi.GetWebhookKeys(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.WebhookKeysAPI.GetWebhookKeys(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysApi.GetWebhookKeys``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysAPI.GetWebhookKeys``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetWebhookKeys`: GetWebhookKeysResponse - fmt.Fprintf(os.Stdout, "Response from `WebhookKeysApi.GetWebhookKeys`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhookKeysAPI.GetWebhookKeys`: %v\n", resp) } ``` @@ -325,13 +325,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhookKeysApi.UpdateWebhookKey(context.Background(), id).AcceptLanguage(acceptLanguage).WebhookKeyUpdateRequest(webhookKeyUpdateRequest).Execute() + resp, r, err := apiClient.WebhookKeysAPI.UpdateWebhookKey(context.Background(), id).AcceptLanguage(acceptLanguage).WebhookKeyUpdateRequest(webhookKeyUpdateRequest).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysApi.UpdateWebhookKey``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhookKeysAPI.UpdateWebhookKey``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateWebhookKey`: WebhookKeyResponse - fmt.Fprintf(os.Stdout, "Response from `WebhookKeysApi.UpdateWebhookKey`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhookKeysAPI.UpdateWebhookKey`: %v\n", resp) } ``` diff --git a/docs/WebhookUpdateRequest.md b/docs/WebhookUpdateRequest.md index 2b22095..8ad7a80 100644 --- a/docs/WebhookUpdateRequest.md +++ b/docs/WebhookUpdateRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Url** | **string** | 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. | **Synchronous** | Pointer to **bool** | It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false | [optional] [default to false] -**SubscribedEvents** | Pointer to **[]string** | | [optional] +**Events** | Pointer to **[]string** | | [optional] ## Methods @@ -72,30 +72,30 @@ SetSynchronous sets Synchronous field to given value. HasSynchronous returns a boolean if a field has been set. -### GetSubscribedEvents +### GetEvents -`func (o *WebhookUpdateRequest) GetSubscribedEvents() []string` +`func (o *WebhookUpdateRequest) GetEvents() []string` -GetSubscribedEvents returns the SubscribedEvents field if non-nil, zero value otherwise. +GetEvents returns the Events field if non-nil, zero value otherwise. -### GetSubscribedEventsOk +### GetEventsOk -`func (o *WebhookUpdateRequest) GetSubscribedEventsOk() (*[]string, bool)` +`func (o *WebhookUpdateRequest) GetEventsOk() (*[]string, bool)` -GetSubscribedEventsOk returns a tuple with the SubscribedEvents field if it's non-nil, zero value otherwise +GetEventsOk returns a tuple with the Events field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSubscribedEvents +### SetEvents -`func (o *WebhookUpdateRequest) SetSubscribedEvents(v []string)` +`func (o *WebhookUpdateRequest) SetEvents(v []string)` -SetSubscribedEvents sets SubscribedEvents field to given value. +SetEvents sets Events field to given value. -### HasSubscribedEvents +### HasEvents -`func (o *WebhookUpdateRequest) HasSubscribedEvents() bool` +`func (o *WebhookUpdateRequest) HasEvents() bool` -HasSubscribedEvents returns a boolean if a field has been set. +HasEvents returns a boolean if a field has been set. [[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 0194b7f..2aa4415 100644 --- a/docs/WebhooksApi.md +++ b/docs/WebhooksApi.md @@ -1,15 +1,15 @@ -# \WebhooksApi +# \WebhooksAPI All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateWebhook**](WebhooksApi.md#CreateWebhook) | **Post** /webhooks | Create Webhook -[**DeleteWebhook**](WebhooksApi.md#DeleteWebhook) | **Delete** /webhooks/{id} | Delete Webhook -[**GetWebhook**](WebhooksApi.md#GetWebhook) | **Get** /webhooks/{id} | Get Webhook -[**GetWebhooks**](WebhooksApi.md#GetWebhooks) | **Get** /webhooks | Get List of Webhooks -[**TestWebhook**](WebhooksApi.md#TestWebhook) | **Post** /webhooks/{id}/test | Test Webhook -[**UpdateWebhook**](WebhooksApi.md#UpdateWebhook) | **Put** /webhooks/{id} | Update Webhook +[**CreateWebhook**](WebhooksAPI.md#CreateWebhook) | **Post** /webhooks | Create Webhook +[**DeleteWebhook**](WebhooksAPI.md#DeleteWebhook) | **Delete** /webhooks/{id} | Delete Webhook +[**GetWebhook**](WebhooksAPI.md#GetWebhook) | **Get** /webhooks/{id} | Get Webhook +[**GetWebhooks**](WebhooksAPI.md#GetWebhooks) | **Get** /webhooks | Get List of Webhooks +[**TestWebhook**](WebhooksAPI.md#TestWebhook) | **Post** /webhooks/{id}/test | Test Webhook +[**UpdateWebhook**](WebhooksAPI.md#UpdateWebhook) | **Put** /webhooks/{id} | Update Webhook @@ -39,13 +39,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhooksApi.CreateWebhook(context.Background()).WebhookRequest(webhookRequest).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.WebhooksAPI.CreateWebhook(context.Background()).WebhookRequest(webhookRequest).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.CreateWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.CreateWebhook``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `CreateWebhook`: WebhookResponse - fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.CreateWebhook`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhooksAPI.CreateWebhook`: %v\n", resp) } ``` @@ -105,13 +105,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhooksApi.DeleteWebhook(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.WebhooksAPI.DeleteWebhook(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.DeleteWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.DeleteWebhook``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `DeleteWebhook`: WebhookResponse - fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.DeleteWebhook`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhooksAPI.DeleteWebhook`: %v\n", resp) } ``` @@ -176,13 +176,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhooksApi.GetWebhook(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.WebhooksAPI.GetWebhook(context.Background(), id).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.GetWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.GetWebhook``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetWebhook`: WebhookResponse - fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.GetWebhook`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhooksAPI.GetWebhook`: %v\n", resp) } ``` @@ -253,13 +253,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhooksApi.GetWebhooks(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() + resp, r, err := apiClient.WebhooksAPI.GetWebhooks(context.Background()).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Limit(limit).Search(search).Next(next).Previous(previous).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.GetWebhooks``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.GetWebhooks``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetWebhooks`: GetWebhooksResponse - fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.GetWebhooks`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhooksAPI.GetWebhooks`: %v\n", resp) } ``` @@ -325,13 +325,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhooksApi.TestWebhook(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() + resp, r, err := apiClient.WebhooksAPI.TestWebhook(context.Background(), id).AcceptLanguage(acceptLanguage).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.TestWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.TestWebhook``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `TestWebhook`: WebhookResponse - fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.TestWebhook`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhooksAPI.TestWebhook`: %v\n", resp) } ``` @@ -399,13 +399,13 @@ func main() { configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WebhooksApi.UpdateWebhook(context.Background(), id).WebhookUpdateRequest(webhookUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() + resp, r, err := apiClient.WebhooksAPI.UpdateWebhook(context.Background(), id).WebhookUpdateRequest(webhookUpdateRequest).AcceptLanguage(acceptLanguage).XChildCompanyId(xChildCompanyId).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WebhooksApi.UpdateWebhook``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `WebhooksAPI.UpdateWebhook``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `UpdateWebhook`: WebhookResponse - fmt.Fprintf(os.Stdout, "Response from `WebhooksApi.UpdateWebhook`: %v\n", resp) + fmt.Fprintf(os.Stdout, "Response from `WebhooksAPI.UpdateWebhook`: %v\n", resp) } ``` diff --git a/model_api_key_request.go b/model_api_key_request.go index a0e56ec..256f67e 100644 --- a/model_api_key_request.go +++ b/model_api_key_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ApiKeyRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type ApiKeyRequest struct { Role string `json:"role"` } +type _ApiKeyRequest ApiKeyRequest + // NewApiKeyRequest instantiates a new ApiKeyRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -116,6 +119,41 @@ func (o ApiKeyRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ApiKeyRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "role", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varApiKeyRequest := _ApiKeyRequest{} + + err = json.Unmarshal(bytes, &varApiKeyRequest) + + if err != nil { + return err + } + + *o = ApiKeyRequest(varApiKeyRequest) + + return err +} + type NullableApiKeyRequest struct { value *ApiKeyRequest isSet bool diff --git a/model_charge_order_response.go b/model_charge_order_response.go index 74fac58..6ff8c51 100644 --- a/model_charge_order_response.go +++ b/model_charge_order_response.go @@ -29,7 +29,6 @@ type ChargeOrderResponse struct { DeviceFingerprint NullableString `json:"device_fingerprint,omitempty"` FailureCode *string `json:"failure_code,omitempty"` FailureMessage *string `json:"failure_message,omitempty"` - Fee *int32 `json:"fee,omitempty"` Id *string `json:"id,omitempty"` Livemode *bool `json:"livemode,omitempty"` MonthlyInstallments NullableInt32 `json:"monthly_installments,omitempty"` @@ -358,38 +357,6 @@ func (o *ChargeOrderResponse) SetFailureMessage(v string) { o.FailureMessage = &v } -// GetFee returns the Fee field value if set, zero value otherwise. -func (o *ChargeOrderResponse) GetFee() int32 { - if o == nil || IsNil(o.Fee) { - var ret int32 - return ret - } - return *o.Fee -} - -// GetFeeOk returns a tuple with the Fee field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeOrderResponse) GetFeeOk() (*int32, bool) { - if o == nil || IsNil(o.Fee) { - return nil, false - } - return o.Fee, true -} - -// HasFee returns a boolean if a field has been set. -func (o *ChargeOrderResponse) HasFee() bool { - if o != nil && !IsNil(o.Fee) { - return true - } - - return false -} - -// SetFee gets a reference to the given int32 and assigns it to the Fee field. -func (o *ChargeOrderResponse) SetFee(v int32) { - o.Fee = &v -} - // GetId returns the Id field value if set, zero value otherwise. func (o *ChargeOrderResponse) GetId() string { if o == nil || IsNil(o.Id) { @@ -777,9 +744,6 @@ func (o ChargeOrderResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.FailureMessage) { toSerialize["failure_message"] = o.FailureMessage } - if !IsNil(o.Fee) { - toSerialize["fee"] = o.Fee - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } diff --git a/model_charge_request.go b/model_charge_request.go index 99fbec4..7836242 100644 --- a/model_charge_request.go +++ b/model_charge_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ChargeRequest type satisfies the MappedNullable interface at compile time @@ -21,13 +22,13 @@ var _ MappedNullable = &ChargeRequest{} // ChargeRequest The charges to be made type ChargeRequest struct { Amount *int32 `json:"amount,omitempty"` - // How many months without interest to apply, it can be 3, 6, 9, 12 or 18 - MonthlyInstallments *int32 `json:"monthly_installments,omitempty"` PaymentMethod ChargeRequestPaymentMethod `json:"payment_method"` // Custom reference to add to the charge ReferenceId *string `json:"reference_id,omitempty"` } +type _ChargeRequest ChargeRequest + // NewChargeRequest instantiates a new ChargeRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -78,38 +79,6 @@ func (o *ChargeRequest) SetAmount(v int32) { o.Amount = &v } -// GetMonthlyInstallments returns the MonthlyInstallments field value if set, zero value otherwise. -func (o *ChargeRequest) GetMonthlyInstallments() int32 { - if o == nil || IsNil(o.MonthlyInstallments) { - var ret int32 - return ret - } - return *o.MonthlyInstallments -} - -// GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeRequest) GetMonthlyInstallmentsOk() (*int32, bool) { - if o == nil || IsNil(o.MonthlyInstallments) { - return nil, false - } - return o.MonthlyInstallments, true -} - -// HasMonthlyInstallments returns a boolean if a field has been set. -func (o *ChargeRequest) HasMonthlyInstallments() bool { - if o != nil && !IsNil(o.MonthlyInstallments) { - return true - } - - return false -} - -// SetMonthlyInstallments gets a reference to the given int32 and assigns it to the MonthlyInstallments field. -func (o *ChargeRequest) SetMonthlyInstallments(v int32) { - o.MonthlyInstallments = &v -} - // GetPaymentMethod returns the PaymentMethod field value func (o *ChargeRequest) GetPaymentMethod() ChargeRequestPaymentMethod { if o == nil { @@ -179,9 +148,6 @@ func (o ChargeRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.Amount) { toSerialize["amount"] = o.Amount } - if !IsNil(o.MonthlyInstallments) { - toSerialize["monthly_installments"] = o.MonthlyInstallments - } toSerialize["payment_method"] = o.PaymentMethod if !IsNil(o.ReferenceId) { toSerialize["reference_id"] = o.ReferenceId @@ -189,6 +155,41 @@ func (o ChargeRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChargeRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "payment_method", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChargeRequest := _ChargeRequest{} + + err = json.Unmarshal(bytes, &varChargeRequest) + + if err != nil { + return err + } + + *o = ChargeRequest(varChargeRequest) + + return err +} + type NullableChargeRequest struct { value *ChargeRequest isSet bool diff --git a/model_charge_request_payment_method.go b/model_charge_request_payment_method.go index d2b3240..7d25ace 100644 --- a/model_charge_request_payment_method.go +++ b/model_charge_request_payment_method.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ChargeRequestPaymentMethod type satisfies the MappedNullable interface at compile time @@ -22,6 +23,8 @@ var _ MappedNullable = &ChargeRequestPaymentMethod{} type ChargeRequestPaymentMethod struct { // Method expiration date as unix timestamp ExpiresAt *int64 `json:"expires_at,omitempty"` + // How many months without interest to apply, it can be 3, 6, 9, 12 or 18 + MonthlyInstallments *int32 `json:"monthly_installments,omitempty"` Type string `json:"type"` TokenId *string `json:"token_id,omitempty"` PaymentSourceId *string `json:"payment_source_id,omitempty"` @@ -29,6 +32,8 @@ type ChargeRequestPaymentMethod struct { ContractId *string `json:"contract_id,omitempty"` } +type _ChargeRequestPaymentMethod ChargeRequestPaymentMethod + // NewChargeRequestPaymentMethod instantiates a new ChargeRequestPaymentMethod object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +84,38 @@ func (o *ChargeRequestPaymentMethod) SetExpiresAt(v int64) { o.ExpiresAt = &v } +// GetMonthlyInstallments returns the MonthlyInstallments field value if set, zero value otherwise. +func (o *ChargeRequestPaymentMethod) GetMonthlyInstallments() int32 { + if o == nil || IsNil(o.MonthlyInstallments) { + var ret int32 + return ret + } + return *o.MonthlyInstallments +} + +// GetMonthlyInstallmentsOk returns a tuple with the MonthlyInstallments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChargeRequestPaymentMethod) GetMonthlyInstallmentsOk() (*int32, bool) { + if o == nil || IsNil(o.MonthlyInstallments) { + return nil, false + } + return o.MonthlyInstallments, true +} + +// HasMonthlyInstallments returns a boolean if a field has been set. +func (o *ChargeRequestPaymentMethod) HasMonthlyInstallments() bool { + if o != nil && !IsNil(o.MonthlyInstallments) { + return true + } + + return false +} + +// SetMonthlyInstallments gets a reference to the given int32 and assigns it to the MonthlyInstallments field. +func (o *ChargeRequestPaymentMethod) SetMonthlyInstallments(v int32) { + o.MonthlyInstallments = &v +} + // GetType returns the Type field value func (o *ChargeRequestPaymentMethod) GetType() string { if o == nil { @@ -212,6 +249,9 @@ func (o ChargeRequestPaymentMethod) ToMap() (map[string]interface{}, error) { if !IsNil(o.ExpiresAt) { toSerialize["expires_at"] = o.ExpiresAt } + if !IsNil(o.MonthlyInstallments) { + toSerialize["monthly_installments"] = o.MonthlyInstallments + } toSerialize["type"] = o.Type if !IsNil(o.TokenId) { toSerialize["token_id"] = o.TokenId @@ -225,6 +265,41 @@ func (o ChargeRequestPaymentMethod) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChargeRequestPaymentMethod) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChargeRequestPaymentMethod := _ChargeRequestPaymentMethod{} + + err = json.Unmarshal(bytes, &varChargeRequestPaymentMethod) + + if err != nil { + return err + } + + *o = ChargeRequestPaymentMethod(varChargeRequestPaymentMethod) + + return err +} + type NullableChargeRequestPaymentMethod struct { value *ChargeRequestPaymentMethod isSet bool diff --git a/model_charge_response.go b/model_charge_response.go index c151dc0..9f034e6 100644 --- a/model_charge_response.go +++ b/model_charge_response.go @@ -29,7 +29,6 @@ type ChargeResponse struct { DeviceFingerprint *string `json:"device_fingerprint,omitempty"` FailureCode *string `json:"failure_code,omitempty"` FailureMessage *string `json:"failure_message,omitempty"` - Fee *int32 `json:"fee,omitempty"` Id *string `json:"id,omitempty"` Livemode *bool `json:"livemode,omitempty"` Object *string `json:"object,omitempty"` @@ -347,38 +346,6 @@ func (o *ChargeResponse) SetFailureMessage(v string) { o.FailureMessage = &v } -// GetFee returns the Fee field value if set, zero value otherwise. -func (o *ChargeResponse) GetFee() int32 { - if o == nil || IsNil(o.Fee) { - var ret int32 - return ret - } - return *o.Fee -} - -// GetFeeOk returns a tuple with the Fee field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeResponse) GetFeeOk() (*int32, bool) { - if o == nil || IsNil(o.Fee) { - return nil, false - } - return o.Fee, true -} - -// HasFee returns a boolean if a field has been set. -func (o *ChargeResponse) HasFee() bool { - if o != nil && !IsNil(o.Fee) { - return true - } - - return false -} - -// SetFee gets a reference to the given int32 and assigns it to the Fee field. -func (o *ChargeResponse) SetFee(v int32) { - o.Fee = &v -} - // GetId returns the Id field value if set, zero value otherwise. func (o *ChargeResponse) GetId() string { if o == nil || IsNil(o.Id) { @@ -734,9 +701,6 @@ func (o ChargeResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.FailureMessage) { toSerialize["failure_message"] = o.FailureMessage } - if !IsNil(o.Fee) { - toSerialize["fee"] = o.Fee - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } diff --git a/model_charge_response_refunds.go b/model_charge_response_refunds.go index 6b184bc..227a3b9 100644 --- a/model_charge_response_refunds.go +++ b/model_charge_response_refunds.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ChargeResponseRefunds type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type ChargeResponseRefunds struct { Data []ChargeResponseRefundsData `json:"data,omitempty"` } +type _ChargeResponseRefunds ChargeResponseRefunds + // NewChargeResponseRefunds instantiates a new ChargeResponseRefunds object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -239,6 +242,42 @@ func (o ChargeResponseRefunds) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChargeResponseRefunds) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChargeResponseRefunds := _ChargeResponseRefunds{} + + err = json.Unmarshal(bytes, &varChargeResponseRefunds) + + if err != nil { + return err + } + + *o = ChargeResponseRefunds(varChargeResponseRefunds) + + return err +} + type NullableChargeResponseRefunds struct { value *ChargeResponseRefunds isSet bool diff --git a/model_charge_response_refunds_data.go b/model_charge_response_refunds_data.go index a870a98..a24b9c7 100644 --- a/model_charge_response_refunds_data.go +++ b/model_charge_response_refunds_data.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ChargeResponseRefundsData type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type ChargeResponseRefundsData struct { Status *string `json:"status,omitempty"` } +type _ChargeResponseRefundsData ChargeResponseRefundsData + // NewChargeResponseRefundsData instantiates a new ChargeResponseRefundsData object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -270,6 +273,44 @@ func (o ChargeResponseRefundsData) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ChargeResponseRefundsData) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "created_at", + "id", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChargeResponseRefundsData := _ChargeResponseRefundsData{} + + err = json.Unmarshal(bytes, &varChargeResponseRefundsData) + + if err != nil { + return err + } + + *o = ChargeResponseRefundsData(varChargeResponseRefundsData) + + return err +} + type NullableChargeResponseRefundsData struct { value *ChargeResponseRefundsData isSet bool diff --git a/model_charge_update_request.go b/model_charge_update_request.go new file mode 100644 index 0000000..464aeec --- /dev/null +++ b/model_charge_update_request.go @@ -0,0 +1,128 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" +) + +// checks if the ChargeUpdateRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChargeUpdateRequest{} + +// ChargeUpdateRequest requested field for update a charge +type ChargeUpdateRequest struct { + // custom reference id + ReferenceId *string `json:"reference_id,omitempty"` +} + +// NewChargeUpdateRequest instantiates a new ChargeUpdateRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChargeUpdateRequest() *ChargeUpdateRequest { + this := ChargeUpdateRequest{} + return &this +} + +// NewChargeUpdateRequestWithDefaults instantiates a new ChargeUpdateRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChargeUpdateRequestWithDefaults() *ChargeUpdateRequest { + this := ChargeUpdateRequest{} + return &this +} + +// GetReferenceId returns the ReferenceId field value if set, zero value otherwise. +func (o *ChargeUpdateRequest) GetReferenceId() string { + if o == nil || IsNil(o.ReferenceId) { + var ret string + return ret + } + return *o.ReferenceId +} + +// GetReferenceIdOk returns a tuple with the ReferenceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ChargeUpdateRequest) GetReferenceIdOk() (*string, bool) { + if o == nil || IsNil(o.ReferenceId) { + return nil, false + } + return o.ReferenceId, true +} + +// HasReferenceId returns a boolean if a field has been set. +func (o *ChargeUpdateRequest) HasReferenceId() bool { + if o != nil && !IsNil(o.ReferenceId) { + return true + } + + return false +} + +// SetReferenceId gets a reference to the given string and assigns it to the ReferenceId field. +func (o *ChargeUpdateRequest) SetReferenceId(v string) { + o.ReferenceId = &v +} + +func (o ChargeUpdateRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChargeUpdateRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ReferenceId) { + toSerialize["reference_id"] = o.ReferenceId + } + return toSerialize, nil +} + +type NullableChargeUpdateRequest struct { + value *ChargeUpdateRequest + isSet bool +} + +func (v NullableChargeUpdateRequest) Get() *ChargeUpdateRequest { + return v.value +} + +func (v *NullableChargeUpdateRequest) Set(val *ChargeUpdateRequest) { + v.value = val + v.isSet = true +} + +func (v NullableChargeUpdateRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableChargeUpdateRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChargeUpdateRequest(val *ChargeUpdateRequest) *NullableChargeUpdateRequest { + return &NullableChargeUpdateRequest{value: val, isSet: true} +} + +func (v NullableChargeUpdateRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChargeUpdateRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_charges_data_response.go b/model_charges_data_response.go index ce54323..bc2a07e 100644 --- a/model_charges_data_response.go +++ b/model_charges_data_response.go @@ -29,7 +29,6 @@ type ChargesDataResponse struct { DeviceFingerprint *string `json:"device_fingerprint,omitempty"` FailureCode *string `json:"failure_code,omitempty"` FailureMessage *string `json:"failure_message,omitempty"` - Fee *int32 `json:"fee,omitempty"` Id *string `json:"id,omitempty"` Livemode *bool `json:"livemode,omitempty"` Object *string `json:"object,omitempty"` @@ -347,38 +346,6 @@ func (o *ChargesDataResponse) SetFailureMessage(v string) { o.FailureMessage = &v } -// GetFee returns the Fee field value if set, zero value otherwise. -func (o *ChargesDataResponse) GetFee() int32 { - if o == nil || IsNil(o.Fee) { - var ret int32 - return ret - } - return *o.Fee -} - -// GetFeeOk returns a tuple with the Fee field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargesDataResponse) GetFeeOk() (*int32, bool) { - if o == nil || IsNil(o.Fee) { - return nil, false - } - return o.Fee, true -} - -// HasFee returns a boolean if a field has been set. -func (o *ChargesDataResponse) HasFee() bool { - if o != nil && !IsNil(o.Fee) { - return true - } - - return false -} - -// SetFee gets a reference to the given int32 and assigns it to the Fee field. -func (o *ChargesDataResponse) SetFee(v int32) { - o.Fee = &v -} - // GetId returns the Id field value if set, zero value otherwise. func (o *ChargesDataResponse) GetId() string { if o == nil || IsNil(o.Id) { @@ -734,9 +701,6 @@ func (o ChargesDataResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.FailureMessage) { toSerialize["failure_message"] = o.FailureMessage } - if !IsNil(o.Fee) { - toSerialize["fee"] = o.Fee - } if !IsNil(o.Id) { toSerialize["id"] = o.Id } diff --git a/model_checkout.go b/model_checkout.go index 599b108..64bcd14 100644 --- a/model_checkout.go +++ b/model_checkout.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the Checkout type satisfies the MappedNullable interface at compile time @@ -43,6 +44,8 @@ type Checkout struct { Type string `json:"type"` } +type _Checkout Checkout + // NewCheckout instantiates a new Checkout object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -414,6 +417,46 @@ func (o Checkout) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Checkout) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "allowed_payment_methods", + "expires_at", + "name", + "order_template", + "recurrent", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCheckout := _Checkout{} + + err = json.Unmarshal(bytes, &varCheckout) + + if err != nil { + return err + } + + *o = Checkout(varCheckout) + + return err +} + type NullableCheckout struct { value *Checkout isSet bool diff --git a/model_checkout_order_template.go b/model_checkout_order_template.go index fb74990..a8aa6a7 100644 --- a/model_checkout_order_template.go +++ b/model_checkout_order_template.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CheckoutOrderTemplate type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type CheckoutOrderTemplate struct { Metadata map[string]interface{} `json:"metadata,omitempty"` } +type _CheckoutOrderTemplate CheckoutOrderTemplate + // NewCheckoutOrderTemplate instantiates a new CheckoutOrderTemplate object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -181,6 +184,42 @@ func (o CheckoutOrderTemplate) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CheckoutOrderTemplate) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "currency", + "line_items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCheckoutOrderTemplate := _CheckoutOrderTemplate{} + + err = json.Unmarshal(bytes, &varCheckoutOrderTemplate) + + if err != nil { + return err + } + + *o = CheckoutOrderTemplate(varCheckoutOrderTemplate) + + return err +} + type NullableCheckoutOrderTemplate struct { value *CheckoutOrderTemplate isSet bool diff --git a/model_checkout_request.go b/model_checkout_request.go index ff82f8f..364a0f2 100644 --- a/model_checkout_request.go +++ b/model_checkout_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CheckoutRequest type satisfies the MappedNullable interface at compile time @@ -37,6 +38,8 @@ type CheckoutRequest struct { Type *string `json:"type,omitempty"` } +type _CheckoutRequest CheckoutRequest + // NewCheckoutRequest instantiates a new CheckoutRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -373,6 +376,41 @@ func (o CheckoutRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CheckoutRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "allowed_payment_methods", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCheckoutRequest := _CheckoutRequest{} + + err = json.Unmarshal(bytes, &varCheckoutRequest) + + if err != nil { + return err + } + + *o = CheckoutRequest(varCheckoutRequest) + + return err +} + type NullableCheckoutRequest struct { value *CheckoutRequest isSet bool diff --git a/model_checkout_response.go b/model_checkout_response.go index 94301e4..dc89309 100644 --- a/model_checkout_response.go +++ b/model_checkout_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CheckoutResponse type satisfies the MappedNullable interface at compile time @@ -48,6 +49,8 @@ type CheckoutResponse struct { Url *string `json:"url,omitempty"` } +type _CheckoutResponse CheckoutResponse + // NewCheckoutResponse instantiates a new CheckoutResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -927,6 +930,44 @@ func (o CheckoutResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CheckoutResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "livemode", + "name", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCheckoutResponse := _CheckoutResponse{} + + err = json.Unmarshal(bytes, &varCheckoutResponse) + + if err != nil { + return err + } + + *o = CheckoutResponse(varCheckoutResponse) + + return err +} + type NullableCheckoutResponse struct { value *CheckoutResponse isSet bool diff --git a/model_checkouts_response.go b/model_checkouts_response.go index 7dd122b..31a134c 100644 --- a/model_checkouts_response.go +++ b/model_checkouts_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CheckoutsResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type CheckoutsResponse struct { Data []CheckoutResponse `json:"data,omitempty"` } +type _CheckoutsResponse CheckoutsResponse + // NewCheckoutsResponse instantiates a new CheckoutsResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o CheckoutsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CheckoutsResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCheckoutsResponse := _CheckoutsResponse{} + + err = json.Unmarshal(bytes, &varCheckoutsResponse) + + if err != nil { + return err + } + + *o = CheckoutsResponse(varCheckoutsResponse) + + return err +} + type NullableCheckoutsResponse struct { value *CheckoutsResponse isSet bool diff --git a/model_create_customer_fiscal_entities_response.go b/model_create_customer_fiscal_entities_response.go index e9aa7cd..6fecbcc 100644 --- a/model_create_customer_fiscal_entities_response.go +++ b/model_create_customer_fiscal_entities_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CreateCustomerFiscalEntitiesResponse type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type CreateCustomerFiscalEntitiesResponse struct { Default *bool `json:"default,omitempty"` } +type _CreateCustomerFiscalEntitiesResponse CreateCustomerFiscalEntitiesResponse + // NewCreateCustomerFiscalEntitiesResponse instantiates a new CreateCustomerFiscalEntitiesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -412,6 +415,44 @@ func (o CreateCustomerFiscalEntitiesResponse) ToMap() (map[string]interface{}, e return toSerialize, nil } +func (o *CreateCustomerFiscalEntitiesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateCustomerFiscalEntitiesResponse := _CreateCustomerFiscalEntitiesResponse{} + + err = json.Unmarshal(bytes, &varCreateCustomerFiscalEntitiesResponse) + + if err != nil { + return err + } + + *o = CreateCustomerFiscalEntitiesResponse(varCreateCustomerFiscalEntitiesResponse) + + return err +} + type NullableCreateCustomerFiscalEntitiesResponse struct { value *CreateCustomerFiscalEntitiesResponse isSet bool diff --git a/model_create_customer_fiscal_entities_response_all_of.go b/model_create_customer_fiscal_entities_response_all_of.go index 1082ed3..48de0b1 100644 --- a/model_create_customer_fiscal_entities_response_all_of.go +++ b/model_create_customer_fiscal_entities_response_all_of.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CreateCustomerFiscalEntitiesResponseAllOf type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type CreateCustomerFiscalEntitiesResponseAllOf struct { Default *bool `json:"default,omitempty"` } +type _CreateCustomerFiscalEntitiesResponseAllOf CreateCustomerFiscalEntitiesResponseAllOf + // NewCreateCustomerFiscalEntitiesResponseAllOf instantiates a new CreateCustomerFiscalEntitiesResponseAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -205,6 +208,43 @@ func (o CreateCustomerFiscalEntitiesResponseAllOf) ToMap() (map[string]interface return toSerialize, nil } +func (o *CreateCustomerFiscalEntitiesResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateCustomerFiscalEntitiesResponseAllOf := _CreateCustomerFiscalEntitiesResponseAllOf{} + + err = json.Unmarshal(bytes, &varCreateCustomerFiscalEntitiesResponseAllOf) + + if err != nil { + return err + } + + *o = CreateCustomerFiscalEntitiesResponseAllOf(varCreateCustomerFiscalEntitiesResponseAllOf) + + return err +} + type NullableCreateCustomerFiscalEntitiesResponseAllOf struct { value *CreateCustomerFiscalEntitiesResponseAllOf isSet bool diff --git a/model_create_customer_payment_methods_response.go b/model_create_customer_payment_methods_response.go index 68ba994..218b0ac 100644 --- a/model_create_customer_payment_methods_response.go +++ b/model_create_customer_payment_methods_response.go @@ -91,6 +91,18 @@ func (dst *CreateCustomerPaymentMethodsResponse) UnmarshalJSON(data []byte) erro } } + // check if the discriminator value is 'spei_recurrent' + if jsonDict["type"] == "spei_recurrent" { + // try to unmarshal JSON data into PaymentMethodSpeiRecurrent + err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) + if err == nil { + return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match + } else { + dst.PaymentMethodSpeiRecurrent = nil + return fmt.Errorf("failed to unmarshal CreateCustomerPaymentMethodsResponse as PaymentMethodSpeiRecurrent: %s", err.Error()) + } + } + // check if the discriminator value is 'payment_method_card_response' if jsonDict["type"] == "payment_method_card_response" { // try to unmarshal JSON data into PaymentMethodCardResponse @@ -127,18 +139,6 @@ func (dst *CreateCustomerPaymentMethodsResponse) UnmarshalJSON(data []byte) erro } } - // check if the discriminator value is 'spei_recurrent' - if jsonDict["type"] == "spei_recurrent" { - // try to unmarshal JSON data into PaymentMethodSpeiRecurrent - err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) - if err == nil { - return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match - } else { - dst.PaymentMethodSpeiRecurrent = nil - return fmt.Errorf("failed to unmarshal CreateCustomerPaymentMethodsResponse as PaymentMethodSpeiRecurrent: %s", err.Error()) - } - } - return nil } diff --git a/model_create_risk_rules_data.go b/model_create_risk_rules_data.go index 9881d74..fa2791e 100644 --- a/model_create_risk_rules_data.go +++ b/model_create_risk_rules_data.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CreateRiskRulesData type satisfies the MappedNullable interface at compile time @@ -28,6 +29,8 @@ type CreateRiskRulesData struct { Value string `json:"value"` } +type _CreateRiskRulesData CreateRiskRulesData + // NewCreateRiskRulesData instantiates a new CreateRiskRulesData object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -136,6 +139,43 @@ func (o CreateRiskRulesData) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CreateRiskRulesData) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "description", + "field", + "value", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateRiskRulesData := _CreateRiskRulesData{} + + err = json.Unmarshal(bytes, &varCreateRiskRulesData) + + if err != nil { + return err + } + + *o = CreateRiskRulesData(varCreateRiskRulesData) + + return err +} + type NullableCreateRiskRulesData struct { value *CreateRiskRulesData isSet bool diff --git a/model_customer.go b/model_customer.go index 9f82803..6bb7221 100644 --- a/model_customer.go +++ b/model_customer.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the Customer type satisfies the MappedNullable interface at compile time @@ -46,6 +47,8 @@ type Customer struct { Subscription *SubscriptionRequest `json:"subscription,omitempty"` } +type _Customer Customer + // NewCustomer instantiates a new Customer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -553,6 +556,43 @@ func (o Customer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Customer) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "email", + "name", + "phone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomer := _Customer{} + + err = json.Unmarshal(bytes, &varCustomer) + + if err != nil { + return err + } + + *o = Customer(varCustomer) + + return err +} + type NullableCustomer struct { value *Customer isSet bool diff --git a/model_customer_address.go b/model_customer_address.go index 20f0509..fd88dbb 100644 --- a/model_customer_address.go +++ b/model_customer_address.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerAddress type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type CustomerAddress struct { ExternalNumber *string `json:"external_number,omitempty"` } +type _CustomerAddress CustomerAddress + // NewCustomerAddress instantiates a new CustomerAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -40,6 +43,8 @@ func NewCustomerAddress(street1 string, postalCode string, city string) *Custome this.Street1 = street1 this.PostalCode = postalCode this.City = city + var residential bool = false + this.Residential = &residential return &this } @@ -48,6 +53,8 @@ func NewCustomerAddress(street1 string, postalCode string, city string) *Custome // but it doesn't guarantee that properties required by API are set func NewCustomerAddressWithDefaults() *CustomerAddress { this := CustomerAddress{} + var residential bool = false + this.Residential = &residential return &this } @@ -314,6 +321,43 @@ func (o CustomerAddress) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomerAddress) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "street1", + "postal_code", + "city", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerAddress := _CustomerAddress{} + + err = json.Unmarshal(bytes, &varCustomerAddress) + + if err != nil { + return err + } + + *o = CustomerAddress(varCustomerAddress) + + return err +} + type NullableCustomerAddress struct { value *CustomerAddress isSet bool diff --git a/model_customer_fiscal_entities_data_response.go b/model_customer_fiscal_entities_data_response.go index 72676f4..d672b01 100644 --- a/model_customer_fiscal_entities_data_response.go +++ b/model_customer_fiscal_entities_data_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerFiscalEntitiesDataResponse type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type CustomerFiscalEntitiesDataResponse struct { Default *bool `json:"default,omitempty"` } +type _CustomerFiscalEntitiesDataResponse CustomerFiscalEntitiesDataResponse + // NewCustomerFiscalEntitiesDataResponse instantiates a new CustomerFiscalEntitiesDataResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -412,6 +415,44 @@ func (o CustomerFiscalEntitiesDataResponse) ToMap() (map[string]interface{}, err return toSerialize, nil } +func (o *CustomerFiscalEntitiesDataResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerFiscalEntitiesDataResponse := _CustomerFiscalEntitiesDataResponse{} + + err = json.Unmarshal(bytes, &varCustomerFiscalEntitiesDataResponse) + + if err != nil { + return err + } + + *o = CustomerFiscalEntitiesDataResponse(varCustomerFiscalEntitiesDataResponse) + + return err +} + type NullableCustomerFiscalEntitiesDataResponse struct { value *CustomerFiscalEntitiesDataResponse isSet bool diff --git a/model_customer_fiscal_entities_request.go b/model_customer_fiscal_entities_request.go index 56f5b83..a48254c 100644 --- a/model_customer_fiscal_entities_request.go +++ b/model_customer_fiscal_entities_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerFiscalEntitiesRequest type satisfies the MappedNullable interface at compile time @@ -28,6 +29,8 @@ type CustomerFiscalEntitiesRequest struct { CompanyName *string `json:"company_name,omitempty"` } +type _CustomerFiscalEntitiesRequest CustomerFiscalEntitiesRequest + // NewCustomerFiscalEntitiesRequest instantiates a new CustomerFiscalEntitiesRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -259,6 +262,41 @@ func (o CustomerFiscalEntitiesRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomerFiscalEntitiesRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerFiscalEntitiesRequest := _CustomerFiscalEntitiesRequest{} + + err = json.Unmarshal(bytes, &varCustomerFiscalEntitiesRequest) + + if err != nil { + return err + } + + *o = CustomerFiscalEntitiesRequest(varCustomerFiscalEntitiesRequest) + + return err +} + type NullableCustomerFiscalEntitiesRequest struct { value *CustomerFiscalEntitiesRequest isSet bool diff --git a/model_customer_fiscal_entities_request_address.go b/model_customer_fiscal_entities_request_address.go index a100f11..a93280d 100644 --- a/model_customer_fiscal_entities_request_address.go +++ b/model_customer_fiscal_entities_request_address.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerFiscalEntitiesRequestAddress type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type CustomerFiscalEntitiesRequestAddress struct { ExternalNumber *string `json:"external_number,omitempty"` } +type _CustomerFiscalEntitiesRequestAddress CustomerFiscalEntitiesRequestAddress + // NewCustomerFiscalEntitiesRequestAddress instantiates a new CustomerFiscalEntitiesRequestAddress object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -40,6 +43,8 @@ func NewCustomerFiscalEntitiesRequestAddress(street1 string, postalCode string, this.Street1 = street1 this.PostalCode = postalCode this.City = city + var residential bool = false + this.Residential = &residential return &this } @@ -48,6 +53,8 @@ func NewCustomerFiscalEntitiesRequestAddress(street1 string, postalCode string, // but it doesn't guarantee that properties required by API are set func NewCustomerFiscalEntitiesRequestAddressWithDefaults() *CustomerFiscalEntitiesRequestAddress { this := CustomerFiscalEntitiesRequestAddress{} + var residential bool = false + this.Residential = &residential return &this } @@ -314,6 +321,43 @@ func (o CustomerFiscalEntitiesRequestAddress) ToMap() (map[string]interface{}, e return toSerialize, nil } +func (o *CustomerFiscalEntitiesRequestAddress) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "street1", + "postal_code", + "city", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerFiscalEntitiesRequestAddress := _CustomerFiscalEntitiesRequestAddress{} + + err = json.Unmarshal(bytes, &varCustomerFiscalEntitiesRequestAddress) + + if err != nil { + return err + } + + *o = CustomerFiscalEntitiesRequestAddress(varCustomerFiscalEntitiesRequestAddress) + + return err +} + type NullableCustomerFiscalEntitiesRequestAddress struct { value *CustomerFiscalEntitiesRequestAddress isSet bool diff --git a/model_customer_fiscal_entities_response.go b/model_customer_fiscal_entities_response.go index d9792b6..d25413f 100644 --- a/model_customer_fiscal_entities_response.go +++ b/model_customer_fiscal_entities_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerFiscalEntitiesResponse type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type CustomerFiscalEntitiesResponse struct { Data []CustomerFiscalEntitiesDataResponse `json:"data,omitempty"` } +type _CustomerFiscalEntitiesResponse CustomerFiscalEntitiesResponse + // NewCustomerFiscalEntitiesResponse instantiates a new CustomerFiscalEntitiesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o CustomerFiscalEntitiesResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *CustomerFiscalEntitiesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerFiscalEntitiesResponse := _CustomerFiscalEntitiesResponse{} + + err = json.Unmarshal(bytes, &varCustomerFiscalEntitiesResponse) + + if err != nil { + return err + } + + *o = CustomerFiscalEntitiesResponse(varCustomerFiscalEntitiesResponse) + + return err +} + type NullableCustomerFiscalEntitiesResponse struct { value *CustomerFiscalEntitiesResponse isSet bool diff --git a/model_customer_info.go b/model_customer_info.go index 62ddd15..7e559e4 100644 --- a/model_customer_info.go +++ b/model_customer_info.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerInfo type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type CustomerInfo struct { Object *string `json:"object,omitempty"` } +type _CustomerInfo CustomerInfo + // NewCustomerInfo instantiates a new CustomerInfo object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -205,6 +208,43 @@ func (o CustomerInfo) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomerInfo) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "email", + "phone", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerInfo := _CustomerInfo{} + + err = json.Unmarshal(bytes, &varCustomerInfo) + + if err != nil { + return err + } + + *o = CustomerInfo(varCustomerInfo) + + return err +} + type NullableCustomerInfo struct { value *CustomerInfo isSet bool diff --git a/model_customer_info_just_customer_id.go b/model_customer_info_just_customer_id.go index 510f2d0..bf95dd3 100644 --- a/model_customer_info_just_customer_id.go +++ b/model_customer_info_just_customer_id.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerInfoJustCustomerId type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ type CustomerInfoJustCustomerId struct { CustomerId string `json:"customer_id"` } +type _CustomerInfoJustCustomerId CustomerInfoJustCustomerId + // NewCustomerInfoJustCustomerId instantiates a new CustomerInfoJustCustomerId object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +82,41 @@ func (o CustomerInfoJustCustomerId) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomerInfoJustCustomerId) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "customer_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerInfoJustCustomerId := _CustomerInfoJustCustomerId{} + + err = json.Unmarshal(bytes, &varCustomerInfoJustCustomerId) + + if err != nil { + return err + } + + *o = CustomerInfoJustCustomerId(varCustomerInfoJustCustomerId) + + return err +} + type NullableCustomerInfoJustCustomerId struct { value *CustomerInfoJustCustomerId isSet bool diff --git a/model_customer_payment_method_request.go b/model_customer_payment_method_request.go index b72fe8a..796e85a 100644 --- a/model_customer_payment_method_request.go +++ b/model_customer_payment_method_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerPaymentMethodRequest type satisfies the MappedNullable interface at compile time @@ -24,6 +25,8 @@ type CustomerPaymentMethodRequest struct { Type string `json:"type"` } +type _CustomerPaymentMethodRequest CustomerPaymentMethodRequest + // NewCustomerPaymentMethodRequest instantiates a new CustomerPaymentMethodRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -80,6 +83,41 @@ func (o CustomerPaymentMethodRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomerPaymentMethodRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerPaymentMethodRequest := _CustomerPaymentMethodRequest{} + + err = json.Unmarshal(bytes, &varCustomerPaymentMethodRequest) + + if err != nil { + return err + } + + *o = CustomerPaymentMethodRequest(varCustomerPaymentMethodRequest) + + return err +} + type NullableCustomerPaymentMethodRequest struct { value *CustomerPaymentMethodRequest isSet bool diff --git a/model_customer_payment_methods_data.go b/model_customer_payment_methods_data.go index c8f70bf..1940337 100644 --- a/model_customer_payment_methods_data.go +++ b/model_customer_payment_methods_data.go @@ -91,6 +91,18 @@ func (dst *CustomerPaymentMethodsData) UnmarshalJSON(data []byte) error { } } + // check if the discriminator value is 'spei_recurrent' + if jsonDict["type"] == "spei_recurrent" { + // try to unmarshal JSON data into PaymentMethodSpeiRecurrent + err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) + if err == nil { + return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match + } else { + dst.PaymentMethodSpeiRecurrent = nil + return fmt.Errorf("failed to unmarshal CustomerPaymentMethodsData as PaymentMethodSpeiRecurrent: %s", err.Error()) + } + } + // check if the discriminator value is 'payment_method_card_response' if jsonDict["type"] == "payment_method_card_response" { // try to unmarshal JSON data into PaymentMethodCardResponse @@ -127,18 +139,6 @@ func (dst *CustomerPaymentMethodsData) UnmarshalJSON(data []byte) error { } } - // check if the discriminator value is 'spei_recurrent' - if jsonDict["type"] == "spei_recurrent" { - // try to unmarshal JSON data into PaymentMethodSpeiRecurrent - err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) - if err == nil { - return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match - } else { - dst.PaymentMethodSpeiRecurrent = nil - return fmt.Errorf("failed to unmarshal CustomerPaymentMethodsData as PaymentMethodSpeiRecurrent: %s", err.Error()) - } - } - return nil } diff --git a/model_customer_payment_methods_response.go b/model_customer_payment_methods_response.go index 7691d9f..12f076a 100644 --- a/model_customer_payment_methods_response.go +++ b/model_customer_payment_methods_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerPaymentMethodsResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type CustomerPaymentMethodsResponse struct { Data []CustomerPaymentMethodsData `json:"data,omitempty"` } +type _CustomerPaymentMethodsResponse CustomerPaymentMethodsResponse + // NewCustomerPaymentMethodsResponse instantiates a new CustomerPaymentMethodsResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o CustomerPaymentMethodsResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +func (o *CustomerPaymentMethodsResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerPaymentMethodsResponse := _CustomerPaymentMethodsResponse{} + + err = json.Unmarshal(bytes, &varCustomerPaymentMethodsResponse) + + if err != nil { + return err + } + + *o = CustomerPaymentMethodsResponse(varCustomerPaymentMethodsResponse) + + return err +} + type NullableCustomerPaymentMethodsResponse struct { value *CustomerPaymentMethodsResponse isSet bool diff --git a/model_customer_response.go b/model_customer_response.go index bf5d85c..fcc1a78 100644 --- a/model_customer_response.go +++ b/model_customer_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerResponse type satisfies the MappedNullable interface at compile time @@ -21,33 +22,44 @@ var _ MappedNullable = &CustomerResponse{} // CustomerResponse customer response type CustomerResponse struct { AntifraudInfo NullableCustomerAntifraudInfoResponse `json:"antifraud_info,omitempty"` + // true if the customer is a company Corporate *bool `json:"corporate,omitempty"` + // Creation date of the object CreatedAt int64 `json:"created_at"` + // Custom reference CustomReference *string `json:"custom_reference,omitempty"` DefaultFiscalEntityId NullableString `json:"default_fiscal_entity_id,omitempty"` DefaultShippingContactId *string `json:"default_shipping_contact_id,omitempty"` DefaultPaymentSourceId NullableString `json:"default_payment_source_id,omitempty"` Email *string `json:"email,omitempty"` FiscalEntities *CustomerFiscalEntitiesResponse `json:"fiscal_entities,omitempty"` + // Customer's ID Id string `json:"id"` + // true if the object exists in live mode or the value false if the object exists in test mode Livemode bool `json:"livemode"` - Name *string `json:"name,omitempty"` + // Customer's name + Name string `json:"name"` + Metadata map[string]interface{} `json:"metadata,omitempty"` Object string `json:"object"` PaymentSources *CustomerPaymentMethodsResponse `json:"payment_sources,omitempty"` + // Customer's phone number Phone *string `json:"phone,omitempty"` ShippingContacts *CustomerResponseShippingContacts `json:"shipping_contacts,omitempty"` Subscription *SubscriptionResponse `json:"subscription,omitempty"` } +type _CustomerResponse CustomerResponse + // NewCustomerResponse instantiates a new CustomerResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCustomerResponse(createdAt int64, id string, livemode bool, object string) *CustomerResponse { +func NewCustomerResponse(createdAt int64, id string, livemode bool, name string, object string) *CustomerResponse { this := CustomerResponse{} this.CreatedAt = createdAt this.Id = id this.Livemode = livemode + this.Name = name this.Object = object return &this } @@ -418,36 +430,60 @@ func (o *CustomerResponse) SetLivemode(v bool) { o.Livemode = v } -// GetName returns the Name field value if set, zero value otherwise. +// GetName returns the Name field value func (o *CustomerResponse) GetName() string { - if o == nil || IsNil(o.Name) { + if o == nil { var ret string return ret } - return *o.Name + + return o.Name } -// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. func (o *CustomerResponse) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { + if o == nil { return nil, false } - return o.Name, true + return &o.Name, true } -// HasName returns a boolean if a field has been set. -func (o *CustomerResponse) HasName() bool { - if o != nil && !IsNil(o.Name) { +// SetName sets field value +func (o *CustomerResponse) SetName(v string) { + o.Name = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CustomerResponse) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerResponse) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CustomerResponse) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { return true } return false } -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *CustomerResponse) SetName(v string) { - o.Name = &v +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *CustomerResponse) SetMetadata(v map[string]interface{}) { + o.Metadata = v } // GetObject returns the Object field value @@ -639,8 +675,9 @@ func (o CustomerResponse) ToMap() (map[string]interface{}, error) { } toSerialize["id"] = o.Id toSerialize["livemode"] = o.Livemode - if !IsNil(o.Name) { - toSerialize["name"] = o.Name + toSerialize["name"] = o.Name + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata } toSerialize["object"] = o.Object if !IsNil(o.PaymentSources) { @@ -658,6 +695,45 @@ func (o CustomerResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomerResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "created_at", + "id", + "livemode", + "name", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerResponse := _CustomerResponse{} + + err = json.Unmarshal(bytes, &varCustomerResponse) + + if err != nil { + return err + } + + *o = CustomerResponse(varCustomerResponse) + + return err +} + type NullableCustomerResponse struct { value *CustomerResponse isSet bool diff --git a/model_customer_response_shipping_contacts.go b/model_customer_response_shipping_contacts.go index c1d13a8..d51d405 100644 --- a/model_customer_response_shipping_contacts.go +++ b/model_customer_response_shipping_contacts.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerResponseShippingContacts type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type CustomerResponseShippingContacts struct { Data []CustomerShippingContactsDataResponse `json:"data,omitempty"` } +type _CustomerResponseShippingContacts CustomerResponseShippingContacts + // NewCustomerResponseShippingContacts instantiates a new CustomerResponseShippingContacts object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o CustomerResponseShippingContacts) ToMap() (map[string]interface{}, error return toSerialize, nil } +func (o *CustomerResponseShippingContacts) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerResponseShippingContacts := _CustomerResponseShippingContacts{} + + err = json.Unmarshal(bytes, &varCustomerResponseShippingContacts) + + if err != nil { + return err + } + + *o = CustomerResponseShippingContacts(varCustomerResponseShippingContacts) + + return err +} + type NullableCustomerResponseShippingContacts struct { value *CustomerResponseShippingContacts isSet bool diff --git a/model_customer_shipping_contacts.go b/model_customer_shipping_contacts.go index 0cf23ab..1e9960c 100644 --- a/model_customer_shipping_contacts.go +++ b/model_customer_shipping_contacts.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerShippingContacts type satisfies the MappedNullable interface at compile time @@ -30,8 +31,12 @@ type CustomerShippingContacts struct { ParentId *string `json:"parent_id,omitempty"` Default NullableBool `json:"default,omitempty"` Deleted NullableBool `json:"deleted,omitempty"` + // Metadata associated with the shipping contact + Metadata map[string]interface{} `json:"metadata,omitempty"` } +type _CustomerShippingContacts CustomerShippingContacts + // NewCustomerShippingContacts instantiates a new CustomerShippingContacts object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -286,6 +291,38 @@ func (o *CustomerShippingContacts) UnsetDeleted() { o.Deleted.Unset() } +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CustomerShippingContacts) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerShippingContacts) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CustomerShippingContacts) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *CustomerShippingContacts) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + func (o CustomerShippingContacts) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -315,9 +352,47 @@ func (o CustomerShippingContacts) ToMap() (map[string]interface{}, error) { if o.Deleted.IsSet() { toSerialize["deleted"] = o.Deleted.Get() } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } return toSerialize, nil } +func (o *CustomerShippingContacts) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerShippingContacts := _CustomerShippingContacts{} + + err = json.Unmarshal(bytes, &varCustomerShippingContacts) + + if err != nil { + return err + } + + *o = CustomerShippingContacts(varCustomerShippingContacts) + + return err +} + type NullableCustomerShippingContacts struct { value *CustomerShippingContacts isSet bool diff --git a/model_customer_shipping_contacts_data_response.go b/model_customer_shipping_contacts_data_response.go index 1f2ef2b..922284b 100644 --- a/model_customer_shipping_contacts_data_response.go +++ b/model_customer_shipping_contacts_data_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerShippingContactsDataResponse type satisfies the MappedNullable interface at compile time @@ -30,11 +31,15 @@ type CustomerShippingContactsDataResponse struct { ParentId *string `json:"parent_id,omitempty"` Default NullableBool `json:"default,omitempty"` Deleted NullableBool `json:"deleted,omitempty"` + // Metadata associated with the shipping contact + Metadata map[string]interface{} `json:"metadata,omitempty"` Id string `json:"id"` Object string `json:"object"` CreatedAt int64 `json:"created_at"` } +type _CustomerShippingContactsDataResponse CustomerShippingContactsDataResponse + // NewCustomerShippingContactsDataResponse instantiates a new CustomerShippingContactsDataResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -292,6 +297,38 @@ func (o *CustomerShippingContactsDataResponse) UnsetDeleted() { o.Deleted.Unset() } +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CustomerShippingContactsDataResponse) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerShippingContactsDataResponse) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CustomerShippingContactsDataResponse) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *CustomerShippingContactsDataResponse) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + // GetId returns the Id field value func (o *CustomerShippingContactsDataResponse) GetId() string { if o == nil { @@ -393,12 +430,53 @@ func (o CustomerShippingContactsDataResponse) ToMap() (map[string]interface{}, e if o.Deleted.IsSet() { toSerialize["deleted"] = o.Deleted.Get() } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } toSerialize["id"] = o.Id toSerialize["object"] = o.Object toSerialize["created_at"] = o.CreatedAt return toSerialize, nil } +func (o *CustomerShippingContactsDataResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerShippingContactsDataResponse := _CustomerShippingContactsDataResponse{} + + err = json.Unmarshal(bytes, &varCustomerShippingContactsDataResponse) + + if err != nil { + return err + } + + *o = CustomerShippingContactsDataResponse(varCustomerShippingContactsDataResponse) + + return err +} + type NullableCustomerShippingContactsDataResponse struct { value *CustomerShippingContactsDataResponse isSet bool diff --git a/model_customer_shipping_contacts_data_response_all_of.go b/model_customer_shipping_contacts_data_response_all_of.go index ead942c..5e9eb1e 100644 --- a/model_customer_shipping_contacts_data_response_all_of.go +++ b/model_customer_shipping_contacts_data_response_all_of.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomerShippingContactsDataResponseAllOf type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type CustomerShippingContactsDataResponseAllOf struct { CreatedAt int64 `json:"created_at"` } +type _CustomerShippingContactsDataResponseAllOf CustomerShippingContactsDataResponseAllOf + // NewCustomerShippingContactsDataResponseAllOf instantiates a new CustomerShippingContactsDataResponseAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -133,6 +136,43 @@ func (o CustomerShippingContactsDataResponseAllOf) ToMap() (map[string]interface return toSerialize, nil } +func (o *CustomerShippingContactsDataResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomerShippingContactsDataResponseAllOf := _CustomerShippingContactsDataResponseAllOf{} + + err = json.Unmarshal(bytes, &varCustomerShippingContactsDataResponseAllOf) + + if err != nil { + return err + } + + *o = CustomerShippingContactsDataResponseAllOf(varCustomerShippingContactsDataResponseAllOf) + + return err +} + type NullableCustomerShippingContactsDataResponseAllOf struct { value *CustomerShippingContactsDataResponseAllOf isSet bool diff --git a/model_customer_shipping_contacts_response.go b/model_customer_shipping_contacts_response.go index d51b765..30fa86c 100644 --- a/model_customer_shipping_contacts_response.go +++ b/model_customer_shipping_contacts_response.go @@ -28,6 +28,8 @@ type CustomerShippingContactsResponse struct { Default *bool `json:"default,omitempty"` Id *string `json:"id,omitempty"` CreatedAt *int64 `json:"created_at,omitempty"` + // Metadata associated with the shipping contact + Metadata map[string]interface{} `json:"metadata,omitempty"` Object *string `json:"object,omitempty"` Deleted *bool `json:"deleted,omitempty"` } @@ -315,6 +317,38 @@ func (o *CustomerShippingContactsResponse) SetCreatedAt(v int64) { o.CreatedAt = &v } +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *CustomerShippingContactsResponse) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CustomerShippingContactsResponse) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *CustomerShippingContactsResponse) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *CustomerShippingContactsResponse) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + // GetObject returns the Object field value if set, zero value otherwise. func (o *CustomerShippingContactsResponse) GetObject() string { if o == nil || IsNil(o.Object) { @@ -413,6 +447,9 @@ func (o CustomerShippingContactsResponse) ToMap() (map[string]interface{}, error if !IsNil(o.CreatedAt) { toSerialize["created_at"] = o.CreatedAt } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } if !IsNil(o.Object) { toSerialize["object"] = o.Object } diff --git a/model_customer_shipping_contacts_response_address.go b/model_customer_shipping_contacts_response_address.go index cc3cbea..aed2477 100644 --- a/model_customer_shipping_contacts_response_address.go +++ b/model_customer_shipping_contacts_response_address.go @@ -27,7 +27,7 @@ type CustomerShippingContactsResponseAddress struct { City *string `json:"city,omitempty"` State *string `json:"state,omitempty"` Country *string `json:"country,omitempty"` - Residential *bool `json:"residential,omitempty"` + Residential NullableBool `json:"residential,omitempty"` } // NewCustomerShippingContactsResponseAddress instantiates a new CustomerShippingContactsResponseAddress object @@ -271,36 +271,46 @@ func (o *CustomerShippingContactsResponseAddress) SetCountry(v string) { o.Country = &v } -// GetResidential returns the Residential field value if set, zero value otherwise. +// GetResidential returns the Residential field value if set, zero value otherwise (both if not set or set to explicit null). func (o *CustomerShippingContactsResponseAddress) GetResidential() bool { - if o == nil || IsNil(o.Residential) { + if o == nil || IsNil(o.Residential.Get()) { var ret bool return ret } - return *o.Residential + return *o.Residential.Get() } // GetResidentialOk returns a tuple with the Residential field value if set, nil otherwise // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *CustomerShippingContactsResponseAddress) GetResidentialOk() (*bool, bool) { - if o == nil || IsNil(o.Residential) { + if o == nil { return nil, false } - return o.Residential, true + return o.Residential.Get(), o.Residential.IsSet() } // HasResidential returns a boolean if a field has been set. func (o *CustomerShippingContactsResponseAddress) HasResidential() bool { - if o != nil && !IsNil(o.Residential) { + if o != nil && o.Residential.IsSet() { return true } return false } -// SetResidential gets a reference to the given bool and assigns it to the Residential field. +// SetResidential gets a reference to the given NullableBool and assigns it to the Residential field. func (o *CustomerShippingContactsResponseAddress) SetResidential(v bool) { - o.Residential = &v + o.Residential.Set(&v) +} +// SetResidentialNil sets the value for Residential to be an explicit nil +func (o *CustomerShippingContactsResponseAddress) SetResidentialNil() { + o.Residential.Set(nil) +} + +// UnsetResidential ensures that no value is present for Residential, not even an explicit nil +func (o *CustomerShippingContactsResponseAddress) UnsetResidential() { + o.Residential.Unset() } func (o CustomerShippingContactsResponseAddress) MarshalJSON() ([]byte, error) { @@ -334,8 +344,8 @@ func (o CustomerShippingContactsResponseAddress) ToMap() (map[string]interface{} if !IsNil(o.Country) { toSerialize["country"] = o.Country } - if !IsNil(o.Residential) { - toSerialize["residential"] = o.Residential + if o.Residential.IsSet() { + toSerialize["residential"] = o.Residential.Get() } return toSerialize, nil } diff --git a/model_customers_response.go b/model_customers_response.go index f8bd2bf..750a741 100644 --- a/model_customers_response.go +++ b/model_customers_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the CustomersResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type CustomersResponse struct { PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` } +type _CustomersResponse CustomersResponse + // NewCustomersResponse instantiates a new CustomersResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o CustomersResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *CustomersResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCustomersResponse := _CustomersResponse{} + + err = json.Unmarshal(bytes, &varCustomersResponse) + + if err != nil { + return err + } + + *o = CustomersResponse(varCustomersResponse) + + return err +} + type NullableCustomersResponse struct { value *CustomersResponse isSet bool diff --git a/model_discount_lines_data_response.go b/model_discount_lines_data_response.go index 55e87d5..c4d9efe 100644 --- a/model_discount_lines_data_response.go +++ b/model_discount_lines_data_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the DiscountLinesDataResponse type satisfies the MappedNullable interface at compile time @@ -34,6 +35,8 @@ type DiscountLinesDataResponse struct { ParentId string `json:"parent_id"` } +type _DiscountLinesDataResponse DiscountLinesDataResponse + // NewDiscountLinesDataResponse instantiates a new DiscountLinesDataResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -220,6 +223,46 @@ func (o DiscountLinesDataResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DiscountLinesDataResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "code", + "type", + "id", + "object", + "parent_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDiscountLinesDataResponse := _DiscountLinesDataResponse{} + + err = json.Unmarshal(bytes, &varDiscountLinesDataResponse) + + if err != nil { + return err + } + + *o = DiscountLinesDataResponse(varDiscountLinesDataResponse) + + return err +} + type NullableDiscountLinesDataResponse struct { value *DiscountLinesDataResponse isSet bool diff --git a/model_discount_lines_response.go b/model_discount_lines_response.go index 409cfa6..116bd92 100644 --- a/model_discount_lines_response.go +++ b/model_discount_lines_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the DiscountLinesResponse type satisfies the MappedNullable interface at compile time @@ -34,6 +35,8 @@ type DiscountLinesResponse struct { ParentId string `json:"parent_id"` } +type _DiscountLinesResponse DiscountLinesResponse + // NewDiscountLinesResponse instantiates a new DiscountLinesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -220,6 +223,46 @@ func (o DiscountLinesResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DiscountLinesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "code", + "type", + "id", + "object", + "parent_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDiscountLinesResponse := _DiscountLinesResponse{} + + err = json.Unmarshal(bytes, &varDiscountLinesResponse) + + if err != nil { + return err + } + + *o = DiscountLinesResponse(varDiscountLinesResponse) + + return err +} + type NullableDiscountLinesResponse struct { value *DiscountLinesResponse isSet bool diff --git a/model_discount_lines_response_all_of.go b/model_discount_lines_response_all_of.go index c5451e2..dfbca6a 100644 --- a/model_discount_lines_response_all_of.go +++ b/model_discount_lines_response_all_of.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the DiscountLinesResponseAllOf type satisfies the MappedNullable interface at compile time @@ -28,6 +29,8 @@ type DiscountLinesResponseAllOf struct { ParentId string `json:"parent_id"` } +type _DiscountLinesResponseAllOf DiscountLinesResponseAllOf + // NewDiscountLinesResponseAllOf instantiates a new DiscountLinesResponseAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -136,6 +139,43 @@ func (o DiscountLinesResponseAllOf) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *DiscountLinesResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "object", + "parent_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDiscountLinesResponseAllOf := _DiscountLinesResponseAllOf{} + + err = json.Unmarshal(bytes, &varDiscountLinesResponseAllOf) + + if err != nil { + return err + } + + *o = DiscountLinesResponseAllOf(varDiscountLinesResponseAllOf) + + return err +} + type NullableDiscountLinesResponseAllOf struct { value *DiscountLinesResponseAllOf isSet bool diff --git a/model_email_checkout_request.go b/model_email_checkout_request.go index 2d56791..9abf10e 100644 --- a/model_email_checkout_request.go +++ b/model_email_checkout_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the EmailCheckoutRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ type EmailCheckoutRequest struct { Email string `json:"email"` } +type _EmailCheckoutRequest EmailCheckoutRequest + // NewEmailCheckoutRequest instantiates a new EmailCheckoutRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +82,41 @@ func (o EmailCheckoutRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *EmailCheckoutRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "email", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varEmailCheckoutRequest := _EmailCheckoutRequest{} + + err = json.Unmarshal(bytes, &varEmailCheckoutRequest) + + if err != nil { + return err + } + + *o = EmailCheckoutRequest(varEmailCheckoutRequest) + + return err +} + type NullableEmailCheckoutRequest struct { value *EmailCheckoutRequest isSet bool diff --git a/model_fiscal_entity_address.go b/model_fiscal_entity_address.go new file mode 100644 index 0000000..a3bd728 --- /dev/null +++ b/model_fiscal_entity_address.go @@ -0,0 +1,357 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the FiscalEntityAddress type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FiscalEntityAddress{} + +// FiscalEntityAddress Address of the fiscal entity +type FiscalEntityAddress struct { + // Street name and number + Street1 string `json:"street1"` + // Street name and number + Street2 NullableString `json:"street2,omitempty"` + // Postal code + PostalCode string `json:"postal_code"` + // City + City string `json:"city"` + // State + State *string `json:"state,omitempty"` + // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Country string `json:"country"` + // External number + ExternalNumber string `json:"external_number"` +} + +type _FiscalEntityAddress FiscalEntityAddress + +// NewFiscalEntityAddress instantiates a new FiscalEntityAddress object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFiscalEntityAddress(street1 string, postalCode string, city string, country string, externalNumber string) *FiscalEntityAddress { + this := FiscalEntityAddress{} + this.Street1 = street1 + this.PostalCode = postalCode + this.City = city + this.Country = country + this.ExternalNumber = externalNumber + return &this +} + +// NewFiscalEntityAddressWithDefaults instantiates a new FiscalEntityAddress object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFiscalEntityAddressWithDefaults() *FiscalEntityAddress { + this := FiscalEntityAddress{} + return &this +} + +// GetStreet1 returns the Street1 field value +func (o *FiscalEntityAddress) GetStreet1() string { + if o == nil { + var ret string + return ret + } + + return o.Street1 +} + +// GetStreet1Ok returns a tuple with the Street1 field value +// and a boolean to check if the value has been set. +func (o *FiscalEntityAddress) GetStreet1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Street1, true +} + +// SetStreet1 sets field value +func (o *FiscalEntityAddress) SetStreet1(v string) { + o.Street1 = v +} + +// GetStreet2 returns the Street2 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FiscalEntityAddress) GetStreet2() string { + if o == nil || IsNil(o.Street2.Get()) { + var ret string + return ret + } + return *o.Street2.Get() +} + +// GetStreet2Ok returns a tuple with the Street2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FiscalEntityAddress) GetStreet2Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Street2.Get(), o.Street2.IsSet() +} + +// HasStreet2 returns a boolean if a field has been set. +func (o *FiscalEntityAddress) HasStreet2() bool { + if o != nil && o.Street2.IsSet() { + return true + } + + return false +} + +// SetStreet2 gets a reference to the given NullableString and assigns it to the Street2 field. +func (o *FiscalEntityAddress) SetStreet2(v string) { + o.Street2.Set(&v) +} +// SetStreet2Nil sets the value for Street2 to be an explicit nil +func (o *FiscalEntityAddress) SetStreet2Nil() { + o.Street2.Set(nil) +} + +// UnsetStreet2 ensures that no value is present for Street2, not even an explicit nil +func (o *FiscalEntityAddress) UnsetStreet2() { + o.Street2.Unset() +} + +// GetPostalCode returns the PostalCode field value +func (o *FiscalEntityAddress) GetPostalCode() string { + if o == nil { + var ret string + return ret + } + + return o.PostalCode +} + +// GetPostalCodeOk returns a tuple with the PostalCode field value +// and a boolean to check if the value has been set. +func (o *FiscalEntityAddress) GetPostalCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PostalCode, true +} + +// SetPostalCode sets field value +func (o *FiscalEntityAddress) SetPostalCode(v string) { + o.PostalCode = v +} + +// GetCity returns the City field value +func (o *FiscalEntityAddress) GetCity() string { + if o == nil { + var ret string + return ret + } + + return o.City +} + +// GetCityOk returns a tuple with the City field value +// and a boolean to check if the value has been set. +func (o *FiscalEntityAddress) GetCityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.City, true +} + +// SetCity sets field value +func (o *FiscalEntityAddress) SetCity(v string) { + o.City = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *FiscalEntityAddress) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FiscalEntityAddress) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *FiscalEntityAddress) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *FiscalEntityAddress) SetState(v string) { + o.State = &v +} + +// GetCountry returns the Country field value +func (o *FiscalEntityAddress) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *FiscalEntityAddress) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *FiscalEntityAddress) SetCountry(v string) { + o.Country = v +} + +// GetExternalNumber returns the ExternalNumber field value +func (o *FiscalEntityAddress) GetExternalNumber() string { + if o == nil { + var ret string + return ret + } + + return o.ExternalNumber +} + +// GetExternalNumberOk returns a tuple with the ExternalNumber field value +// and a boolean to check if the value has been set. +func (o *FiscalEntityAddress) GetExternalNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExternalNumber, true +} + +// SetExternalNumber sets field value +func (o *FiscalEntityAddress) SetExternalNumber(v string) { + o.ExternalNumber = v +} + +func (o FiscalEntityAddress) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FiscalEntityAddress) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["street1"] = o.Street1 + if o.Street2.IsSet() { + toSerialize["street2"] = o.Street2.Get() + } + toSerialize["postal_code"] = o.PostalCode + toSerialize["city"] = o.City + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["country"] = o.Country + toSerialize["external_number"] = o.ExternalNumber + return toSerialize, nil +} + +func (o *FiscalEntityAddress) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "street1", + "postal_code", + "city", + "country", + "external_number", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFiscalEntityAddress := _FiscalEntityAddress{} + + err = json.Unmarshal(bytes, &varFiscalEntityAddress) + + if err != nil { + return err + } + + *o = FiscalEntityAddress(varFiscalEntityAddress) + + return err +} + +type NullableFiscalEntityAddress struct { + value *FiscalEntityAddress + isSet bool +} + +func (v NullableFiscalEntityAddress) Get() *FiscalEntityAddress { + return v.value +} + +func (v *NullableFiscalEntityAddress) Set(val *FiscalEntityAddress) { + v.value = val + v.isSet = true +} + +func (v NullableFiscalEntityAddress) IsSet() bool { + return v.isSet +} + +func (v *NullableFiscalEntityAddress) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFiscalEntityAddress(val *FiscalEntityAddress) *NullableFiscalEntityAddress { + return &NullableFiscalEntityAddress{value: val, isSet: true} +} + +func (v NullableFiscalEntityAddress) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFiscalEntityAddress) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_get_api_keys_response.go b/model_get_api_keys_response.go index 71bf216..a6b9cee 100644 --- a/model_get_api_keys_response.go +++ b/model_get_api_keys_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetApiKeysResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetApiKeysResponse struct { Data []ApiKeyResponse `json:"data,omitempty"` } +type _GetApiKeysResponse GetApiKeysResponse + // NewGetApiKeysResponse instantiates a new GetApiKeysResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetApiKeysResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetApiKeysResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetApiKeysResponse := _GetApiKeysResponse{} + + err = json.Unmarshal(bytes, &varGetApiKeysResponse) + + if err != nil { + return err + } + + *o = GetApiKeysResponse(varGetApiKeysResponse) + + return err +} + type NullableGetApiKeysResponse struct { value *GetApiKeysResponse isSet bool diff --git a/model_get_charges_response.go b/model_get_charges_response.go index 830d0e7..dd358ec 100644 --- a/model_get_charges_response.go +++ b/model_get_charges_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetChargesResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetChargesResponse struct { Data []ChargeResponse `json:"data,omitempty"` } +type _GetChargesResponse GetChargesResponse + // NewGetChargesResponse instantiates a new GetChargesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetChargesResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetChargesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetChargesResponse := _GetChargesResponse{} + + err = json.Unmarshal(bytes, &varGetChargesResponse) + + if err != nil { + return err + } + + *o = GetChargesResponse(varGetChargesResponse) + + return err +} + type NullableGetChargesResponse struct { value *GetChargesResponse isSet bool diff --git a/model_get_companies_response.go b/model_get_companies_response.go index 394ab9c..6b634a2 100644 --- a/model_get_companies_response.go +++ b/model_get_companies_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetCompaniesResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetCompaniesResponse struct { Data []CompanyResponse `json:"data,omitempty"` } +type _GetCompaniesResponse GetCompaniesResponse + // NewGetCompaniesResponse instantiates a new GetCompaniesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetCompaniesResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetCompaniesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetCompaniesResponse := _GetCompaniesResponse{} + + err = json.Unmarshal(bytes, &varGetCompaniesResponse) + + if err != nil { + return err + } + + *o = GetCompaniesResponse(varGetCompaniesResponse) + + return err +} + type NullableGetCompaniesResponse struct { value *GetCompaniesResponse isSet bool diff --git a/model_get_customer_payment_method_data_response.go b/model_get_customer_payment_method_data_response.go index 6d6ccb3..8db547b 100644 --- a/model_get_customer_payment_method_data_response.go +++ b/model_get_customer_payment_method_data_response.go @@ -91,6 +91,18 @@ func (dst *GetCustomerPaymentMethodDataResponse) UnmarshalJSON(data []byte) erro } } + // check if the discriminator value is 'spei_recurrent' + if jsonDict["type"] == "spei_recurrent" { + // try to unmarshal JSON data into PaymentMethodSpeiRecurrent + err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) + if err == nil { + return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match + } else { + dst.PaymentMethodSpeiRecurrent = nil + return fmt.Errorf("failed to unmarshal GetCustomerPaymentMethodDataResponse as PaymentMethodSpeiRecurrent: %s", err.Error()) + } + } + // check if the discriminator value is 'payment_method_card_response' if jsonDict["type"] == "payment_method_card_response" { // try to unmarshal JSON data into PaymentMethodCardResponse @@ -127,18 +139,6 @@ func (dst *GetCustomerPaymentMethodDataResponse) UnmarshalJSON(data []byte) erro } } - // check if the discriminator value is 'spei_recurrent' - if jsonDict["type"] == "spei_recurrent" { - // try to unmarshal JSON data into PaymentMethodSpeiRecurrent - err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) - if err == nil { - return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match - } else { - dst.PaymentMethodSpeiRecurrent = nil - return fmt.Errorf("failed to unmarshal GetCustomerPaymentMethodDataResponse as PaymentMethodSpeiRecurrent: %s", err.Error()) - } - } - return nil } diff --git a/model_get_events_response.go b/model_get_events_response.go index 76d4119..a29cfe6 100644 --- a/model_get_events_response.go +++ b/model_get_events_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetEventsResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetEventsResponse struct { Data []EventResponse `json:"data,omitempty"` } +type _GetEventsResponse GetEventsResponse + // NewGetEventsResponse instantiates a new GetEventsResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetEventsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetEventsResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetEventsResponse := _GetEventsResponse{} + + err = json.Unmarshal(bytes, &varGetEventsResponse) + + if err != nil { + return err + } + + *o = GetEventsResponse(varGetEventsResponse) + + return err +} + type NullableGetEventsResponse struct { value *GetEventsResponse isSet bool diff --git a/model_get_order_discount_lines_response.go b/model_get_order_discount_lines_response.go index e305762..ebfd4c6 100644 --- a/model_get_order_discount_lines_response.go +++ b/model_get_order_discount_lines_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetOrderDiscountLinesResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetOrderDiscountLinesResponse struct { Data []DiscountLinesResponse `json:"data,omitempty"` } +type _GetOrderDiscountLinesResponse GetOrderDiscountLinesResponse + // NewGetOrderDiscountLinesResponse instantiates a new GetOrderDiscountLinesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetOrderDiscountLinesResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetOrderDiscountLinesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetOrderDiscountLinesResponse := _GetOrderDiscountLinesResponse{} + + err = json.Unmarshal(bytes, &varGetOrderDiscountLinesResponse) + + if err != nil { + return err + } + + *o = GetOrderDiscountLinesResponse(varGetOrderDiscountLinesResponse) + + return err +} + type NullableGetOrderDiscountLinesResponse struct { value *GetOrderDiscountLinesResponse isSet bool diff --git a/model_get_orders_response.go b/model_get_orders_response.go index f763a84..0586abf 100644 --- a/model_get_orders_response.go +++ b/model_get_orders_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetOrdersResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetOrdersResponse struct { PreviousPageUrl NullableString `json:"previous_page_url,omitempty"` } +type _GetOrdersResponse GetOrdersResponse + // NewGetOrdersResponse instantiates a new GetOrdersResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -229,6 +232,43 @@ func (o GetOrdersResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetOrdersResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetOrdersResponse := _GetOrdersResponse{} + + err = json.Unmarshal(bytes, &varGetOrdersResponse) + + if err != nil { + return err + } + + *o = GetOrdersResponse(varGetOrdersResponse) + + return err +} + type NullableGetOrdersResponse struct { value *GetOrdersResponse isSet bool diff --git a/model_get_payment_method_response.go b/model_get_payment_method_response.go index ba6f61d..3082cb7 100644 --- a/model_get_payment_method_response.go +++ b/model_get_payment_method_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetPaymentMethodResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetPaymentMethodResponse struct { Data []GetCustomerPaymentMethodDataResponse `json:"data,omitempty"` } +type _GetPaymentMethodResponse GetPaymentMethodResponse + // NewGetPaymentMethodResponse instantiates a new GetPaymentMethodResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetPaymentMethodResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetPaymentMethodResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetPaymentMethodResponse := _GetPaymentMethodResponse{} + + err = json.Unmarshal(bytes, &varGetPaymentMethodResponse) + + if err != nil { + return err + } + + *o = GetPaymentMethodResponse(varGetPaymentMethodResponse) + + return err +} + type NullableGetPaymentMethodResponse struct { value *GetPaymentMethodResponse isSet bool diff --git a/model_get_plans_response.go b/model_get_plans_response.go index 7a9bb2d..121ff4a 100644 --- a/model_get_plans_response.go +++ b/model_get_plans_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetPlansResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetPlansResponse struct { Data []PlanResponse `json:"data,omitempty"` } +type _GetPlansResponse GetPlansResponse + // NewGetPlansResponse instantiates a new GetPlansResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetPlansResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetPlansResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetPlansResponse := _GetPlansResponse{} + + err = json.Unmarshal(bytes, &varGetPlansResponse) + + if err != nil { + return err + } + + *o = GetPlansResponse(varGetPlansResponse) + + return err +} + type NullableGetPlansResponse struct { value *GetPlansResponse isSet bool diff --git a/model_get_transactions_response.go b/model_get_transactions_response.go index d6f62ac..5556b97 100644 --- a/model_get_transactions_response.go +++ b/model_get_transactions_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetTransactionsResponse type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type GetTransactionsResponse struct { Data []TransactionResponse `json:"data,omitempty"` } +type _GetTransactionsResponse GetTransactionsResponse + // NewGetTransactionsResponse instantiates a new GetTransactionsResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -239,6 +242,42 @@ func (o GetTransactionsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetTransactionsResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetTransactionsResponse := _GetTransactionsResponse{} + + err = json.Unmarshal(bytes, &varGetTransactionsResponse) + + if err != nil { + return err + } + + *o = GetTransactionsResponse(varGetTransactionsResponse) + + return err +} + type NullableGetTransactionsResponse struct { value *GetTransactionsResponse isSet bool diff --git a/model_get_transfers_response.go b/model_get_transfers_response.go index 88b46da..78da4a1 100644 --- a/model_get_transfers_response.go +++ b/model_get_transfers_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetTransfersResponse type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type GetTransfersResponse struct { Data []TransfersResponse `json:"data,omitempty"` } +type _GetTransfersResponse GetTransfersResponse + // NewGetTransfersResponse instantiates a new GetTransfersResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -239,6 +242,42 @@ func (o GetTransfersResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetTransfersResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetTransfersResponse := _GetTransfersResponse{} + + err = json.Unmarshal(bytes, &varGetTransfersResponse) + + if err != nil { + return err + } + + *o = GetTransfersResponse(varGetTransfersResponse) + + return err +} + type NullableGetTransfersResponse struct { value *GetTransfersResponse isSet bool diff --git a/model_get_webhook_keys_response.go b/model_get_webhook_keys_response.go index cf23d4b..a7a366a 100644 --- a/model_get_webhook_keys_response.go +++ b/model_get_webhook_keys_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetWebhookKeysResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetWebhookKeysResponse struct { Data []WebhookKeyResponse `json:"data,omitempty"` } +type _GetWebhookKeysResponse GetWebhookKeysResponse + // NewGetWebhookKeysResponse instantiates a new GetWebhookKeysResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetWebhookKeysResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetWebhookKeysResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetWebhookKeysResponse := _GetWebhookKeysResponse{} + + err = json.Unmarshal(bytes, &varGetWebhookKeysResponse) + + if err != nil { + return err + } + + *o = GetWebhookKeysResponse(varGetWebhookKeysResponse) + + return err +} + type NullableGetWebhookKeysResponse struct { value *GetWebhookKeysResponse isSet bool diff --git a/model_get_webhooks_response.go b/model_get_webhooks_response.go index f4bb3fb..ba891c9 100644 --- a/model_get_webhooks_response.go +++ b/model_get_webhooks_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the GetWebhooksResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type GetWebhooksResponse struct { Data []WebhookResponse `json:"data,omitempty"` } +type _GetWebhooksResponse GetWebhooksResponse + // NewGetWebhooksResponse instantiates a new GetWebhooksResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o GetWebhooksResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *GetWebhooksResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGetWebhooksResponse := _GetWebhooksResponse{} + + err = json.Unmarshal(bytes, &varGetWebhooksResponse) + + if err != nil { + return err + } + + *o = GetWebhooksResponse(varGetWebhooksResponse) + + return err +} + type NullableGetWebhooksResponse struct { value *GetWebhooksResponse isSet bool diff --git a/model_log_response.go b/model_log_response.go index e523ba1..a2afc3a 100644 --- a/model_log_response.go +++ b/model_log_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the LogResponse type satisfies the MappedNullable interface at compile time @@ -42,6 +43,8 @@ type LogResponse struct { Version *string `json:"version,omitempty"` } +type _LogResponse LogResponse + // NewLogResponse instantiates a new LogResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -775,6 +778,43 @@ func (o LogResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *LogResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "created_at", + "id", + "livemode", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLogResponse := _LogResponse{} + + err = json.Unmarshal(bytes, &varLogResponse) + + if err != nil { + return err + } + + *o = LogResponse(varLogResponse) + + return err +} + type NullableLogResponse struct { value *LogResponse isSet bool diff --git a/model_logs_response.go b/model_logs_response.go index b51d0d8..2b7c462 100644 --- a/model_logs_response.go +++ b/model_logs_response.go @@ -240,8 +240,12 @@ func (o LogsResponse) MarshalJSON() ([]byte, error) { func (o LogsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - // skip: has_more is readOnly - // skip: object is readOnly + if !IsNil(o.HasMore) { + toSerialize["has_more"] = o.HasMore + } + if !IsNil(o.Object) { + toSerialize["object"] = o.Object + } if o.NextPageUrl.IsSet() { toSerialize["next_page_url"] = o.NextPageUrl.Get() } diff --git a/model_order_capture_request.go b/model_order_capture_request.go index ae682f9..83bd275 100644 --- a/model_order_capture_request.go +++ b/model_order_capture_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderCaptureRequest type satisfies the MappedNullable interface at compile time @@ -24,6 +25,8 @@ type OrderCaptureRequest struct { Amount int64 `json:"amount"` } +type _OrderCaptureRequest OrderCaptureRequest + // NewOrderCaptureRequest instantiates a new OrderCaptureRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -80,6 +83,41 @@ func (o OrderCaptureRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderCaptureRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderCaptureRequest := _OrderCaptureRequest{} + + err = json.Unmarshal(bytes, &varOrderCaptureRequest) + + if err != nil { + return err + } + + *o = OrderCaptureRequest(varOrderCaptureRequest) + + return err +} + type NullableOrderCaptureRequest struct { value *OrderCaptureRequest isSet bool diff --git a/model_order_customer_info_response.go b/model_order_customer_info_response.go new file mode 100644 index 0000000..b381562 --- /dev/null +++ b/model_order_customer_info_response.go @@ -0,0 +1,322 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" +) + +// checks if the OrderCustomerInfoResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderCustomerInfoResponse{} + +// OrderCustomerInfoResponse struct for OrderCustomerInfoResponse +type OrderCustomerInfoResponse struct { + // Custom reference + CustomerCustomReference NullableString `json:"customer_custom_reference,omitempty"` + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + Phone *string `json:"phone,omitempty"` + Corporate *bool `json:"corporate,omitempty"` + Object *string `json:"object,omitempty"` +} + +// NewOrderCustomerInfoResponse instantiates a new OrderCustomerInfoResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderCustomerInfoResponse() *OrderCustomerInfoResponse { + this := OrderCustomerInfoResponse{} + var corporate bool = false + this.Corporate = &corporate + return &this +} + +// NewOrderCustomerInfoResponseWithDefaults instantiates a new OrderCustomerInfoResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderCustomerInfoResponseWithDefaults() *OrderCustomerInfoResponse { + this := OrderCustomerInfoResponse{} + var corporate bool = false + this.Corporate = &corporate + return &this +} + +// GetCustomerCustomReference returns the CustomerCustomReference field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderCustomerInfoResponse) GetCustomerCustomReference() string { + if o == nil || IsNil(o.CustomerCustomReference.Get()) { + var ret string + return ret + } + return *o.CustomerCustomReference.Get() +} + +// GetCustomerCustomReferenceOk returns a tuple with the CustomerCustomReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderCustomerInfoResponse) GetCustomerCustomReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomerCustomReference.Get(), o.CustomerCustomReference.IsSet() +} + +// HasCustomerCustomReference returns a boolean if a field has been set. +func (o *OrderCustomerInfoResponse) HasCustomerCustomReference() bool { + if o != nil && o.CustomerCustomReference.IsSet() { + return true + } + + return false +} + +// SetCustomerCustomReference gets a reference to the given NullableString and assigns it to the CustomerCustomReference field. +func (o *OrderCustomerInfoResponse) SetCustomerCustomReference(v string) { + o.CustomerCustomReference.Set(&v) +} +// SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil +func (o *OrderCustomerInfoResponse) SetCustomerCustomReferenceNil() { + o.CustomerCustomReference.Set(nil) +} + +// UnsetCustomerCustomReference ensures that no value is present for CustomerCustomReference, not even an explicit nil +func (o *OrderCustomerInfoResponse) UnsetCustomerCustomReference() { + o.CustomerCustomReference.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *OrderCustomerInfoResponse) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderCustomerInfoResponse) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *OrderCustomerInfoResponse) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *OrderCustomerInfoResponse) SetName(v string) { + o.Name = &v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *OrderCustomerInfoResponse) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderCustomerInfoResponse) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *OrderCustomerInfoResponse) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *OrderCustomerInfoResponse) SetEmail(v string) { + o.Email = &v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *OrderCustomerInfoResponse) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderCustomerInfoResponse) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *OrderCustomerInfoResponse) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *OrderCustomerInfoResponse) SetPhone(v string) { + o.Phone = &v +} + +// GetCorporate returns the Corporate field value if set, zero value otherwise. +func (o *OrderCustomerInfoResponse) GetCorporate() bool { + if o == nil || IsNil(o.Corporate) { + var ret bool + return ret + } + return *o.Corporate +} + +// GetCorporateOk returns a tuple with the Corporate field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderCustomerInfoResponse) GetCorporateOk() (*bool, bool) { + if o == nil || IsNil(o.Corporate) { + return nil, false + } + return o.Corporate, true +} + +// HasCorporate returns a boolean if a field has been set. +func (o *OrderCustomerInfoResponse) HasCorporate() bool { + if o != nil && !IsNil(o.Corporate) { + return true + } + + return false +} + +// SetCorporate gets a reference to the given bool and assigns it to the Corporate field. +func (o *OrderCustomerInfoResponse) SetCorporate(v bool) { + o.Corporate = &v +} + +// GetObject returns the Object field value if set, zero value otherwise. +func (o *OrderCustomerInfoResponse) GetObject() string { + if o == nil || IsNil(o.Object) { + var ret string + return ret + } + return *o.Object +} + +// GetObjectOk returns a tuple with the Object field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderCustomerInfoResponse) GetObjectOk() (*string, bool) { + if o == nil || IsNil(o.Object) { + return nil, false + } + return o.Object, true +} + +// HasObject returns a boolean if a field has been set. +func (o *OrderCustomerInfoResponse) HasObject() bool { + if o != nil && !IsNil(o.Object) { + return true + } + + return false +} + +// SetObject gets a reference to the given string and assigns it to the Object field. +func (o *OrderCustomerInfoResponse) SetObject(v string) { + o.Object = &v +} + +func (o OrderCustomerInfoResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderCustomerInfoResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.CustomerCustomReference.IsSet() { + toSerialize["customer_custom_reference"] = o.CustomerCustomReference.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + if !IsNil(o.Corporate) { + toSerialize["corporate"] = o.Corporate + } + if !IsNil(o.Object) { + toSerialize["object"] = o.Object + } + return toSerialize, nil +} + +type NullableOrderCustomerInfoResponse struct { + value *OrderCustomerInfoResponse + isSet bool +} + +func (v NullableOrderCustomerInfoResponse) Get() *OrderCustomerInfoResponse { + return v.value +} + +func (v *NullableOrderCustomerInfoResponse) Set(val *OrderCustomerInfoResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrderCustomerInfoResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderCustomerInfoResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderCustomerInfoResponse(val *OrderCustomerInfoResponse) *NullableOrderCustomerInfoResponse { + return &NullableOrderCustomerInfoResponse{value: val, isSet: true} +} + +func (v NullableOrderCustomerInfoResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderCustomerInfoResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_discount_lines_request.go b/model_order_discount_lines_request.go index 0cbaf9f..3004a6f 100644 --- a/model_order_discount_lines_request.go +++ b/model_order_discount_lines_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderDiscountLinesRequest type satisfies the MappedNullable interface at compile time @@ -28,6 +29,8 @@ type OrderDiscountLinesRequest struct { Type string `json:"type"` } +type _OrderDiscountLinesRequest OrderDiscountLinesRequest + // NewOrderDiscountLinesRequest instantiates a new OrderDiscountLinesRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -136,6 +139,43 @@ func (o OrderDiscountLinesRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderDiscountLinesRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "code", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderDiscountLinesRequest := _OrderDiscountLinesRequest{} + + err = json.Unmarshal(bytes, &varOrderDiscountLinesRequest) + + if err != nil { + return err + } + + *o = OrderDiscountLinesRequest(varOrderDiscountLinesRequest) + + return err +} + type NullableOrderDiscountLinesRequest struct { value *OrderDiscountLinesRequest isSet bool diff --git a/model_order_fiscal_entity_address_response.go b/model_order_fiscal_entity_address_response.go new file mode 100644 index 0000000..0788453 --- /dev/null +++ b/model_order_fiscal_entity_address_response.go @@ -0,0 +1,393 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the OrderFiscalEntityAddressResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderFiscalEntityAddressResponse{} + +// OrderFiscalEntityAddressResponse Address of the fiscal entity +type OrderFiscalEntityAddressResponse struct { + // Street name and number + Street1 string `json:"street1"` + // Street name and number + Street2 NullableString `json:"street2,omitempty"` + // Postal code + PostalCode string `json:"postal_code"` + // City + City string `json:"city"` + // State + State *string `json:"state,omitempty"` + // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + Country string `json:"country"` + // External number + ExternalNumber string `json:"external_number"` + Object *string `json:"object,omitempty"` +} + +type _OrderFiscalEntityAddressResponse OrderFiscalEntityAddressResponse + +// NewOrderFiscalEntityAddressResponse instantiates a new OrderFiscalEntityAddressResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderFiscalEntityAddressResponse(street1 string, postalCode string, city string, country string, externalNumber string) *OrderFiscalEntityAddressResponse { + this := OrderFiscalEntityAddressResponse{} + this.Street1 = street1 + this.PostalCode = postalCode + this.City = city + this.Country = country + this.ExternalNumber = externalNumber + return &this +} + +// NewOrderFiscalEntityAddressResponseWithDefaults instantiates a new OrderFiscalEntityAddressResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderFiscalEntityAddressResponseWithDefaults() *OrderFiscalEntityAddressResponse { + this := OrderFiscalEntityAddressResponse{} + return &this +} + +// GetStreet1 returns the Street1 field value +func (o *OrderFiscalEntityAddressResponse) GetStreet1() string { + if o == nil { + var ret string + return ret + } + + return o.Street1 +} + +// GetStreet1Ok returns a tuple with the Street1 field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetStreet1Ok() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Street1, true +} + +// SetStreet1 sets field value +func (o *OrderFiscalEntityAddressResponse) SetStreet1(v string) { + o.Street1 = v +} + +// GetStreet2 returns the Street2 field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityAddressResponse) GetStreet2() string { + if o == nil || IsNil(o.Street2.Get()) { + var ret string + return ret + } + return *o.Street2.Get() +} + +// GetStreet2Ok returns a tuple with the Street2 field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityAddressResponse) GetStreet2Ok() (*string, bool) { + if o == nil { + return nil, false + } + return o.Street2.Get(), o.Street2.IsSet() +} + +// HasStreet2 returns a boolean if a field has been set. +func (o *OrderFiscalEntityAddressResponse) HasStreet2() bool { + if o != nil && o.Street2.IsSet() { + return true + } + + return false +} + +// SetStreet2 gets a reference to the given NullableString and assigns it to the Street2 field. +func (o *OrderFiscalEntityAddressResponse) SetStreet2(v string) { + o.Street2.Set(&v) +} +// SetStreet2Nil sets the value for Street2 to be an explicit nil +func (o *OrderFiscalEntityAddressResponse) SetStreet2Nil() { + o.Street2.Set(nil) +} + +// UnsetStreet2 ensures that no value is present for Street2, not even an explicit nil +func (o *OrderFiscalEntityAddressResponse) UnsetStreet2() { + o.Street2.Unset() +} + +// GetPostalCode returns the PostalCode field value +func (o *OrderFiscalEntityAddressResponse) GetPostalCode() string { + if o == nil { + var ret string + return ret + } + + return o.PostalCode +} + +// GetPostalCodeOk returns a tuple with the PostalCode field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetPostalCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PostalCode, true +} + +// SetPostalCode sets field value +func (o *OrderFiscalEntityAddressResponse) SetPostalCode(v string) { + o.PostalCode = v +} + +// GetCity returns the City field value +func (o *OrderFiscalEntityAddressResponse) GetCity() string { + if o == nil { + var ret string + return ret + } + + return o.City +} + +// GetCityOk returns a tuple with the City field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetCityOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.City, true +} + +// SetCity sets field value +func (o *OrderFiscalEntityAddressResponse) SetCity(v string) { + o.City = v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *OrderFiscalEntityAddressResponse) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// GetStateOk returns a tuple with the State field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetStateOk() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *OrderFiscalEntityAddressResponse) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *OrderFiscalEntityAddressResponse) SetState(v string) { + o.State = &v +} + +// GetCountry returns the Country field value +func (o *OrderFiscalEntityAddressResponse) GetCountry() string { + if o == nil { + var ret string + return ret + } + + return o.Country +} + +// GetCountryOk returns a tuple with the Country field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetCountryOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Country, true +} + +// SetCountry sets field value +func (o *OrderFiscalEntityAddressResponse) SetCountry(v string) { + o.Country = v +} + +// GetExternalNumber returns the ExternalNumber field value +func (o *OrderFiscalEntityAddressResponse) GetExternalNumber() string { + if o == nil { + var ret string + return ret + } + + return o.ExternalNumber +} + +// GetExternalNumberOk returns a tuple with the ExternalNumber field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetExternalNumberOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ExternalNumber, true +} + +// SetExternalNumber sets field value +func (o *OrderFiscalEntityAddressResponse) SetExternalNumber(v string) { + o.ExternalNumber = v +} + +// GetObject returns the Object field value if set, zero value otherwise. +func (o *OrderFiscalEntityAddressResponse) GetObject() string { + if o == nil || IsNil(o.Object) { + var ret string + return ret + } + return *o.Object +} + +// GetObjectOk returns a tuple with the Object field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponse) GetObjectOk() (*string, bool) { + if o == nil || IsNil(o.Object) { + return nil, false + } + return o.Object, true +} + +// HasObject returns a boolean if a field has been set. +func (o *OrderFiscalEntityAddressResponse) HasObject() bool { + if o != nil && !IsNil(o.Object) { + return true + } + + return false +} + +// SetObject gets a reference to the given string and assigns it to the Object field. +func (o *OrderFiscalEntityAddressResponse) SetObject(v string) { + o.Object = &v +} + +func (o OrderFiscalEntityAddressResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderFiscalEntityAddressResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["street1"] = o.Street1 + if o.Street2.IsSet() { + toSerialize["street2"] = o.Street2.Get() + } + toSerialize["postal_code"] = o.PostalCode + toSerialize["city"] = o.City + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + toSerialize["country"] = o.Country + toSerialize["external_number"] = o.ExternalNumber + if !IsNil(o.Object) { + toSerialize["object"] = o.Object + } + return toSerialize, nil +} + +func (o *OrderFiscalEntityAddressResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "street1", + "postal_code", + "city", + "country", + "external_number", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderFiscalEntityAddressResponse := _OrderFiscalEntityAddressResponse{} + + err = json.Unmarshal(bytes, &varOrderFiscalEntityAddressResponse) + + if err != nil { + return err + } + + *o = OrderFiscalEntityAddressResponse(varOrderFiscalEntityAddressResponse) + + return err +} + +type NullableOrderFiscalEntityAddressResponse struct { + value *OrderFiscalEntityAddressResponse + isSet bool +} + +func (v NullableOrderFiscalEntityAddressResponse) Get() *OrderFiscalEntityAddressResponse { + return v.value +} + +func (v *NullableOrderFiscalEntityAddressResponse) Set(val *OrderFiscalEntityAddressResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrderFiscalEntityAddressResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderFiscalEntityAddressResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderFiscalEntityAddressResponse(val *OrderFiscalEntityAddressResponse) *NullableOrderFiscalEntityAddressResponse { + return &NullableOrderFiscalEntityAddressResponse{value: val, isSet: true} +} + +func (v NullableOrderFiscalEntityAddressResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderFiscalEntityAddressResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_fiscal_entity_address_response_all_of.go b/model_order_fiscal_entity_address_response_all_of.go new file mode 100644 index 0000000..9a74865 --- /dev/null +++ b/model_order_fiscal_entity_address_response_all_of.go @@ -0,0 +1,127 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" +) + +// checks if the OrderFiscalEntityAddressResponseAllOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderFiscalEntityAddressResponseAllOf{} + +// OrderFiscalEntityAddressResponseAllOf struct for OrderFiscalEntityAddressResponseAllOf +type OrderFiscalEntityAddressResponseAllOf struct { + Object *string `json:"object,omitempty"` +} + +// NewOrderFiscalEntityAddressResponseAllOf instantiates a new OrderFiscalEntityAddressResponseAllOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderFiscalEntityAddressResponseAllOf() *OrderFiscalEntityAddressResponseAllOf { + this := OrderFiscalEntityAddressResponseAllOf{} + return &this +} + +// NewOrderFiscalEntityAddressResponseAllOfWithDefaults instantiates a new OrderFiscalEntityAddressResponseAllOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderFiscalEntityAddressResponseAllOfWithDefaults() *OrderFiscalEntityAddressResponseAllOf { + this := OrderFiscalEntityAddressResponseAllOf{} + return &this +} + +// GetObject returns the Object field value if set, zero value otherwise. +func (o *OrderFiscalEntityAddressResponseAllOf) GetObject() string { + if o == nil || IsNil(o.Object) { + var ret string + return ret + } + return *o.Object +} + +// GetObjectOk returns a tuple with the Object field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityAddressResponseAllOf) GetObjectOk() (*string, bool) { + if o == nil || IsNil(o.Object) { + return nil, false + } + return o.Object, true +} + +// HasObject returns a boolean if a field has been set. +func (o *OrderFiscalEntityAddressResponseAllOf) HasObject() bool { + if o != nil && !IsNil(o.Object) { + return true + } + + return false +} + +// SetObject gets a reference to the given string and assigns it to the Object field. +func (o *OrderFiscalEntityAddressResponseAllOf) SetObject(v string) { + o.Object = &v +} + +func (o OrderFiscalEntityAddressResponseAllOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderFiscalEntityAddressResponseAllOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Object) { + toSerialize["object"] = o.Object + } + return toSerialize, nil +} + +type NullableOrderFiscalEntityAddressResponseAllOf struct { + value *OrderFiscalEntityAddressResponseAllOf + isSet bool +} + +func (v NullableOrderFiscalEntityAddressResponseAllOf) Get() *OrderFiscalEntityAddressResponseAllOf { + return v.value +} + +func (v *NullableOrderFiscalEntityAddressResponseAllOf) Set(val *OrderFiscalEntityAddressResponseAllOf) { + v.value = val + v.isSet = true +} + +func (v NullableOrderFiscalEntityAddressResponseAllOf) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderFiscalEntityAddressResponseAllOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderFiscalEntityAddressResponseAllOf(val *OrderFiscalEntityAddressResponseAllOf) *NullableOrderFiscalEntityAddressResponseAllOf { + return &NullableOrderFiscalEntityAddressResponseAllOf{value: val, isSet: true} +} + +func (v NullableOrderFiscalEntityAddressResponseAllOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderFiscalEntityAddressResponseAllOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_fiscal_entity_request.go b/model_order_fiscal_entity_request.go new file mode 100644 index 0000000..bf602c2 --- /dev/null +++ b/model_order_fiscal_entity_request.go @@ -0,0 +1,361 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the OrderFiscalEntityRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderFiscalEntityRequest{} + +// OrderFiscalEntityRequest Fiscal entity of the order, Currently it is a purely informative field +type OrderFiscalEntityRequest struct { + Address FiscalEntityAddress `json:"address"` + // Email of the fiscal entity + Email *string `json:"email,omitempty"` + // Metadata associated with the fiscal entity + Metadata map[string]interface{} `json:"metadata,omitempty"` + // Name of the fiscal entity + Name NullableString `json:"name,omitempty"` + // Phone of the fiscal entity + Phone *string `json:"phone,omitempty"` + // Tax ID of the fiscal entity + TaxId NullableString `json:"tax_id,omitempty"` +} + +type _OrderFiscalEntityRequest OrderFiscalEntityRequest + +// NewOrderFiscalEntityRequest instantiates a new OrderFiscalEntityRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderFiscalEntityRequest(address FiscalEntityAddress) *OrderFiscalEntityRequest { + this := OrderFiscalEntityRequest{} + this.Address = address + return &this +} + +// NewOrderFiscalEntityRequestWithDefaults instantiates a new OrderFiscalEntityRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderFiscalEntityRequestWithDefaults() *OrderFiscalEntityRequest { + this := OrderFiscalEntityRequest{} + return &this +} + +// GetAddress returns the Address field value +func (o *OrderFiscalEntityRequest) GetAddress() FiscalEntityAddress { + if o == nil { + var ret FiscalEntityAddress + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityRequest) GetAddressOk() (*FiscalEntityAddress, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *OrderFiscalEntityRequest) SetAddress(v FiscalEntityAddress) { + o.Address = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *OrderFiscalEntityRequest) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityRequest) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *OrderFiscalEntityRequest) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *OrderFiscalEntityRequest) SetEmail(v string) { + o.Email = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *OrderFiscalEntityRequest) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityRequest) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *OrderFiscalEntityRequest) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *OrderFiscalEntityRequest) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityRequest) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *OrderFiscalEntityRequest) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *OrderFiscalEntityRequest) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *OrderFiscalEntityRequest) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *OrderFiscalEntityRequest) UnsetName() { + o.Name.Unset() +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *OrderFiscalEntityRequest) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityRequest) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *OrderFiscalEntityRequest) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *OrderFiscalEntityRequest) SetPhone(v string) { + o.Phone = &v +} + +// GetTaxId returns the TaxId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityRequest) GetTaxId() string { + if o == nil || IsNil(o.TaxId.Get()) { + var ret string + return ret + } + return *o.TaxId.Get() +} + +// GetTaxIdOk returns a tuple with the TaxId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityRequest) GetTaxIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TaxId.Get(), o.TaxId.IsSet() +} + +// HasTaxId returns a boolean if a field has been set. +func (o *OrderFiscalEntityRequest) HasTaxId() bool { + if o != nil && o.TaxId.IsSet() { + return true + } + + return false +} + +// SetTaxId gets a reference to the given NullableString and assigns it to the TaxId field. +func (o *OrderFiscalEntityRequest) SetTaxId(v string) { + o.TaxId.Set(&v) +} +// SetTaxIdNil sets the value for TaxId to be an explicit nil +func (o *OrderFiscalEntityRequest) SetTaxIdNil() { + o.TaxId.Set(nil) +} + +// UnsetTaxId ensures that no value is present for TaxId, not even an explicit nil +func (o *OrderFiscalEntityRequest) UnsetTaxId() { + o.TaxId.Unset() +} + +func (o OrderFiscalEntityRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderFiscalEntityRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + if o.TaxId.IsSet() { + toSerialize["tax_id"] = o.TaxId.Get() + } + return toSerialize, nil +} + +func (o *OrderFiscalEntityRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderFiscalEntityRequest := _OrderFiscalEntityRequest{} + + err = json.Unmarshal(bytes, &varOrderFiscalEntityRequest) + + if err != nil { + return err + } + + *o = OrderFiscalEntityRequest(varOrderFiscalEntityRequest) + + return err +} + +type NullableOrderFiscalEntityRequest struct { + value *OrderFiscalEntityRequest + isSet bool +} + +func (v NullableOrderFiscalEntityRequest) Get() *OrderFiscalEntityRequest { + return v.value +} + +func (v *NullableOrderFiscalEntityRequest) Set(val *OrderFiscalEntityRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOrderFiscalEntityRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderFiscalEntityRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderFiscalEntityRequest(val *OrderFiscalEntityRequest) *NullableOrderFiscalEntityRequest { + return &NullableOrderFiscalEntityRequest{value: val, isSet: true} +} + +func (v NullableOrderFiscalEntityRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderFiscalEntityRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_fiscal_entity_response.go b/model_order_fiscal_entity_response.go new file mode 100644 index 0000000..523fe0c --- /dev/null +++ b/model_order_fiscal_entity_response.go @@ -0,0 +1,467 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the OrderFiscalEntityResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderFiscalEntityResponse{} + +// OrderFiscalEntityResponse Fiscal entity of the order, Currently it is a purely informative field +type OrderFiscalEntityResponse struct { + Address OrderFiscalEntityAddressResponse `json:"address"` + // Email of the fiscal entity + Email NullableString `json:"email,omitempty"` + // Metadata associated with the fiscal entity + Metadata map[string]interface{} `json:"metadata,omitempty"` + // Name of the fiscal entity + Name NullableString `json:"name,omitempty"` + // Tax ID of the fiscal entity + TaxId NullableString `json:"tax_id,omitempty"` + // ID of the fiscal entity + Id string `json:"id"` + // The time at which the object was created in seconds since the Unix epoch + CreatedAt int64 `json:"created_at"` + Object string `json:"object"` + // Phone of the fiscal entity + Phone NullableString `json:"phone,omitempty"` +} + +type _OrderFiscalEntityResponse OrderFiscalEntityResponse + +// NewOrderFiscalEntityResponse instantiates a new OrderFiscalEntityResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderFiscalEntityResponse(address OrderFiscalEntityAddressResponse, id string, createdAt int64, object string) *OrderFiscalEntityResponse { + this := OrderFiscalEntityResponse{} + this.Address = address + this.Id = id + this.CreatedAt = createdAt + this.Object = object + return &this +} + +// NewOrderFiscalEntityResponseWithDefaults instantiates a new OrderFiscalEntityResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderFiscalEntityResponseWithDefaults() *OrderFiscalEntityResponse { + this := OrderFiscalEntityResponse{} + return &this +} + +// GetAddress returns the Address field value +func (o *OrderFiscalEntityResponse) GetAddress() OrderFiscalEntityAddressResponse { + if o == nil { + var ret OrderFiscalEntityAddressResponse + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityResponse) GetAddressOk() (*OrderFiscalEntityAddressResponse, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *OrderFiscalEntityResponse) SetAddress(v OrderFiscalEntityAddressResponse) { + o.Address = v +} + +// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityResponse) GetEmail() string { + if o == nil || IsNil(o.Email.Get()) { + var ret string + return ret + } + return *o.Email.Get() +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityResponse) GetEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Email.Get(), o.Email.IsSet() +} + +// HasEmail returns a boolean if a field has been set. +func (o *OrderFiscalEntityResponse) HasEmail() bool { + if o != nil && o.Email.IsSet() { + return true + } + + return false +} + +// SetEmail gets a reference to the given NullableString and assigns it to the Email field. +func (o *OrderFiscalEntityResponse) SetEmail(v string) { + o.Email.Set(&v) +} +// SetEmailNil sets the value for Email to be an explicit nil +func (o *OrderFiscalEntityResponse) SetEmailNil() { + o.Email.Set(nil) +} + +// UnsetEmail ensures that no value is present for Email, not even an explicit nil +func (o *OrderFiscalEntityResponse) UnsetEmail() { + o.Email.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *OrderFiscalEntityResponse) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityResponse) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *OrderFiscalEntityResponse) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *OrderFiscalEntityResponse) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityResponse) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityResponse) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *OrderFiscalEntityResponse) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *OrderFiscalEntityResponse) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *OrderFiscalEntityResponse) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *OrderFiscalEntityResponse) UnsetName() { + o.Name.Unset() +} + +// GetTaxId returns the TaxId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityResponse) GetTaxId() string { + if o == nil || IsNil(o.TaxId.Get()) { + var ret string + return ret + } + return *o.TaxId.Get() +} + +// GetTaxIdOk returns a tuple with the TaxId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityResponse) GetTaxIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TaxId.Get(), o.TaxId.IsSet() +} + +// HasTaxId returns a boolean if a field has been set. +func (o *OrderFiscalEntityResponse) HasTaxId() bool { + if o != nil && o.TaxId.IsSet() { + return true + } + + return false +} + +// SetTaxId gets a reference to the given NullableString and assigns it to the TaxId field. +func (o *OrderFiscalEntityResponse) SetTaxId(v string) { + o.TaxId.Set(&v) +} +// SetTaxIdNil sets the value for TaxId to be an explicit nil +func (o *OrderFiscalEntityResponse) SetTaxIdNil() { + o.TaxId.Set(nil) +} + +// UnsetTaxId ensures that no value is present for TaxId, not even an explicit nil +func (o *OrderFiscalEntityResponse) UnsetTaxId() { + o.TaxId.Unset() +} + +// GetId returns the Id field value +func (o *OrderFiscalEntityResponse) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityResponse) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *OrderFiscalEntityResponse) SetId(v string) { + o.Id = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *OrderFiscalEntityResponse) GetCreatedAt() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityResponse) GetCreatedAtOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *OrderFiscalEntityResponse) SetCreatedAt(v int64) { + o.CreatedAt = v +} + +// GetObject returns the Object field value +func (o *OrderFiscalEntityResponse) GetObject() string { + if o == nil { + var ret string + return ret + } + + return o.Object +} + +// GetObjectOk returns a tuple with the Object field value +// and a boolean to check if the value has been set. +func (o *OrderFiscalEntityResponse) GetObjectOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Object, true +} + +// SetObject sets field value +func (o *OrderFiscalEntityResponse) SetObject(v string) { + o.Object = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderFiscalEntityResponse) GetPhone() string { + if o == nil || IsNil(o.Phone.Get()) { + var ret string + return ret + } + return *o.Phone.Get() +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderFiscalEntityResponse) GetPhoneOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Phone.Get(), o.Phone.IsSet() +} + +// HasPhone returns a boolean if a field has been set. +func (o *OrderFiscalEntityResponse) HasPhone() bool { + if o != nil && o.Phone.IsSet() { + return true + } + + return false +} + +// SetPhone gets a reference to the given NullableString and assigns it to the Phone field. +func (o *OrderFiscalEntityResponse) SetPhone(v string) { + o.Phone.Set(&v) +} +// SetPhoneNil sets the value for Phone to be an explicit nil +func (o *OrderFiscalEntityResponse) SetPhoneNil() { + o.Phone.Set(nil) +} + +// UnsetPhone ensures that no value is present for Phone, not even an explicit nil +func (o *OrderFiscalEntityResponse) UnsetPhone() { + o.Phone.Unset() +} + +func (o OrderFiscalEntityResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderFiscalEntityResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + if o.Email.IsSet() { + toSerialize["email"] = o.Email.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.TaxId.IsSet() { + toSerialize["tax_id"] = o.TaxId.Get() + } + toSerialize["id"] = o.Id + toSerialize["created_at"] = o.CreatedAt + toSerialize["object"] = o.Object + if o.Phone.IsSet() { + toSerialize["phone"] = o.Phone.Get() + } + return toSerialize, nil +} + +func (o *OrderFiscalEntityResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "id", + "created_at", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderFiscalEntityResponse := _OrderFiscalEntityResponse{} + + err = json.Unmarshal(bytes, &varOrderFiscalEntityResponse) + + if err != nil { + return err + } + + *o = OrderFiscalEntityResponse(varOrderFiscalEntityResponse) + + return err +} + +type NullableOrderFiscalEntityResponse struct { + value *OrderFiscalEntityResponse + isSet bool +} + +func (v NullableOrderFiscalEntityResponse) Get() *OrderFiscalEntityResponse { + return v.value +} + +func (v *NullableOrderFiscalEntityResponse) Set(val *OrderFiscalEntityResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrderFiscalEntityResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderFiscalEntityResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderFiscalEntityResponse(val *OrderFiscalEntityResponse) *NullableOrderFiscalEntityResponse { + return &NullableOrderFiscalEntityResponse{value: val, isSet: true} +} + +func (v NullableOrderFiscalEntityResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderFiscalEntityResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_next_action_response.go b/model_order_next_action_response.go new file mode 100644 index 0000000..82443a5 --- /dev/null +++ b/model_order_next_action_response.go @@ -0,0 +1,164 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" +) + +// checks if the OrderNextActionResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderNextActionResponse{} + +// OrderNextActionResponse contains the following attributes that will guide to continue the flow +type OrderNextActionResponse struct { + RedirectToUrl *OrderNextActionResponseRedirectToUrl `json:"redirect_to_url,omitempty"` + // Indicates the type of action to be taken + Type *string `json:"type,omitempty"` +} + +// NewOrderNextActionResponse instantiates a new OrderNextActionResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderNextActionResponse() *OrderNextActionResponse { + this := OrderNextActionResponse{} + return &this +} + +// NewOrderNextActionResponseWithDefaults instantiates a new OrderNextActionResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderNextActionResponseWithDefaults() *OrderNextActionResponse { + this := OrderNextActionResponse{} + return &this +} + +// GetRedirectToUrl returns the RedirectToUrl field value if set, zero value otherwise. +func (o *OrderNextActionResponse) GetRedirectToUrl() OrderNextActionResponseRedirectToUrl { + if o == nil || IsNil(o.RedirectToUrl) { + var ret OrderNextActionResponseRedirectToUrl + return ret + } + return *o.RedirectToUrl +} + +// GetRedirectToUrlOk returns a tuple with the RedirectToUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderNextActionResponse) GetRedirectToUrlOk() (*OrderNextActionResponseRedirectToUrl, bool) { + if o == nil || IsNil(o.RedirectToUrl) { + return nil, false + } + return o.RedirectToUrl, true +} + +// HasRedirectToUrl returns a boolean if a field has been set. +func (o *OrderNextActionResponse) HasRedirectToUrl() bool { + if o != nil && !IsNil(o.RedirectToUrl) { + return true + } + + return false +} + +// SetRedirectToUrl gets a reference to the given OrderNextActionResponseRedirectToUrl and assigns it to the RedirectToUrl field. +func (o *OrderNextActionResponse) SetRedirectToUrl(v OrderNextActionResponseRedirectToUrl) { + o.RedirectToUrl = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *OrderNextActionResponse) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderNextActionResponse) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *OrderNextActionResponse) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *OrderNextActionResponse) SetType(v string) { + o.Type = &v +} + +func (o OrderNextActionResponse) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderNextActionResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.RedirectToUrl) { + toSerialize["redirect_to_url"] = o.RedirectToUrl + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableOrderNextActionResponse struct { + value *OrderNextActionResponse + isSet bool +} + +func (v NullableOrderNextActionResponse) Get() *OrderNextActionResponse { + return v.value +} + +func (v *NullableOrderNextActionResponse) Set(val *OrderNextActionResponse) { + v.value = val + v.isSet = true +} + +func (v NullableOrderNextActionResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderNextActionResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderNextActionResponse(val *OrderNextActionResponse) *NullableOrderNextActionResponse { + return &NullableOrderNextActionResponse{value: val, isSet: true} +} + +func (v NullableOrderNextActionResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderNextActionResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_next_action_response_redirect_to_url.go b/model_order_next_action_response_redirect_to_url.go new file mode 100644 index 0000000..7ccb3d3 --- /dev/null +++ b/model_order_next_action_response_redirect_to_url.go @@ -0,0 +1,165 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" +) + +// checks if the OrderNextActionResponseRedirectToUrl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderNextActionResponseRedirectToUrl{} + +// OrderNextActionResponseRedirectToUrl contains the following attributes that will guide to continue the flow +type OrderNextActionResponseRedirectToUrl struct { + // pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. + Url *string `json:"url,omitempty"` + // Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. + ReturnUrl *string `json:"return_url,omitempty"` +} + +// NewOrderNextActionResponseRedirectToUrl instantiates a new OrderNextActionResponseRedirectToUrl object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderNextActionResponseRedirectToUrl() *OrderNextActionResponseRedirectToUrl { + this := OrderNextActionResponseRedirectToUrl{} + return &this +} + +// NewOrderNextActionResponseRedirectToUrlWithDefaults instantiates a new OrderNextActionResponseRedirectToUrl object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderNextActionResponseRedirectToUrlWithDefaults() *OrderNextActionResponseRedirectToUrl { + this := OrderNextActionResponseRedirectToUrl{} + return &this +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *OrderNextActionResponseRedirectToUrl) GetUrl() string { + if o == nil || IsNil(o.Url) { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderNextActionResponseRedirectToUrl) GetUrlOk() (*string, bool) { + if o == nil || IsNil(o.Url) { + return nil, false + } + return o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *OrderNextActionResponseRedirectToUrl) HasUrl() bool { + if o != nil && !IsNil(o.Url) { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *OrderNextActionResponseRedirectToUrl) SetUrl(v string) { + o.Url = &v +} + +// GetReturnUrl returns the ReturnUrl field value if set, zero value otherwise. +func (o *OrderNextActionResponseRedirectToUrl) GetReturnUrl() string { + if o == nil || IsNil(o.ReturnUrl) { + var ret string + return ret + } + return *o.ReturnUrl +} + +// GetReturnUrlOk returns a tuple with the ReturnUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderNextActionResponseRedirectToUrl) GetReturnUrlOk() (*string, bool) { + if o == nil || IsNil(o.ReturnUrl) { + return nil, false + } + return o.ReturnUrl, true +} + +// HasReturnUrl returns a boolean if a field has been set. +func (o *OrderNextActionResponseRedirectToUrl) HasReturnUrl() bool { + if o != nil && !IsNil(o.ReturnUrl) { + return true + } + + return false +} + +// SetReturnUrl gets a reference to the given string and assigns it to the ReturnUrl field. +func (o *OrderNextActionResponseRedirectToUrl) SetReturnUrl(v string) { + o.ReturnUrl = &v +} + +func (o OrderNextActionResponseRedirectToUrl) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderNextActionResponseRedirectToUrl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Url) { + toSerialize["url"] = o.Url + } + if !IsNil(o.ReturnUrl) { + toSerialize["return_url"] = o.ReturnUrl + } + return toSerialize, nil +} + +type NullableOrderNextActionResponseRedirectToUrl struct { + value *OrderNextActionResponseRedirectToUrl + isSet bool +} + +func (v NullableOrderNextActionResponseRedirectToUrl) Get() *OrderNextActionResponseRedirectToUrl { + return v.value +} + +func (v *NullableOrderNextActionResponseRedirectToUrl) Set(val *OrderNextActionResponseRedirectToUrl) { + v.value = val + v.isSet = true +} + +func (v NullableOrderNextActionResponseRedirectToUrl) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderNextActionResponseRedirectToUrl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderNextActionResponseRedirectToUrl(val *OrderNextActionResponseRedirectToUrl) *NullableOrderNextActionResponseRedirectToUrl { + return &NullableOrderNextActionResponseRedirectToUrl{value: val, isSet: true} +} + +func (v NullableOrderNextActionResponseRedirectToUrl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderNextActionResponseRedirectToUrl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_refund_request.go b/model_order_refund_request.go index d70f323..c6b6dff 100644 --- a/model_order_refund_request.go +++ b/model_order_refund_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderRefundRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type OrderRefundRequest struct { Reason string `json:"reason"` } +type _OrderRefundRequest OrderRefundRequest + // NewOrderRefundRequest instantiates a new OrderRefundRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -152,6 +155,42 @@ func (o OrderRefundRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderRefundRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "reason", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderRefundRequest := _OrderRefundRequest{} + + err = json.Unmarshal(bytes, &varOrderRefundRequest) + + if err != nil { + return err + } + + *o = OrderRefundRequest(varOrderRefundRequest) + + return err +} + type NullableOrderRefundRequest struct { value *OrderRefundRequest isSet bool diff --git a/model_order_request.go b/model_order_request.go index 9267ce4..e3619fb 100644 --- a/model_order_request.go +++ b/model_order_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderRequest type satisfies the MappedNullable interface at compile time @@ -28,6 +29,7 @@ type OrderRequest struct { CustomerInfo OrderRequestCustomerInfo `json:"customer_info"` // List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. DiscountLines []OrderDiscountLinesRequest `json:"discount_lines,omitempty"` + FiscalEntity *OrderFiscalEntityRequest `json:"fiscal_entity,omitempty"` // List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. LineItems []Product `json:"line_items"` // Metadata associated with the order @@ -38,13 +40,19 @@ type OrderRequest struct { PreAuthorize *bool `json:"pre_authorize,omitempty"` // Indicates the processing mode for the order, either ecommerce, recurrent or validation. ProcessingMode *string `json:"processing_mode,omitempty"` + // Indicates the redirection callback upon completion of the 3DS2 flow. + ReturnUrl *string `json:"return_url,omitempty"` ShippingContact *CustomerShippingContacts `json:"shipping_contact,omitempty"` // List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. ShippingLines []ShippingRequest `json:"shipping_lines,omitempty"` // List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. TaxLines []OrderTaxRequest `json:"tax_lines,omitempty"` + // Indicates the 3DS2 mode for the order, either smart or strict. + ThreeDsMode *string `json:"three_ds_mode,omitempty"` } +type _OrderRequest OrderRequest + // NewOrderRequest instantiates a new OrderRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -213,6 +221,38 @@ func (o *OrderRequest) SetDiscountLines(v []OrderDiscountLinesRequest) { o.DiscountLines = v } +// GetFiscalEntity returns the FiscalEntity field value if set, zero value otherwise. +func (o *OrderRequest) GetFiscalEntity() OrderFiscalEntityRequest { + if o == nil || IsNil(o.FiscalEntity) { + var ret OrderFiscalEntityRequest + return ret + } + return *o.FiscalEntity +} + +// GetFiscalEntityOk returns a tuple with the FiscalEntity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderRequest) GetFiscalEntityOk() (*OrderFiscalEntityRequest, bool) { + if o == nil || IsNil(o.FiscalEntity) { + return nil, false + } + return o.FiscalEntity, true +} + +// HasFiscalEntity returns a boolean if a field has been set. +func (o *OrderRequest) HasFiscalEntity() bool { + if o != nil && !IsNil(o.FiscalEntity) { + return true + } + + return false +} + +// SetFiscalEntity gets a reference to the given OrderFiscalEntityRequest and assigns it to the FiscalEntity field. +func (o *OrderRequest) SetFiscalEntity(v OrderFiscalEntityRequest) { + o.FiscalEntity = &v +} + // GetLineItems returns the LineItems field value func (o *OrderRequest) GetLineItems() []Product { if o == nil { @@ -365,6 +405,38 @@ func (o *OrderRequest) SetProcessingMode(v string) { o.ProcessingMode = &v } +// GetReturnUrl returns the ReturnUrl field value if set, zero value otherwise. +func (o *OrderRequest) GetReturnUrl() string { + if o == nil || IsNil(o.ReturnUrl) { + var ret string + return ret + } + return *o.ReturnUrl +} + +// GetReturnUrlOk returns a tuple with the ReturnUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderRequest) GetReturnUrlOk() (*string, bool) { + if o == nil || IsNil(o.ReturnUrl) { + return nil, false + } + return o.ReturnUrl, true +} + +// HasReturnUrl returns a boolean if a field has been set. +func (o *OrderRequest) HasReturnUrl() bool { + if o != nil && !IsNil(o.ReturnUrl) { + return true + } + + return false +} + +// SetReturnUrl gets a reference to the given string and assigns it to the ReturnUrl field. +func (o *OrderRequest) SetReturnUrl(v string) { + o.ReturnUrl = &v +} + // GetShippingContact returns the ShippingContact field value if set, zero value otherwise. func (o *OrderRequest) GetShippingContact() CustomerShippingContacts { if o == nil || IsNil(o.ShippingContact) { @@ -461,6 +533,38 @@ func (o *OrderRequest) SetTaxLines(v []OrderTaxRequest) { o.TaxLines = v } +// GetThreeDsMode returns the ThreeDsMode field value if set, zero value otherwise. +func (o *OrderRequest) GetThreeDsMode() string { + if o == nil || IsNil(o.ThreeDsMode) { + var ret string + return ret + } + return *o.ThreeDsMode +} + +// GetThreeDsModeOk returns a tuple with the ThreeDsMode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderRequest) GetThreeDsModeOk() (*string, bool) { + if o == nil || IsNil(o.ThreeDsMode) { + return nil, false + } + return o.ThreeDsMode, true +} + +// HasThreeDsMode returns a boolean if a field has been set. +func (o *OrderRequest) HasThreeDsMode() bool { + if o != nil && !IsNil(o.ThreeDsMode) { + return true + } + + return false +} + +// SetThreeDsMode gets a reference to the given string and assigns it to the ThreeDsMode field. +func (o *OrderRequest) SetThreeDsMode(v string) { + o.ThreeDsMode = &v +} + func (o OrderRequest) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -482,6 +586,9 @@ func (o OrderRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.DiscountLines) { toSerialize["discount_lines"] = o.DiscountLines } + if !IsNil(o.FiscalEntity) { + toSerialize["fiscal_entity"] = o.FiscalEntity + } toSerialize["line_items"] = o.LineItems if !IsNil(o.Metadata) { toSerialize["metadata"] = o.Metadata @@ -495,6 +602,9 @@ func (o OrderRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.ProcessingMode) { toSerialize["processing_mode"] = o.ProcessingMode } + if !IsNil(o.ReturnUrl) { + toSerialize["return_url"] = o.ReturnUrl + } if !IsNil(o.ShippingContact) { toSerialize["shipping_contact"] = o.ShippingContact } @@ -504,9 +614,49 @@ func (o OrderRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.TaxLines) { toSerialize["tax_lines"] = o.TaxLines } + if !IsNil(o.ThreeDsMode) { + toSerialize["three_ds_mode"] = o.ThreeDsMode + } return toSerialize, nil } +func (o *OrderRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "currency", + "customer_info", + "line_items", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderRequest := _OrderRequest{} + + err = json.Unmarshal(bytes, &varOrderRequest) + + if err != nil { + return err + } + + *o = OrderRequest(varOrderRequest) + + return err +} + type NullableOrderRequest struct { value *OrderRequest isSet bool diff --git a/model_order_response.go b/model_order_response.go index c3be541..1ab0dbd 100644 --- a/model_order_response.go +++ b/model_order_response.go @@ -33,7 +33,7 @@ type OrderResponse struct { Currency *string `json:"currency,omitempty"` CustomerInfo *OrderResponseCustomerInfo `json:"customer_info,omitempty"` DiscountLines *OrderResponseDiscountLines `json:"discount_lines,omitempty"` - FiscalEntity *OrderResponseFiscalEntity `json:"fiscal_entity,omitempty"` + FiscalEntity NullableOrderFiscalEntityResponse `json:"fiscal_entity,omitempty"` Id *string `json:"id,omitempty"` IsRefundable *bool `json:"is_refundable,omitempty"` LineItems *OrderResponseProducts `json:"line_items,omitempty"` @@ -41,6 +41,7 @@ type OrderResponse struct { Livemode *bool `json:"livemode,omitempty"` // Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Metadata map[string]interface{} `json:"metadata,omitempty"` + NextAction *OrderNextActionResponse `json:"next_action,omitempty"` // String representing the object’s type. Objects of the same type share the same value. Object *string `json:"object,omitempty"` // The payment status of the order. @@ -357,36 +358,46 @@ func (o *OrderResponse) SetDiscountLines(v OrderResponseDiscountLines) { o.DiscountLines = &v } -// GetFiscalEntity returns the FiscalEntity field value if set, zero value otherwise. -func (o *OrderResponse) GetFiscalEntity() OrderResponseFiscalEntity { - if o == nil || IsNil(o.FiscalEntity) { - var ret OrderResponseFiscalEntity +// GetFiscalEntity returns the FiscalEntity field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderResponse) GetFiscalEntity() OrderFiscalEntityResponse { + if o == nil || IsNil(o.FiscalEntity.Get()) { + var ret OrderFiscalEntityResponse return ret } - return *o.FiscalEntity + return *o.FiscalEntity.Get() } // GetFiscalEntityOk returns a tuple with the FiscalEntity field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *OrderResponse) GetFiscalEntityOk() (*OrderResponseFiscalEntity, bool) { - if o == nil || IsNil(o.FiscalEntity) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderResponse) GetFiscalEntityOk() (*OrderFiscalEntityResponse, bool) { + if o == nil { return nil, false } - return o.FiscalEntity, true + return o.FiscalEntity.Get(), o.FiscalEntity.IsSet() } // HasFiscalEntity returns a boolean if a field has been set. func (o *OrderResponse) HasFiscalEntity() bool { - if o != nil && !IsNil(o.FiscalEntity) { + if o != nil && o.FiscalEntity.IsSet() { return true } return false } -// SetFiscalEntity gets a reference to the given OrderResponseFiscalEntity and assigns it to the FiscalEntity field. -func (o *OrderResponse) SetFiscalEntity(v OrderResponseFiscalEntity) { - o.FiscalEntity = &v +// SetFiscalEntity gets a reference to the given NullableOrderFiscalEntityResponse and assigns it to the FiscalEntity field. +func (o *OrderResponse) SetFiscalEntity(v OrderFiscalEntityResponse) { + o.FiscalEntity.Set(&v) +} +// SetFiscalEntityNil sets the value for FiscalEntity to be an explicit nil +func (o *OrderResponse) SetFiscalEntityNil() { + o.FiscalEntity.Set(nil) +} + +// UnsetFiscalEntity ensures that no value is present for FiscalEntity, not even an explicit nil +func (o *OrderResponse) UnsetFiscalEntity() { + o.FiscalEntity.Unset() } // GetId returns the Id field value if set, zero value otherwise. @@ -549,6 +560,38 @@ func (o *OrderResponse) SetMetadata(v map[string]interface{}) { o.Metadata = v } +// GetNextAction returns the NextAction field value if set, zero value otherwise. +func (o *OrderResponse) GetNextAction() OrderNextActionResponse { + if o == nil || IsNil(o.NextAction) { + var ret OrderNextActionResponse + return ret + } + return *o.NextAction +} + +// GetNextActionOk returns a tuple with the NextAction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderResponse) GetNextActionOk() (*OrderNextActionResponse, bool) { + if o == nil || IsNil(o.NextAction) { + return nil, false + } + return o.NextAction, true +} + +// HasNextAction returns a boolean if a field has been set. +func (o *OrderResponse) HasNextAction() bool { + if o != nil && !IsNil(o.NextAction) { + return true + } + + return false +} + +// SetNextAction gets a reference to the given OrderNextActionResponse and assigns it to the NextAction field. +func (o *OrderResponse) SetNextAction(v OrderNextActionResponse) { + o.NextAction = &v +} + // GetObject returns the Object field value if set, zero value otherwise. func (o *OrderResponse) GetObject() string { if o == nil || IsNil(o.Object) { @@ -746,8 +789,8 @@ func (o OrderResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.DiscountLines) { toSerialize["discount_lines"] = o.DiscountLines } - if !IsNil(o.FiscalEntity) { - toSerialize["fiscal_entity"] = o.FiscalEntity + if o.FiscalEntity.IsSet() { + toSerialize["fiscal_entity"] = o.FiscalEntity.Get() } if !IsNil(o.Id) { toSerialize["id"] = o.Id @@ -764,6 +807,9 @@ func (o OrderResponse) ToMap() (map[string]interface{}, error) { if !IsNil(o.Metadata) { toSerialize["metadata"] = o.Metadata } + if !IsNil(o.NextAction) { + toSerialize["next_action"] = o.NextAction + } if !IsNil(o.Object) { toSerialize["object"] = o.Object } diff --git a/model_order_response_charges.go b/model_order_response_charges.go index d4ac365..38d6416 100644 --- a/model_order_response_charges.go +++ b/model_order_response_charges.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderResponseCharges type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type OrderResponseCharges struct { Data []ChargesDataResponse `json:"data,omitempty"` } +type _OrderResponseCharges OrderResponseCharges + // NewOrderResponseCharges instantiates a new OrderResponseCharges object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o OrderResponseCharges) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderResponseCharges) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderResponseCharges := _OrderResponseCharges{} + + err = json.Unmarshal(bytes, &varOrderResponseCharges) + + if err != nil { + return err + } + + *o = OrderResponseCharges(varOrderResponseCharges) + + return err +} + type NullableOrderResponseCharges struct { value *OrderResponseCharges isSet bool diff --git a/model_order_response_customer_info.go b/model_order_response_customer_info.go index 9daa9af..5821bc7 100644 --- a/model_order_response_customer_info.go +++ b/model_order_response_customer_info.go @@ -21,6 +21,8 @@ var _ MappedNullable = &OrderResponseCustomerInfo{} // OrderResponseCustomerInfo struct for OrderResponseCustomerInfo type OrderResponseCustomerInfo struct { Object *string `json:"object,omitempty"` + // Custom reference + CustomerCustomReference NullableString `json:"customer_custom_reference,omitempty"` Name *string `json:"name,omitempty"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` @@ -81,6 +83,48 @@ func (o *OrderResponseCustomerInfo) SetObject(v string) { o.Object = &v } +// GetCustomerCustomReference returns the CustomerCustomReference field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderResponseCustomerInfo) GetCustomerCustomReference() string { + if o == nil || IsNil(o.CustomerCustomReference.Get()) { + var ret string + return ret + } + return *o.CustomerCustomReference.Get() +} + +// GetCustomerCustomReferenceOk returns a tuple with the CustomerCustomReference field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderResponseCustomerInfo) GetCustomerCustomReferenceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CustomerCustomReference.Get(), o.CustomerCustomReference.IsSet() +} + +// HasCustomerCustomReference returns a boolean if a field has been set. +func (o *OrderResponseCustomerInfo) HasCustomerCustomReference() bool { + if o != nil && o.CustomerCustomReference.IsSet() { + return true + } + + return false +} + +// SetCustomerCustomReference gets a reference to the given NullableString and assigns it to the CustomerCustomReference field. +func (o *OrderResponseCustomerInfo) SetCustomerCustomReference(v string) { + o.CustomerCustomReference.Set(&v) +} +// SetCustomerCustomReferenceNil sets the value for CustomerCustomReference to be an explicit nil +func (o *OrderResponseCustomerInfo) SetCustomerCustomReferenceNil() { + o.CustomerCustomReference.Set(nil) +} + +// UnsetCustomerCustomReference ensures that no value is present for CustomerCustomReference, not even an explicit nil +func (o *OrderResponseCustomerInfo) UnsetCustomerCustomReference() { + o.CustomerCustomReference.Unset() +} + // GetName returns the Name field value if set, zero value otherwise. func (o *OrderResponseCustomerInfo) GetName() string { if o == nil || IsNil(o.Name) { @@ -254,6 +298,9 @@ func (o OrderResponseCustomerInfo) ToMap() (map[string]interface{}, error) { if !IsNil(o.Object) { toSerialize["object"] = o.Object } + if o.CustomerCustomReference.IsSet() { + toSerialize["customer_custom_reference"] = o.CustomerCustomReference.Get() + } if !IsNil(o.Name) { toSerialize["name"] = o.Name } diff --git a/model_order_response_discount_lines.go b/model_order_response_discount_lines.go index 2c2233c..2ee0f33 100644 --- a/model_order_response_discount_lines.go +++ b/model_order_response_discount_lines.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderResponseDiscountLines type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type OrderResponseDiscountLines struct { Data []DiscountLinesDataResponse `json:"data,omitempty"` } +type _OrderResponseDiscountLines OrderResponseDiscountLines + // NewOrderResponseDiscountLines instantiates a new OrderResponseDiscountLines object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o OrderResponseDiscountLines) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderResponseDiscountLines) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderResponseDiscountLines := _OrderResponseDiscountLines{} + + err = json.Unmarshal(bytes, &varOrderResponseDiscountLines) + + if err != nil { + return err + } + + *o = OrderResponseDiscountLines(varOrderResponseDiscountLines) + + return err +} + type NullableOrderResponseDiscountLines struct { value *OrderResponseDiscountLines isSet bool diff --git a/model_order_response_products.go b/model_order_response_products.go index 5adf1ad..40c35a4 100644 --- a/model_order_response_products.go +++ b/model_order_response_products.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderResponseProducts type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type OrderResponseProducts struct { Data []ProductDataResponse `json:"data,omitempty"` } +type _OrderResponseProducts OrderResponseProducts + // NewOrderResponseProducts instantiates a new OrderResponseProducts object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o OrderResponseProducts) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderResponseProducts) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderResponseProducts := _OrderResponseProducts{} + + err = json.Unmarshal(bytes, &varOrderResponseProducts) + + if err != nil { + return err + } + + *o = OrderResponseProducts(varOrderResponseProducts) + + return err +} + type NullableOrderResponseProducts struct { value *OrderResponseProducts isSet bool diff --git a/model_order_response_shipping_contact.go b/model_order_response_shipping_contact.go index 5c3a3d5..869f167 100644 --- a/model_order_response_shipping_contact.go +++ b/model_order_response_shipping_contact.go @@ -29,6 +29,8 @@ type OrderResponseShippingContact struct { Address *CustomerShippingContactsResponseAddress `json:"address,omitempty"` ParentId *string `json:"parent_id,omitempty"` Default *bool `json:"default,omitempty"` + // Metadata associated with the shipping contact + Metadata map[string]interface{} `json:"metadata,omitempty"` Deleted *bool `json:"deleted,omitempty"` } @@ -347,6 +349,38 @@ func (o *OrderResponseShippingContact) SetDefault(v bool) { o.Default = &v } +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *OrderResponseShippingContact) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderResponseShippingContact) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *OrderResponseShippingContact) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *OrderResponseShippingContact) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + // GetDeleted returns the Deleted field value if set, zero value otherwise. func (o *OrderResponseShippingContact) GetDeleted() bool { if o == nil || IsNil(o.Deleted) { @@ -416,6 +450,9 @@ func (o OrderResponseShippingContact) ToMap() (map[string]interface{}, error) { if !IsNil(o.Default) { toSerialize["default"] = o.Default } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } if !IsNil(o.Deleted) { toSerialize["deleted"] = o.Deleted } diff --git a/model_order_tax_request.go b/model_order_tax_request.go index 8ea85ae..ecc225e 100644 --- a/model_order_tax_request.go +++ b/model_order_tax_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrderTaxRequest type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type OrderTaxRequest struct { Metadata map[string]interface{} `json:"metadata,omitempty"` } +type _OrderTaxRequest OrderTaxRequest + // NewOrderTaxRequest instantiates a new OrderTaxRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -144,6 +147,42 @@ func (o OrderTaxRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrderTaxRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "description", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderTaxRequest := _OrderTaxRequest{} + + err = json.Unmarshal(bytes, &varOrderTaxRequest) + + if err != nil { + return err + } + + *o = OrderTaxRequest(varOrderTaxRequest) + + return err +} + type NullableOrderTaxRequest struct { value *OrderTaxRequest isSet bool diff --git a/model_order_update_fiscal_entity_request.go b/model_order_update_fiscal_entity_request.go new file mode 100644 index 0000000..caaec7f --- /dev/null +++ b/model_order_update_fiscal_entity_request.go @@ -0,0 +1,361 @@ +/* +Conekta API + +Conekta sdk + +API version: 2.1.0 +Contact: engineering@conekta.com +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package conekta + +import ( + "encoding/json" + "fmt" +) + +// checks if the OrderUpdateFiscalEntityRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &OrderUpdateFiscalEntityRequest{} + +// OrderUpdateFiscalEntityRequest Fiscal entity of the order, Currently it is a purely informative field +type OrderUpdateFiscalEntityRequest struct { + Address FiscalEntityAddress `json:"address"` + // Email of the fiscal entity + Email *string `json:"email,omitempty"` + // Name of the fiscal entity + Name NullableString `json:"name,omitempty"` + // Metadata associated with the fiscal entity + Metadata map[string]interface{} `json:"metadata,omitempty"` + // Phone of the fiscal entity + Phone *string `json:"phone,omitempty"` + // Tax ID of the fiscal entity + TaxId NullableString `json:"tax_id,omitempty"` +} + +type _OrderUpdateFiscalEntityRequest OrderUpdateFiscalEntityRequest + +// NewOrderUpdateFiscalEntityRequest instantiates a new OrderUpdateFiscalEntityRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewOrderUpdateFiscalEntityRequest(address FiscalEntityAddress) *OrderUpdateFiscalEntityRequest { + this := OrderUpdateFiscalEntityRequest{} + this.Address = address + return &this +} + +// NewOrderUpdateFiscalEntityRequestWithDefaults instantiates a new OrderUpdateFiscalEntityRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewOrderUpdateFiscalEntityRequestWithDefaults() *OrderUpdateFiscalEntityRequest { + this := OrderUpdateFiscalEntityRequest{} + return &this +} + +// GetAddress returns the Address field value +func (o *OrderUpdateFiscalEntityRequest) GetAddress() FiscalEntityAddress { + if o == nil { + var ret FiscalEntityAddress + return ret + } + + return o.Address +} + +// GetAddressOk returns a tuple with the Address field value +// and a boolean to check if the value has been set. +func (o *OrderUpdateFiscalEntityRequest) GetAddressOk() (*FiscalEntityAddress, bool) { + if o == nil { + return nil, false + } + return &o.Address, true +} + +// SetAddress sets field value +func (o *OrderUpdateFiscalEntityRequest) SetAddress(v FiscalEntityAddress) { + o.Address = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *OrderUpdateFiscalEntityRequest) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderUpdateFiscalEntityRequest) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *OrderUpdateFiscalEntityRequest) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *OrderUpdateFiscalEntityRequest) SetEmail(v string) { + o.Email = &v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderUpdateFiscalEntityRequest) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderUpdateFiscalEntityRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *OrderUpdateFiscalEntityRequest) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *OrderUpdateFiscalEntityRequest) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *OrderUpdateFiscalEntityRequest) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *OrderUpdateFiscalEntityRequest) UnsetName() { + o.Name.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *OrderUpdateFiscalEntityRequest) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderUpdateFiscalEntityRequest) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *OrderUpdateFiscalEntityRequest) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *OrderUpdateFiscalEntityRequest) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetPhone returns the Phone field value if set, zero value otherwise. +func (o *OrderUpdateFiscalEntityRequest) GetPhone() string { + if o == nil || IsNil(o.Phone) { + var ret string + return ret + } + return *o.Phone +} + +// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderUpdateFiscalEntityRequest) GetPhoneOk() (*string, bool) { + if o == nil || IsNil(o.Phone) { + return nil, false + } + return o.Phone, true +} + +// HasPhone returns a boolean if a field has been set. +func (o *OrderUpdateFiscalEntityRequest) HasPhone() bool { + if o != nil && !IsNil(o.Phone) { + return true + } + + return false +} + +// SetPhone gets a reference to the given string and assigns it to the Phone field. +func (o *OrderUpdateFiscalEntityRequest) SetPhone(v string) { + o.Phone = &v +} + +// GetTaxId returns the TaxId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *OrderUpdateFiscalEntityRequest) GetTaxId() string { + if o == nil || IsNil(o.TaxId.Get()) { + var ret string + return ret + } + return *o.TaxId.Get() +} + +// GetTaxIdOk returns a tuple with the TaxId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *OrderUpdateFiscalEntityRequest) GetTaxIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.TaxId.Get(), o.TaxId.IsSet() +} + +// HasTaxId returns a boolean if a field has been set. +func (o *OrderUpdateFiscalEntityRequest) HasTaxId() bool { + if o != nil && o.TaxId.IsSet() { + return true + } + + return false +} + +// SetTaxId gets a reference to the given NullableString and assigns it to the TaxId field. +func (o *OrderUpdateFiscalEntityRequest) SetTaxId(v string) { + o.TaxId.Set(&v) +} +// SetTaxIdNil sets the value for TaxId to be an explicit nil +func (o *OrderUpdateFiscalEntityRequest) SetTaxIdNil() { + o.TaxId.Set(nil) +} + +// UnsetTaxId ensures that no value is present for TaxId, not even an explicit nil +func (o *OrderUpdateFiscalEntityRequest) UnsetTaxId() { + o.TaxId.Unset() +} + +func (o OrderUpdateFiscalEntityRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o OrderUpdateFiscalEntityRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["address"] = o.Address + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + if !IsNil(o.Phone) { + toSerialize["phone"] = o.Phone + } + if o.TaxId.IsSet() { + toSerialize["tax_id"] = o.TaxId.Get() + } + return toSerialize, nil +} + +func (o *OrderUpdateFiscalEntityRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrderUpdateFiscalEntityRequest := _OrderUpdateFiscalEntityRequest{} + + err = json.Unmarshal(bytes, &varOrderUpdateFiscalEntityRequest) + + if err != nil { + return err + } + + *o = OrderUpdateFiscalEntityRequest(varOrderUpdateFiscalEntityRequest) + + return err +} + +type NullableOrderUpdateFiscalEntityRequest struct { + value *OrderUpdateFiscalEntityRequest + isSet bool +} + +func (v NullableOrderUpdateFiscalEntityRequest) Get() *OrderUpdateFiscalEntityRequest { + return v.value +} + +func (v *NullableOrderUpdateFiscalEntityRequest) Set(val *OrderUpdateFiscalEntityRequest) { + v.value = val + v.isSet = true +} + +func (v NullableOrderUpdateFiscalEntityRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableOrderUpdateFiscalEntityRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableOrderUpdateFiscalEntityRequest(val *OrderUpdateFiscalEntityRequest) *NullableOrderUpdateFiscalEntityRequest { + return &NullableOrderUpdateFiscalEntityRequest{value: val, isSet: true} +} + +func (v NullableOrderUpdateFiscalEntityRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableOrderUpdateFiscalEntityRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/model_order_update_request.go b/model_order_update_request.go index 14a9c25..730874a 100644 --- a/model_order_update_request.go +++ b/model_order_update_request.go @@ -27,6 +27,7 @@ type OrderUpdateRequest struct { CustomerInfo *OrderUpdateRequestCustomerInfo `json:"customer_info,omitempty"` // List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. DiscountLines []OrderDiscountLinesRequest `json:"discount_lines,omitempty"` + FiscalEntity *OrderUpdateFiscalEntityRequest `json:"fiscal_entity,omitempty"` // List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. LineItems []Product `json:"line_items,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` @@ -219,6 +220,38 @@ func (o *OrderUpdateRequest) SetDiscountLines(v []OrderDiscountLinesRequest) { o.DiscountLines = v } +// GetFiscalEntity returns the FiscalEntity field value if set, zero value otherwise. +func (o *OrderUpdateRequest) GetFiscalEntity() OrderUpdateFiscalEntityRequest { + if o == nil || IsNil(o.FiscalEntity) { + var ret OrderUpdateFiscalEntityRequest + return ret + } + return *o.FiscalEntity +} + +// GetFiscalEntityOk returns a tuple with the FiscalEntity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *OrderUpdateRequest) GetFiscalEntityOk() (*OrderUpdateFiscalEntityRequest, bool) { + if o == nil || IsNil(o.FiscalEntity) { + return nil, false + } + return o.FiscalEntity, true +} + +// HasFiscalEntity returns a boolean if a field has been set. +func (o *OrderUpdateRequest) HasFiscalEntity() bool { + if o != nil && !IsNil(o.FiscalEntity) { + return true + } + + return false +} + +// SetFiscalEntity gets a reference to the given OrderUpdateFiscalEntityRequest and assigns it to the FiscalEntity field. +func (o *OrderUpdateRequest) SetFiscalEntity(v OrderUpdateFiscalEntityRequest) { + o.FiscalEntity = &v +} + // GetLineItems returns the LineItems field value if set, zero value otherwise. func (o *OrderUpdateRequest) GetLineItems() []Product { if o == nil || IsNil(o.LineItems) { @@ -436,6 +469,9 @@ func (o OrderUpdateRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.DiscountLines) { toSerialize["discount_lines"] = o.DiscountLines } + if !IsNil(o.FiscalEntity) { + toSerialize["fiscal_entity"] = o.FiscalEntity + } if !IsNil(o.LineItems) { toSerialize["line_items"] = o.LineItems } diff --git a/model_orders_response.go b/model_orders_response.go index c418a07..c0e36e3 100644 --- a/model_orders_response.go +++ b/model_orders_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the OrdersResponse type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ type OrdersResponse struct { Data []OrderResponse `json:"data"` } +type _OrdersResponse OrdersResponse + // NewOrdersResponse instantiates a new OrdersResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +82,41 @@ func (o OrdersResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *OrdersResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varOrdersResponse := _OrdersResponse{} + + err = json.Unmarshal(bytes, &varOrdersResponse) + + if err != nil { + return err + } + + *o = OrdersResponse(varOrdersResponse) + + return err +} + type NullableOrdersResponse struct { value *OrdersResponse isSet bool diff --git a/model_pagination.go b/model_pagination.go index 5b6350d..b1ba0aa 100644 --- a/model_pagination.go +++ b/model_pagination.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the Pagination type satisfies the MappedNullable interface at compile time @@ -26,6 +27,8 @@ type Pagination struct { Object string `json:"object"` } +type _Pagination Pagination + // NewPagination instantiates a new Pagination object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -108,6 +111,42 @@ func (o Pagination) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Pagination) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPagination := _Pagination{} + + err = json.Unmarshal(bytes, &varPagination) + + if err != nil { + return err + } + + *o = Pagination(varPagination) + + return err +} + type NullablePagination struct { value *Pagination isSet bool diff --git a/model_payment_method.go b/model_payment_method.go index 28cb6a7..0121c00 100644 --- a/model_payment_method.go +++ b/model_payment_method.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethod type satisfies the MappedNullable interface at compile time @@ -24,6 +25,8 @@ type PaymentMethod struct { Object string `json:"object"` } +type _PaymentMethod PaymentMethod + // NewPaymentMethod instantiates a new PaymentMethod object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -115,6 +118,41 @@ func (o PaymentMethod) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethod) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethod := _PaymentMethod{} + + err = json.Unmarshal(bytes, &varPaymentMethod) + + if err != nil { + return err + } + + *o = PaymentMethod(varPaymentMethod) + + return err +} + type NullablePaymentMethod struct { value *PaymentMethod isSet bool diff --git a/model_payment_method_bank_transfer.go b/model_payment_method_bank_transfer.go index cc769a8..c914e0c 100644 --- a/model_payment_method_bank_transfer.go +++ b/model_payment_method_bank_transfer.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodBankTransfer type satisfies the MappedNullable interface at compile time @@ -31,7 +32,7 @@ type PaymentMethodBankTransfer struct { IssuingAccountNumber NullableString `json:"issuing_account_number,omitempty"` IssuingAccountHolderName NullableString `json:"issuing_account_holder_name,omitempty"` IssuingAccountTaxId NullableString `json:"issuing_account_tax_id,omitempty"` - PaymentAttempts []interface{} `json:"payment_attempts,omitempty"` + PaymentAttempts []map[string]interface{} `json:"payment_attempts,omitempty"` ReceivingAccountHolderName NullableString `json:"receiving_account_holder_name,omitempty"` ReceivingAccountNumber *string `json:"receiving_account_number,omitempty"` ReceivingAccountBank *string `json:"receiving_account_bank,omitempty"` @@ -40,6 +41,8 @@ type PaymentMethodBankTransfer struct { TrackingCode NullableString `json:"tracking_code,omitempty"` } +type _PaymentMethodBankTransfer PaymentMethodBankTransfer + // NewPaymentMethodBankTransfer instantiates a new PaymentMethodBankTransfer object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -463,9 +466,9 @@ func (o *PaymentMethodBankTransfer) UnsetIssuingAccountTaxId() { } // GetPaymentAttempts returns the PaymentAttempts field value if set, zero value otherwise. -func (o *PaymentMethodBankTransfer) GetPaymentAttempts() []interface{} { +func (o *PaymentMethodBankTransfer) GetPaymentAttempts() []map[string]interface{} { if o == nil || IsNil(o.PaymentAttempts) { - var ret []interface{} + var ret []map[string]interface{} return ret } return o.PaymentAttempts @@ -473,7 +476,7 @@ func (o *PaymentMethodBankTransfer) GetPaymentAttempts() []interface{} { // GetPaymentAttemptsOk returns a tuple with the PaymentAttempts field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethodBankTransfer) GetPaymentAttemptsOk() ([]interface{}, bool) { +func (o *PaymentMethodBankTransfer) GetPaymentAttemptsOk() ([]map[string]interface{}, bool) { if o == nil || IsNil(o.PaymentAttempts) { return nil, false } @@ -489,8 +492,8 @@ func (o *PaymentMethodBankTransfer) HasPaymentAttempts() bool { return false } -// SetPaymentAttempts gets a reference to the given []interface{} and assigns it to the PaymentAttempts field. -func (o *PaymentMethodBankTransfer) SetPaymentAttempts(v []interface{}) { +// SetPaymentAttempts gets a reference to the given []map[string]interface{} and assigns it to the PaymentAttempts field. +func (o *PaymentMethodBankTransfer) SetPaymentAttempts(v []map[string]interface{}) { o.PaymentAttempts = v } @@ -791,6 +794,41 @@ func (o PaymentMethodBankTransfer) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodBankTransfer) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodBankTransfer := _PaymentMethodBankTransfer{} + + err = json.Unmarshal(bytes, &varPaymentMethodBankTransfer) + + if err != nil { + return err + } + + *o = PaymentMethodBankTransfer(varPaymentMethodBankTransfer) + + return err +} + type NullablePaymentMethodBankTransfer struct { value *PaymentMethodBankTransfer isSet bool diff --git a/model_payment_method_card.go b/model_payment_method_card.go index fbd5ec3..86cc0e0 100644 --- a/model_payment_method_card.go +++ b/model_payment_method_card.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodCard type satisfies the MappedNullable interface at compile time @@ -30,12 +31,14 @@ type PaymentMethodCard struct { Country *string `json:"country,omitempty"` ExpMonth *string `json:"exp_month,omitempty"` ExpYear *string `json:"exp_year,omitempty"` - FraudIndicators []interface{} `json:"fraud_indicators,omitempty"` + FraudIndicators []map[string]interface{} `json:"fraud_indicators,omitempty"` Issuer *string `json:"issuer,omitempty"` Last4 *string `json:"last4,omitempty"` Name *string `json:"name,omitempty"` } +type _PaymentMethodCard PaymentMethodCard + // NewPaymentMethodCard instantiates a new PaymentMethodCard object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -335,9 +338,9 @@ func (o *PaymentMethodCard) SetExpYear(v string) { } // GetFraudIndicators returns the FraudIndicators field value if set, zero value otherwise. -func (o *PaymentMethodCard) GetFraudIndicators() []interface{} { +func (o *PaymentMethodCard) GetFraudIndicators() []map[string]interface{} { if o == nil || IsNil(o.FraudIndicators) { - var ret []interface{} + var ret []map[string]interface{} return ret } return o.FraudIndicators @@ -345,7 +348,7 @@ func (o *PaymentMethodCard) GetFraudIndicators() []interface{} { // GetFraudIndicatorsOk returns a tuple with the FraudIndicators field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PaymentMethodCard) GetFraudIndicatorsOk() ([]interface{}, bool) { +func (o *PaymentMethodCard) GetFraudIndicatorsOk() ([]map[string]interface{}, bool) { if o == nil || IsNil(o.FraudIndicators) { return nil, false } @@ -361,8 +364,8 @@ func (o *PaymentMethodCard) HasFraudIndicators() bool { return false } -// SetFraudIndicators gets a reference to the given []interface{} and assigns it to the FraudIndicators field. -func (o *PaymentMethodCard) SetFraudIndicators(v []interface{}) { +// SetFraudIndicators gets a reference to the given []map[string]interface{} and assigns it to the FraudIndicators field. +func (o *PaymentMethodCard) SetFraudIndicators(v []map[string]interface{}) { o.FraudIndicators = v } @@ -512,6 +515,41 @@ func (o PaymentMethodCard) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodCard) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodCard := _PaymentMethodCard{} + + err = json.Unmarshal(bytes, &varPaymentMethodCard) + + if err != nil { + return err + } + + *o = PaymentMethodCard(varPaymentMethodCard) + + return err +} + type NullablePaymentMethodCard struct { value *PaymentMethodCard isSet bool diff --git a/model_payment_method_card_request.go b/model_payment_method_card_request.go index 482fcb1..668194b 100644 --- a/model_payment_method_card_request.go +++ b/model_payment_method_card_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodCardRequest type satisfies the MappedNullable interface at compile time @@ -26,6 +27,8 @@ type PaymentMethodCardRequest struct { TokenId string `json:"token_id"` } +type _PaymentMethodCardRequest PaymentMethodCardRequest + // NewPaymentMethodCardRequest instantiates a new PaymentMethodCardRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -108,6 +111,42 @@ func (o PaymentMethodCardRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodCardRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "token_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodCardRequest := _PaymentMethodCardRequest{} + + err = json.Unmarshal(bytes, &varPaymentMethodCardRequest) + + if err != nil { + return err + } + + *o = PaymentMethodCardRequest(varPaymentMethodCardRequest) + + return err +} + type NullablePaymentMethodCardRequest struct { value *PaymentMethodCardRequest isSet bool diff --git a/model_payment_method_card_response.go b/model_payment_method_card_response.go index 24c53a2..5ecf0fe 100644 --- a/model_payment_method_card_response.go +++ b/model_payment_method_card_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodCardResponse type satisfies the MappedNullable interface at compile time @@ -37,6 +38,8 @@ type PaymentMethodCardResponse struct { PaymentSourceStatus *string `json:"payment_source_status,omitempty"` } +type _PaymentMethodCardResponse PaymentMethodCardResponse + // NewPaymentMethodCardResponse instantiates a new PaymentMethodCardResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -556,6 +559,44 @@ func (o PaymentMethodCardResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodCardResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodCardResponse := _PaymentMethodCardResponse{} + + err = json.Unmarshal(bytes, &varPaymentMethodCardResponse) + + if err != nil { + return err + } + + *o = PaymentMethodCardResponse(varPaymentMethodCardResponse) + + return err +} + type NullablePaymentMethodCardResponse struct { value *PaymentMethodCardResponse isSet bool diff --git a/model_payment_method_cash.go b/model_payment_method_cash.go index 7b45c7f..e6e7d9d 100644 --- a/model_payment_method_cash.go +++ b/model_payment_method_cash.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodCash type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type PaymentMethodCash struct { StoreName *string `json:"store_name,omitempty"` } +type _PaymentMethodCash PaymentMethodCash + // NewPaymentMethodCash instantiates a new PaymentMethodCash object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -433,6 +436,41 @@ func (o PaymentMethodCash) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodCash) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodCash := _PaymentMethodCash{} + + err = json.Unmarshal(bytes, &varPaymentMethodCash) + + if err != nil { + return err + } + + *o = PaymentMethodCash(varPaymentMethodCash) + + return err +} + type NullablePaymentMethodCash struct { value *PaymentMethodCash isSet bool diff --git a/model_payment_method_cash_request.go b/model_payment_method_cash_request.go index 56b08e6..ef50504 100644 --- a/model_payment_method_cash_request.go +++ b/model_payment_method_cash_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodCashRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type PaymentMethodCashRequest struct { ExpiresAt *int64 `json:"expires_at,omitempty"` } +type _PaymentMethodCashRequest PaymentMethodCashRequest + // NewPaymentMethodCashRequest instantiates a new PaymentMethodCashRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -116,6 +119,41 @@ func (o PaymentMethodCashRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodCashRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodCashRequest := _PaymentMethodCashRequest{} + + err = json.Unmarshal(bytes, &varPaymentMethodCashRequest) + + if err != nil { + return err + } + + *o = PaymentMethodCashRequest(varPaymentMethodCashRequest) + + return err +} + type NullablePaymentMethodCashRequest struct { value *PaymentMethodCashRequest isSet bool diff --git a/model_payment_method_cash_response.go b/model_payment_method_cash_response.go index b233fe4..fec47d8 100644 --- a/model_payment_method_cash_response.go +++ b/model_payment_method_cash_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodCashResponse type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type PaymentMethodCashResponse struct { Provider *string `json:"provider,omitempty"` } +type _PaymentMethodCashResponse PaymentMethodCashResponse + // NewPaymentMethodCashResponse instantiates a new PaymentMethodCashResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -376,6 +379,44 @@ func (o PaymentMethodCashResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodCashResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodCashResponse := _PaymentMethodCashResponse{} + + err = json.Unmarshal(bytes, &varPaymentMethodCashResponse) + + if err != nil { + return err + } + + *o = PaymentMethodCashResponse(varPaymentMethodCashResponse) + + return err +} + type NullablePaymentMethodCashResponse struct { value *PaymentMethodCashResponse isSet bool diff --git a/model_payment_method_response.go b/model_payment_method_response.go index 44dfc88..e0f8d70 100644 --- a/model_payment_method_response.go +++ b/model_payment_method_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodResponse type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type PaymentMethodResponse struct { ParentId *string `json:"parent_id,omitempty"` } +type _PaymentMethodResponse PaymentMethodResponse + // NewPaymentMethodResponse instantiates a new PaymentMethodResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -196,6 +199,44 @@ func (o PaymentMethodResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodResponse := _PaymentMethodResponse{} + + err = json.Unmarshal(bytes, &varPaymentMethodResponse) + + if err != nil { + return err + } + + *o = PaymentMethodResponse(varPaymentMethodResponse) + + return err +} + type NullablePaymentMethodResponse struct { value *PaymentMethodResponse isSet bool diff --git a/model_payment_method_spei_recurrent.go b/model_payment_method_spei_recurrent.go index 1d057f3..d8cbd11 100644 --- a/model_payment_method_spei_recurrent.go +++ b/model_payment_method_spei_recurrent.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodSpeiRecurrent type satisfies the MappedNullable interface at compile time @@ -29,6 +30,8 @@ type PaymentMethodSpeiRecurrent struct { ExpiresAt *string `json:"expires_at,omitempty"` } +type _PaymentMethodSpeiRecurrent PaymentMethodSpeiRecurrent + // NewPaymentMethodSpeiRecurrent instantiates a new PaymentMethodSpeiRecurrent object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -268,6 +271,44 @@ func (o PaymentMethodSpeiRecurrent) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodSpeiRecurrent) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodSpeiRecurrent := _PaymentMethodSpeiRecurrent{} + + err = json.Unmarshal(bytes, &varPaymentMethodSpeiRecurrent) + + if err != nil { + return err + } + + *o = PaymentMethodSpeiRecurrent(varPaymentMethodSpeiRecurrent) + + return err +} + type NullablePaymentMethodSpeiRecurrent struct { value *PaymentMethodSpeiRecurrent isSet bool diff --git a/model_payment_method_spei_request.go b/model_payment_method_spei_request.go index 8bd67e5..9982d95 100644 --- a/model_payment_method_spei_request.go +++ b/model_payment_method_spei_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PaymentMethodSpeiRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type PaymentMethodSpeiRequest struct { ExpiresAt *int64 `json:"expires_at,omitempty"` } +type _PaymentMethodSpeiRequest PaymentMethodSpeiRequest + // NewPaymentMethodSpeiRequest instantiates a new PaymentMethodSpeiRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -116,6 +119,41 @@ func (o PaymentMethodSpeiRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PaymentMethodSpeiRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPaymentMethodSpeiRequest := _PaymentMethodSpeiRequest{} + + err = json.Unmarshal(bytes, &varPaymentMethodSpeiRequest) + + if err != nil { + return err + } + + *o = PaymentMethodSpeiRequest(varPaymentMethodSpeiRequest) + + return err +} + type NullablePaymentMethodSpeiRequest struct { value *PaymentMethodSpeiRequest isSet bool diff --git a/model_plan_request.go b/model_plan_request.go index f54e2d6..dc6d45c 100644 --- a/model_plan_request.go +++ b/model_plan_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the PlanRequest type satisfies the MappedNullable interface at compile time @@ -38,6 +39,8 @@ type PlanRequest struct { TrialPeriodDays *int32 `json:"trial_period_days,omitempty"` } +type _PlanRequest PlanRequest + // NewPlanRequest instantiates a new PlanRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -312,6 +315,44 @@ func (o PlanRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *PlanRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "frequency", + "interval", + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varPlanRequest := _PlanRequest{} + + err = json.Unmarshal(bytes, &varPlanRequest) + + if err != nil { + return err + } + + *o = PlanRequest(varPlanRequest) + + return err +} + type NullablePlanRequest struct { value *PlanRequest isSet bool diff --git a/model_product.go b/model_product.go index fb8736e..49f2944 100644 --- a/model_product.go +++ b/model_product.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the Product type satisfies the MappedNullable interface at compile time @@ -39,6 +40,8 @@ type Product struct { UnitPrice int32 `json:"unit_price"` } +type _Product Product + // NewProduct instantiates a new Product object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -357,6 +360,43 @@ func (o Product) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *Product) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "quantity", + "unit_price", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProduct := _Product{} + + err = json.Unmarshal(bytes, &varProduct) + + if err != nil { + return err + } + + *o = Product(varProduct) + + return err +} + type NullableProduct struct { value *Product isSet bool diff --git a/model_product_data_response.go b/model_product_data_response.go index 5f021b0..2723914 100644 --- a/model_product_data_response.go +++ b/model_product_data_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ProductDataResponse type satisfies the MappedNullable interface at compile time @@ -42,6 +43,8 @@ type ProductDataResponse struct { ParentId *string `json:"parent_id,omitempty"` } +type _ProductDataResponse ProductDataResponse + // NewProductDataResponse instantiates a new ProductDataResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -465,6 +468,43 @@ func (o ProductDataResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ProductDataResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "quantity", + "unit_price", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProductDataResponse := _ProductDataResponse{} + + err = json.Unmarshal(bytes, &varProductDataResponse) + + if err != nil { + return err + } + + *o = ProductDataResponse(varProductDataResponse) + + return err +} + type NullableProductDataResponse struct { value *ProductDataResponse isSet bool diff --git a/model_product_order_response.go b/model_product_order_response.go index 91553cb..d7bc94c 100644 --- a/model_product_order_response.go +++ b/model_product_order_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ProductOrderResponse type satisfies the MappedNullable interface at compile time @@ -42,6 +43,8 @@ type ProductOrderResponse struct { ParentId *string `json:"parent_id,omitempty"` } +type _ProductOrderResponse ProductOrderResponse + // NewProductOrderResponse instantiates a new ProductOrderResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -465,6 +468,43 @@ func (o ProductOrderResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ProductOrderResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "quantity", + "unit_price", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varProductOrderResponse := _ProductOrderResponse{} + + err = json.Unmarshal(bytes, &varProductOrderResponse) + + if err != nil { + return err + } + + *o = ProductOrderResponse(varProductOrderResponse) + + return err +} + type NullableProductOrderResponse struct { value *ProductOrderResponse isSet bool diff --git a/model_risk_rules_list.go b/model_risk_rules_list.go index 46a7d3f..ad9b691 100644 --- a/model_risk_rules_list.go +++ b/model_risk_rules_list.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the RiskRulesList type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type RiskRulesList struct { Data []RiskRulesData `json:"data,omitempty"` } +type _RiskRulesList RiskRulesList + // NewRiskRulesList instantiates a new RiskRulesList object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o RiskRulesList) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *RiskRulesList) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varRiskRulesList := _RiskRulesList{} + + err = json.Unmarshal(bytes, &varRiskRulesList) + + if err != nil { + return err + } + + *o = RiskRulesList(varRiskRulesList) + + return err +} + type NullableRiskRulesList struct { value *RiskRulesList isSet bool diff --git a/model_shipping_order_response.go b/model_shipping_order_response.go index 4931b3f..7ce9432 100644 --- a/model_shipping_order_response.go +++ b/model_shipping_order_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ShippingOrderResponse type satisfies the MappedNullable interface at compile time @@ -35,6 +36,8 @@ type ShippingOrderResponse struct { ParentId *string `json:"parent_id,omitempty"` } +type _ShippingOrderResponse ShippingOrderResponse + // NewShippingOrderResponse instantiates a new ShippingOrderResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -336,6 +339,41 @@ func (o ShippingOrderResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ShippingOrderResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varShippingOrderResponse := _ShippingOrderResponse{} + + err = json.Unmarshal(bytes, &varShippingOrderResponse) + + if err != nil { + return err + } + + *o = ShippingOrderResponse(varShippingOrderResponse) + + return err +} + type NullableShippingOrderResponse struct { value *ShippingOrderResponse isSet bool diff --git a/model_shipping_request.go b/model_shipping_request.go index 6db3976..4b9e410 100644 --- a/model_shipping_request.go +++ b/model_shipping_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the ShippingRequest type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type ShippingRequest struct { Metadata map[string]interface{} `json:"metadata,omitempty"` } +type _ShippingRequest ShippingRequest + // NewShippingRequest instantiates a new ShippingRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -228,6 +231,41 @@ func (o ShippingRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *ShippingRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varShippingRequest := _ShippingRequest{} + + err = json.Unmarshal(bytes, &varShippingRequest) + + if err != nil { + return err + } + + *o = ShippingRequest(varShippingRequest) + + return err +} + type NullableShippingRequest struct { value *ShippingRequest isSet bool diff --git a/model_sms_checkout_request.go b/model_sms_checkout_request.go index aa33552..83f3095 100644 --- a/model_sms_checkout_request.go +++ b/model_sms_checkout_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the SmsCheckoutRequest type satisfies the MappedNullable interface at compile time @@ -23,6 +24,8 @@ type SmsCheckoutRequest struct { Phonenumber string `json:"phonenumber"` } +type _SmsCheckoutRequest SmsCheckoutRequest + // NewSmsCheckoutRequest instantiates a new SmsCheckoutRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -79,6 +82,41 @@ func (o SmsCheckoutRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SmsCheckoutRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "phonenumber", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSmsCheckoutRequest := _SmsCheckoutRequest{} + + err = json.Unmarshal(bytes, &varSmsCheckoutRequest) + + if err != nil { + return err + } + + *o = SmsCheckoutRequest(varSmsCheckoutRequest) + + return err +} + type NullableSmsCheckoutRequest struct { value *SmsCheckoutRequest isSet bool diff --git a/model_subscription_events_response.go b/model_subscription_events_response.go index cd0c50e..a5d4880 100644 --- a/model_subscription_events_response.go +++ b/model_subscription_events_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the SubscriptionEventsResponse type satisfies the MappedNullable interface at compile time @@ -31,6 +32,8 @@ type SubscriptionEventsResponse struct { Data []EventResponse `json:"data,omitempty"` } +type _SubscriptionEventsResponse SubscriptionEventsResponse + // NewSubscriptionEventsResponse instantiates a new SubscriptionEventsResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -238,6 +241,42 @@ func (o SubscriptionEventsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SubscriptionEventsResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "object", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSubscriptionEventsResponse := _SubscriptionEventsResponse{} + + err = json.Unmarshal(bytes, &varSubscriptionEventsResponse) + + if err != nil { + return err + } + + *o = SubscriptionEventsResponse(varSubscriptionEventsResponse) + + return err +} + type NullableSubscriptionEventsResponse struct { value *SubscriptionEventsResponse isSet bool diff --git a/model_subscription_request.go b/model_subscription_request.go index 8d89ec1..4ec022c 100644 --- a/model_subscription_request.go +++ b/model_subscription_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the SubscriptionRequest type satisfies the MappedNullable interface at compile time @@ -25,6 +26,8 @@ type SubscriptionRequest struct { TrialEnd *int32 `json:"trial_end,omitempty"` } +type _SubscriptionRequest SubscriptionRequest + // NewSubscriptionRequest instantiates a new SubscriptionRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -151,6 +154,41 @@ func (o SubscriptionRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *SubscriptionRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "plan_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSubscriptionRequest := _SubscriptionRequest{} + + err = json.Unmarshal(bytes, &varSubscriptionRequest) + + if err != nil { + return err + } + + *o = SubscriptionRequest(varSubscriptionRequest) + + return err +} + type NullableSubscriptionRequest struct { value *SubscriptionRequest isSet bool diff --git a/model_token_card.go b/model_token_card.go index 117e0b6..b3c574f 100644 --- a/model_token_card.go +++ b/model_token_card.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the TokenCard type satisfies the MappedNullable interface at compile time @@ -34,6 +35,8 @@ type TokenCard struct { Number string `json:"number"` } +type _TokenCard TokenCard + // NewTokenCard instantiates a new TokenCard object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -229,6 +232,45 @@ func (o TokenCard) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *TokenCard) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "cvc", + "exp_month", + "exp_year", + "name", + "number", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTokenCard := _TokenCard{} + + err = json.Unmarshal(bytes, &varTokenCard) + + if err != nil { + return err + } + + *o = TokenCard(varTokenCard) + + return err +} + type NullableTokenCard struct { value *TokenCard isSet bool diff --git a/model_token_response.go b/model_token_response.go index 57077aa..0c31516 100644 --- a/model_token_response.go +++ b/model_token_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the TokenResponse type satisfies the MappedNullable interface at compile time @@ -32,6 +33,8 @@ type TokenResponse struct { Used bool `json:"used"` } +type _TokenResponse TokenResponse + // NewTokenResponse instantiates a new TokenResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -214,6 +217,44 @@ func (o TokenResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *TokenResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "livemode", + "object", + "used", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTokenResponse := _TokenResponse{} + + err = json.Unmarshal(bytes, &varTokenResponse) + + if err != nil { + return err + } + + *o = TokenResponse(varTokenResponse) + + return err +} + type NullableTokenResponse struct { value *TokenResponse isSet bool diff --git a/model_transaction_response.go b/model_transaction_response.go index b973e46..4279ec8 100644 --- a/model_transaction_response.go +++ b/model_transaction_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the TransactionResponse type satisfies the MappedNullable interface at compile time @@ -44,6 +45,8 @@ type TransactionResponse struct { Type string `json:"type"` } +type _TransactionResponse TransactionResponse + // NewTransactionResponse instantiates a new TransactionResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -360,6 +363,51 @@ func (o TransactionResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *TransactionResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "charge", + "created_at", + "currency", + "fee", + "id", + "livemode", + "net", + "object", + "status", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varTransactionResponse := _TransactionResponse{} + + err = json.Unmarshal(bytes, &varTransactionResponse) + + if err != nil { + return err + } + + *o = TransactionResponse(varTransactionResponse) + + return err +} + type NullableTransactionResponse struct { value *TransactionResponse isSet bool diff --git a/model_update_customer_fiscal_entities_response.go b/model_update_customer_fiscal_entities_response.go index 35fffa0..24dae32 100644 --- a/model_update_customer_fiscal_entities_response.go +++ b/model_update_customer_fiscal_entities_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the UpdateCustomerFiscalEntitiesResponse type satisfies the MappedNullable interface at compile time @@ -33,6 +34,8 @@ type UpdateCustomerFiscalEntitiesResponse struct { Default *bool `json:"default,omitempty"` } +type _UpdateCustomerFiscalEntitiesResponse UpdateCustomerFiscalEntitiesResponse + // NewUpdateCustomerFiscalEntitiesResponse instantiates a new UpdateCustomerFiscalEntitiesResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -412,6 +415,44 @@ func (o UpdateCustomerFiscalEntitiesResponse) ToMap() (map[string]interface{}, e return toSerialize, nil } +func (o *UpdateCustomerFiscalEntitiesResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "address", + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateCustomerFiscalEntitiesResponse := _UpdateCustomerFiscalEntitiesResponse{} + + err = json.Unmarshal(bytes, &varUpdateCustomerFiscalEntitiesResponse) + + if err != nil { + return err + } + + *o = UpdateCustomerFiscalEntitiesResponse(varUpdateCustomerFiscalEntitiesResponse) + + return err +} + type NullableUpdateCustomerFiscalEntitiesResponse struct { value *UpdateCustomerFiscalEntitiesResponse isSet bool diff --git a/model_update_customer_fiscal_entities_response_all_of.go b/model_update_customer_fiscal_entities_response_all_of.go index 0ebc77a..b6b7829 100644 --- a/model_update_customer_fiscal_entities_response_all_of.go +++ b/model_update_customer_fiscal_entities_response_all_of.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the UpdateCustomerFiscalEntitiesResponseAllOf type satisfies the MappedNullable interface at compile time @@ -27,6 +28,8 @@ type UpdateCustomerFiscalEntitiesResponseAllOf struct { Default *bool `json:"default,omitempty"` } +type _UpdateCustomerFiscalEntitiesResponseAllOf UpdateCustomerFiscalEntitiesResponseAllOf + // NewUpdateCustomerFiscalEntitiesResponseAllOf instantiates a new UpdateCustomerFiscalEntitiesResponseAllOf object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -205,6 +208,43 @@ func (o UpdateCustomerFiscalEntitiesResponseAllOf) ToMap() (map[string]interface return toSerialize, nil } +func (o *UpdateCustomerFiscalEntitiesResponseAllOf) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "object", + "created_at", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateCustomerFiscalEntitiesResponseAllOf := _UpdateCustomerFiscalEntitiesResponseAllOf{} + + err = json.Unmarshal(bytes, &varUpdateCustomerFiscalEntitiesResponseAllOf) + + if err != nil { + return err + } + + *o = UpdateCustomerFiscalEntitiesResponseAllOf(varUpdateCustomerFiscalEntitiesResponseAllOf) + + return err +} + type NullableUpdateCustomerFiscalEntitiesResponseAllOf struct { value *UpdateCustomerFiscalEntitiesResponseAllOf isSet bool diff --git a/model_update_customer_payment_methods_response.go b/model_update_customer_payment_methods_response.go index 2872e7b..ebfd77b 100644 --- a/model_update_customer_payment_methods_response.go +++ b/model_update_customer_payment_methods_response.go @@ -91,6 +91,18 @@ func (dst *UpdateCustomerPaymentMethodsResponse) UnmarshalJSON(data []byte) erro } } + // check if the discriminator value is 'spei_recurrent' + if jsonDict["type"] == "spei_recurrent" { + // try to unmarshal JSON data into PaymentMethodSpeiRecurrent + err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) + if err == nil { + return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match + } else { + dst.PaymentMethodSpeiRecurrent = nil + return fmt.Errorf("failed to unmarshal UpdateCustomerPaymentMethodsResponse as PaymentMethodSpeiRecurrent: %s", err.Error()) + } + } + // check if the discriminator value is 'payment_method_card_response' if jsonDict["type"] == "payment_method_card_response" { // try to unmarshal JSON data into PaymentMethodCardResponse @@ -127,18 +139,6 @@ func (dst *UpdateCustomerPaymentMethodsResponse) UnmarshalJSON(data []byte) erro } } - // check if the discriminator value is 'spei_recurrent' - if jsonDict["type"] == "spei_recurrent" { - // try to unmarshal JSON data into PaymentMethodSpeiRecurrent - err = json.Unmarshal(data, &dst.PaymentMethodSpeiRecurrent) - if err == nil { - return nil // data stored in dst.PaymentMethodSpeiRecurrent, return on the first match - } else { - dst.PaymentMethodSpeiRecurrent = nil - return fmt.Errorf("failed to unmarshal UpdateCustomerPaymentMethodsResponse as PaymentMethodSpeiRecurrent: %s", err.Error()) - } - } - return nil } diff --git a/model_update_order_tax_response.go b/model_update_order_tax_response.go index b3bd9ff..456d6ac 100644 --- a/model_update_order_tax_response.go +++ b/model_update_order_tax_response.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the UpdateOrderTaxResponse type satisfies the MappedNullable interface at compile time @@ -30,6 +31,8 @@ type UpdateOrderTaxResponse struct { ParentId *string `json:"parent_id,omitempty"` } +type _UpdateOrderTaxResponse UpdateOrderTaxResponse + // NewUpdateOrderTaxResponse instantiates a new UpdateOrderTaxResponse object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -243,6 +246,43 @@ func (o UpdateOrderTaxResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *UpdateOrderTaxResponse) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "amount", + "description", + "id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateOrderTaxResponse := _UpdateOrderTaxResponse{} + + err = json.Unmarshal(bytes, &varUpdateOrderTaxResponse) + + if err != nil { + return err + } + + *o = UpdateOrderTaxResponse(varUpdateOrderTaxResponse) + + return err +} + type NullableUpdateOrderTaxResponse struct { value *UpdateOrderTaxResponse isSet bool diff --git a/model_webhook_request.go b/model_webhook_request.go index 91c5b29..d9c9b39 100644 --- a/model_webhook_request.go +++ b/model_webhook_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the WebhookRequest type satisfies the MappedNullable interface at compile time @@ -26,6 +27,8 @@ type WebhookRequest struct { Synchronous bool `json:"synchronous"` } +type _WebhookRequest WebhookRequest + // NewWebhookRequest instantiates a new WebhookRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -110,6 +113,42 @@ func (o WebhookRequest) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +func (o *WebhookRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "synchronous", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebhookRequest := _WebhookRequest{} + + err = json.Unmarshal(bytes, &varWebhookRequest) + + if err != nil { + return err + } + + *o = WebhookRequest(varWebhookRequest) + + return err +} + type NullableWebhookRequest struct { value *WebhookRequest isSet bool diff --git a/model_webhook_update_request.go b/model_webhook_update_request.go index 4ff3ad5..9b3a8d2 100644 --- a/model_webhook_update_request.go +++ b/model_webhook_update_request.go @@ -13,6 +13,7 @@ package conekta import ( "encoding/json" + "fmt" ) // checks if the WebhookUpdateRequest type satisfies the MappedNullable interface at compile time @@ -24,9 +25,11 @@ type WebhookUpdateRequest struct { Url string `json:"url"` // It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false Synchronous *bool `json:"synchronous,omitempty"` - SubscribedEvents []string `json:"subscribed_events,omitempty"` + Events []string `json:"events,omitempty"` } +type _WebhookUpdateRequest WebhookUpdateRequest + // NewWebhookUpdateRequest instantiates a new WebhookUpdateRequest object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments @@ -105,36 +108,36 @@ func (o *WebhookUpdateRequest) SetSynchronous(v bool) { o.Synchronous = &v } -// GetSubscribedEvents returns the SubscribedEvents field value if set, zero value otherwise. -func (o *WebhookUpdateRequest) GetSubscribedEvents() []string { - if o == nil || IsNil(o.SubscribedEvents) { +// GetEvents returns the Events field value if set, zero value otherwise. +func (o *WebhookUpdateRequest) GetEvents() []string { + if o == nil || IsNil(o.Events) { var ret []string return ret } - return o.SubscribedEvents + return o.Events } -// GetSubscribedEventsOk returns a tuple with the SubscribedEvents field value if set, nil otherwise +// GetEventsOk returns a tuple with the Events field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WebhookUpdateRequest) GetSubscribedEventsOk() ([]string, bool) { - if o == nil || IsNil(o.SubscribedEvents) { +func (o *WebhookUpdateRequest) GetEventsOk() ([]string, bool) { + if o == nil || IsNil(o.Events) { return nil, false } - return o.SubscribedEvents, true + return o.Events, true } -// HasSubscribedEvents returns a boolean if a field has been set. -func (o *WebhookUpdateRequest) HasSubscribedEvents() bool { - if o != nil && !IsNil(o.SubscribedEvents) { +// HasEvents returns a boolean if a field has been set. +func (o *WebhookUpdateRequest) HasEvents() bool { + if o != nil && !IsNil(o.Events) { return true } return false } -// SetSubscribedEvents gets a reference to the given []string and assigns it to the SubscribedEvents field. -func (o *WebhookUpdateRequest) SetSubscribedEvents(v []string) { - o.SubscribedEvents = v +// SetEvents gets a reference to the given []string and assigns it to the Events field. +func (o *WebhookUpdateRequest) SetEvents(v []string) { + o.Events = v } func (o WebhookUpdateRequest) MarshalJSON() ([]byte, error) { @@ -151,12 +154,47 @@ func (o WebhookUpdateRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.Synchronous) { toSerialize["synchronous"] = o.Synchronous } - if !IsNil(o.SubscribedEvents) { - toSerialize["subscribed_events"] = o.SubscribedEvents + if !IsNil(o.Events) { + toSerialize["events"] = o.Events } return toSerialize, nil } +func (o *WebhookUpdateRequest) UnmarshalJSON(bytes []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(bytes, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWebhookUpdateRequest := _WebhookUpdateRequest{} + + err = json.Unmarshal(bytes, &varWebhookUpdateRequest) + + if err != nil { + return err + } + + *o = WebhookUpdateRequest(varWebhookUpdateRequest) + + return err +} + type NullableWebhookUpdateRequest struct { value *WebhookUpdateRequest isSet bool diff --git a/templates/go/README.mustache b/templates/go/README.mustache new file mode 100644 index 0000000..7cf2407 --- /dev/null +++ b/templates/go/README.mustache @@ -0,0 +1,267 @@ +![GO api]({{gitUserId}}.png) +# {{packageName}} Go API Library +[![Go Reference](https://pkg.go.dev/badge/github.com/{{gitUserId}}/{{gitRepoId}}.svg)](https://pkg.go.dev/github.com/{{gitUserId}}/{{gitRepoId}}) + +{{#appDescriptionWithNewLines}} +{{{.}}} +{{/appDescriptionWithNewLines}} + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: {{appVersion}} +- Package version: {{packageVersion}} +{{^hideGenerationTimestamp}} +- Build date: {{generatedDate}} +{{/hideGenerationTimestamp}} +- Build package: {{generatorClass}} +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + +## Prerequisites +- [Conekta account](https://panel.conekta.com/) +- [API key](https://developers.conekta.com/docs/como-obtener-tus-api-keys). your API credential . + +## Installation +Download conekta-go package: +``` +go get -u github.com/conekta/conekta-go +``` +## Using the library + +In order to submit http request to Conekta API you need to initialize the client. The following example makes a order request: +```go +package main + +import ( + "context" + "net/http" + + "github.com/conekta/conekta-go" +) + +func main() { + // Create a OrderRequest + const acceptLanguage = "es" + const accessToken = "Your merchant XAPI key" + + // create the http client + config := conekta.NewConfiguration() + client := conekta.NewAPIClient(config) + + ctx := context.WithValue(context.TODO(), conekta.ContextAccessToken, accessToken) + + // create customer + customer := conekta.Customer{ + Name: "test go", + Phone: "+573143159063", + Email: "test@conekta.com", + } + customerResponse, httpResponse, err := client.CustomersApi.CreateCustomer(ctx). + Customer(customer). + AcceptLanguage(acceptLanguage). + Execute() + if err != nil { + panic(err) + } + if httpResponse.StatusCode != http.StatusCreated { + panic("invalid response statusCode") + } + + // Create OrderRequest + chargeRequest := conekta.ChargeRequest{ + Amount: conekta.PtrInt32(1555), + PaymentMethod: *conekta.NewChargeRequestPaymentMethod("cash"), + } + productLine := conekta.Product{ + Name: "toshiba", + Quantity: 1, + UnitPrice: 1555, + } + orderRequest := conekta.OrderRequest{ + Charges: []conekta.ChargeRequest{ + chargeRequest, + }, + Currency: "MXN", + CustomerInfo: conekta.OrderRequestCustomerInfo{ + CustomerInfoJustCustomerId: conekta.NewCustomerInfoJustCustomerId(customerResponse.Id), + }, + LineItems: []conekta.Product{ + productLine, + }, + } + + //Make the call to the service. This example code makes a call to /orders + orderResponse, httpResponse, err := client.OrdersApi.CreateOrder(ctx). + OrderRequest(orderRequest). + AcceptLanguage(acceptLanguage). + Execute() + if err != nil { + panic(err) + } + if httpResponse.StatusCode != http.StatusCreated { + panic("invalid response statusCode") + } + println(*orderResponse) +} +``` + +## Running tests +Navigate to conekta-go folder and run the following commands. +``` +docker-compose up -d +go test -v --race ./... +``` + +## Documentation for API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} +{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} +{{#authMethods}} +### {{{name}}} + +{{#isApiKey}} +- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} + +Note, each API key must be added to a map of `map[string]APIKey` where the key is: {{keyParamName}} and passed in as the auth context for each request. + +Example + +```golang +auth := context.WithValue( + context.Background(), + sw.ContextAPIKeys, + map[string]sw.APIKey{ + "{{keyParamName}}": {Key: "API_KEY_STRING"}, + }, + ) +r, err := client.Service.Operation(auth, args) +``` + +{{/isApiKey}} +{{#isBasic}} +{{#isBasicBearer}} +- **Type**: HTTP Bearer token authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING") +r, err := client.Service.Operation(auth, args) +``` + +{{/isBasicBearer}} +{{#isBasicBasic}} +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + +{{/isBasicBasic}} +{{#isHttpSignature}} +- **Type**: HTTP signature authentication + +Example + +```golang + authConfig := client.HttpSignatureAuth{ + KeyId: "my-key-id", + PrivateKeyPath: "rsa.pem", + Passphrase: "my-passphrase", + SigningScheme: sw.HttpSigningSchemeHs2019, + SignedHeaders: []string{ + sw.HttpSignatureParameterRequestTarget, // The special (request-target) parameter expresses the HTTP request target. + sw.HttpSignatureParameterCreated, // Time when request was signed, formatted as a Unix timestamp integer value. + "Host", // The Host request header specifies the domain name of the server, and optionally the TCP port number. + "Date", // The date and time at which the message was originated. + "Content-Type", // The Media type of the body of the request. + "Digest", // A cryptographic digest of the request body. + }, + SigningAlgorithm: sw.HttpSigningAlgorithmRsaPSS, + SignatureMaxValidity: 5 * time.Minute, + } + var authCtx context.Context + var err error + if authCtx, err = authConfig.ContextWithValue(context.Background()); err != nil { + // Process error + } + r, err = client.Service.Operation(auth, args) + +``` +{{/isHttpSignature}} +{{/isBasic}} +{{#isOAuth}} + +- **Type**: OAuth +- **Flow**: {{{flow}}} +- **Authorization URL**: {{{authorizationUrl}}} +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING") +r, err := client.Service.Operation(auth, args) +``` + +Or via OAuth2 module to automatically refresh tokens and perform user authentication. + +```golang +import "golang.org/x/oauth2" + +/* Perform OAuth2 round trip request and obtain a token */ + +tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token) +auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource) +r, err := client.Service.Operation(auth, args) +``` + +{{/isOAuth}} +{{/authMethods}} + +## Documentation for Utility Methods + +Due to the fact that model structure members are all pointers, this package contains +a number of utility functions to easily obtain pointers to values of basic types. +Each of these functions takes a value of the given basic type and returns a pointer to it: + +* `PtrBool` +* `PtrInt` +* `PtrInt32` +* `PtrInt64` +* `PtrFloat` +* `PtrFloat32` +* `PtrFloat64` +* `PtrString` +* `PtrTime` + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} \ No newline at end of file diff --git a/templates/go/client.mustache b/templates/go/client.mustache new file mode 100644 index 0000000..1b4db77 --- /dev/null +++ b/templates/go/client.mustache @@ -0,0 +1,788 @@ +{{>partial_header}} +package {{packageName}} + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "fmt" + "io" + "log" + "mime/multipart" + "net/http" + "net/http/httputil" + "net/url" + "os" + "path/filepath" + "reflect" + "regexp" + "strconv" + "strings" + "time" + "unicode/utf8" + "runtime" + "os/exec" + + {{#hasOAuthMethods}} + "golang.org/x/oauth2" + {{/hasOAuthMethods}} + {{#withAWSV4Signature}} + awsv4 "github.com/aws/aws-sdk-go/aws/signer/v4" + awscredentials "github.com/aws/aws-sdk-go/aws/credentials" + {{/withAWSV4Signature}} +) + +var ( + jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) + xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + encodedConektaUserAgent string +) +const ( + // UnknownPlatform is the string returned as the system name if we couldn't get + // one from `uname`. + UnknownPlatform string = "unknown platform" +) + +// APIClient manages communication with the {{appName}} API v{{version}} +// In most cases there should be only one, shared, APIClient. +type APIClient struct { + cfg *Configuration + common service // Reuse a single struct instead of allocating one for each service on the heap. + + // API Services +{{#apiInfo}} +{{#apis}} +{{#operations}} + + {{classname}} {{#generateInterfaces}}{{classname}}{{/generateInterfaces}}{{^generateInterfaces}}*{{classname}}Service{{/generateInterfaces}} +{{/operations}} +{{/apis}} +{{/apiInfo}} +} + + +func init() { + initUserAgent() +} + +func initUserAgent() { + data := map[string]string{ + "bindings_version": "{{{packageVersion}}}", + "lang": "go", + "lang_version": runtime.Version(), + "publisher": "conekta", + "uname": getUname(), + } + + r, _ := json.Marshal(data) + encodedConektaUserAgent = string(r) +} + +// getUname tries to get an uname from the system, but not that hard. It tries +// to execute `uname -a`, but swallows any errors in case that didn't work +// (i.e. non-Unix non-Mac system or some other reason). +func getUname() string { + path, err := exec.LookPath("uname") + if err != nil { + return UnknownPlatform + } + + cmd := exec.Command(path, "-a") + var out bytes.Buffer + cmd.Stderr = nil // goes to os.DevNull + cmd.Stdout = &out + err = cmd.Run() + if err != nil { + return UnknownPlatform + } + + return out.String() +} +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +func NewAPIClient(cfg *Configuration) *APIClient { + if cfg.HTTPClient == nil { + cfg.HTTPClient = http.DefaultClient + } + + c := &APIClient{} + c.cfg = cfg + c.common.client = c + +{{#apiInfo}} + // API Services +{{#apis}} +{{#operations}} + c.{{classname}} = (*{{classname}}Service)(&c.common) +{{/operations}} +{{/apis}} +{{/apiInfo}} + + return c +} + +func atoi(in string) (int, error) { + return strconv.Atoi(in) +} + +// selectHeaderContentType select a content type from the available list. +func selectHeaderContentType(contentTypes []string) string { + if len(contentTypes) == 0 { + return "" + } + if contains(contentTypes, "application/json") { + return "application/json" + } + return contentTypes[0] // use the first content type specified in 'consumes' +} + +// selectHeaderAccept join all accept types and return +func selectHeaderAccept(accepts []string) string { + if len(accepts) == 0 { + return "" + } + + if contains(accepts, "application/json") { + return "application/json" + } + + return strings.Join(accepts, ",") +} + +// contains is a case insensitive match, finding needle in a haystack +func contains(haystack []string, needle string) bool { + for _, a := range haystack { + if strings.EqualFold(a, needle) { + return true + } + } + return false +} + +// Verify optional parameters are of the correct type. +func typeCheckParameter(obj interface{}, expected string, name string) error { + // Make sure there is an object. + if obj == nil { + return nil + } + + // Check the type is as expected. + if reflect.TypeOf(obj).String() != expected { + return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String()) + } + return nil +} + +func parameterValueToString( obj interface{}, key string ) string { + if reflect.TypeOf(obj).Kind() != reflect.Ptr { + return fmt.Sprintf("%v", obj) + } + var param,ok = obj.(MappedNullable) + if !ok { + return "" + } + dataMap,err := param.ToMap() + if err != nil { + return "" + } + return fmt.Sprintf("%v", dataMap[key]) +} + +// parameterAddToHeaderOrQuery adds the provided object to the request header or url query +// supporting deep object syntax +func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) { + var v = reflect.ValueOf(obj) + var value = "" + if v == reflect.ValueOf(nil) { + value = "null" + } else { + switch v.Kind() { + case reflect.Invalid: + value = "invalid" + + case reflect.Struct: + if t,ok := obj.(MappedNullable); ok { + dataMap,err := t.ToMap() + if err != nil { + return + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) + return + } + value = v.Type().String() + " value" + case reflect.Slice: + var indValue = reflect.ValueOf(obj) + if indValue == reflect.ValueOf(nil) { + return + } + var lenIndValue = indValue.Len() + for i:=0;i 0 || (len(formFiles) > 0) { + if body != nil { + return nil, errors.New("Cannot specify postBody and multipart form at the same time.") + } + body = &bytes.Buffer{} + w := multipart.NewWriter(body) + + for k, v := range formParams { + for _, iv := range v { + if strings.HasPrefix(k, "@") { // file + err = addFile(w, k[1:], iv) + if err != nil { + return nil, err + } + } else { // form value + w.WriteField(k, iv) + } + } + } + for _, formFile := range formFiles { + if len(formFile.fileBytes) > 0 && formFile.fileName != "" { + w.Boundary() + part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) + if err != nil { + return nil, err + } + _, err = part.Write(formFile.fileBytes) + if err != nil { + return nil, err + } + } + } + + // Set the Boundary in the Content-Type + headerParams["Content-Type"] = w.FormDataContentType() + + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + w.Close() + } + + if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { + if body != nil { + return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") + } + body = &bytes.Buffer{} + body.WriteString(formParams.Encode()) + // Set Content-Length + headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) + } + + // Setup path and query parameters + url, err := url.Parse(path) + if err != nil { + return nil, err + } + + // Override request host, if applicable + if c.cfg.Host != "" { + url.Host = c.cfg.Host + } + + // Override request scheme, if applicable + if c.cfg.Scheme != "" { + url.Scheme = c.cfg.Scheme + } + + // Adding Query Param + query := url.Query() + for k, v := range queryParams { + for _, iv := range v { + query.Add(k, iv) + } + } + + // Encode the parameters. + url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string { + pieces := strings.Split(s, "=") + pieces[0] = queryDescape.Replace(pieces[0]) + return strings.Join(pieces, "=") + }) + + // Generate a new request + if body != nil { + localVarRequest, err = http.NewRequest(method, url.String(), body) + } else { + localVarRequest, err = http.NewRequest(method, url.String(), nil) + } + if err != nil { + return nil, err + } + + // add header parameters, if any + if len(headerParams) > 0 { + headers := http.Header{} + for h, v := range headerParams { + headers[h] = []string{v} + } + localVarRequest.Header = headers + } + + // Add the user agent to the request. + localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) + + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + + {{#hasOAuthMethods}} + // OAuth2 authentication + if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { + // We were able to grab an oauth2 token from the context + var latestToken *oauth2.Token + if latestToken, err = tok.Token(); err != nil { + return nil, err + } + + latestToken.SetAuthHeader(localVarRequest) + } + + {{/hasOAuthMethods}} + {{#hasHttpBasicMethods}} + // Basic HTTP Authentication + if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { + localVarRequest.SetBasicAuth(auth.UserName, auth.Password) + } + + {{/hasHttpBasicMethods}} + {{#hasHttpBearerMethods}} + // AccessToken Authentication + if auth, ok := ctx.Value(ContextAccessToken).(string); ok { + localVarRequest.Header.Add("Authorization", "Bearer "+auth) + } + + {{/hasHttpBearerMethods}} + {{#withAWSV4Signature}} + // AWS Signature v4 Authentication + if auth, ok := ctx.Value(ContextAWSv4).(AWSv4); ok { + creds := awscredentials.NewStaticCredentials(auth.AccessKey, auth.SecretKey, auth.SessionToken) + signer := awsv4.NewSigner(creds) + var reader *strings.Reader + if body == nil { + reader = strings.NewReader("") + } else { + reader = strings.NewReader(body.String()) + } + + // Define default values for region and service to maintain backward compatibility + region := auth.Region + if region == "" { + region = "eu-west-2" + } + service := auth.Service + if service == "" { + service = "oapi" + } + + timestamp := time.Now() + _, err := signer.Sign(localVarRequest, reader, service, region, timestamp) + if err != nil { + return nil, err + } + } + {{/withAWSV4Signature}} + } + + for header, value := range c.cfg.DefaultHeader { + localVarRequest.Header.Add(header, value) + } +{{#withCustomMiddlewareFunction}} + + if c.cfg.Middleware != nil { + c.cfg.Middleware(localVarRequest) + } + +{{/withCustomMiddlewareFunction}} +{{#hasHttpSignatureMethods}} + if ctx != nil { + // HTTP Signature Authentication. All request headers must be set (including default headers) + // because the headers may be included in the signature. + if auth, ok := ctx.Value(ContextHttpSignatureAuth).(HttpSignatureAuth); ok { + err = SignRequest(ctx, localVarRequest, auth) + if err != nil { + return nil, err + } + } + } +{{/hasHttpSignatureMethods}} + return localVarRequest, nil +} + +func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { + if len(b) == 0 { + return nil + } + if s, ok := v.(*string); ok { + *s = string(b) + return nil + } + if f, ok := v.(*os.File); ok { + f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = f.Write(b) + if err != nil { + return + } + _, err = f.Seek(0, io.SeekStart) + return + } + if f, ok := v.(**os.File); ok { + *f, err = os.CreateTemp("", "HttpClientFile") + if err != nil { + return + } + _, err = (*f).Write(b) + if err != nil { + return + } + _, err = (*f).Seek(0, io.SeekStart) + return + } + if xmlCheck.MatchString(contentType) { + if err = xml.Unmarshal(b, v); err != nil { + return err + } + return nil + } + if jsonCheck.MatchString(contentType) { + if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas + if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined + if err = unmarshalObj.UnmarshalJSON(b); err != nil { + return err + } + } else { + return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") + } + } else if err = json.Unmarshal(b, v); err != nil { // simple model + return err + } + return nil + } + return errors.New("undefined response type") +} + +// Add a file to the multipart request +func addFile(w *multipart.Writer, fieldName, path string) error { + file, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + err = file.Close() + if err != nil { + return err + } + + part, err := w.CreateFormFile(fieldName, filepath.Base(path)) + if err != nil { + return err + } + _, err = io.Copy(part, file) + + return err +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Set request body from an interface{} +func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { + if bodyBuf == nil { + bodyBuf = &bytes.Buffer{} + } + + if reader, ok := body.(io.Reader); ok { + _, err = bodyBuf.ReadFrom(reader) + } else if fp, ok := body.(*os.File); ok { + _, err = bodyBuf.ReadFrom(fp) + } else if b, ok := body.([]byte); ok { + _, err = bodyBuf.Write(b) + } else if s, ok := body.(string); ok { + _, err = bodyBuf.WriteString(s) + } else if s, ok := body.(*string); ok { + _, err = bodyBuf.WriteString(*s) + } else if jsonCheck.MatchString(contentType) { + err = json.NewEncoder(bodyBuf).Encode(body) + } else if xmlCheck.MatchString(contentType) { + err = xml.NewEncoder(bodyBuf).Encode(body) + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", contentType) + return nil, err + } + return bodyBuf, nil +} + +// detectContentType method is used to figure out `Request.Body` content type for request header +func detectContentType(body interface{}) string { + contentType := "text/plain; charset=utf-8" + kind := reflect.TypeOf(body).Kind() + + switch kind { + case reflect.Struct, reflect.Map, reflect.Ptr: + contentType = "application/json; charset=utf-8" + case reflect.String: + contentType = "text/plain; charset=utf-8" + default: + if b, ok := body.([]byte); ok { + contentType = http.DetectContentType(b) + } else if kind == reflect.Slice { + contentType = "application/json; charset=utf-8" + } + } + + return contentType +} + +// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go +type cacheControl map[string]string + +func parseCacheControl(headers http.Header) cacheControl { + cc := cacheControl{} + ccHeader := headers.Get("Cache-Control") + for _, part := range strings.Split(ccHeader, ",") { + part = strings.Trim(part, " ") + if part == "" { + continue + } + if strings.ContainsRune(part, '=') { + keyval := strings.Split(part, "=") + cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") + } else { + cc[part] = "" + } + } + return cc +} + +// CacheExpires helper function to determine remaining time before repeating a request. +func CacheExpires(r *http.Response) time.Time { + // Figure out when the cache expires. + var expires time.Time + now, err := time.Parse(time.RFC1123, r.Header.Get("date")) + if err != nil { + return time.Now() + } + respCacheControl := parseCacheControl(r.Header) + + if maxAge, ok := respCacheControl["max-age"]; ok { + lifetime, err := time.ParseDuration(maxAge + "s") + if err != nil { + expires = now + } else { + expires = now.Add(lifetime) + } + } else { + expiresHeader := r.Header.Get("Expires") + if expiresHeader != "" { + expires, err = time.Parse(time.RFC1123, expiresHeader) + if err != nil { + expires = now + } + } + } + return expires +} + +func strlen(s string) int { + return utf8.RuneCountInString(s) +} + +// GenericOpenAPIError Provides access to the body, error and model on returned errors. +type GenericOpenAPIError struct { + body []byte + error string + model interface{} +} + +// Error returns non-empty string if there was an error. +func (e GenericOpenAPIError) Error() string { + return e.error +} + +// Body returns the raw bytes of the response +func (e GenericOpenAPIError) Body() []byte { + return e.body +} + +// Model returns the unpacked model of the error +func (e GenericOpenAPIError) Model() interface{} { + return e.model +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + + // status title (detail) + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} From 431c17304c35740edf24449f4363a9b45bd6abc2 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 21 Dec 2023 14:43:15 -0500 Subject: [PATCH 2/3] new entities --- .github/workflows/go.yml | 10 +- Makefile | 3 + README.md | 2 +- client.go | 2 +- config-go.json | 4 +- configuration.go | 2 +- model_charge_order_response_channel.go | 235 ----------- model_consumer_payment_methods_request.go | 179 -------- model_customer_info_response.go | 275 ------------- model_events_webhook_resend_response.go | 307 -------------- model_order_response_fiscal_entity.go | 235 ----------- model_order_response_fiscal_entity_address.go | 389 ------------------ ...r_response_fiscal_entity_address_all_of.go | 127 ------ model_risk_rules_list_all_of.go | 127 ------ model_risk_rules_list_all_of_data.go | 350 ---------------- model_risk_rules_list_data_inner.go | 235 ----------- test/api_antifraud_test.go | 12 +- test/api_api_keys_test.go | 10 +- test/api_balances_test.go | 2 +- test/api_charges_test.go | 4 +- test/api_companies_test.go | 4 +- test/api_customers_test.go | 14 +- test/api_discounts_test.go | 6 +- test/api_events_test.go | 6 +- test/api_logs_test.go | 4 +- test/api_orders_test.go | 40 +- test/api_payment_link_test.go | 12 +- test/api_payment_methods_test.go | 8 +- test/api_plans_test.go | 10 +- test/api_products_test.go | 6 +- test/api_shipping_contacts_test.go | 6 +- test/api_shippings_test.go | 6 +- test/api_subscriptions_test.go | 14 +- test/api_taxes_test.go | 6 +- test/api_tokens_test.go | 2 +- test/api_transactions_test.go | 4 +- test/api_transfers_test.go | 4 +- test/api_webhook_keys_test.go | 10 +- test/api_webhooks_test.go | 12 +- 39 files changed, 127 insertions(+), 2557 deletions(-) delete mode 100644 model_charge_order_response_channel.go delete mode 100644 model_consumer_payment_methods_request.go delete mode 100644 model_customer_info_response.go delete mode 100644 model_events_webhook_resend_response.go delete mode 100644 model_order_response_fiscal_entity.go delete mode 100644 model_order_response_fiscal_entity_address.go delete mode 100644 model_order_response_fiscal_entity_address_all_of.go delete mode 100644 model_risk_rules_list_all_of.go delete mode 100644 model_risk_rules_list_all_of_data.go delete mode 100644 model_risk_rules_list_data_inner.go diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c1c5042..04dcf92 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,10 +16,12 @@ jobs: - uses: actions/setup-go@v4 with: go-version: ${{ matrix.sdk }} - - name: Install Mockserver - run: | - npm install -g @mockoon/cli - npx mockoon-cli start --data https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json --port 3000 + - name: Run Mockoon CLI + uses: mockoon/cli-action@v1 + with: + version: 'latest' + data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json' + port: 3000 - name: Run tests run: | go test -v --race ./... diff --git a/Makefile b/Makefile index cc40c34..9dd659d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ + +ci-test: + go test ./... go: rm -rf /docs \ && rm model_* diff --git a/README.md b/README.md index 2539b68..d7c8aa6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Conekta sdk This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - API version: 2.1.0 -- Package version: 6.0.3 +- Package version: 6.0.4 - Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit [https://github.com/conekta/openapi/issues](https://github.com/conekta/openapi/issues) diff --git a/client.go b/client.go index 7b3d936..c5e19ab 100644 --- a/client.go +++ b/client.go @@ -112,7 +112,7 @@ func init() { func initUserAgent() { data := map[string]string{ - "bindings_version": "6.0.3", + "bindings_version": "6.0.4", "lang": "go", "lang_version": runtime.Version(), "publisher": "conekta", diff --git a/config-go.json b/config-go.json index 7cb30ff..9181ada 100644 --- a/config-go.json +++ b/config-go.json @@ -1,12 +1,12 @@ { - "packageVersion": "6.0.3", + "packageVersion": "6.0.4", "packageName": "conekta", "hideGenerationTimestamp": false, "generateInterfaces": true, "disallowAdditionalPropertiesIfNotPresent": true, "gitUserId": "conekta", "gitRepoId": "conekta-go", - "httpUserAgent": "Conekta/v2 GoBindings/6.0.2", + "httpUserAgent": "Conekta/v2 GoBindings/6.0.4", "files": { "/local/CODE_OF_CONDUCT.md" : {}, "/local/AUTHORS.md": {}, diff --git a/configuration.go b/configuration.go index 50daddd..82a6a6b 100644 --- a/configuration.go +++ b/configuration.go @@ -90,7 +90,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "Conekta/v2 GoBindings/6.0.2", + UserAgent: "Conekta/v2 GoBindings/6.0.4", Debug: false, Servers: ServerConfigurations{ { diff --git a/model_charge_order_response_channel.go b/model_charge_order_response_channel.go deleted file mode 100644 index 7d1d823..0000000 --- a/model_charge_order_response_channel.go +++ /dev/null @@ -1,235 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the ChargeOrderResponseChannel type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ChargeOrderResponseChannel{} - -// ChargeOrderResponseChannel struct for ChargeOrderResponseChannel -type ChargeOrderResponseChannel struct { - Segment *string `json:"segment,omitempty"` - CheckoutRequestId *string `json:"checkout_request_id,omitempty"` - CheckoutRequestType *string `json:"checkout_request_type,omitempty"` - Id *string `json:"id,omitempty"` -} - -// NewChargeOrderResponseChannel instantiates a new ChargeOrderResponseChannel object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewChargeOrderResponseChannel() *ChargeOrderResponseChannel { - this := ChargeOrderResponseChannel{} - return &this -} - -// NewChargeOrderResponseChannelWithDefaults instantiates a new ChargeOrderResponseChannel object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewChargeOrderResponseChannelWithDefaults() *ChargeOrderResponseChannel { - this := ChargeOrderResponseChannel{} - return &this -} - -// GetSegment returns the Segment field value if set, zero value otherwise. -func (o *ChargeOrderResponseChannel) GetSegment() string { - if o == nil || IsNil(o.Segment) { - var ret string - return ret - } - return *o.Segment -} - -// GetSegmentOk returns a tuple with the Segment field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeOrderResponseChannel) GetSegmentOk() (*string, bool) { - if o == nil || IsNil(o.Segment) { - return nil, false - } - return o.Segment, true -} - -// HasSegment returns a boolean if a field has been set. -func (o *ChargeOrderResponseChannel) HasSegment() bool { - if o != nil && !IsNil(o.Segment) { - return true - } - - return false -} - -// SetSegment gets a reference to the given string and assigns it to the Segment field. -func (o *ChargeOrderResponseChannel) SetSegment(v string) { - o.Segment = &v -} - -// GetCheckoutRequestId returns the CheckoutRequestId field value if set, zero value otherwise. -func (o *ChargeOrderResponseChannel) GetCheckoutRequestId() string { - if o == nil || IsNil(o.CheckoutRequestId) { - var ret string - return ret - } - return *o.CheckoutRequestId -} - -// GetCheckoutRequestIdOk returns a tuple with the CheckoutRequestId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeOrderResponseChannel) GetCheckoutRequestIdOk() (*string, bool) { - if o == nil || IsNil(o.CheckoutRequestId) { - return nil, false - } - return o.CheckoutRequestId, true -} - -// HasCheckoutRequestId returns a boolean if a field has been set. -func (o *ChargeOrderResponseChannel) HasCheckoutRequestId() bool { - if o != nil && !IsNil(o.CheckoutRequestId) { - return true - } - - return false -} - -// SetCheckoutRequestId gets a reference to the given string and assigns it to the CheckoutRequestId field. -func (o *ChargeOrderResponseChannel) SetCheckoutRequestId(v string) { - o.CheckoutRequestId = &v -} - -// GetCheckoutRequestType returns the CheckoutRequestType field value if set, zero value otherwise. -func (o *ChargeOrderResponseChannel) GetCheckoutRequestType() string { - if o == nil || IsNil(o.CheckoutRequestType) { - var ret string - return ret - } - return *o.CheckoutRequestType -} - -// GetCheckoutRequestTypeOk returns a tuple with the CheckoutRequestType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeOrderResponseChannel) GetCheckoutRequestTypeOk() (*string, bool) { - if o == nil || IsNil(o.CheckoutRequestType) { - return nil, false - } - return o.CheckoutRequestType, true -} - -// HasCheckoutRequestType returns a boolean if a field has been set. -func (o *ChargeOrderResponseChannel) HasCheckoutRequestType() bool { - if o != nil && !IsNil(o.CheckoutRequestType) { - return true - } - - return false -} - -// SetCheckoutRequestType gets a reference to the given string and assigns it to the CheckoutRequestType field. -func (o *ChargeOrderResponseChannel) SetCheckoutRequestType(v string) { - o.CheckoutRequestType = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *ChargeOrderResponseChannel) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ChargeOrderResponseChannel) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *ChargeOrderResponseChannel) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *ChargeOrderResponseChannel) SetId(v string) { - o.Id = &v -} - -func (o ChargeOrderResponseChannel) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ChargeOrderResponseChannel) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Segment) { - toSerialize["segment"] = o.Segment - } - if !IsNil(o.CheckoutRequestId) { - toSerialize["checkout_request_id"] = o.CheckoutRequestId - } - if !IsNil(o.CheckoutRequestType) { - toSerialize["checkout_request_type"] = o.CheckoutRequestType - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - return toSerialize, nil -} - -type NullableChargeOrderResponseChannel struct { - value *ChargeOrderResponseChannel - isSet bool -} - -func (v NullableChargeOrderResponseChannel) Get() *ChargeOrderResponseChannel { - return v.value -} - -func (v *NullableChargeOrderResponseChannel) Set(val *ChargeOrderResponseChannel) { - v.value = val - v.isSet = true -} - -func (v NullableChargeOrderResponseChannel) IsSet() bool { - return v.isSet -} - -func (v *NullableChargeOrderResponseChannel) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableChargeOrderResponseChannel(val *ChargeOrderResponseChannel) *NullableChargeOrderResponseChannel { - return &NullableChargeOrderResponseChannel{value: val, isSet: true} -} - -func (v NullableChargeOrderResponseChannel) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableChargeOrderResponseChannel) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_consumer_payment_methods_request.go b/model_consumer_payment_methods_request.go deleted file mode 100644 index 016fd0e..0000000 --- a/model_consumer_payment_methods_request.go +++ /dev/null @@ -1,179 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" - "fmt" -) - -// ConsumerPaymentMethodsRequest - struct for ConsumerPaymentMethodsRequest -type ConsumerPaymentMethodsRequest struct { - PaymentMethodCardRequest *PaymentMethodCardRequest - PaymentMethodCashRequest *PaymentMethodCashRequest - PaymentMethodSpeiRequest *PaymentMethodSpeiRequest -} - -// PaymentMethodCardRequestAsConsumerPaymentMethodsRequest is a convenience function that returns PaymentMethodCardRequest wrapped in ConsumerPaymentMethodsRequest -func PaymentMethodCardRequestAsConsumerPaymentMethodsRequest(v *PaymentMethodCardRequest) ConsumerPaymentMethodsRequest { - return ConsumerPaymentMethodsRequest{ - PaymentMethodCardRequest: v, - } -} - -// PaymentMethodCashRequestAsConsumerPaymentMethodsRequest is a convenience function that returns PaymentMethodCashRequest wrapped in ConsumerPaymentMethodsRequest -func PaymentMethodCashRequestAsConsumerPaymentMethodsRequest(v *PaymentMethodCashRequest) ConsumerPaymentMethodsRequest { - return ConsumerPaymentMethodsRequest{ - PaymentMethodCashRequest: v, - } -} - -// PaymentMethodSpeiRequestAsConsumerPaymentMethodsRequest is a convenience function that returns PaymentMethodSpeiRequest wrapped in ConsumerPaymentMethodsRequest -func PaymentMethodSpeiRequestAsConsumerPaymentMethodsRequest(v *PaymentMethodSpeiRequest) ConsumerPaymentMethodsRequest { - return ConsumerPaymentMethodsRequest{ - PaymentMethodSpeiRequest: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *ConsumerPaymentMethodsRequest) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into PaymentMethodCardRequest - err = json.Unmarshal(data, &dst.PaymentMethodCardRequest) - if err == nil { - jsonPaymentMethodCardRequest, _ := json.Marshal(dst.PaymentMethodCardRequest) - if string(jsonPaymentMethodCardRequest) == "{}" { // empty struct - dst.PaymentMethodCardRequest = nil - } else { - match++ - } - } else { - dst.PaymentMethodCardRequest = nil - } - - // try to unmarshal data into PaymentMethodCashRequest - err = json.Unmarshal(data, &dst.PaymentMethodCashRequest) - if err == nil { - jsonPaymentMethodCashRequest, _ := json.Marshal(dst.PaymentMethodCashRequest) - if string(jsonPaymentMethodCashRequest) == "{}" { // empty struct - dst.PaymentMethodCashRequest = nil - } else { - match++ - } - } else { - dst.PaymentMethodCashRequest = nil - } - - // try to unmarshal data into PaymentMethodSpeiRequest - err = json.Unmarshal(data, &dst.PaymentMethodSpeiRequest) - if err == nil { - jsonPaymentMethodSpeiRequest, _ := json.Marshal(dst.PaymentMethodSpeiRequest) - if string(jsonPaymentMethodSpeiRequest) == "{}" { // empty struct - dst.PaymentMethodSpeiRequest = nil - } else { - match++ - } - } else { - dst.PaymentMethodSpeiRequest = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.PaymentMethodCardRequest = nil - dst.PaymentMethodCashRequest = nil - dst.PaymentMethodSpeiRequest = nil - - return fmt.Errorf("data matches more than one schema in oneOf(ConsumerPaymentMethodsRequest)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - return fmt.Errorf("data failed to match schemas in oneOf(ConsumerPaymentMethodsRequest)") - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ConsumerPaymentMethodsRequest) MarshalJSON() ([]byte, error) { - if src.PaymentMethodCardRequest != nil { - return json.Marshal(&src.PaymentMethodCardRequest) - } - - if src.PaymentMethodCashRequest != nil { - return json.Marshal(&src.PaymentMethodCashRequest) - } - - if src.PaymentMethodSpeiRequest != nil { - return json.Marshal(&src.PaymentMethodSpeiRequest) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *ConsumerPaymentMethodsRequest) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.PaymentMethodCardRequest != nil { - return obj.PaymentMethodCardRequest - } - - if obj.PaymentMethodCashRequest != nil { - return obj.PaymentMethodCashRequest - } - - if obj.PaymentMethodSpeiRequest != nil { - return obj.PaymentMethodSpeiRequest - } - - // all schemas are nil - return nil -} - -type NullableConsumerPaymentMethodsRequest struct { - value *ConsumerPaymentMethodsRequest - isSet bool -} - -func (v NullableConsumerPaymentMethodsRequest) Get() *ConsumerPaymentMethodsRequest { - return v.value -} - -func (v *NullableConsumerPaymentMethodsRequest) Set(val *ConsumerPaymentMethodsRequest) { - v.value = val - v.isSet = true -} - -func (v NullableConsumerPaymentMethodsRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableConsumerPaymentMethodsRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableConsumerPaymentMethodsRequest(val *ConsumerPaymentMethodsRequest) *NullableConsumerPaymentMethodsRequest { - return &NullableConsumerPaymentMethodsRequest{value: val, isSet: true} -} - -func (v NullableConsumerPaymentMethodsRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableConsumerPaymentMethodsRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_customer_info_response.go b/model_customer_info_response.go deleted file mode 100644 index 5684057..0000000 --- a/model_customer_info_response.go +++ /dev/null @@ -1,275 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the CustomerInfoResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CustomerInfoResponse{} - -// CustomerInfoResponse struct for CustomerInfoResponse -type CustomerInfoResponse struct { - Name *string `json:"name,omitempty"` - Email *string `json:"email,omitempty"` - Phone *string `json:"phone,omitempty"` - Corporate *bool `json:"corporate,omitempty"` - Object *string `json:"object,omitempty"` -} - -// NewCustomerInfoResponse instantiates a new CustomerInfoResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCustomerInfoResponse() *CustomerInfoResponse { - this := CustomerInfoResponse{} - var corporate bool = false - this.Corporate = &corporate - return &this -} - -// NewCustomerInfoResponseWithDefaults instantiates a new CustomerInfoResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCustomerInfoResponseWithDefaults() *CustomerInfoResponse { - this := CustomerInfoResponse{} - var corporate bool = false - this.Corporate = &corporate - return &this -} - -// GetName returns the Name field value if set, zero value otherwise. -func (o *CustomerInfoResponse) GetName() string { - if o == nil || IsNil(o.Name) { - var ret string - return ret - } - return *o.Name -} - -// GetNameOk returns a tuple with the Name field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CustomerInfoResponse) GetNameOk() (*string, bool) { - if o == nil || IsNil(o.Name) { - return nil, false - } - return o.Name, true -} - -// HasName returns a boolean if a field has been set. -func (o *CustomerInfoResponse) HasName() bool { - if o != nil && !IsNil(o.Name) { - return true - } - - return false -} - -// SetName gets a reference to the given string and assigns it to the Name field. -func (o *CustomerInfoResponse) SetName(v string) { - o.Name = &v -} - -// GetEmail returns the Email field value if set, zero value otherwise. -func (o *CustomerInfoResponse) GetEmail() string { - if o == nil || IsNil(o.Email) { - var ret string - return ret - } - return *o.Email -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CustomerInfoResponse) GetEmailOk() (*string, bool) { - if o == nil || IsNil(o.Email) { - return nil, false - } - return o.Email, true -} - -// HasEmail returns a boolean if a field has been set. -func (o *CustomerInfoResponse) HasEmail() bool { - if o != nil && !IsNil(o.Email) { - return true - } - - return false -} - -// SetEmail gets a reference to the given string and assigns it to the Email field. -func (o *CustomerInfoResponse) SetEmail(v string) { - o.Email = &v -} - -// GetPhone returns the Phone field value if set, zero value otherwise. -func (o *CustomerInfoResponse) GetPhone() string { - if o == nil || IsNil(o.Phone) { - var ret string - return ret - } - return *o.Phone -} - -// GetPhoneOk returns a tuple with the Phone field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CustomerInfoResponse) GetPhoneOk() (*string, bool) { - if o == nil || IsNil(o.Phone) { - return nil, false - } - return o.Phone, true -} - -// HasPhone returns a boolean if a field has been set. -func (o *CustomerInfoResponse) HasPhone() bool { - if o != nil && !IsNil(o.Phone) { - return true - } - - return false -} - -// SetPhone gets a reference to the given string and assigns it to the Phone field. -func (o *CustomerInfoResponse) SetPhone(v string) { - o.Phone = &v -} - -// GetCorporate returns the Corporate field value if set, zero value otherwise. -func (o *CustomerInfoResponse) GetCorporate() bool { - if o == nil || IsNil(o.Corporate) { - var ret bool - return ret - } - return *o.Corporate -} - -// GetCorporateOk returns a tuple with the Corporate field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CustomerInfoResponse) GetCorporateOk() (*bool, bool) { - if o == nil || IsNil(o.Corporate) { - return nil, false - } - return o.Corporate, true -} - -// HasCorporate returns a boolean if a field has been set. -func (o *CustomerInfoResponse) HasCorporate() bool { - if o != nil && !IsNil(o.Corporate) { - return true - } - - return false -} - -// SetCorporate gets a reference to the given bool and assigns it to the Corporate field. -func (o *CustomerInfoResponse) SetCorporate(v bool) { - o.Corporate = &v -} - -// GetObject returns the Object field value if set, zero value otherwise. -func (o *CustomerInfoResponse) GetObject() string { - if o == nil || IsNil(o.Object) { - var ret string - return ret - } - return *o.Object -} - -// GetObjectOk returns a tuple with the Object field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CustomerInfoResponse) GetObjectOk() (*string, bool) { - if o == nil || IsNil(o.Object) { - return nil, false - } - return o.Object, true -} - -// HasObject returns a boolean if a field has been set. -func (o *CustomerInfoResponse) HasObject() bool { - if o != nil && !IsNil(o.Object) { - return true - } - - return false -} - -// SetObject gets a reference to the given string and assigns it to the Object field. -func (o *CustomerInfoResponse) SetObject(v string) { - o.Object = &v -} - -func (o CustomerInfoResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CustomerInfoResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Name) { - toSerialize["name"] = o.Name - } - if !IsNil(o.Email) { - toSerialize["email"] = o.Email - } - if !IsNil(o.Phone) { - toSerialize["phone"] = o.Phone - } - if !IsNil(o.Corporate) { - toSerialize["corporate"] = o.Corporate - } - if !IsNil(o.Object) { - toSerialize["object"] = o.Object - } - return toSerialize, nil -} - -type NullableCustomerInfoResponse struct { - value *CustomerInfoResponse - isSet bool -} - -func (v NullableCustomerInfoResponse) Get() *CustomerInfoResponse { - return v.value -} - -func (v *NullableCustomerInfoResponse) Set(val *CustomerInfoResponse) { - v.value = val - v.isSet = true -} - -func (v NullableCustomerInfoResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableCustomerInfoResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCustomerInfoResponse(val *CustomerInfoResponse) *NullableCustomerInfoResponse { - return &NullableCustomerInfoResponse{value: val, isSet: true} -} - -func (v NullableCustomerInfoResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCustomerInfoResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_events_webhook_resend_response.go b/model_events_webhook_resend_response.go deleted file mode 100644 index 8e68956..0000000 --- a/model_events_webhook_resend_response.go +++ /dev/null @@ -1,307 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the EventsWebhookResendResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EventsWebhookResendResponse{} - -// EventsWebhookResendResponse event model -type EventsWebhookResendResponse struct { - FailedAttempts *int32 `json:"failed_attempts,omitempty"` - Id *string `json:"id,omitempty"` - LastAttemptedAt *int32 `json:"last_attempted_at,omitempty"` - LastHttpResponseStatus *int32 `json:"last_http_response_status,omitempty"` - ResponseData map[string]interface{} `json:"response_data,omitempty"` - Url *string `json:"url,omitempty"` -} - -// NewEventsWebhookResendResponse instantiates a new EventsWebhookResendResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEventsWebhookResendResponse() *EventsWebhookResendResponse { - this := EventsWebhookResendResponse{} - return &this -} - -// NewEventsWebhookResendResponseWithDefaults instantiates a new EventsWebhookResendResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEventsWebhookResendResponseWithDefaults() *EventsWebhookResendResponse { - this := EventsWebhookResendResponse{} - return &this -} - -// GetFailedAttempts returns the FailedAttempts field value if set, zero value otherwise. -func (o *EventsWebhookResendResponse) GetFailedAttempts() int32 { - if o == nil || IsNil(o.FailedAttempts) { - var ret int32 - return ret - } - return *o.FailedAttempts -} - -// GetFailedAttemptsOk returns a tuple with the FailedAttempts field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventsWebhookResendResponse) GetFailedAttemptsOk() (*int32, bool) { - if o == nil || IsNil(o.FailedAttempts) { - return nil, false - } - return o.FailedAttempts, true -} - -// HasFailedAttempts returns a boolean if a field has been set. -func (o *EventsWebhookResendResponse) HasFailedAttempts() bool { - if o != nil && !IsNil(o.FailedAttempts) { - return true - } - - return false -} - -// SetFailedAttempts gets a reference to the given int32 and assigns it to the FailedAttempts field. -func (o *EventsWebhookResendResponse) SetFailedAttempts(v int32) { - o.FailedAttempts = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *EventsWebhookResendResponse) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventsWebhookResendResponse) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *EventsWebhookResendResponse) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *EventsWebhookResendResponse) SetId(v string) { - o.Id = &v -} - -// GetLastAttemptedAt returns the LastAttemptedAt field value if set, zero value otherwise. -func (o *EventsWebhookResendResponse) GetLastAttemptedAt() int32 { - if o == nil || IsNil(o.LastAttemptedAt) { - var ret int32 - return ret - } - return *o.LastAttemptedAt -} - -// GetLastAttemptedAtOk returns a tuple with the LastAttemptedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventsWebhookResendResponse) GetLastAttemptedAtOk() (*int32, bool) { - if o == nil || IsNil(o.LastAttemptedAt) { - return nil, false - } - return o.LastAttemptedAt, true -} - -// HasLastAttemptedAt returns a boolean if a field has been set. -func (o *EventsWebhookResendResponse) HasLastAttemptedAt() bool { - if o != nil && !IsNil(o.LastAttemptedAt) { - return true - } - - return false -} - -// SetLastAttemptedAt gets a reference to the given int32 and assigns it to the LastAttemptedAt field. -func (o *EventsWebhookResendResponse) SetLastAttemptedAt(v int32) { - o.LastAttemptedAt = &v -} - -// GetLastHttpResponseStatus returns the LastHttpResponseStatus field value if set, zero value otherwise. -func (o *EventsWebhookResendResponse) GetLastHttpResponseStatus() int32 { - if o == nil || IsNil(o.LastHttpResponseStatus) { - var ret int32 - return ret - } - return *o.LastHttpResponseStatus -} - -// GetLastHttpResponseStatusOk returns a tuple with the LastHttpResponseStatus field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventsWebhookResendResponse) GetLastHttpResponseStatusOk() (*int32, bool) { - if o == nil || IsNil(o.LastHttpResponseStatus) { - return nil, false - } - return o.LastHttpResponseStatus, true -} - -// HasLastHttpResponseStatus returns a boolean if a field has been set. -func (o *EventsWebhookResendResponse) HasLastHttpResponseStatus() bool { - if o != nil && !IsNil(o.LastHttpResponseStatus) { - return true - } - - return false -} - -// SetLastHttpResponseStatus gets a reference to the given int32 and assigns it to the LastHttpResponseStatus field. -func (o *EventsWebhookResendResponse) SetLastHttpResponseStatus(v int32) { - o.LastHttpResponseStatus = &v -} - -// GetResponseData returns the ResponseData field value if set, zero value otherwise. -func (o *EventsWebhookResendResponse) GetResponseData() map[string]interface{} { - if o == nil || IsNil(o.ResponseData) { - var ret map[string]interface{} - return ret - } - return o.ResponseData -} - -// GetResponseDataOk returns a tuple with the ResponseData field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventsWebhookResendResponse) GetResponseDataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.ResponseData) { - return map[string]interface{}{}, false - } - return o.ResponseData, true -} - -// HasResponseData returns a boolean if a field has been set. -func (o *EventsWebhookResendResponse) HasResponseData() bool { - if o != nil && !IsNil(o.ResponseData) { - return true - } - - return false -} - -// SetResponseData gets a reference to the given map[string]interface{} and assigns it to the ResponseData field. -func (o *EventsWebhookResendResponse) SetResponseData(v map[string]interface{}) { - o.ResponseData = v -} - -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *EventsWebhookResendResponse) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventsWebhookResendResponse) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *EventsWebhookResendResponse) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *EventsWebhookResendResponse) SetUrl(v string) { - o.Url = &v -} - -func (o EventsWebhookResendResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EventsWebhookResendResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.FailedAttempts) { - toSerialize["failed_attempts"] = o.FailedAttempts - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.LastAttemptedAt) { - toSerialize["last_attempted_at"] = o.LastAttemptedAt - } - if !IsNil(o.LastHttpResponseStatus) { - toSerialize["last_http_response_status"] = o.LastHttpResponseStatus - } - if !IsNil(o.ResponseData) { - toSerialize["response_data"] = o.ResponseData - } - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } - return toSerialize, nil -} - -type NullableEventsWebhookResendResponse struct { - value *EventsWebhookResendResponse - isSet bool -} - -func (v NullableEventsWebhookResendResponse) Get() *EventsWebhookResendResponse { - return v.value -} - -func (v *NullableEventsWebhookResendResponse) Set(val *EventsWebhookResendResponse) { - v.value = val - v.isSet = true -} - -func (v NullableEventsWebhookResendResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableEventsWebhookResendResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEventsWebhookResendResponse(val *EventsWebhookResendResponse) *NullableEventsWebhookResendResponse { - return &NullableEventsWebhookResendResponse{value: val, isSet: true} -} - -func (v NullableEventsWebhookResendResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEventsWebhookResendResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_order_response_fiscal_entity.go b/model_order_response_fiscal_entity.go deleted file mode 100644 index 2ae4641..0000000 --- a/model_order_response_fiscal_entity.go +++ /dev/null @@ -1,235 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the OrderResponseFiscalEntity type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OrderResponseFiscalEntity{} - -// OrderResponseFiscalEntity struct for OrderResponseFiscalEntity -type OrderResponseFiscalEntity struct { - Address *OrderResponseFiscalEntityAddress `json:"address,omitempty"` - TaxId *string `json:"tax_id,omitempty"` - Id *string `json:"id,omitempty"` - Object *string `json:"object,omitempty"` -} - -// NewOrderResponseFiscalEntity instantiates a new OrderResponseFiscalEntity object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOrderResponseFiscalEntity() *OrderResponseFiscalEntity { - this := OrderResponseFiscalEntity{} - return &this -} - -// NewOrderResponseFiscalEntityWithDefaults instantiates a new OrderResponseFiscalEntity object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOrderResponseFiscalEntityWithDefaults() *OrderResponseFiscalEntity { - this := OrderResponseFiscalEntity{} - return &this -} - -// GetAddress returns the Address field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntity) GetAddress() OrderResponseFiscalEntityAddress { - if o == nil || IsNil(o.Address) { - var ret OrderResponseFiscalEntityAddress - return ret - } - return *o.Address -} - -// GetAddressOk returns a tuple with the Address field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntity) GetAddressOk() (*OrderResponseFiscalEntityAddress, bool) { - if o == nil || IsNil(o.Address) { - return nil, false - } - return o.Address, true -} - -// HasAddress returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntity) HasAddress() bool { - if o != nil && !IsNil(o.Address) { - return true - } - - return false -} - -// SetAddress gets a reference to the given OrderResponseFiscalEntityAddress and assigns it to the Address field. -func (o *OrderResponseFiscalEntity) SetAddress(v OrderResponseFiscalEntityAddress) { - o.Address = &v -} - -// GetTaxId returns the TaxId field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntity) GetTaxId() string { - if o == nil || IsNil(o.TaxId) { - var ret string - return ret - } - return *o.TaxId -} - -// GetTaxIdOk returns a tuple with the TaxId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntity) GetTaxIdOk() (*string, bool) { - if o == nil || IsNil(o.TaxId) { - return nil, false - } - return o.TaxId, true -} - -// HasTaxId returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntity) HasTaxId() bool { - if o != nil && !IsNil(o.TaxId) { - return true - } - - return false -} - -// SetTaxId gets a reference to the given string and assigns it to the TaxId field. -func (o *OrderResponseFiscalEntity) SetTaxId(v string) { - o.TaxId = &v -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntity) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntity) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntity) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *OrderResponseFiscalEntity) SetId(v string) { - o.Id = &v -} - -// GetObject returns the Object field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntity) GetObject() string { - if o == nil || IsNil(o.Object) { - var ret string - return ret - } - return *o.Object -} - -// GetObjectOk returns a tuple with the Object field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntity) GetObjectOk() (*string, bool) { - if o == nil || IsNil(o.Object) { - return nil, false - } - return o.Object, true -} - -// HasObject returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntity) HasObject() bool { - if o != nil && !IsNil(o.Object) { - return true - } - - return false -} - -// SetObject gets a reference to the given string and assigns it to the Object field. -func (o *OrderResponseFiscalEntity) SetObject(v string) { - o.Object = &v -} - -func (o OrderResponseFiscalEntity) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OrderResponseFiscalEntity) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Address) { - toSerialize["address"] = o.Address - } - if !IsNil(o.TaxId) { - toSerialize["tax_id"] = o.TaxId - } - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Object) { - toSerialize["object"] = o.Object - } - return toSerialize, nil -} - -type NullableOrderResponseFiscalEntity struct { - value *OrderResponseFiscalEntity - isSet bool -} - -func (v NullableOrderResponseFiscalEntity) Get() *OrderResponseFiscalEntity { - return v.value -} - -func (v *NullableOrderResponseFiscalEntity) Set(val *OrderResponseFiscalEntity) { - v.value = val - v.isSet = true -} - -func (v NullableOrderResponseFiscalEntity) IsSet() bool { - return v.isSet -} - -func (v *NullableOrderResponseFiscalEntity) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOrderResponseFiscalEntity(val *OrderResponseFiscalEntity) *NullableOrderResponseFiscalEntity { - return &NullableOrderResponseFiscalEntity{value: val, isSet: true} -} - -func (v NullableOrderResponseFiscalEntity) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOrderResponseFiscalEntity) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_order_response_fiscal_entity_address.go b/model_order_response_fiscal_entity_address.go deleted file mode 100644 index d6d30c5..0000000 --- a/model_order_response_fiscal_entity_address.go +++ /dev/null @@ -1,389 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the OrderResponseFiscalEntityAddress type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OrderResponseFiscalEntityAddress{} - -// OrderResponseFiscalEntityAddress struct for OrderResponseFiscalEntityAddress -type OrderResponseFiscalEntityAddress struct { - Street1 string `json:"street1"` - Street2 *string `json:"street2,omitempty"` - PostalCode string `json:"postal_code"` - City string `json:"city"` - State *string `json:"state,omitempty"` - // this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - Country *string `json:"country,omitempty"` - Residential *bool `json:"residential,omitempty"` - ExternalNumber *string `json:"external_number,omitempty"` - Object *string `json:"object,omitempty"` -} - -// NewOrderResponseFiscalEntityAddress instantiates a new OrderResponseFiscalEntityAddress object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOrderResponseFiscalEntityAddress(street1 string, postalCode string, city string) *OrderResponseFiscalEntityAddress { - this := OrderResponseFiscalEntityAddress{} - this.Street1 = street1 - this.PostalCode = postalCode - this.City = city - return &this -} - -// NewOrderResponseFiscalEntityAddressWithDefaults instantiates a new OrderResponseFiscalEntityAddress object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOrderResponseFiscalEntityAddressWithDefaults() *OrderResponseFiscalEntityAddress { - this := OrderResponseFiscalEntityAddress{} - return &this -} - -// GetStreet1 returns the Street1 field value -func (o *OrderResponseFiscalEntityAddress) GetStreet1() string { - if o == nil { - var ret string - return ret - } - - return o.Street1 -} - -// GetStreet1Ok returns a tuple with the Street1 field value -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetStreet1Ok() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Street1, true -} - -// SetStreet1 sets field value -func (o *OrderResponseFiscalEntityAddress) SetStreet1(v string) { - o.Street1 = v -} - -// GetStreet2 returns the Street2 field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddress) GetStreet2() string { - if o == nil || IsNil(o.Street2) { - var ret string - return ret - } - return *o.Street2 -} - -// GetStreet2Ok returns a tuple with the Street2 field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetStreet2Ok() (*string, bool) { - if o == nil || IsNil(o.Street2) { - return nil, false - } - return o.Street2, true -} - -// HasStreet2 returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddress) HasStreet2() bool { - if o != nil && !IsNil(o.Street2) { - return true - } - - return false -} - -// SetStreet2 gets a reference to the given string and assigns it to the Street2 field. -func (o *OrderResponseFiscalEntityAddress) SetStreet2(v string) { - o.Street2 = &v -} - -// GetPostalCode returns the PostalCode field value -func (o *OrderResponseFiscalEntityAddress) GetPostalCode() string { - if o == nil { - var ret string - return ret - } - - return o.PostalCode -} - -// GetPostalCodeOk returns a tuple with the PostalCode field value -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetPostalCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.PostalCode, true -} - -// SetPostalCode sets field value -func (o *OrderResponseFiscalEntityAddress) SetPostalCode(v string) { - o.PostalCode = v -} - -// GetCity returns the City field value -func (o *OrderResponseFiscalEntityAddress) GetCity() string { - if o == nil { - var ret string - return ret - } - - return o.City -} - -// GetCityOk returns a tuple with the City field value -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetCityOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.City, true -} - -// SetCity sets field value -func (o *OrderResponseFiscalEntityAddress) SetCity(v string) { - o.City = v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddress) GetState() string { - if o == nil || IsNil(o.State) { - var ret string - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddress) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given string and assigns it to the State field. -func (o *OrderResponseFiscalEntityAddress) SetState(v string) { - o.State = &v -} - -// GetCountry returns the Country field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddress) GetCountry() string { - if o == nil || IsNil(o.Country) { - var ret string - return ret - } - return *o.Country -} - -// GetCountryOk returns a tuple with the Country field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetCountryOk() (*string, bool) { - if o == nil || IsNil(o.Country) { - return nil, false - } - return o.Country, true -} - -// HasCountry returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddress) HasCountry() bool { - if o != nil && !IsNil(o.Country) { - return true - } - - return false -} - -// SetCountry gets a reference to the given string and assigns it to the Country field. -func (o *OrderResponseFiscalEntityAddress) SetCountry(v string) { - o.Country = &v -} - -// GetResidential returns the Residential field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddress) GetResidential() bool { - if o == nil || IsNil(o.Residential) { - var ret bool - return ret - } - return *o.Residential -} - -// GetResidentialOk returns a tuple with the Residential field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetResidentialOk() (*bool, bool) { - if o == nil || IsNil(o.Residential) { - return nil, false - } - return o.Residential, true -} - -// HasResidential returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddress) HasResidential() bool { - if o != nil && !IsNil(o.Residential) { - return true - } - - return false -} - -// SetResidential gets a reference to the given bool and assigns it to the Residential field. -func (o *OrderResponseFiscalEntityAddress) SetResidential(v bool) { - o.Residential = &v -} - -// GetExternalNumber returns the ExternalNumber field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddress) GetExternalNumber() string { - if o == nil || IsNil(o.ExternalNumber) { - var ret string - return ret - } - return *o.ExternalNumber -} - -// GetExternalNumberOk returns a tuple with the ExternalNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetExternalNumberOk() (*string, bool) { - if o == nil || IsNil(o.ExternalNumber) { - return nil, false - } - return o.ExternalNumber, true -} - -// HasExternalNumber returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddress) HasExternalNumber() bool { - if o != nil && !IsNil(o.ExternalNumber) { - return true - } - - return false -} - -// SetExternalNumber gets a reference to the given string and assigns it to the ExternalNumber field. -func (o *OrderResponseFiscalEntityAddress) SetExternalNumber(v string) { - o.ExternalNumber = &v -} - -// GetObject returns the Object field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddress) GetObject() string { - if o == nil || IsNil(o.Object) { - var ret string - return ret - } - return *o.Object -} - -// GetObjectOk returns a tuple with the Object field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddress) GetObjectOk() (*string, bool) { - if o == nil || IsNil(o.Object) { - return nil, false - } - return o.Object, true -} - -// HasObject returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddress) HasObject() bool { - if o != nil && !IsNil(o.Object) { - return true - } - - return false -} - -// SetObject gets a reference to the given string and assigns it to the Object field. -func (o *OrderResponseFiscalEntityAddress) SetObject(v string) { - o.Object = &v -} - -func (o OrderResponseFiscalEntityAddress) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OrderResponseFiscalEntityAddress) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["street1"] = o.Street1 - if !IsNil(o.Street2) { - toSerialize["street2"] = o.Street2 - } - toSerialize["postal_code"] = o.PostalCode - toSerialize["city"] = o.City - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - if !IsNil(o.Country) { - toSerialize["country"] = o.Country - } - if !IsNil(o.Residential) { - toSerialize["residential"] = o.Residential - } - if !IsNil(o.ExternalNumber) { - toSerialize["external_number"] = o.ExternalNumber - } - if !IsNil(o.Object) { - toSerialize["object"] = o.Object - } - return toSerialize, nil -} - -type NullableOrderResponseFiscalEntityAddress struct { - value *OrderResponseFiscalEntityAddress - isSet bool -} - -func (v NullableOrderResponseFiscalEntityAddress) Get() *OrderResponseFiscalEntityAddress { - return v.value -} - -func (v *NullableOrderResponseFiscalEntityAddress) Set(val *OrderResponseFiscalEntityAddress) { - v.value = val - v.isSet = true -} - -func (v NullableOrderResponseFiscalEntityAddress) IsSet() bool { - return v.isSet -} - -func (v *NullableOrderResponseFiscalEntityAddress) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOrderResponseFiscalEntityAddress(val *OrderResponseFiscalEntityAddress) *NullableOrderResponseFiscalEntityAddress { - return &NullableOrderResponseFiscalEntityAddress{value: val, isSet: true} -} - -func (v NullableOrderResponseFiscalEntityAddress) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOrderResponseFiscalEntityAddress) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_order_response_fiscal_entity_address_all_of.go b/model_order_response_fiscal_entity_address_all_of.go deleted file mode 100644 index b148ac8..0000000 --- a/model_order_response_fiscal_entity_address_all_of.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the OrderResponseFiscalEntityAddressAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OrderResponseFiscalEntityAddressAllOf{} - -// OrderResponseFiscalEntityAddressAllOf struct for OrderResponseFiscalEntityAddressAllOf -type OrderResponseFiscalEntityAddressAllOf struct { - Object *string `json:"object,omitempty"` -} - -// NewOrderResponseFiscalEntityAddressAllOf instantiates a new OrderResponseFiscalEntityAddressAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOrderResponseFiscalEntityAddressAllOf() *OrderResponseFiscalEntityAddressAllOf { - this := OrderResponseFiscalEntityAddressAllOf{} - return &this -} - -// NewOrderResponseFiscalEntityAddressAllOfWithDefaults instantiates a new OrderResponseFiscalEntityAddressAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOrderResponseFiscalEntityAddressAllOfWithDefaults() *OrderResponseFiscalEntityAddressAllOf { - this := OrderResponseFiscalEntityAddressAllOf{} - return &this -} - -// GetObject returns the Object field value if set, zero value otherwise. -func (o *OrderResponseFiscalEntityAddressAllOf) GetObject() string { - if o == nil || IsNil(o.Object) { - var ret string - return ret - } - return *o.Object -} - -// GetObjectOk returns a tuple with the Object field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *OrderResponseFiscalEntityAddressAllOf) GetObjectOk() (*string, bool) { - if o == nil || IsNil(o.Object) { - return nil, false - } - return o.Object, true -} - -// HasObject returns a boolean if a field has been set. -func (o *OrderResponseFiscalEntityAddressAllOf) HasObject() bool { - if o != nil && !IsNil(o.Object) { - return true - } - - return false -} - -// SetObject gets a reference to the given string and assigns it to the Object field. -func (o *OrderResponseFiscalEntityAddressAllOf) SetObject(v string) { - o.Object = &v -} - -func (o OrderResponseFiscalEntityAddressAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OrderResponseFiscalEntityAddressAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Object) { - toSerialize["object"] = o.Object - } - return toSerialize, nil -} - -type NullableOrderResponseFiscalEntityAddressAllOf struct { - value *OrderResponseFiscalEntityAddressAllOf - isSet bool -} - -func (v NullableOrderResponseFiscalEntityAddressAllOf) Get() *OrderResponseFiscalEntityAddressAllOf { - return v.value -} - -func (v *NullableOrderResponseFiscalEntityAddressAllOf) Set(val *OrderResponseFiscalEntityAddressAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableOrderResponseFiscalEntityAddressAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableOrderResponseFiscalEntityAddressAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOrderResponseFiscalEntityAddressAllOf(val *OrderResponseFiscalEntityAddressAllOf) *NullableOrderResponseFiscalEntityAddressAllOf { - return &NullableOrderResponseFiscalEntityAddressAllOf{value: val, isSet: true} -} - -func (v NullableOrderResponseFiscalEntityAddressAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOrderResponseFiscalEntityAddressAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_risk_rules_list_all_of.go b/model_risk_rules_list_all_of.go deleted file mode 100644 index e94ff66..0000000 --- a/model_risk_rules_list_all_of.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the RiskRulesListAllOf type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RiskRulesListAllOf{} - -// RiskRulesListAllOf struct for RiskRulesListAllOf -type RiskRulesListAllOf struct { - Data []RiskRulesListAllOfData `json:"data,omitempty"` -} - -// NewRiskRulesListAllOf instantiates a new RiskRulesListAllOf object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRiskRulesListAllOf() *RiskRulesListAllOf { - this := RiskRulesListAllOf{} - return &this -} - -// NewRiskRulesListAllOfWithDefaults instantiates a new RiskRulesListAllOf object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRiskRulesListAllOfWithDefaults() *RiskRulesListAllOf { - this := RiskRulesListAllOf{} - return &this -} - -// GetData returns the Data field value if set, zero value otherwise. -func (o *RiskRulesListAllOf) GetData() []RiskRulesListAllOfData { - if o == nil || IsNil(o.Data) { - var ret []RiskRulesListAllOfData - return ret - } - return o.Data -} - -// GetDataOk returns a tuple with the Data field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOf) GetDataOk() ([]RiskRulesListAllOfData, bool) { - if o == nil || IsNil(o.Data) { - return nil, false - } - return o.Data, true -} - -// HasData returns a boolean if a field has been set. -func (o *RiskRulesListAllOf) HasData() bool { - if o != nil && !IsNil(o.Data) { - return true - } - - return false -} - -// SetData gets a reference to the given []RiskRulesListAllOfData and assigns it to the Data field. -func (o *RiskRulesListAllOf) SetData(v []RiskRulesListAllOfData) { - o.Data = v -} - -func (o RiskRulesListAllOf) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RiskRulesListAllOf) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Data) { - toSerialize["data"] = o.Data - } - return toSerialize, nil -} - -type NullableRiskRulesListAllOf struct { - value *RiskRulesListAllOf - isSet bool -} - -func (v NullableRiskRulesListAllOf) Get() *RiskRulesListAllOf { - return v.value -} - -func (v *NullableRiskRulesListAllOf) Set(val *RiskRulesListAllOf) { - v.value = val - v.isSet = true -} - -func (v NullableRiskRulesListAllOf) IsSet() bool { - return v.isSet -} - -func (v *NullableRiskRulesListAllOf) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRiskRulesListAllOf(val *RiskRulesListAllOf) *NullableRiskRulesListAllOf { - return &NullableRiskRulesListAllOf{value: val, isSet: true} -} - -func (v NullableRiskRulesListAllOf) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRiskRulesListAllOf) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_risk_rules_list_all_of_data.go b/model_risk_rules_list_all_of_data.go deleted file mode 100644 index 6cf1aa6..0000000 --- a/model_risk_rules_list_all_of_data.go +++ /dev/null @@ -1,350 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the RiskRulesListAllOfData type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RiskRulesListAllOfData{} - -// RiskRulesListAllOfData struct for RiskRulesListAllOfData -type RiskRulesListAllOfData struct { - // rule id - Id *string `json:"id,omitempty"` - // field to be used for the rule - Field *string `json:"field,omitempty"` - // rule creation date - CreatedAt *string `json:"created_at,omitempty"` - // value to be used for the rule - Value *string `json:"value,omitempty"` - // if the rule is global - IsGlobal *bool `json:"is_global,omitempty"` - // if the rule is test - IsTest *bool `json:"is_test,omitempty"` - // description of the rule - Description *string `json:"description,omitempty"` -} - -// NewRiskRulesListAllOfData instantiates a new RiskRulesListAllOfData object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRiskRulesListAllOfData() *RiskRulesListAllOfData { - this := RiskRulesListAllOfData{} - return &this -} - -// NewRiskRulesListAllOfDataWithDefaults instantiates a new RiskRulesListAllOfData object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRiskRulesListAllOfDataWithDefaults() *RiskRulesListAllOfData { - this := RiskRulesListAllOfData{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RiskRulesListAllOfData) SetId(v string) { - o.Id = &v -} - -// GetField returns the Field field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetField() string { - if o == nil || IsNil(o.Field) { - var ret string - return ret - } - return *o.Field -} - -// GetFieldOk returns a tuple with the Field field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetFieldOk() (*string, bool) { - if o == nil || IsNil(o.Field) { - return nil, false - } - return o.Field, true -} - -// HasField returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasField() bool { - if o != nil && !IsNil(o.Field) { - return true - } - - return false -} - -// SetField gets a reference to the given string and assigns it to the Field field. -func (o *RiskRulesListAllOfData) SetField(v string) { - o.Field = &v -} - -// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetCreatedAt() string { - if o == nil || IsNil(o.CreatedAt) { - var ret string - return ret - } - return *o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetCreatedAtOk() (*string, bool) { - if o == nil || IsNil(o.CreatedAt) { - return nil, false - } - return o.CreatedAt, true -} - -// HasCreatedAt returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasCreatedAt() bool { - if o != nil && !IsNil(o.CreatedAt) { - return true - } - - return false -} - -// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. -func (o *RiskRulesListAllOfData) SetCreatedAt(v string) { - o.CreatedAt = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetValue() string { - if o == nil || IsNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetValueOk() (*string, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *RiskRulesListAllOfData) SetValue(v string) { - o.Value = &v -} - -// GetIsGlobal returns the IsGlobal field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetIsGlobal() bool { - if o == nil || IsNil(o.IsGlobal) { - var ret bool - return ret - } - return *o.IsGlobal -} - -// GetIsGlobalOk returns a tuple with the IsGlobal field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetIsGlobalOk() (*bool, bool) { - if o == nil || IsNil(o.IsGlobal) { - return nil, false - } - return o.IsGlobal, true -} - -// HasIsGlobal returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasIsGlobal() bool { - if o != nil && !IsNil(o.IsGlobal) { - return true - } - - return false -} - -// SetIsGlobal gets a reference to the given bool and assigns it to the IsGlobal field. -func (o *RiskRulesListAllOfData) SetIsGlobal(v bool) { - o.IsGlobal = &v -} - -// GetIsTest returns the IsTest field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetIsTest() bool { - if o == nil || IsNil(o.IsTest) { - var ret bool - return ret - } - return *o.IsTest -} - -// GetIsTestOk returns a tuple with the IsTest field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetIsTestOk() (*bool, bool) { - if o == nil || IsNil(o.IsTest) { - return nil, false - } - return o.IsTest, true -} - -// HasIsTest returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasIsTest() bool { - if o != nil && !IsNil(o.IsTest) { - return true - } - - return false -} - -// SetIsTest gets a reference to the given bool and assigns it to the IsTest field. -func (o *RiskRulesListAllOfData) SetIsTest(v bool) { - o.IsTest = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RiskRulesListAllOfData) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListAllOfData) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RiskRulesListAllOfData) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RiskRulesListAllOfData) SetDescription(v string) { - o.Description = &v -} - -func (o RiskRulesListAllOfData) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RiskRulesListAllOfData) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Field) { - toSerialize["field"] = o.Field - } - if !IsNil(o.CreatedAt) { - toSerialize["created_at"] = o.CreatedAt - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.IsGlobal) { - toSerialize["is_global"] = o.IsGlobal - } - if !IsNil(o.IsTest) { - toSerialize["is_test"] = o.IsTest - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - return toSerialize, nil -} - -type NullableRiskRulesListAllOfData struct { - value *RiskRulesListAllOfData - isSet bool -} - -func (v NullableRiskRulesListAllOfData) Get() *RiskRulesListAllOfData { - return v.value -} - -func (v *NullableRiskRulesListAllOfData) Set(val *RiskRulesListAllOfData) { - v.value = val - v.isSet = true -} - -func (v NullableRiskRulesListAllOfData) IsSet() bool { - return v.isSet -} - -func (v *NullableRiskRulesListAllOfData) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRiskRulesListAllOfData(val *RiskRulesListAllOfData) *NullableRiskRulesListAllOfData { - return &NullableRiskRulesListAllOfData{value: val, isSet: true} -} - -func (v NullableRiskRulesListAllOfData) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRiskRulesListAllOfData) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/model_risk_rules_list_data_inner.go b/model_risk_rules_list_data_inner.go deleted file mode 100644 index cdf6b37..0000000 --- a/model_risk_rules_list_data_inner.go +++ /dev/null @@ -1,235 +0,0 @@ -/* -Conekta API - -Conekta sdk - -API version: 2.1.0 -Contact: engineering@conekta.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package conekta - -import ( - "encoding/json" -) - -// checks if the RiskRulesListDataInner type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RiskRulesListDataInner{} - -// RiskRulesListDataInner struct for RiskRulesListDataInner -type RiskRulesListDataInner struct { - Id *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Value *string `json:"value,omitempty"` - Description *string `json:"description,omitempty"` -} - -// NewRiskRulesListDataInner instantiates a new RiskRulesListDataInner object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRiskRulesListDataInner() *RiskRulesListDataInner { - this := RiskRulesListDataInner{} - return &this -} - -// NewRiskRulesListDataInnerWithDefaults instantiates a new RiskRulesListDataInner object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRiskRulesListDataInnerWithDefaults() *RiskRulesListDataInner { - this := RiskRulesListDataInner{} - return &this -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *RiskRulesListDataInner) GetId() string { - if o == nil || IsNil(o.Id) { - var ret string - return ret - } - return *o.Id -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListDataInner) GetIdOk() (*string, bool) { - if o == nil || IsNil(o.Id) { - return nil, false - } - return o.Id, true -} - -// HasId returns a boolean if a field has been set. -func (o *RiskRulesListDataInner) HasId() bool { - if o != nil && !IsNil(o.Id) { - return true - } - - return false -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *RiskRulesListDataInner) SetId(v string) { - o.Id = &v -} - -// GetType returns the Type field value if set, zero value otherwise. -func (o *RiskRulesListDataInner) GetType() string { - if o == nil || IsNil(o.Type) { - var ret string - return ret - } - return *o.Type -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListDataInner) GetTypeOk() (*string, bool) { - if o == nil || IsNil(o.Type) { - return nil, false - } - return o.Type, true -} - -// HasType returns a boolean if a field has been set. -func (o *RiskRulesListDataInner) HasType() bool { - if o != nil && !IsNil(o.Type) { - return true - } - - return false -} - -// SetType gets a reference to the given string and assigns it to the Type field. -func (o *RiskRulesListDataInner) SetType(v string) { - o.Type = &v -} - -// GetValue returns the Value field value if set, zero value otherwise. -func (o *RiskRulesListDataInner) GetValue() string { - if o == nil || IsNil(o.Value) { - var ret string - return ret - } - return *o.Value -} - -// GetValueOk returns a tuple with the Value field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListDataInner) GetValueOk() (*string, bool) { - if o == nil || IsNil(o.Value) { - return nil, false - } - return o.Value, true -} - -// HasValue returns a boolean if a field has been set. -func (o *RiskRulesListDataInner) HasValue() bool { - if o != nil && !IsNil(o.Value) { - return true - } - - return false -} - -// SetValue gets a reference to the given string and assigns it to the Value field. -func (o *RiskRulesListDataInner) SetValue(v string) { - o.Value = &v -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *RiskRulesListDataInner) GetDescription() string { - if o == nil || IsNil(o.Description) { - var ret string - return ret - } - return *o.Description -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RiskRulesListDataInner) GetDescriptionOk() (*string, bool) { - if o == nil || IsNil(o.Description) { - return nil, false - } - return o.Description, true -} - -// HasDescription returns a boolean if a field has been set. -func (o *RiskRulesListDataInner) HasDescription() bool { - if o != nil && !IsNil(o.Description) { - return true - } - - return false -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *RiskRulesListDataInner) SetDescription(v string) { - o.Description = &v -} - -func (o RiskRulesListDataInner) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RiskRulesListDataInner) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Id) { - toSerialize["id"] = o.Id - } - if !IsNil(o.Type) { - toSerialize["type"] = o.Type - } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value - } - if !IsNil(o.Description) { - toSerialize["description"] = o.Description - } - return toSerialize, nil -} - -type NullableRiskRulesListDataInner struct { - value *RiskRulesListDataInner - isSet bool -} - -func (v NullableRiskRulesListDataInner) Get() *RiskRulesListDataInner { - return v.value -} - -func (v *NullableRiskRulesListDataInner) Set(val *RiskRulesListDataInner) { - v.value = val - v.isSet = true -} - -func (v NullableRiskRulesListDataInner) IsSet() bool { - return v.isSet -} - -func (v *NullableRiskRulesListDataInner) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRiskRulesListDataInner(val *RiskRulesListDataInner) *NullableRiskRulesListDataInner { - return &NullableRiskRulesListDataInner{value: val, isSet: true} -} - -func (v NullableRiskRulesListDataInner) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRiskRulesListDataInner) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/test/api_antifraud_test.go b/test/api_antifraud_test.go index 2650fe2..bf8033c 100644 --- a/test/api_antifraud_test.go +++ b/test/api_antifraud_test.go @@ -30,7 +30,7 @@ func Test_conekta_AntifraudApiService(t *testing.T) { Field: "field", Value: "value", } - resp, httpRes, err := apiClient.AntifraudApi.CreateRuleWhitelist(context.TODO()). + resp, httpRes, err := apiClient.AntifraudAPI.CreateRuleWhitelist(context.TODO()). CreateRiskRulesData(req). Execute() @@ -52,7 +52,7 @@ func Test_conekta_AntifraudApiService(t *testing.T) { Field: "field", Value: "value", } - resp, httpRes, err := apiClient.AntifraudApi.CreateRuleWhitelist(context.TODO()). + resp, httpRes, err := apiClient.AntifraudAPI.CreateRuleWhitelist(context.TODO()). CreateRiskRulesData(req). Execute() @@ -69,7 +69,7 @@ func Test_conekta_AntifraudApiService(t *testing.T) { }) t.Run("Test AntifraudApiService DeleteRuleBlacklist", func(t *testing.T) { - resp, httpRes, err := apiClient.AntifraudApi.DeleteRuleWhitelist(context.TODO(), "618c3f2fdb8b8da9be376afe"). + resp, httpRes, err := apiClient.AntifraudAPI.DeleteRuleWhitelist(context.TODO(), "618c3f2fdb8b8da9be376afe"). Execute() if err != nil { @@ -85,7 +85,7 @@ func Test_conekta_AntifraudApiService(t *testing.T) { }) t.Run("Test AntifraudApiService DeleteRuleWhitelist", func(t *testing.T) { - resp, httpRes, err := apiClient.AntifraudApi.DeleteRuleBlacklist(context.TODO(), "618c3f30db8b8da9be376b1e"). + resp, httpRes, err := apiClient.AntifraudAPI.DeleteRuleBlacklist(context.TODO(), "618c3f30db8b8da9be376b1e"). Execute() if err != nil { @@ -101,7 +101,7 @@ func Test_conekta_AntifraudApiService(t *testing.T) { }) t.Run("Test AntifraudApiService GetRuleBlacklist", func(t *testing.T) { - resp, httpRes, err := apiClient.AntifraudApi.GetRuleBlacklist(context.TODO()). + resp, httpRes, err := apiClient.AntifraudAPI.GetRuleBlacklist(context.TODO()). Execute() if err != nil { @@ -117,7 +117,7 @@ func Test_conekta_AntifraudApiService(t *testing.T) { }) t.Run("Test AntifraudApiService GetRuleWhitelist", func(t *testing.T) { - resp, httpRes, err := apiClient.AntifraudApi.GetRuleWhitelist(context.TODO()). + resp, httpRes, err := apiClient.AntifraudAPI.GetRuleWhitelist(context.TODO()). Execute() if err != nil { diff --git a/test/api_api_keys_test.go b/test/api_api_keys_test.go index 1a3e8dc..acd0dfa 100644 --- a/test/api_api_keys_test.go +++ b/test/api_api_keys_test.go @@ -29,7 +29,7 @@ func Test_conekta_ApiKeysApiService(t *testing.T) { Description: conekta.PtrString("description"), Role: "admin", } - resp, httpRes, err := apiClient.ApiKeysApi.CreateApiKey(context.TODO()). + resp, httpRes, err := apiClient.ApiKeysAPI.CreateApiKey(context.TODO()). ApiKeyRequest(rq). AcceptLanguage("es"). Execute() @@ -47,7 +47,7 @@ func Test_conekta_ApiKeysApiService(t *testing.T) { }) t.Run("Test ApiKeysApiService DeleteApiKey", func(t *testing.T) { - resp, httpRes, err := apiClient.ApiKeysApi.DeleteApiKey(context.TODO(), "64625cc9f3e02c00163f5e4d"). + resp, httpRes, err := apiClient.ApiKeysAPI.DeleteApiKey(context.TODO(), "64625cc9f3e02c00163f5e4d"). AcceptLanguage("es"). Execute() @@ -64,7 +64,7 @@ func Test_conekta_ApiKeysApiService(t *testing.T) { }) t.Run("Test ApiKeysApiService GetApiKey", func(t *testing.T) { - resp, httpRes, err := apiClient.ApiKeysApi.GetApiKey(context.TODO(), "64625cc9f3e02c00163f5e4d"). + resp, httpRes, err := apiClient.ApiKeysAPI.GetApiKey(context.TODO(), "64625cc9f3e02c00163f5e4d"). AcceptLanguage("es"). Execute() @@ -81,7 +81,7 @@ func Test_conekta_ApiKeysApiService(t *testing.T) { }) t.Run("Test ApiKeysApiService GetApiKeys", func(t *testing.T) { - resp, httpRes, err := apiClient.ApiKeysApi.GetApiKeys(context.TODO()). + resp, httpRes, err := apiClient.ApiKeysAPI.GetApiKeys(context.TODO()). Limit(20). AcceptLanguage("es"). Execute() @@ -103,7 +103,7 @@ func Test_conekta_ApiKeysApiService(t *testing.T) { Active: conekta.PtrBool(false), Description: conekta.PtrString("description"), } - resp, httpRes, err := apiClient.ApiKeysApi.UpdateApiKey(context.TODO(), "64625cc9f3e02c00163f5e4d"). + resp, httpRes, err := apiClient.ApiKeysAPI.UpdateApiKey(context.TODO(), "64625cc9f3e02c00163f5e4d"). ApiKeyUpdateRequest(rq). AcceptLanguage("es"). Execute() diff --git a/test/api_balances_test.go b/test/api_balances_test.go index e13e1da..c144d46 100644 --- a/test/api_balances_test.go +++ b/test/api_balances_test.go @@ -28,7 +28,7 @@ func Test_conekta_BalancesApiService(t *testing.T) { t.Skip("skip test") // remove to run test - resp, httpRes, err := apiClient.BalancesApi.GetBalance(context.Background()).Execute() + resp, httpRes, err := apiClient.BalancesAPI.GetBalance(context.Background()).Execute() if err != nil { t.Fatalf("expected err nil but was %v", err) diff --git a/test/api_charges_test.go b/test/api_charges_test.go index 0801352..e5d8b2d 100644 --- a/test/api_charges_test.go +++ b/test/api_charges_test.go @@ -25,7 +25,7 @@ func Test_conekta_ChargesApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test ChargesApiService GetCharges", func(t *testing.T) { - resp, httpRes, err := apiClient.ChargesApi.GetCharges(context.TODO()). + resp, httpRes, err := apiClient.ChargesAPI.GetCharges(context.TODO()). Limit(20). AcceptLanguage("es"). Execute() @@ -46,7 +46,7 @@ func Test_conekta_ChargesApiService(t *testing.T) { req := conekta.ChargeRequest{ Amount: conekta.PtrInt32(1000), } - resp, httpRes, err := apiClient.ChargesApi.OrdersCreateCharge(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). + resp, httpRes, err := apiClient.ChargesAPI.OrdersCreateCharge(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). ChargeRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_companies_test.go b/test/api_companies_test.go index a77e59e..5ef3c7e 100644 --- a/test/api_companies_test.go +++ b/test/api_companies_test.go @@ -25,7 +25,7 @@ func Test_conekta_CompaniesApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test CompaniesApiService GetCompanies", func(t *testing.T) { - resp, httpRes, err := apiClient.CompaniesApi.GetCompanies(context.TODO()). + resp, httpRes, err := apiClient.CompaniesAPI.GetCompanies(context.TODO()). AcceptLanguage("es"). Execute() @@ -42,7 +42,7 @@ func Test_conekta_CompaniesApiService(t *testing.T) { }) t.Run("Test CompaniesApiService GetCompany", func(t *testing.T) { - resp, httpRes, err := apiClient.CompaniesApi.GetCompany(context.TODO(), "5c537c4d27839876e2f18139"). + resp, httpRes, err := apiClient.CompaniesAPI.GetCompany(context.TODO(), "5c537c4d27839876e2f18139"). AcceptLanguage("es"). Execute() diff --git a/test/api_customers_test.go b/test/api_customers_test.go index f83112e..71d1a94 100644 --- a/test/api_customers_test.go +++ b/test/api_customers_test.go @@ -29,7 +29,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { Email: "foo@foo.com", Name: "Foo Foo", } - resp, httpRes, err := apiClient.CustomersApi.CreateCustomer(context.TODO()). + resp, httpRes, err := apiClient.CustomersAPI.CreateCustomer(context.TODO()). Customer(req). AcceptLanguage("es"). Execute() @@ -51,7 +51,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { Email: conekta.PtrString("foo@foo.com"), CompanyName: conekta.PtrString("FooCompany"), } - resp, httpRes, err := apiClient.CustomersApi.CreateCustomerFiscalEntities(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.CustomersAPI.CreateCustomerFiscalEntities(context.TODO(), "cus_2tYENskzTjjgkGQLt"). CustomerFiscalEntitiesRequest(req). AcceptLanguage("es"). Execute() @@ -69,7 +69,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { }) t.Run("Test CustomersApiService DeleteCustomerById", func(t *testing.T) { - resp, httpRes, err := apiClient.CustomersApi.DeleteCustomerById(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.CustomersAPI.DeleteCustomerById(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -86,7 +86,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { }) t.Run("Test CustomersApiService GetCustomerById", func(t *testing.T) { - resp, httpRes, err := apiClient.CustomersApi.GetCustomerById(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.CustomersAPI.GetCustomerById(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -103,7 +103,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { }) t.Run("Test CustomersApiService GetCustomers", func(t *testing.T) { - resp, httpRes, err := apiClient.CustomersApi.GetCustomers(context.TODO()). + resp, httpRes, err := apiClient.CustomersAPI.GetCustomers(context.TODO()). Limit(10). AcceptLanguage("es"). Execute() @@ -125,7 +125,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { Email: conekta.PtrString("foo@foo.com"), Name: conekta.PtrString("Foo Foo"), } - resp, httpRes, err := apiClient.CustomersApi.UpdateCustomer(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.CustomersAPI.UpdateCustomer(context.TODO(), "cus_2tYENskzTjjgkGQLt"). UpdateCustomer(req). AcceptLanguage("es"). Execute() @@ -147,7 +147,7 @@ func Test_conekta_CustomersApiService(t *testing.T) { Email: conekta.PtrString("foo@foo.com"), CompanyName: conekta.PtrString("FooCompany"), } - resp, httpRes, err := apiClient.CustomersApi.UpdateCustomerFiscalEntities(context.TODO(), "cus_2tYENskzTjjgkGQLt", "fis_ent_2tYENskzTjjgkGQLr"). + resp, httpRes, err := apiClient.CustomersAPI.UpdateCustomerFiscalEntities(context.TODO(), "cus_2tYENskzTjjgkGQLt", "fis_ent_2tYENskzTjjgkGQLr"). CustomerUpdateFiscalEntitiesRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_discounts_test.go b/test/api_discounts_test.go index 162065b..6b044f0 100644 --- a/test/api_discounts_test.go +++ b/test/api_discounts_test.go @@ -28,7 +28,7 @@ func Test_conekta_DiscountsApiService(t *testing.T) { req := conekta.OrderDiscountLinesRequest{ Amount: 1000, } - resp, httpRes, err := apiClient.DiscountsApi.OrdersCreateDiscountLine(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). + resp, httpRes, err := apiClient.DiscountsAPI.OrdersCreateDiscountLine(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). OrderDiscountLinesRequest(req). AcceptLanguage("es"). Execute() @@ -46,7 +46,7 @@ func Test_conekta_DiscountsApiService(t *testing.T) { }) t.Run("Test DiscountsApiService OrdersDeleteDiscountLines", func(t *testing.T) { - resp, httpRes, err := apiClient.DiscountsApi.OrdersDeleteDiscountLines(context.TODO(), "ord_2tPAmKCEJqh8RE6nY", "dis_lin_2tQQ58HPgPw7StE8z"). + resp, httpRes, err := apiClient.DiscountsAPI.OrdersDeleteDiscountLines(context.TODO(), "ord_2tPAmKCEJqh8RE6nY", "dis_lin_2tQQ58HPgPw7StE8z"). AcceptLanguage("es"). Execute() @@ -66,7 +66,7 @@ func Test_conekta_DiscountsApiService(t *testing.T) { req := conekta.UpdateOrderDiscountLinesRequest{ Amount: conekta.PtrInt64(2000), } - resp, httpRes, err := apiClient.DiscountsApi.OrdersUpdateDiscountLines(context.TODO(), "ord_2tPAmKCEJqh8RE6nY", "dis_lin_2tQQ58HPgPw7StE8z"). + resp, httpRes, err := apiClient.DiscountsAPI.OrdersUpdateDiscountLines(context.TODO(), "ord_2tPAmKCEJqh8RE6nY", "dis_lin_2tQQ58HPgPw7StE8z"). UpdateOrderDiscountLinesRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_events_test.go b/test/api_events_test.go index d6ad87e..f8070ed 100644 --- a/test/api_events_test.go +++ b/test/api_events_test.go @@ -25,7 +25,7 @@ func Test_conekta_EventsApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test EventsApiService GetEvent", func(t *testing.T) { - resp, httpRes, err := apiClient.EventsApi.GetEvent(context.TODO(), "63fe3d2ddf70970001cfb41a"). + resp, httpRes, err := apiClient.EventsAPI.GetEvent(context.TODO(), "63fe3d2ddf70970001cfb41a"). AcceptLanguage("es"). Execute() @@ -42,7 +42,7 @@ func Test_conekta_EventsApiService(t *testing.T) { }) t.Run("Test EventsApiService GetEvents", func(t *testing.T) { - resp, httpRes, err := apiClient.EventsApi.GetEvents(context.TODO()). + resp, httpRes, err := apiClient.EventsAPI.GetEvents(context.TODO()). AcceptLanguage("es"). Execute() @@ -59,7 +59,7 @@ func Test_conekta_EventsApiService(t *testing.T) { }) t.Run("Test EventsApiService ResendEvent", func(t *testing.T) { - resp, httpRes, err := apiClient.EventsApi.ResendEvent(context.TODO(), "6463d6e35a4c3e001819e760", "webhl_2tsv6NzWJHBWCkqGt"). + resp, httpRes, err := apiClient.EventsAPI.ResendEvent(context.TODO(), "6463d6e35a4c3e001819e760", "webhl_2tsv6NzWJHBWCkqGt"). AcceptLanguage("es"). Execute() diff --git a/test/api_logs_test.go b/test/api_logs_test.go index 26062af..de841fc 100644 --- a/test/api_logs_test.go +++ b/test/api_logs_test.go @@ -25,7 +25,7 @@ func Test_conekta_LogsApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test LogsApiService GetLogById", func(t *testing.T) { - resp, httpRes, err := apiClient.LogsApi.GetLogById(context.TODO(), "6419dd15b985080001fc280e"). + resp, httpRes, err := apiClient.LogsAPI.GetLogById(context.TODO(), "6419dd15b985080001fc280e"). AcceptLanguage("es"). Execute() @@ -42,7 +42,7 @@ func Test_conekta_LogsApiService(t *testing.T) { }) t.Run("Test LogsApiService GetLogs", func(t *testing.T) { - resp, httpRes, err := apiClient.LogsApi.GetLogs(context.TODO()). + resp, httpRes, err := apiClient.LogsAPI.GetLogs(context.TODO()). AcceptLanguage("es"). Execute() diff --git a/test/api_orders_test.go b/test/api_orders_test.go index d54e4b5..88d11d0 100644 --- a/test/api_orders_test.go +++ b/test/api_orders_test.go @@ -26,7 +26,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { t.Run("Test OrdersApiService CancelOrder", func(t *testing.T) { orderID := "ord_2tqaGQYZyvBsMKEgs" - resp, httpRes, err := apiClient.OrdersApi.CancelOrder(context.TODO(), orderID). + resp, httpRes, err := apiClient.OrdersAPI.CancelOrder(context.TODO(), orderID). AcceptLanguage("es"). Execute() @@ -44,6 +44,28 @@ func Test_conekta_OrdersApiService(t *testing.T) { t.Run("Test OrdersApiService CreateOrder", func(t *testing.T) { customerID := "cus_2tYENskzTjjgkGQLt" + + shippingContact := conekta.CustomerShippingContacts{ + Address: conekta.CustomerShippingContactsAddress{ + Street1: conekta.PtrString("Calle 123, int 2"), + City: conekta.PtrString("Guadalajara"), + State: conekta.PtrString("Jalisco"), + Country: conekta.PtrString("MX"), + PostalCode: conekta.PtrString("44100"), + }, + Metadata: map[string]interface{}{}, + } + fiscalEntityRequest := conekta.OrderFiscalEntityRequest{ + Address: conekta.FiscalEntityAddress{ + Street1: "Calle 123, int 2", + City: "Guadalajara", + State: conekta.PtrString("Jalisco"), + Country: "MX", + PostalCode: "44100", + }, + Metadata: map[string]interface{}{}, + } + req := conekta.OrderRequest{ Currency: "MXN", CustomerInfo: conekta.OrderRequestCustomerInfo{ @@ -55,8 +77,10 @@ func Test_conekta_OrdersApiService(t *testing.T) { UnitPrice: 1000, }, }, + ShippingContact: &shippingContact, + FiscalEntity: &fiscalEntityRequest, } - resp, httpRes, err := apiClient.OrdersApi.CreateOrder(context.TODO()).OrderRequest(req). + resp, httpRes, err := apiClient.OrdersAPI.CreateOrder(context.TODO()).OrderRequest(req). AcceptLanguage("es"). Execute() @@ -74,7 +98,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { t.Run("Test OrdersApiService GetOrderById", func(t *testing.T) { orderID := "ord_2tUigJ8DgBhbp6w5D" - resp, httpRes, err := apiClient.OrdersApi.GetOrderById(context.TODO(), orderID). + resp, httpRes, err := apiClient.OrdersAPI.GetOrderById(context.TODO(), orderID). AcceptLanguage("es"). Execute() @@ -91,7 +115,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { }) t.Run("Test OrdersApiService GetOrders", func(t *testing.T) { - resp, httpRes, err := apiClient.OrdersApi.GetOrders(context.TODO()).Limit(10). + resp, httpRes, err := apiClient.OrdersAPI.GetOrders(context.TODO()).Limit(10). AcceptLanguage("es"). Execute() @@ -110,7 +134,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { t.Run("Test OrdersApiService OrderCancelRefund", func(t *testing.T) { orderID := "ord_2tV52JvSom2w3E8bX" refundID := "6407b5bee1329a000175ba11" - resp, httpRes, err := apiClient.OrdersApi.OrderCancelRefund(context.TODO(), orderID, refundID). + resp, httpRes, err := apiClient.OrdersAPI.OrderCancelRefund(context.TODO(), orderID, refundID). AcceptLanguage("es"). Execute() @@ -132,7 +156,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { Reason: "reason", } orderID := "ord_2tUigJ8DgBhbp6w5D" - resp, httpRes, err := apiClient.OrdersApi.OrderRefund(context.TODO(), orderID). + resp, httpRes, err := apiClient.OrdersAPI.OrderRefund(context.TODO(), orderID). OrderRefundRequest(req). AcceptLanguage("es"). Execute() @@ -151,7 +175,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { t.Run("Test OrdersApiService OrdersCreateCapture", func(t *testing.T) { orderID := "ord_2tUigJ8DgBhbp6w5D" - resp, httpRes, err := apiClient.OrdersApi.OrdersCreateCapture(context.TODO(), orderID). + resp, httpRes, err := apiClient.OrdersAPI.OrdersCreateCapture(context.TODO(), orderID). AcceptLanguage("es"). Execute() @@ -181,7 +205,7 @@ func Test_conekta_OrdersApiService(t *testing.T) { }, } orderID := "ord_2tUigJ8DgBhbp6w5D" - resp, httpRes, err := apiClient.OrdersApi.UpdateOrder(context.TODO(), orderID). + resp, httpRes, err := apiClient.OrdersAPI.UpdateOrder(context.TODO(), orderID). OrderUpdateRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_payment_link_test.go b/test/api_payment_link_test.go index c619eca..76e9fb2 100644 --- a/test/api_payment_link_test.go +++ b/test/api_payment_link_test.go @@ -25,7 +25,7 @@ func Test_conekta_PaymentLinkApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test PaymentLinkApiService CancelCheckout", func(t *testing.T) { - resp, httpRes, err := apiClient.PaymentLinkApi.CancelCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). + resp, httpRes, err := apiClient.PaymentLinkAPI.CancelCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). AcceptLanguage("es"). Execute() @@ -50,7 +50,7 @@ func Test_conekta_PaymentLinkApiService(t *testing.T) { Name: "FooCheckout", Recurrent: false, } - resp, httpRes, err := apiClient.PaymentLinkApi.CreateCheckout(context.TODO()). + resp, httpRes, err := apiClient.PaymentLinkAPI.CreateCheckout(context.TODO()). Checkout(req). AcceptLanguage("es"). Execute() @@ -69,7 +69,7 @@ func Test_conekta_PaymentLinkApiService(t *testing.T) { t.Run("Test PaymentLinkApiService EmailCheckout", func(t *testing.T) { req := conekta.EmailCheckoutRequest{Email: "foo@foo.com"} - resp, httpRes, err := apiClient.PaymentLinkApi.EmailCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). + resp, httpRes, err := apiClient.PaymentLinkAPI.EmailCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). EmailCheckoutRequest(req). AcceptLanguage("es"). Execute() @@ -87,7 +87,7 @@ func Test_conekta_PaymentLinkApiService(t *testing.T) { }) t.Run("Test PaymentLinkApiService GetCheckout", func(t *testing.T) { - resp, httpRes, err := apiClient.PaymentLinkApi.GetCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). + resp, httpRes, err := apiClient.PaymentLinkAPI.GetCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). AcceptLanguage("es"). Execute() @@ -104,7 +104,7 @@ func Test_conekta_PaymentLinkApiService(t *testing.T) { }) t.Run("Test PaymentLinkApiService GetCheckouts", func(t *testing.T) { - resp, httpRes, err := apiClient.PaymentLinkApi.GetCheckouts(context.TODO()). + resp, httpRes, err := apiClient.PaymentLinkAPI.GetCheckouts(context.TODO()). AcceptLanguage("es"). Execute() @@ -122,7 +122,7 @@ func Test_conekta_PaymentLinkApiService(t *testing.T) { t.Run("Test PaymentLinkApiService SmsCheckout", func(t *testing.T) { req := conekta.SmsCheckoutRequest{Phonenumber: "12312312312"} - resp, httpRes, err := apiClient.PaymentLinkApi.SmsCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). + resp, httpRes, err := apiClient.PaymentLinkAPI.SmsCheckout(context.TODO(), "ff6918c6-5043-43b9-a7ec-d40d407d62c1"). SmsCheckoutRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_payment_methods_test.go b/test/api_payment_methods_test.go index b172b8a..15d3490 100644 --- a/test/api_payment_methods_test.go +++ b/test/api_payment_methods_test.go @@ -31,7 +31,7 @@ func Test_conekta_PaymentMethodsApiService(t *testing.T) { TokenId: "tokenID", }, } - resp, httpRes, err := apiClient.PaymentMethodsApi.CreateCustomerPaymentMethods(context.TODO(), "cus_2tXyF9BwPG14UMkkg"). + resp, httpRes, err := apiClient.PaymentMethodsAPI.CreateCustomerPaymentMethods(context.TODO(), "cus_2tXyF9BwPG14UMkkg"). CreateCustomerPaymentMethodsRequest(req). AcceptLanguage("es"). Execute() @@ -49,7 +49,7 @@ func Test_conekta_PaymentMethodsApiService(t *testing.T) { }) t.Run("Test PaymentMethodsApiService DeleteCustomerPaymentMethods", func(t *testing.T) { - resp, httpRes, err := apiClient.PaymentMethodsApi.DeleteCustomerPaymentMethods(context.TODO(), "cus_2tYENskzTjjgkGQLt", "src_2tbd5Bgy67RL9oycM"). + resp, httpRes, err := apiClient.PaymentMethodsAPI.DeleteCustomerPaymentMethods(context.TODO(), "cus_2tYENskzTjjgkGQLt", "src_2tbd5Bgy67RL9oycM"). AcceptLanguage("es"). Execute() @@ -66,7 +66,7 @@ func Test_conekta_PaymentMethodsApiService(t *testing.T) { }) t.Run("Test PaymentMethodsApiService GetCustomerPaymentMethods", func(t *testing.T) { - resp, httpRes, err := apiClient.PaymentMethodsApi.GetCustomerPaymentMethods(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.PaymentMethodsAPI.GetCustomerPaymentMethods(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -86,7 +86,7 @@ func Test_conekta_PaymentMethodsApiService(t *testing.T) { req := conekta.UpdatePaymentMethods{ Name: conekta.PtrString("name"), } - resp, httpRes, err := apiClient.PaymentMethodsApi.UpdateCustomerPaymentMethods(context.TODO(), "cus_2tYENskzTjjgkGQLt", "src_2tbd5Bgy67RL9oycM"). + resp, httpRes, err := apiClient.PaymentMethodsAPI.UpdateCustomerPaymentMethods(context.TODO(), "cus_2tYENskzTjjgkGQLt", "src_2tbd5Bgy67RL9oycM"). UpdatePaymentMethods(req). AcceptLanguage("es"). Execute() diff --git a/test/api_plans_test.go b/test/api_plans_test.go index 1c54636..299caef 100644 --- a/test/api_plans_test.go +++ b/test/api_plans_test.go @@ -30,7 +30,7 @@ func Test_conekta_PlansApiService(t *testing.T) { Currency: conekta.PtrString("MXN"), Name: "Test Plan", } - resp, httpRes, err := apiClient.PlansApi.CreatePlan(context.TODO()). + resp, httpRes, err := apiClient.PlansAPI.CreatePlan(context.TODO()). PlanRequest(req). AcceptLanguage("es"). Execute() @@ -48,7 +48,7 @@ func Test_conekta_PlansApiService(t *testing.T) { }) t.Run("Test PlansApiService DeletePlan", func(t *testing.T) { - resp, httpRes, err := apiClient.PlansApi.DeletePlan(context.TODO(), "plan_2tZb5q8Z3PYpg6SJd"). + resp, httpRes, err := apiClient.PlansAPI.DeletePlan(context.TODO(), "plan_2tZb5q8Z3PYpg6SJd"). AcceptLanguage("es"). Execute() @@ -65,7 +65,7 @@ func Test_conekta_PlansApiService(t *testing.T) { }) t.Run("Test PlansApiService GetPlan", func(t *testing.T) { - resp, httpRes, err := apiClient.PlansApi.GetPlan(context.TODO(), "plan_2tZb5q8Z3PYpg6SJd"). + resp, httpRes, err := apiClient.PlansAPI.GetPlan(context.TODO(), "plan_2tZb5q8Z3PYpg6SJd"). AcceptLanguage("es"). Execute() @@ -82,7 +82,7 @@ func Test_conekta_PlansApiService(t *testing.T) { }) t.Run("Test PlansApiService GetPlans", func(t *testing.T) { - resp, httpRes, err := apiClient.PlansApi.GetPlans(context.TODO()). + resp, httpRes, err := apiClient.PlansAPI.GetPlans(context.TODO()). Limit(10). AcceptLanguage("es"). Execute() @@ -105,7 +105,7 @@ func Test_conekta_PlansApiService(t *testing.T) { Currency: conekta.PtrString("MXN"), Name: conekta.PtrString("Test Plan"), } - resp, httpRes, err := apiClient.PlansApi.UpdatePlan(context.TODO(), "plan_2tZb5q8Z3PYpg6SJd"). + resp, httpRes, err := apiClient.PlansAPI.UpdatePlan(context.TODO(), "plan_2tZb5q8Z3PYpg6SJd"). PlanUpdateRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_products_test.go b/test/api_products_test.go index 3dac254..7d92cd4 100644 --- a/test/api_products_test.go +++ b/test/api_products_test.go @@ -29,7 +29,7 @@ func Test_conekta_ProductsApiService(t *testing.T) { Name: "Test Product", Quantity: 1, } - resp, httpRes, err := apiClient.ProductsApi.OrdersCreateProduct(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). + resp, httpRes, err := apiClient.ProductsAPI.OrdersCreateProduct(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). Product(req). AcceptLanguage("es"). Execute() @@ -47,7 +47,7 @@ func Test_conekta_ProductsApiService(t *testing.T) { }) t.Run("Test ProductsApiService OrdersDeleteProduct", func(t *testing.T) { - resp, httpRes, err := apiClient.ProductsApi.OrdersDeleteProduct(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "line_item_2tVz8UkyWhSxLfUd7"). + resp, httpRes, err := apiClient.ProductsAPI.OrdersDeleteProduct(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "line_item_2tVz8UkyWhSxLfUd7"). AcceptLanguage("es"). Execute() @@ -68,7 +68,7 @@ func Test_conekta_ProductsApiService(t *testing.T) { Name: conekta.PtrString("Test Product"), Quantity: conekta.PtrInt32(1), } - resp, httpRes, err := apiClient.ProductsApi.OrdersUpdateProduct(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "line_item_2tVz8UkyWhSxLfUd7"). + resp, httpRes, err := apiClient.ProductsAPI.OrdersUpdateProduct(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "line_item_2tVz8UkyWhSxLfUd7"). UpdateProduct(req). AcceptLanguage("es"). Execute() diff --git a/test/api_shipping_contacts_test.go b/test/api_shipping_contacts_test.go index 95d9d4a..10029e2 100644 --- a/test/api_shipping_contacts_test.go +++ b/test/api_shipping_contacts_test.go @@ -28,7 +28,7 @@ func Test_conekta_ShippingContactsApiService(t *testing.T) { req := conekta.CustomerShippingContacts{ Phone: conekta.PtrString("1132312312"), } - resp, httpRes, err := apiClient.ShippingContactsApi.CreateCustomerShippingContacts(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.ShippingContactsAPI.CreateCustomerShippingContacts(context.TODO(), "cus_2tYENskzTjjgkGQLt"). CustomerShippingContacts(req). AcceptLanguage("es"). Execute() @@ -46,7 +46,7 @@ func Test_conekta_ShippingContactsApiService(t *testing.T) { }) t.Run("Test ShippingContactsApiService DeleteCustomerShippingContacts", func(t *testing.T) { - resp, httpRes, err := apiClient.ShippingContactsApi.DeleteCustomerShippingContacts(context.TODO(), "cus_2tYENskzTjjgkGQLt", "ship_cont_2tY2ncFSBLUaohto2"). + resp, httpRes, err := apiClient.ShippingContactsAPI.DeleteCustomerShippingContacts(context.TODO(), "cus_2tYENskzTjjgkGQLt", "ship_cont_2tY2ncFSBLUaohto2"). AcceptLanguage("es"). Execute() @@ -66,7 +66,7 @@ func Test_conekta_ShippingContactsApiService(t *testing.T) { req := conekta.CustomerUpdateShippingContacts{ Phone: conekta.PtrString("1132312312"), } - resp, httpRes, err := apiClient.ShippingContactsApi.UpdateCustomerShippingContacts(context.TODO(), "cus_2tYENskzTjjgkGQLt", "ship_cont_2tY2ncFSBLUaohto2"). + resp, httpRes, err := apiClient.ShippingContactsAPI.UpdateCustomerShippingContacts(context.TODO(), "cus_2tYENskzTjjgkGQLt", "ship_cont_2tY2ncFSBLUaohto2"). CustomerUpdateShippingContacts(req). AcceptLanguage("es"). Execute() diff --git a/test/api_shippings_test.go b/test/api_shippings_test.go index 62ba584..a9d96be 100644 --- a/test/api_shippings_test.go +++ b/test/api_shippings_test.go @@ -30,7 +30,7 @@ func Test_conekta_ShippingsApiService(t *testing.T) { Carrier: conekta.PtrString("FedEx"), TrackingNumber: conekta.PtrString("ASDA12312"), } - resp, httpRes, err := apiClient.ShippingsApi.OrdersCreateShipping(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). + resp, httpRes, err := apiClient.ShippingsAPI.OrdersCreateShipping(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). ShippingRequest(req). AcceptLanguage("es"). Execute() @@ -48,7 +48,7 @@ func Test_conekta_ShippingsApiService(t *testing.T) { }) t.Run("Test ShippingsApiService OrdersDeleteShipping", func(t *testing.T) { - resp, httpRes, err := apiClient.ShippingsApi.OrdersDeleteShipping(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "ship_lin_2tVzNuDGSaDwreMg6"). + resp, httpRes, err := apiClient.ShippingsAPI.OrdersDeleteShipping(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "ship_lin_2tVzNuDGSaDwreMg6"). AcceptLanguage("es"). Execute() @@ -70,7 +70,7 @@ func Test_conekta_ShippingsApiService(t *testing.T) { Carrier: conekta.PtrString("FedEx"), TrackingNumber: conekta.PtrString("ASDA12312"), } - resp, httpRes, err := apiClient.ShippingsApi.OrdersUpdateShipping(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "ship_lin_2tVzNuDGSaDwreMg6"). + resp, httpRes, err := apiClient.ShippingsAPI.OrdersUpdateShipping(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "ship_lin_2tVzNuDGSaDwreMg6"). ShippingRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_subscriptions_test.go b/test/api_subscriptions_test.go index 2a7a8a0..86c0a77 100644 --- a/test/api_subscriptions_test.go +++ b/test/api_subscriptions_test.go @@ -25,7 +25,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test SubscriptionsApiService CancelSubscription", func(t *testing.T) { - resp, httpRes, err := apiClient.SubscriptionsApi.CancelSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.CancelSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -46,7 +46,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { PlanId: "plan_2tZb5q8Z3PYpg6SJd", TrialEnd: conekta.PtrInt32(12312), } - resp, httpRes, err := apiClient.SubscriptionsApi.CreateSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.CreateSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). SubscriptionRequest(req). AcceptLanguage("es"). Execute() @@ -64,7 +64,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { }) t.Run("Test SubscriptionsApiService GetAllEventsFromSubscription", func(t *testing.T) { - resp, httpRes, err := apiClient.SubscriptionsApi.GetAllEventsFromSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.GetAllEventsFromSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -81,7 +81,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { }) t.Run("Test SubscriptionsApiService GetSubscription", func(t *testing.T) { - resp, httpRes, err := apiClient.SubscriptionsApi.GetSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.GetSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -98,7 +98,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { }) t.Run("Test SubscriptionsApiService PauseSubscription", func(t *testing.T) { - resp, httpRes, err := apiClient.SubscriptionsApi.PauseSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.PauseSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -115,7 +115,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { }) t.Run("Test SubscriptionsApiService ResumeSubscription", func(t *testing.T) { - resp, httpRes, err := apiClient.SubscriptionsApi.ResumeSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.ResumeSubscription(context.TODO(), "cus_2tYENskzTjjgkGQLt"). AcceptLanguage("es"). Execute() @@ -137,7 +137,7 @@ func Test_conekta_SubscriptionsApiService(t *testing.T) { TrialEnd: conekta.PtrInt32(12312), } - resp, httpRes, err := apiClient.SubscriptionsApi.UpdateSubscription(context.Background(), "cus_2tYENskzTjjgkGQLt"). + resp, httpRes, err := apiClient.SubscriptionsAPI.UpdateSubscription(context.Background(), "cus_2tYENskzTjjgkGQLt"). SubscriptionUpdateRequest(req). Execute() diff --git a/test/api_taxes_test.go b/test/api_taxes_test.go index 2f67896..a7e853f 100644 --- a/test/api_taxes_test.go +++ b/test/api_taxes_test.go @@ -29,7 +29,7 @@ func Test_conekta_TaxesApiService(t *testing.T) { Amount: 100, Description: "Test", } - resp, httpRes, err := apiClient.TaxesApi.OrdersCreateTaxes(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). + resp, httpRes, err := apiClient.TaxesAPI.OrdersCreateTaxes(context.TODO(), "ord_2tUigJ8DgBhbp6w5D"). OrderTaxRequest(req). AcceptLanguage("es"). Execute() @@ -47,7 +47,7 @@ func Test_conekta_TaxesApiService(t *testing.T) { }) t.Run("Test TaxesApiService OrdersDeleteTaxes", func(t *testing.T) { - resp, httpRes, err := apiClient.TaxesApi.OrdersDeleteTaxes(context.TODO(), "ord_2tVyWPnCPWbrV37mW", "tax_lin_2tVzVp6AAptCRHhgt"). + resp, httpRes, err := apiClient.TaxesAPI.OrdersDeleteTaxes(context.TODO(), "ord_2tVyWPnCPWbrV37mW", "tax_lin_2tVzVp6AAptCRHhgt"). AcceptLanguage("es"). Execute() @@ -68,7 +68,7 @@ func Test_conekta_TaxesApiService(t *testing.T) { Amount: conekta.PtrInt64(100), Description: conekta.PtrString("Test"), } - resp, httpRes, err := apiClient.TaxesApi.OrdersUpdateTaxes(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "tax_lin_2tVzVp6AAptCRHhgt"). + resp, httpRes, err := apiClient.TaxesAPI.OrdersUpdateTaxes(context.TODO(), "ord_2tUigJ8DgBhbp6w5D", "tax_lin_2tVzVp6AAptCRHhgt"). UpdateOrderTaxRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_tokens_test.go b/test/api_tokens_test.go index 96a4cc6..9f31c87 100644 --- a/test/api_tokens_test.go +++ b/test/api_tokens_test.go @@ -28,7 +28,7 @@ func Test_conekta_TokensApiService(t *testing.T) { req := conekta.Token{ Card: *conekta.NewNullableTokenCard(conekta.NewTokenCard("123", "02", "27", "Foo Foo", "5475040095304607")), } - resp, httpRes, err := apiClient.TokensApi.CreateToken(context.TODO()). + resp, httpRes, err := apiClient.TokensAPI.CreateToken(context.TODO()). Token(req). AcceptLanguage("es"). Execute() diff --git a/test/api_transactions_test.go b/test/api_transactions_test.go index 5b6e7c5..e383cec 100644 --- a/test/api_transactions_test.go +++ b/test/api_transactions_test.go @@ -25,7 +25,7 @@ func Test_conekta_TransactionsApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test TransactionsApiService GetTransaction", func(t *testing.T) { - resp, httpRes, err := apiClient.TransactionsApi.GetTransaction(context.TODO(), "6456b6dfac0fd40001a64eb8"). + resp, httpRes, err := apiClient.TransactionsAPI.GetTransaction(context.TODO(), "6456b6dfac0fd40001a64eb8"). AcceptLanguage("es"). Execute() @@ -42,7 +42,7 @@ func Test_conekta_TransactionsApiService(t *testing.T) { }) t.Run("Test TransactionsApiService GetTransactions", func(t *testing.T) { - resp, httpRes, err := apiClient.TransactionsApi.GetTransactions(context.TODO()). + resp, httpRes, err := apiClient.TransactionsAPI.GetTransactions(context.TODO()). AcceptLanguage("es"). Limit(2). Execute() diff --git a/test/api_transfers_test.go b/test/api_transfers_test.go index d6946f4..6a25f29 100644 --- a/test/api_transfers_test.go +++ b/test/api_transfers_test.go @@ -25,7 +25,7 @@ func Test_conekta_TransfersApiService(t *testing.T) { apiClient := conekta.NewAPIClient(configuration) t.Run("Test TransfersApiService GetTransfer", func(t *testing.T) { - resp, httpRes, err := apiClient.TransfersApi.GetTransfer(context.TODO(), "64462930651b2600017b6d43"). + resp, httpRes, err := apiClient.TransfersAPI.GetTransfer(context.TODO(), "64462930651b2600017b6d43"). AcceptLanguage("es"). Execute() @@ -42,7 +42,7 @@ func Test_conekta_TransfersApiService(t *testing.T) { }) t.Run("Test TransfersApiService GetTransfers", func(t *testing.T) { - resp, httpRes, err := apiClient.TransfersApi.GetTransfers(context.TODO()). + resp, httpRes, err := apiClient.TransfersAPI.GetTransfers(context.TODO()). AcceptLanguage("es"). Limit(5). Execute() diff --git a/test/api_webhook_keys_test.go b/test/api_webhook_keys_test.go index 519028d..f7dfff7 100644 --- a/test/api_webhook_keys_test.go +++ b/test/api_webhook_keys_test.go @@ -26,7 +26,7 @@ func Test_conekta_WebhookKeysApiService(t *testing.T) { t.Run("Test WebhookKeysApiService CreateWebhookKey", func(t *testing.T) { req := conekta.WebhookKeyRequest{Active: conekta.PtrBool(true)} - resp, httpRes, err := apiClient.WebhookKeysApi.CreateWebhookKey(context.TODO()). + resp, httpRes, err := apiClient.WebhookKeysAPI.CreateWebhookKey(context.TODO()). WebhookKeyRequest(req). AcceptLanguage("es"). Execute() @@ -44,7 +44,7 @@ func Test_conekta_WebhookKeysApiService(t *testing.T) { }) t.Run("Test WebhookKeysApiService DeleteWebhookKey", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhookKeysApi.DeleteWebhookKey(context.TODO(), "645a59da22e7da0001cad283"). + resp, httpRes, err := apiClient.WebhookKeysAPI.DeleteWebhookKey(context.TODO(), "645a59da22e7da0001cad283"). AcceptLanguage("es"). Execute() @@ -61,7 +61,7 @@ func Test_conekta_WebhookKeysApiService(t *testing.T) { }) t.Run("Test WebhookKeysApiService GetWebhookKey", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhookKeysApi.GetWebhookKey(context.TODO(), "645a5eb022e7da0001cad2a4"). + resp, httpRes, err := apiClient.WebhookKeysAPI.GetWebhookKey(context.TODO(), "645a5eb022e7da0001cad2a4"). AcceptLanguage("es"). Execute() @@ -78,7 +78,7 @@ func Test_conekta_WebhookKeysApiService(t *testing.T) { }) t.Run("Test WebhookKeysApiService GetWebhookKeys", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhookKeysApi.GetWebhookKeys(context.TODO()). + resp, httpRes, err := apiClient.WebhookKeysAPI.GetWebhookKeys(context.TODO()). AcceptLanguage("es"). Limit(2). Execute() @@ -97,7 +97,7 @@ func Test_conekta_WebhookKeysApiService(t *testing.T) { t.Run("Test WebhookKeysApiService UpdateWebhookKey", func(t *testing.T) { req := conekta.WebhookKeyUpdateRequest{Active: conekta.PtrBool(false)} - resp, httpRes, err := apiClient.WebhookKeysApi.UpdateWebhookKey(context.TODO(), "645a613622e7da0001cad882"). + resp, httpRes, err := apiClient.WebhookKeysAPI.UpdateWebhookKey(context.TODO(), "645a613622e7da0001cad882"). WebhookKeyUpdateRequest(req). AcceptLanguage("es"). Execute() diff --git a/test/api_webhooks_test.go b/test/api_webhooks_test.go index ac9e183..d3564c4 100644 --- a/test/api_webhooks_test.go +++ b/test/api_webhooks_test.go @@ -29,7 +29,7 @@ func Test_conekta_WebhooksApiService(t *testing.T) { Url: "https://www.fooapi.com", Synchronous: false, } - resp, httpRes, err := apiClient.WebhooksApi.CreateWebhook(context.TODO()). + resp, httpRes, err := apiClient.WebhooksAPI.CreateWebhook(context.TODO()). WebhookRequest(req). AcceptLanguage("es"). Execute() @@ -47,7 +47,7 @@ func Test_conekta_WebhooksApiService(t *testing.T) { }) t.Run("Test WebhooksApiService DeleteWebhook", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhooksApi.DeleteWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). + resp, httpRes, err := apiClient.WebhooksAPI.DeleteWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). AcceptLanguage("es"). Execute() @@ -64,7 +64,7 @@ func Test_conekta_WebhooksApiService(t *testing.T) { }) t.Run("Test WebhooksApiService GetWebhook", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhooksApi.GetWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). + resp, httpRes, err := apiClient.WebhooksAPI.GetWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). AcceptLanguage("es"). Execute() @@ -81,7 +81,7 @@ func Test_conekta_WebhooksApiService(t *testing.T) { }) t.Run("Test WebhooksApiService GetWebhooks", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhooksApi.GetWebhooks(context.TODO()). + resp, httpRes, err := apiClient.WebhooksAPI.GetWebhooks(context.TODO()). Limit(10). AcceptLanguage("es"). Execute() @@ -99,7 +99,7 @@ func Test_conekta_WebhooksApiService(t *testing.T) { }) t.Run("Test WebhooksApiService TestWebhook", func(t *testing.T) { - resp, httpRes, err := apiClient.WebhooksApi.TestWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). + resp, httpRes, err := apiClient.WebhooksAPI.TestWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). AcceptLanguage("es"). Execute() @@ -119,7 +119,7 @@ func Test_conekta_WebhooksApiService(t *testing.T) { req := conekta.WebhookUpdateRequest{ Url: "https://www.fooapi.com", } - resp, httpRes, err := apiClient.WebhooksApi.UpdateWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). + resp, httpRes, err := apiClient.WebhooksAPI.UpdateWebhook(context.TODO(), "641b1d5662d7e00001eaa46b"). WebhookUpdateRequest(req). AcceptLanguage("es"). Execute() From 0fdaef83bf2bcf375ffe865444189f60348d6d72 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 21 Dec 2023 14:50:58 -0500 Subject: [PATCH 3/3] update template --- client.go | 189 ++++++++++++++++++----------------- templates/go/client.mustache | 42 +++++--- 2 files changed, 124 insertions(+), 107 deletions(-) diff --git a/client.go b/client.go index c5e19ab..97f5c36 100644 --- a/client.go +++ b/client.go @@ -25,25 +25,25 @@ import ( "net/http/httputil" "net/url" "os" + "os/exec" "path/filepath" "reflect" "regexp" + "runtime" "strconv" "strings" "time" "unicode/utf8" - "runtime" - "os/exec" - ) var ( - jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) - xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) - queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) - queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" ) + JsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?json)`) + XmlCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:[^;]+\+)?xml)`) + queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`) + queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") encodedConektaUserAgent string ) + const ( // UnknownPlatform is the string returned as the system name if we couldn't get // one from `uname`. @@ -105,7 +105,6 @@ type APIClient struct { WebhooksAPI WebhooksAPI } - func init() { initUserAgent() } @@ -143,6 +142,7 @@ func getUname() string { return out.String() } + type service struct { client *APIClient } @@ -238,15 +238,15 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } -func parameterValueToString( obj interface{}, key string ) string { +func parameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) } - var param,ok = obj.(MappedNullable) + var param, ok = obj.(MappedNullable) if !ok { return "" } - dataMap,err := param.ToMap() + dataMap, err := param.ToMap() if err != nil { return "" } @@ -262,81 +262,81 @@ func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix stri value = "null" } else { switch v.Kind() { - case reflect.Invalid: - value = "invalid" + case reflect.Invalid: + value = "invalid" - case reflect.Struct: - if t,ok := obj.(MappedNullable); ok { - dataMap,err := t.ToMap() - if err != nil { - return - } - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType) - return - } - if t, ok := obj.(time.Time); ok { - parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType) - return - } - value = v.Type().String() + " value" - case reflect.Slice: - var indValue = reflect.ValueOf(obj) - if indValue == reflect.ValueOf(nil) { + case reflect.Struct: + if t, ok := obj.(MappedNullable); ok { + dataMap, err := t.ToMap() + if err != nil { return } - var lenIndValue = indValue.Len() - for i:=0;i