diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 706de1e..637fec3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,7 +20,7 @@ jobs: - name: Run Mockoon CLI uses: mockoon/cli-action@v1 with: - version: 'latest' + version: '6.0.1' data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json' port: 3000 - name: Execute dotnet diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 61636a1..f92204f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -9,7 +9,6 @@ api/openapi.yaml conekta.png docs/AntifraudApi.md docs/ApiKeyCreateResponse.md -docs/ApiKeyCreateResponseAllOf.md docs/ApiKeyRequest.md docs/ApiKeyResponse.md docs/ApiKeyResponseOnDelete.md @@ -19,9 +18,6 @@ docs/BalanceCommonField.md docs/BalanceResponse.md docs/BalancesApi.md docs/BlacklistRuleResponse.md -docs/ChargeDataPaymentMethodBankTransferResponse.md -docs/ChargeDataPaymentMethodCardResponse.md -docs/ChargeDataPaymentMethodCashResponse.md docs/ChargeOrderResponse.md docs/ChargeOrderResponsePaymentMethod.md docs/ChargeRequest.md @@ -30,7 +26,6 @@ docs/ChargeResponse.md docs/ChargeResponseChannel.md docs/ChargeResponsePaymentMethod.md docs/ChargeResponseRefunds.md -docs/ChargeResponseRefundsAllOf.md docs/ChargeResponseRefundsData.md docs/ChargeUpdateRequest.md docs/ChargesApi.md @@ -41,14 +36,12 @@ docs/CheckoutOrderTemplateCustomerInfo.md docs/CheckoutRequest.md docs/CheckoutResponse.md docs/CheckoutsResponse.md -docs/CheckoutsResponseAllOf.md docs/CompaniesApi.md docs/CompanyFiscalInfoAddressResponse.md docs/CompanyFiscalInfoResponse.md docs/CompanyPayoutDestinationResponse.md docs/CompanyResponse.md docs/CreateCustomerFiscalEntitiesResponse.md -docs/CreateCustomerFiscalEntitiesResponseAllOf.md docs/CreateCustomerPaymentMethodsRequest.md docs/CreateCustomerPaymentMethodsResponse.md docs/CreateRiskRulesData.md @@ -58,72 +51,53 @@ docs/CustomerAntifraudInfo.md docs/CustomerAntifraudInfoResponse.md docs/CustomerFiscalEntitiesDataResponse.md docs/CustomerFiscalEntitiesRequest.md -docs/CustomerFiscalEntitiesRequestAddress.md docs/CustomerFiscalEntitiesResponse.md -docs/CustomerFiscalEntitiesResponseAllOf.md docs/CustomerInfo.md docs/CustomerInfoJustCustomerId.md docs/CustomerInfoJustCustomerIdResponse.md docs/CustomerPaymentMethodRequest.md -docs/CustomerPaymentMethods.md docs/CustomerPaymentMethodsData.md docs/CustomerPaymentMethodsRequest.md docs/CustomerPaymentMethodsResponse.md docs/CustomerResponse.md docs/CustomerResponseShippingContacts.md -docs/CustomerResponseShippingContactsAllOf.md docs/CustomerShippingContacts.md docs/CustomerShippingContactsAddress.md docs/CustomerShippingContactsDataResponse.md -docs/CustomerShippingContactsDataResponseAllOf.md docs/CustomerShippingContactsResponse.md docs/CustomerShippingContactsResponseAddress.md docs/CustomerUpdateFiscalEntitiesRequest.md docs/CustomerUpdateShippingContacts.md docs/CustomersApi.md docs/CustomersResponse.md -docs/CustomersResponseAllOf.md docs/DeleteApiKeysResponse.md -docs/DeleteApiKeysResponseAllOf.md docs/DeletedBlacklistRuleResponse.md docs/DeletedWhitelistRuleResponse.md docs/Details.md docs/DetailsError.md docs/DiscountLinesDataResponse.md docs/DiscountLinesResponse.md -docs/DiscountLinesResponseAllOf.md docs/DiscountsApi.md docs/EmailCheckoutRequest.md docs/Error.md -docs/ErrorAllOf.md docs/EventResponse.md +docs/EventTypes.md docs/EventsApi.md docs/EventsResendResponse.md docs/FiscalEntityAddress.md docs/GetApiKeysResponse.md -docs/GetApiKeysResponseAllOf.md docs/GetChargesResponse.md -docs/GetChargesResponseAllOf.md docs/GetCompaniesResponse.md -docs/GetCompaniesResponseAllOf.md docs/GetCustomerPaymentMethodDataResponse.md docs/GetEventsResponse.md -docs/GetEventsResponseAllOf.md docs/GetOrderDiscountLinesResponse.md -docs/GetOrderDiscountLinesResponseAllOf.md docs/GetOrdersResponse.md docs/GetPaymentMethodResponse.md -docs/GetPaymentMethodResponseAllOf.md docs/GetPlansResponse.md -docs/GetPlansResponseAllOf.md docs/GetTransactionsResponse.md -docs/GetTransactionsResponseAllOf.md docs/GetTransfersResponse.md -docs/GetTransfersResponseAllOf.md docs/GetWebhookKeysResponse.md -docs/GetWebhookKeysResponseAllOf.md docs/GetWebhooksResponse.md -docs/GetWebhooksResponseAllOf.md docs/LogResponse.md docs/LogsApi.md docs/LogsResponse.md @@ -132,7 +106,6 @@ docs/OrderCaptureRequest.md docs/OrderCustomerInfoResponse.md docs/OrderDiscountLinesRequest.md docs/OrderFiscalEntityAddressResponse.md -docs/OrderFiscalEntityAddressResponseAllOf.md docs/OrderFiscalEntityRequest.md docs/OrderFiscalEntityResponse.md docs/OrderNextActionResponse.md @@ -142,16 +115,11 @@ docs/OrderRequest.md docs/OrderRequestCustomerInfo.md docs/OrderResponse.md docs/OrderResponseCharges.md -docs/OrderResponseChargesAllOf.md docs/OrderResponseCheckout.md docs/OrderResponseCustomerInfo.md -docs/OrderResponseCustomerInfoAllOf.md docs/OrderResponseDiscountLines.md -docs/OrderResponseDiscountLinesAllOf.md docs/OrderResponseProducts.md -docs/OrderResponseProductsAllOf.md docs/OrderResponseShippingContact.md -docs/OrderResponseShippingContactAllOf.md docs/OrderTaxRequest.md docs/OrderUpdateFiscalEntityRequest.md docs/OrderUpdateRequest.md @@ -165,30 +133,30 @@ docs/PaymentMethod.md docs/PaymentMethodBankTransfer.md docs/PaymentMethodCard.md docs/PaymentMethodCardRequest.md -docs/PaymentMethodCardRequestAllOf.md docs/PaymentMethodCardResponse.md -docs/PaymentMethodCardResponseAllOf.md docs/PaymentMethodCash.md docs/PaymentMethodCashRequest.md -docs/PaymentMethodCashRequestAllOf.md docs/PaymentMethodCashResponse.md -docs/PaymentMethodCashResponseAllOf.md docs/PaymentMethodResponse.md docs/PaymentMethodSpeiRecurrent.md -docs/PaymentMethodSpeiRecurrentAllOf.md docs/PaymentMethodSpeiRequest.md docs/PaymentMethodsApi.md +docs/Payout.md +docs/PayoutMethod.md +docs/PayoutOrder.md +docs/PayoutOrderPayoutsItem.md +docs/PayoutOrderResponse.md +docs/PayoutOrderResponseCustomerInfo.md +docs/PayoutOrdersApi.md +docs/PayoutOrdersResponse.md docs/PlanRequest.md docs/PlanResponse.md docs/PlanUpdateRequest.md docs/PlansApi.md docs/Product.md docs/ProductDataResponse.md -docs/ProductDataResponseAllOf.md docs/ProductOrderResponse.md -docs/ProductOrderResponseAllOf.md docs/ProductsApi.md -docs/RiskRules.md docs/RiskRulesData.md docs/RiskRulesList.md docs/ShippingContactsApi.md @@ -218,12 +186,10 @@ docs/TransfersResponse.md docs/UpdateCustomer.md docs/UpdateCustomerAntifraudInfo.md docs/UpdateCustomerFiscalEntitiesResponse.md -docs/UpdateCustomerFiscalEntitiesResponseAllOf.md docs/UpdateCustomerPaymentMethodsResponse.md docs/UpdateOrderDiscountLinesRequest.md docs/UpdateOrderTaxRequest.md docs/UpdateOrderTaxResponse.md -docs/UpdateOrderTaxResponseAllOf.md docs/UpdatePaymentMethods.md docs/UpdateProduct.md docs/WebhookKeyCreateResponse.md @@ -251,6 +217,7 @@ src/Conekta.net/Api/LogsApi.cs src/Conekta.net/Api/OrdersApi.cs src/Conekta.net/Api/PaymentLinkApi.cs src/Conekta.net/Api/PaymentMethodsApi.cs +src/Conekta.net/Api/PayoutOrdersApi.cs src/Conekta.net/Api/PlansApi.cs src/Conekta.net/Api/ProductsApi.cs src/Conekta.net/Api/ShippingContactsApi.cs @@ -281,7 +248,6 @@ src/Conekta.net/Client/RetryConfiguration.cs src/Conekta.net/Conekta.net.csproj src/Conekta.net/Model/AbstractOpenAPISchema.cs src/Conekta.net/Model/ApiKeyCreateResponse.cs -src/Conekta.net/Model/ApiKeyCreateResponseAllOf.cs src/Conekta.net/Model/ApiKeyRequest.cs src/Conekta.net/Model/ApiKeyResponse.cs src/Conekta.net/Model/ApiKeyResponseOnDelete.cs @@ -289,9 +255,6 @@ src/Conekta.net/Model/ApiKeyUpdateRequest.cs src/Conekta.net/Model/BalanceCommonField.cs src/Conekta.net/Model/BalanceResponse.cs src/Conekta.net/Model/BlacklistRuleResponse.cs -src/Conekta.net/Model/ChargeDataPaymentMethodBankTransferResponse.cs -src/Conekta.net/Model/ChargeDataPaymentMethodCardResponse.cs -src/Conekta.net/Model/ChargeDataPaymentMethodCashResponse.cs src/Conekta.net/Model/ChargeOrderResponse.cs src/Conekta.net/Model/ChargeOrderResponsePaymentMethod.cs src/Conekta.net/Model/ChargeRequest.cs @@ -300,7 +263,6 @@ src/Conekta.net/Model/ChargeResponse.cs src/Conekta.net/Model/ChargeResponseChannel.cs src/Conekta.net/Model/ChargeResponsePaymentMethod.cs src/Conekta.net/Model/ChargeResponseRefunds.cs -src/Conekta.net/Model/ChargeResponseRefundsAllOf.cs src/Conekta.net/Model/ChargeResponseRefundsData.cs src/Conekta.net/Model/ChargeUpdateRequest.cs src/Conekta.net/Model/ChargesDataResponse.cs @@ -310,13 +272,11 @@ src/Conekta.net/Model/CheckoutOrderTemplateCustomerInfo.cs src/Conekta.net/Model/CheckoutRequest.cs src/Conekta.net/Model/CheckoutResponse.cs src/Conekta.net/Model/CheckoutsResponse.cs -src/Conekta.net/Model/CheckoutsResponseAllOf.cs src/Conekta.net/Model/CompanyFiscalInfoAddressResponse.cs src/Conekta.net/Model/CompanyFiscalInfoResponse.cs src/Conekta.net/Model/CompanyPayoutDestinationResponse.cs src/Conekta.net/Model/CompanyResponse.cs src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponse.cs -src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponseAllOf.cs src/Conekta.net/Model/CreateCustomerPaymentMethodsRequest.cs src/Conekta.net/Model/CreateCustomerPaymentMethodsResponse.cs src/Conekta.net/Model/CreateRiskRulesData.cs @@ -326,69 +286,50 @@ src/Conekta.net/Model/CustomerAntifraudInfo.cs src/Conekta.net/Model/CustomerAntifraudInfoResponse.cs src/Conekta.net/Model/CustomerFiscalEntitiesDataResponse.cs src/Conekta.net/Model/CustomerFiscalEntitiesRequest.cs -src/Conekta.net/Model/CustomerFiscalEntitiesRequestAddress.cs src/Conekta.net/Model/CustomerFiscalEntitiesResponse.cs -src/Conekta.net/Model/CustomerFiscalEntitiesResponseAllOf.cs src/Conekta.net/Model/CustomerInfo.cs src/Conekta.net/Model/CustomerInfoJustCustomerId.cs src/Conekta.net/Model/CustomerInfoJustCustomerIdResponse.cs src/Conekta.net/Model/CustomerPaymentMethodRequest.cs -src/Conekta.net/Model/CustomerPaymentMethods.cs src/Conekta.net/Model/CustomerPaymentMethodsData.cs src/Conekta.net/Model/CustomerPaymentMethodsRequest.cs src/Conekta.net/Model/CustomerPaymentMethodsResponse.cs src/Conekta.net/Model/CustomerResponse.cs src/Conekta.net/Model/CustomerResponseShippingContacts.cs -src/Conekta.net/Model/CustomerResponseShippingContactsAllOf.cs src/Conekta.net/Model/CustomerShippingContacts.cs src/Conekta.net/Model/CustomerShippingContactsAddress.cs src/Conekta.net/Model/CustomerShippingContactsDataResponse.cs -src/Conekta.net/Model/CustomerShippingContactsDataResponseAllOf.cs src/Conekta.net/Model/CustomerShippingContactsResponse.cs src/Conekta.net/Model/CustomerShippingContactsResponseAddress.cs src/Conekta.net/Model/CustomerUpdateFiscalEntitiesRequest.cs src/Conekta.net/Model/CustomerUpdateShippingContacts.cs src/Conekta.net/Model/CustomersResponse.cs -src/Conekta.net/Model/CustomersResponseAllOf.cs src/Conekta.net/Model/DeleteApiKeysResponse.cs -src/Conekta.net/Model/DeleteApiKeysResponseAllOf.cs src/Conekta.net/Model/DeletedBlacklistRuleResponse.cs src/Conekta.net/Model/DeletedWhitelistRuleResponse.cs src/Conekta.net/Model/Details.cs src/Conekta.net/Model/DetailsError.cs src/Conekta.net/Model/DiscountLinesDataResponse.cs src/Conekta.net/Model/DiscountLinesResponse.cs -src/Conekta.net/Model/DiscountLinesResponseAllOf.cs src/Conekta.net/Model/EmailCheckoutRequest.cs src/Conekta.net/Model/Error.cs -src/Conekta.net/Model/ErrorAllOf.cs src/Conekta.net/Model/EventResponse.cs +src/Conekta.net/Model/EventTypes.cs src/Conekta.net/Model/EventsResendResponse.cs src/Conekta.net/Model/FiscalEntityAddress.cs src/Conekta.net/Model/GetApiKeysResponse.cs -src/Conekta.net/Model/GetApiKeysResponseAllOf.cs src/Conekta.net/Model/GetChargesResponse.cs -src/Conekta.net/Model/GetChargesResponseAllOf.cs src/Conekta.net/Model/GetCompaniesResponse.cs -src/Conekta.net/Model/GetCompaniesResponseAllOf.cs src/Conekta.net/Model/GetCustomerPaymentMethodDataResponse.cs src/Conekta.net/Model/GetEventsResponse.cs -src/Conekta.net/Model/GetEventsResponseAllOf.cs src/Conekta.net/Model/GetOrderDiscountLinesResponse.cs -src/Conekta.net/Model/GetOrderDiscountLinesResponseAllOf.cs src/Conekta.net/Model/GetOrdersResponse.cs src/Conekta.net/Model/GetPaymentMethodResponse.cs -src/Conekta.net/Model/GetPaymentMethodResponseAllOf.cs src/Conekta.net/Model/GetPlansResponse.cs -src/Conekta.net/Model/GetPlansResponseAllOf.cs src/Conekta.net/Model/GetTransactionsResponse.cs -src/Conekta.net/Model/GetTransactionsResponseAllOf.cs src/Conekta.net/Model/GetTransfersResponse.cs -src/Conekta.net/Model/GetTransfersResponseAllOf.cs src/Conekta.net/Model/GetWebhookKeysResponse.cs -src/Conekta.net/Model/GetWebhookKeysResponseAllOf.cs src/Conekta.net/Model/GetWebhooksResponse.cs -src/Conekta.net/Model/GetWebhooksResponseAllOf.cs src/Conekta.net/Model/LogResponse.cs src/Conekta.net/Model/LogsResponse.cs src/Conekta.net/Model/LogsResponseData.cs @@ -396,7 +337,6 @@ src/Conekta.net/Model/OrderCaptureRequest.cs src/Conekta.net/Model/OrderCustomerInfoResponse.cs src/Conekta.net/Model/OrderDiscountLinesRequest.cs src/Conekta.net/Model/OrderFiscalEntityAddressResponse.cs -src/Conekta.net/Model/OrderFiscalEntityAddressResponseAllOf.cs src/Conekta.net/Model/OrderFiscalEntityRequest.cs src/Conekta.net/Model/OrderFiscalEntityResponse.cs src/Conekta.net/Model/OrderNextActionResponse.cs @@ -406,16 +346,11 @@ src/Conekta.net/Model/OrderRequest.cs src/Conekta.net/Model/OrderRequestCustomerInfo.cs src/Conekta.net/Model/OrderResponse.cs src/Conekta.net/Model/OrderResponseCharges.cs -src/Conekta.net/Model/OrderResponseChargesAllOf.cs src/Conekta.net/Model/OrderResponseCheckout.cs src/Conekta.net/Model/OrderResponseCustomerInfo.cs -src/Conekta.net/Model/OrderResponseCustomerInfoAllOf.cs src/Conekta.net/Model/OrderResponseDiscountLines.cs -src/Conekta.net/Model/OrderResponseDiscountLinesAllOf.cs src/Conekta.net/Model/OrderResponseProducts.cs -src/Conekta.net/Model/OrderResponseProductsAllOf.cs src/Conekta.net/Model/OrderResponseShippingContact.cs -src/Conekta.net/Model/OrderResponseShippingContactAllOf.cs src/Conekta.net/Model/OrderTaxRequest.cs src/Conekta.net/Model/OrderUpdateFiscalEntityRequest.cs src/Conekta.net/Model/OrderUpdateRequest.cs @@ -427,27 +362,26 @@ src/Conekta.net/Model/PaymentMethod.cs src/Conekta.net/Model/PaymentMethodBankTransfer.cs src/Conekta.net/Model/PaymentMethodCard.cs src/Conekta.net/Model/PaymentMethodCardRequest.cs -src/Conekta.net/Model/PaymentMethodCardRequestAllOf.cs src/Conekta.net/Model/PaymentMethodCardResponse.cs -src/Conekta.net/Model/PaymentMethodCardResponseAllOf.cs src/Conekta.net/Model/PaymentMethodCash.cs src/Conekta.net/Model/PaymentMethodCashRequest.cs -src/Conekta.net/Model/PaymentMethodCashRequestAllOf.cs src/Conekta.net/Model/PaymentMethodCashResponse.cs -src/Conekta.net/Model/PaymentMethodCashResponseAllOf.cs src/Conekta.net/Model/PaymentMethodResponse.cs src/Conekta.net/Model/PaymentMethodSpeiRecurrent.cs -src/Conekta.net/Model/PaymentMethodSpeiRecurrentAllOf.cs src/Conekta.net/Model/PaymentMethodSpeiRequest.cs +src/Conekta.net/Model/Payout.cs +src/Conekta.net/Model/PayoutMethod.cs +src/Conekta.net/Model/PayoutOrder.cs +src/Conekta.net/Model/PayoutOrderPayoutsItem.cs +src/Conekta.net/Model/PayoutOrderResponse.cs +src/Conekta.net/Model/PayoutOrderResponseCustomerInfo.cs +src/Conekta.net/Model/PayoutOrdersResponse.cs src/Conekta.net/Model/PlanRequest.cs src/Conekta.net/Model/PlanResponse.cs src/Conekta.net/Model/PlanUpdateRequest.cs src/Conekta.net/Model/Product.cs src/Conekta.net/Model/ProductDataResponse.cs -src/Conekta.net/Model/ProductDataResponseAllOf.cs src/Conekta.net/Model/ProductOrderResponse.cs -src/Conekta.net/Model/ProductOrderResponseAllOf.cs -src/Conekta.net/Model/RiskRules.cs src/Conekta.net/Model/RiskRulesData.cs src/Conekta.net/Model/RiskRulesList.cs src/Conekta.net/Model/ShippingOrderResponse.cs @@ -470,12 +404,10 @@ src/Conekta.net/Model/TransfersResponse.cs src/Conekta.net/Model/UpdateCustomer.cs src/Conekta.net/Model/UpdateCustomerAntifraudInfo.cs src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponse.cs -src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponseAllOf.cs src/Conekta.net/Model/UpdateCustomerPaymentMethodsResponse.cs src/Conekta.net/Model/UpdateOrderDiscountLinesRequest.cs src/Conekta.net/Model/UpdateOrderTaxRequest.cs src/Conekta.net/Model/UpdateOrderTaxResponse.cs -src/Conekta.net/Model/UpdateOrderTaxResponseAllOf.cs src/Conekta.net/Model/UpdatePaymentMethods.cs src/Conekta.net/Model/UpdateProduct.cs src/Conekta.net/Model/WebhookKeyCreateResponse.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 3769235..ba7f754 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.1.0 \ No newline at end of file +7.4.0 diff --git a/Conekta.net.sln b/Conekta.net.sln index 0bd78ed..d83671e 100644 --- a/Conekta.net.sln +++ b/Conekta.net.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net", "src\Conekta.net\Conekta.net.csproj", "{0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net", "src\Conekta.net\Conekta.net.csproj", "{81E33AE8-15AD-4D75-B13A-D35521C41C6F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Conekta.net.Test", "src\Conekta.net.Test\Conekta.net.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C14BE4D-EA70-46AD-B1DF-D7BC4444785C}.Release|Any CPU.Build.0 = Release|Any CPU + {81E33AE8-15AD-4D75-B13A-D35521C41C6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81E33AE8-15AD-4D75-B13A-D35521C41C6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81E33AE8-15AD-4D75-B13A-D35521C41C6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81E33AE8-15AD-4D75-B13A-D35521C41C6F}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/Makefile b/Makefile index a06ee88..97197bb 100644 --- a/Makefile +++ b/Makefile @@ -9,9 +9,10 @@ clean: csharp: rm -rf /docs && \ rm -rf src/Conekta.net/Model && \ - npx @openapitools/openapi-generator-cli generate \ + docker run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli:v7.4.0 generate \ -i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \ -g csharp \ - -o . \ - -c config-netcore.json \ + -o /local \ + -c /local/config-netcore.json \ --global-property modelTests=false diff --git a/VERSION b/VERSION index 089b1e6..4b786f5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.7 +6.0.8 diff --git a/api/openapi.yaml b/api/openapi.yaml index 5157794..8655c3e 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -5289,6 +5289,315 @@ paths: summary: Cancel Refund tags: - Orders + /payout_orders: + get: + description: Get Payout order details in the form of a list + operationId: getPayoutOrders + parameters: + - 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: "The numbers of items to return, the maximum value is 250" + explode: true + in: query + name: limit + required: false + schema: + default: 20 + format: int32 + 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: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/payout_orders_response' + description: successful operation + "401": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: Please include your access key in your request. + param: null + code: conekta.errors.authentication.missing_key + log_id: 507f1f77bcf86cd799439011 + object: error + type: authentication_error + schema: + $ref: '#/components/schemas/error' + description: authentication error + "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: Get a list of Payout Orders + tags: + - Payout Orders + post: + description: Create a new payout order. + operationId: createPayoutOrder + parameters: + - 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 + requestBody: + $ref: '#/components/requestBodies/payout_order' + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/payout_order_response' + description: successful operation + "422": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: The token does not exist. + param: payment_method.token_id + code: conekta.errors.parameter_validation.payment_method.token_id.nonexistent_token + debug_message: The token does not exist. + log_id: 641b6d813cd9a50001515017 + object: error + type: parameter_validation_error + schema: + $ref: '#/components/schemas/error' + description: parameter validation error + "401": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: Please include your access key in your request. + param: null + code: conekta.errors.authentication.missing_key + log_id: 507f1f77bcf86cd799439011 + object: error + type: authentication_error + schema: + $ref: '#/components/schemas/error' + description: authentication error + "402": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: The card could not be processed. + code: conekta.errors.processing.tokenization.used + debug_message: The token has already been used. + log_id: 641b6d073cd9a50001515007 + object: error + type: processing_error + schema: + $ref: '#/components/schemas/error' + description: payment required 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: Create payout order + tags: + - Payout Orders + /payout_orders/{id}: + get: + description: Gets a payout Order resource that corresponds to a payout order + ID. + operationId: getPayoutOrderById + 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 + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/payout_order_response' + description: successful operation + "401": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - message: Please include your access key in your request. + param: null + code: conekta.errors.authentication.missing_key + log_id: 507f1f77bcf86cd799439011 + object: error + type: authentication_error + schema: + $ref: '#/components/schemas/error' + description: authentication 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: Get Payout Order + tags: + - Payout Orders /checkouts: get: description: Returns a list of links generated by the merchant @@ -12323,6 +12632,13 @@ components: $ref: '#/components/schemas/orderRefund_request' description: requested field for a refund required: true + payout_order: + content: + application/json: + schema: + $ref: '#/components/schemas/payout_order' + description: requested field for payout order + required: true checkout: content: application/json: @@ -12574,15 +12890,44 @@ components: $ref: '#/components/schemas/error' description: payment required error schemas: + event_types: + description: "It is a parameter that allows to identify in the response, the\ + \ type of event that is being generated." + enum: + - webhook_ping + - order.paid + - order.expired + - order.canceled + - order.pending_payment + title: event_types + type: string risk_rules_list: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/risk_rules' + - properties: + data: + items: + $ref: '#/components/schemas/risk_rules_data' + type: array + title: risk_rules + type: object error: allOf: - $ref: '#/components/schemas/details' - - $ref: '#/components/schemas/error_allOf' + - properties: + log_id: + description: log id + example: 507f1f77bcf86cd799439011 + nullable: true + type: string + type: + example: authentication_error + type: string + object: + example: error + type: string + type: object description: err model title: error create_risk_rules_data: @@ -12998,7 +13343,7 @@ components: $ref: '#/components/schemas/customer_payment_methods_response' phone: description: Customer's phone number - example: "5215555555555" + example: "+5215555555555" type: string shipping_contacts: $ref: '#/components/schemas/customer_response_shipping_contacts' @@ -13015,7 +13360,8 @@ components: customer_fiscal_entities_request: properties: address: - $ref: '#/components/schemas/customer_fiscal_entities_request_address' + allOf: + - $ref: '#/components/schemas/customer_address' tax_id: type: string email: @@ -13036,7 +13382,24 @@ components: discount_lines_response: allOf: - $ref: '#/components/schemas/order_discount_lines_request' - - $ref: '#/components/schemas/discount_lines_response_allOf' + - properties: + id: + description: The discount line id + example: dis_lin_2tQQ58HPgPw7StE8z + type: string + object: + description: The object name + example: discount_line + type: string + parent_id: + description: The order id + example: ord_2tPAmKCEJqh8RE6nY + type: string + required: + - id + - object + - parent_id + type: object title: discount_lines_order_response event_response: description: event model @@ -13340,13 +13703,104 @@ components: example: 1676328434 format: int64 type: integer - title: order_response + title: order_response + type: object + product_order_response: + allOf: + - $ref: '#/components/schemas/product' + - properties: + id: + type: string + object: + type: string + parent_id: + type: string + type: object + title: product order response + payout_order_response: + description: payout order model response + properties: + allowed_payout_methods: + description: The payout methods that are allowed for the payout order. + example: + - cashout + items: + type: string + minItems: 1 + type: array + amount: + description: The amount of the payout order. + example: 100 + type: integer + created_at: + description: The creation date of the payout order. + example: 1677626837 + format: int64 + type: integer + currency: + default: MXN + description: The currency in which the payout order is made. + example: MXN + type: string + customer_info: + $ref: '#/components/schemas/payout_order_response_customer_info' + expires_at: + description: The expiration date of the payout order. + example: 1677626837 + format: int64 + type: integer + id: + description: The id of the payout order. + example: f2654d66-d740-457a-9a8c-f96b5196f44e + type: string + livemode: + description: The live mode of the payout order. + example: true + type: boolean + object: + description: The object of the payout order. + example: payout_order + type: string + metadata: + additionalProperties: true + description: The metadata of the payout order. + example: + custom_client_id: "12345" + maxProperties: 100 + type: object + payouts: + description: The payout information of the payout order. + items: + $ref: '#/components/schemas/payout_order_payouts_item' + title: payout_order_payouts + type: array + reason: + description: The reason for the payout order. + example: Payout order for the customer + type: string + status: + description: The status of the payout order. + example: open + type: string + updated_at: + description: The update date of the payout order. + example: 1677626837 + format: int64 + type: integer + required: + - allowed_payout_methods + - amount + - created_at + - currency + - customer_info + - id + - livemode + - object + - payouts + - reason + - updated_at + title: payout_order_response type: object - product_order_response: - allOf: - - $ref: '#/components/schemas/product' - - $ref: '#/components/schemas/product_order_response_allOf' - title: product order response checkout_response: description: checkout response properties: @@ -13454,15 +13908,71 @@ components: payment_method_cash_response: allOf: - $ref: '#/components/schemas/payment_method_response' - - $ref: '#/components/schemas/payment_method_cash_response_allOf' + - description: use for cash responses + properties: + reference: + example: "93000262276908" + type: string + barcode: + example: "93000262276908" + type: string + barcode_url: + example: https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3UN6375MP4SLLCWV%2F20230203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230203T215750Z&X-Amz-Expires=604800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJGMEQCICd79cu7DYu%2F4%2B3HnVVswydgU9yHcE9kmQIIk2TLoZJrAiBVZ0HxVSeboK5lhdQSqADjwQF62XX35jhC%2F2riB0M8uCqQBAj2%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc5OTgwMTA4MTY4OCIMXWZds9ZI5hzUdbeGKuQDFreMyeWnWWPqDuGZ2%2BHk6usCr%2Fl096%2FNJh9xtf8htLu56K%2FhWUTx%2BjiqFWM2O%2FF5zTS%2BIV6TqkLDZ%2BQ5Jo1miQrRmR57YDz6uP2Yd1mNZ1ouq5ipnNjUuu5UWCCBAmqyZQsrVmeMQpSV2IB%2BTERCCcW2SukFEYU%2F20%2Fzy5orsoZ8DxOW460IymR3cWBk5u3Xh2cV6Y1RdPEwDEThhqYEF5w%2ByKbLENloMsI%2FUm6sG5PPrO3yQOAP9aK2muLJs9lXQRU%2FL%2FSsmS4FKSUFOqlN6YU%2Bi2Y%2FyGIKAJT2VDkngvz5Sl%2Fadj0j%2BPKftVRV5FcEhySB6Rl%2BSkPN7kVQMJp6pS8hMJ6JCyEA%2BA3eWYdIfKgQhWVXAR4oCBfJ62DH8FU3a7WfSjjpTwfVkiReWen3GGCYfUWETTVKp46MKnJ9PG0CD3KzxKV8VfmEGc5krK%2FI%2F%2BDV2wtSa%2F9qf1%2BK1YYJIK9qZGb25ljUiGhTB4T%2BMUOSQFjetiWUoOJc5Q3Jz%2FXJbiTAMTST39MhdbCgiMgfrc8OGKN5DOVbex33Z7dn0xf%2FOCkSqurhLaG08efKQBdhLNS0RlE9hbg9yZ2ywwtQIF39fI6A7eeH0T11a5HMlvm51u4rAffPHRuEJfwJoIuj%2F2s3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc + type: string + expires_at: + example: 0 + format: int64 + type: integer + provider: + example: Oxxo + type: string + type: object payment_method_card_response: allOf: - $ref: '#/components/schemas/payment_method_response' - - $ref: '#/components/schemas/payment_method_card_response_allOf' + - description: use for card responses + properties: + last4: + example: "6410" + type: string + bin: + example: "40276657" + type: string + card_type: + example: debit + type: string + exp_month: + example: "10" + type: string + exp_year: + example: "25" + type: string + brand: + example: visa + type: string + name: + example: Fulano Perez" + type: string + default: + type: boolean + visible_on_checkout: + type: boolean + payment_source_status: + example: active + type: string + type: object payment_method_spei_recurrent: allOf: - $ref: '#/components/schemas/payment_method_response' - - $ref: '#/components/schemas/payment_method_spei_recurrent_allOf' + - description: use for spei responses + properties: + reference: + example: "93000262276908" + type: string + expires_at: + example: none + type: string + type: object plan_response: description: plans model properties: @@ -13508,14 +14018,21 @@ components: shipping_order_response: allOf: - $ref: '#/components/schemas/shipping_request' - - $ref: '#/components/schemas/product_order_response_allOf' + - properties: + id: + type: string + object: + type: string + parent_id: + type: string + type: object title: shipping_order_response customer_shipping_contacts_response: description: Contains the detail of the shipping addresses that the client has active or has used in Conekta properties: phone: - example: "525511223344" + example: "+525511223344" type: string receiver: example: Marvin Fuller @@ -13623,7 +14140,17 @@ components: update_order_tax_response: allOf: - $ref: '#/components/schemas/order_tax_request' - - $ref: '#/components/schemas/update_order_tax_response_allOf' + - properties: + id: + example: tax_lin_2tQ8dC5mg1UADmVPo + type: string + object: + example: tax_line + type: string + parent_id: + example: ord_2tPAmKCEJqh8RE6nY + type: string + type: object description: create new taxes for an existing order response required: - id @@ -14064,7 +14591,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,\ @@ -14107,7 +14634,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,\ @@ -14155,7 +14682,8 @@ components: customer_update_fiscal_entities_request: properties: address: - $ref: '#/components/schemas/customer_fiscal_entities_request_address' + allOf: + - $ref: '#/components/schemas/customer_address' tax_id: type: string email: @@ -14442,6 +14970,49 @@ components: type: object title: update_product type: object + payout_order: + description: a payout order + properties: + allowed_payout_methods: + description: The payout methods that are allowed for the payout order. + example: + - cashout + items: + type: string + type: array + amount: + description: The amount of the payout order. + example: 100 + type: integer + currency: + default: MXN + description: The currency in which the payout order is made. + example: MXN + type: string + customer_info: + $ref: '#/components/schemas/customer_info_just_customer_id' + metadata: + additionalProperties: true + description: The metadata of the payout order. + example: + custom_client_id: "12345" + maxProperties: 100 + type: object + payout: + $ref: '#/components/schemas/payout' + reason: + description: The reason for the payout order. + example: Payout order for the customer + type: string + required: + - allowed_payout_methods + - amount + - currency + - customer_info + - payout + - reason + title: payout order request + type: object checkout: description: It is a sub-resource of the Order model that can be stipulated in order to configure its corresponding checkout @@ -14521,19 +15092,36 @@ components: payment_method_card_request: allOf: - $ref: '#/components/schemas/customer_payment_method_request' - - $ref: '#/components/schemas/payment_method_card_request_allOf' - required: - - token_id + - properties: + token_id: + description: "Token id that will be used to create a \"card\" type payment\ + \ method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription]\ + \ tutorial for more information on how to tokenize cards." + example: tok_32hj4g234as + type: string + required: + - token_id + type: object title: payment_method_card_request payment_method_cash_request: allOf: - $ref: '#/components/schemas/customer_payment_method_request' - - $ref: '#/components/schemas/payment_method_cash_request_allOf' + - properties: + expires_at: + example: 1553273553 + format: int64 + type: integer + type: object title: payment_method_cash_request payment_method_spei_request: allOf: - $ref: '#/components/schemas/customer_payment_method_request' - - $ref: '#/components/schemas/payment_method_cash_request_allOf' + - properties: + expires_at: + example: 1553273553 + format: int64 + type: integer + type: object title: payment_method_spei_request update_payment_methods: properties: @@ -14659,7 +15247,7 @@ components: properties: phone: description: Phone contact - example: "525511223344" + example: "+525511223344" type: string receiver: description: Name of the person who will receive the order @@ -14695,7 +15283,7 @@ components: properties: phone: description: Phone contact - example: "525511223344" + example: "+525511223344" type: string receiver: description: Name of the person who will receive the order @@ -14874,15 +15462,135 @@ components: payment_method_cash: allOf: - $ref: '#/components/schemas/payment_method' - - $ref: '#/components/schemas/charge_data_payment_method_cash_response' + - description: use for cash responses + properties: + auth_code: + example: 542563 + nullable: true + type: integer + cashier_id: + example: OINM01010 + nullable: true + type: string + reference: + example: "93000262276908" + type: string + barcode_url: + example: https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3UN6375MP4SLLCWV%2F20230203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230203T215750Z&X-Amz-Expires=604800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJGMEQCICd79cu7DYu%2F4%2B3HnVVswydgU9yHcE9kmQIIk2TLoZJrAiBVZ0HxVSeboK5lhdQSqADjwQF62XX35jhC%2F2riB0M8uCqQBAj2%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc5OTgwMTA4MTY4OCIMXWZds9ZI5hzUdbeGKuQDFreMyeWnWWPqDuGZ2%2BHk6usCr%2Fl096%2FNJh9xtf8htLu56K%2FhWUTx%2BjiqFWM2O%2FF5zTS%2BIV6TqkLDZ%2BQ5Jo1miQrRmR57YDz6uP2Yd1mNZ1ouq5ipnNjUuu5UWCCBAmqyZQsrVmeMQpSV2IB%2BTERCCcW2SukFEYU%2F20%2Fzy5orsoZ8DxOW460IymR3cWBk5u3Xh2cV6Y1RdPEwDEThhqYEF5w%2ByKbLENloMsI%2FUm6sG5PPrO3yQOAP9aK2muLJs9lXQRU%2FL%2FSsmS4FKSUFOqlN6YU%2Bi2Y%2FyGIKAJT2VDkngvz5Sl%2Fadj0j%2BPKftVRV5FcEhySB6Rl%2BSkPN7kVQMJp6pS8hMJ6JCyEA%2BA3eWYdIfKgQhWVXAR4oCBfJ62DH8FU3a7WfSjjpTwfVkiReWen3GGCYfUWETTVKp46MKnJ9PG0CD3KzxKV8VfmEGc5krK%2FI%2F%2BDV2wtSa%2F9qf1%2BK1YYJIK9qZGb25ljUiGhTB4T%2BMUOSQFjetiWUoOJc5Q3Jz%2FXJbiTAMTST39MhdbCgiMgfrc8OGKN5DOVbex33Z7dn0xf%2FOCkSqurhLaG08efKQBdhLNS0RlE9hbg9yZ2ywwtQIF39fI6A7eeH0T11a5HMlvm51u4rAffPHRuEJfwJoIuj%2F2s3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc + type: string + expires_at: + example: 0 + format: int64 + type: integer + service_name: + example: OxxoPay + type: string + store: + example: 10MON50EDI + nullable: true + type: string + store_name: + example: OXXO + type: string + title: charge_data_payment_method_cash_response + type: object payment_method_card: allOf: - $ref: '#/components/schemas/payment_method' - - $ref: '#/components/schemas/charge_data_payment_method_card_response' + - description: use for card responses + properties: + account_type: + example: Credit + type: string + auth_code: + example: "867372" + type: string + brand: + example: visa + type: string + contract_id: + description: Id sent for recurrent charges. + example: S781317595 + type: string + country: + example: MX + type: string + exp_month: + example: "02" + type: string + exp_year: + example: "30" + type: string + fraud_indicators: + items: {} + type: array + issuer: + example: BANAMEX + type: string + last4: + example: "4242" + type: string + name: + example: Fulanito Perez + type: string + title: charge_data_payment_method_card_response + type: object payment_method_bank_transfer: allOf: - $ref: '#/components/schemas/payment_method' - - $ref: '#/components/schemas/charge_data_payment_method_bank_transfer_response' + - description: use for bank transfer responses + properties: + bank: + example: STP + type: string + clabe: + example: "646180111805034237" + type: string + description: + nullable: true + type: string + executed_at: + nullable: true + type: integer + expires_at: + example: 1683053729 + format: int64 + type: integer + issuing_account_bank: + nullable: true + type: string + issuing_account_number: + nullable: true + type: string + issuing_account_holder_name: + nullable: true + type: string + issuing_account_tax_id: + nullable: true + type: string + payment_attempts: + items: {} + type: array + receiving_account_holder_name: + nullable: true + type: string + receiving_account_number: + example: "646180111805034237" + type: string + receiving_account_bank: + example: STP + type: string + receiving_account_tax_id: + nullable: true + type: string + reference_number: + nullable: true + type: string + tracking_code: + nullable: true + type: string + title: charge_data_payment_method_bank_transfer_response + type: object company_payout_destination_response: description: Company payout destination model properties: @@ -15111,6 +15819,11 @@ components: on_demand_enabled: example: true type: boolean + redirection_time: + description: number of seconds to wait before redirecting to the success_url + example: 10 + format: int8 + type: integer success_url: description: "Redirection url back to the site in case of successful payment,\ \ applies only to HostedPayment" @@ -15299,31 +16012,27 @@ components: type: string title: deleted_blacklist_rule_response type: object - get_api_keys_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/api_key_response' - type: array - type: object get_api_keys_response: allOf: - $ref: '#/components/schemas/page' - $ref: '#/components/schemas/pagination' - - $ref: '#/components/schemas/get_api_keys_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/api_key_response' + type: array + type: object title: get_api_keys_response - api_key_create_response_allOf: - properties: - authentication_token: - description: "It is occupied as a user when authenticated with basic authentication,\ - \ with a blank password. This value will only appear once, in the request\ - \ to create a new key. Copy and save it in a safe place." - example: key_rpHzxufNgjFCdprEEFZRTKi - type: string - type: object api_key_create_response: allOf: - - $ref: '#/components/schemas/api_key_create_response_allOf' + - properties: + authentication_token: + description: "It is occupied as a user when authenticated with basic authentication,\ + \ with a blank password. This value will only appear once, in the request\ + \ to create a new key. Copy and save it in a safe place." + example: key_rpHzxufNgjFCdprEEFZRTKi + type: string + type: object - $ref: '#/components/schemas/api_key_response' title: api_key_create_response api_key_update_request: @@ -15338,136 +16047,120 @@ components: type: string title: api_key_update_request type: object - delete_api_keys_response_allOf: - properties: - deleted: - example: true - type: boolean - type: object delete_api_keys_response: allOf: - $ref: '#/components/schemas/api_key_response_on_delete' - - $ref: '#/components/schemas/delete_api_keys_response_allOf' + - properties: + deleted: + example: true + type: boolean + type: object title: delete_api_keys_response - get_charges_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/charge_response' - type: array - type: object get_charges_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_charges_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/charge_response' + type: array + type: object title: get_charges_response - get_companies_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/company_response' - type: array - type: object get_companies_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_companies_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/company_response' + type: array + type: object title: get_companies_response - customers_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/customer_response' - title: customers_data_response - type: array - type: object customers_response: allOf: - - $ref: '#/components/schemas/customers_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/customer_response' + title: customers_data_response + type: array + type: object - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' title: customers_response - create_customer_fiscal_entities_response_allOf: - properties: - id: - example: ship_cont_2tKZsTYcsryyu7Ah8 - type: string - object: - example: shipping_contact - type: string - created_at: - example: 1675715413 - format: int64 - type: integer - parent_id: - example: cus_2tKcHxhTz7xU5SymF - type: string - default: - type: boolean - required: - - created_at - - id - - object - type: object create_customer_fiscal_entities_response: allOf: - $ref: '#/components/schemas/customer_fiscal_entities_request' - - $ref: '#/components/schemas/create_customer_fiscal_entities_response_allOf' + - properties: + id: + example: ship_cont_2tKZsTYcsryyu7Ah8 + type: string + object: + example: shipping_contact + type: string + created_at: + example: 1675715413 + format: int64 + type: integer + parent_id: + example: cus_2tKcHxhTz7xU5SymF + type: string + default: + type: boolean + required: + - created_at + - id + - object + type: object title: create_customer_fiscal_entities_response - update_customer_fiscal_entities_response_allOf: - properties: - id: - example: fis_ent_2tKZsTYcsryyu7Ah8 - type: string - object: - example: fiscal_entities - type: string - created_at: - example: 1675715413 - format: int64 - type: integer - parent_id: - example: cus_2tKcHxhTz7xU5SymF - type: string - default: - type: boolean - required: - - created_at - - id - - object - type: object update_customer_fiscal_entities_response: allOf: - $ref: '#/components/schemas/customer_fiscal_entities_request' - - $ref: '#/components/schemas/update_customer_fiscal_entities_response_allOf' + - properties: + id: + example: fis_ent_2tKZsTYcsryyu7Ah8 + type: string + object: + example: fiscal_entities + type: string + created_at: + example: 1675715413 + format: int64 + type: integer + parent_id: + example: cus_2tKcHxhTz7xU5SymF + type: string + default: + type: boolean + required: + - created_at + - id + - object + type: object title: update_customer_fiscal_entities_response - get_order_discount_lines_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/discount_lines_response' - type: array - type: object get_order_discount_lines_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_order_discount_lines_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/discount_lines_response' + type: array + type: object title: get_order_discount_lines_response - get_events_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/event_response' - type: array - type: object get_events_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_events_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/event_response' + type: array + type: object title: get_events_response get_orders_response: allOf: @@ -15505,18 +16198,28 @@ components: - amount - reason type: object - checkouts_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/checkout_response' - type: array - type: object + payout_orders_response: + allOf: + - properties: + data: + items: + $ref: '#/components/schemas/payout_order_response' + title: payout_orders_data_response + type: array + type: object + - $ref: '#/components/schemas/pagination' + - $ref: '#/components/schemas/page' + title: payout_orders_response checkouts_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/checkouts_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/checkout_response' + type: array + type: object title: checkouts_response emailCheckout_request: properties: @@ -15548,18 +16251,16 @@ components: - $ref: '#/components/schemas/payment_method_card_response' - $ref: '#/components/schemas/payment_method_spei_recurrent' title: get_customer_payment_method_data_response - get_payment_method_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/get_customer_payment_method_data_response' - type: array - type: object get_payment_method_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_payment_method_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/get_customer_payment_method_data_response' + type: array + type: object title: get_payment_method_response CreateCustomerPaymentMethods_request: description: Contains details of the payment methods that the customer has active @@ -15594,65 +16295,62 @@ components: - $ref: '#/components/schemas/payment_method_card_response' - $ref: '#/components/schemas/payment_method_spei_recurrent' title: update_customer_payment_methods_response - get_plans_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/plan_response' - type: array - type: object get_plans_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_plans_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/plan_response' + type: array + type: object title: get_plans_response subscription_events_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_events_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/event_response' + type: array + type: object title: subscription_events_response - get_transactions_response_allOf: - properties: - data: - description: Transactions - items: - $ref: '#/components/schemas/transaction_response' - type: array - type: object get_transactions_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_transactions_response_allOf' + - properties: + data: + description: Transactions + items: + $ref: '#/components/schemas/transaction_response' + type: array + type: object title: get_transactions_response - get_transfers_response_allOf: - properties: - data: - description: Transfers - items: - $ref: '#/components/schemas/transfers_response' - type: array - type: object get_transfers_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_transfers_response_allOf' + - properties: + data: + description: Transfers + items: + $ref: '#/components/schemas/transfers_response' + type: array + type: object title: get_transfers_response - get_webhook_keys_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/webhook-key_response' - type: array - type: object get_webhook_keys_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_webhook_keys_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/webhook-key_response' + type: array + type: object title: get_webhook_keys_response webhook_key_request: properties: @@ -15672,18 +16370,16 @@ components: type: boolean title: webhook_key_update_request type: object - get_webhooks_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/webhook_response' - type: array - type: object get_webhooks_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/get_webhooks_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/webhook_response' + type: array + type: object title: get_webhooks_response risk_rules_data: properties: @@ -15716,31 +16412,6 @@ components: example: secure customer example@example.com type: string type: object - example: null - risk_rules: - properties: - data: - items: - $ref: '#/components/schemas/risk_rules_data' - type: array - title: risk_rules - type: object - example: null - error_allOf: - properties: - log_id: - description: log id - example: 507f1f77bcf86cd799439011 - nullable: true - type: string - type: - example: authentication_error - type: string - object: - example: error - type: string - type: object - example: null charge_response_channel: properties: segment: @@ -15803,19 +16474,17 @@ components: - object title: charge_response_refunds_data type: object - charge_response_refunds_allOf: - properties: - data: - description: refunds - items: - $ref: '#/components/schemas/charge_response_refunds_data' - type: array - type: object charge_response_refunds: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/charge_response_refunds_allOf' + - properties: + data: + description: refunds + items: + $ref: '#/components/schemas/charge_response_refunds_data' + type: array + type: object nullable: true title: charge_response_refunds type: object @@ -15846,19 +16515,37 @@ components: customer_fiscal_entities_data_response: allOf: - $ref: '#/components/schemas/customer_fiscal_entities_request' - - $ref: '#/components/schemas/create_customer_fiscal_entities_response_allOf' + - properties: + id: + example: ship_cont_2tKZsTYcsryyu7Ah8 + type: string + object: + example: shipping_contact + type: string + created_at: + example: 1675715413 + format: int64 + type: integer + parent_id: + example: cus_2tKcHxhTz7xU5SymF + type: string + default: + type: boolean + required: + - created_at + - id + - object + type: object title: customer_fiscal_entities_data_response - customer_fiscal_entities_response_allOf: - properties: - data: - items: - $ref: '#/components/schemas/customer_fiscal_entities_data_response' - type: array - type: object customer_fiscal_entities_response: allOf: - $ref: '#/components/schemas/pagination' - - $ref: '#/components/schemas/customer_fiscal_entities_response_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/customer_fiscal_entities_data_response' + type: array + type: object title: customer_fiscal_entities_response customer_payment_methods_data: discriminator: @@ -15873,77 +16560,48 @@ components: - $ref: '#/components/schemas/payment_method_card_response' - $ref: '#/components/schemas/payment_method_spei_recurrent' title: customer_payment_methods_data - customerPaymentMethods: - properties: - data: - items: - $ref: '#/components/schemas/customer_payment_methods_data' - title: customer_payment_methods_data - type: array - title: customerPaymentMethods - type: object customer_payment_methods_response: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/customerPaymentMethods' + - properties: + data: + items: + $ref: '#/components/schemas/customer_payment_methods_data' + title: customer_payment_methods_data + type: array + title: customerPaymentMethods + type: object title: customer_payment_methods_response - customer_shipping_contacts_data_response_allOf: - properties: - id: - example: ship_cont_2tKZsTYcsryyu7Ah8 - type: string - object: - example: shipping_contact - type: string - created_at: - example: 1675715413 - format: int64 - type: integer - required: - - created_at - - id - - object - type: object customer_shipping_contacts_data_response: allOf: - $ref: '#/components/schemas/customer_shipping_contacts' - - $ref: '#/components/schemas/customer_shipping_contacts_data_response_allOf' + - properties: + id: + example: ship_cont_2tKZsTYcsryyu7Ah8 + type: string + object: + example: shipping_contact + type: string + created_at: + example: 1675715413 + format: int64 + type: integer + required: + - created_at + - id + - object + type: object title: customer_shipping_contacts_data_response - customer_response_shipping_contacts_allOf: - properties: - data: - items: - $ref: '#/components/schemas/customer_shipping_contacts_data_response' - type: array - type: object customer_response_shipping_contacts: allOf: - $ref: '#/components/schemas/pagination' - - $ref: '#/components/schemas/customer_response_shipping_contacts_allOf' - customer_fiscal_entities_request_address: - allOf: - - $ref: '#/components/schemas/customer_address' - discount_lines_response_allOf: - properties: - id: - description: The discount line id - example: dis_lin_2tQQ58HPgPw7StE8z - type: string - object: - description: The object name - example: discount_line - type: string - parent_id: - description: The order id - example: ord_2tPAmKCEJqh8RE6nY - type: string - required: - - id - - object - - parent_id - type: object - example: null + - properties: + data: + items: + $ref: '#/components/schemas/customer_shipping_contacts_data_response' + type: array + type: object WebhookLog: properties: failed_attempts: @@ -16096,21 +16754,15 @@ components: type: string title: logs_response_data type: object - charges_data_response: - allOf: - - $ref: '#/components/schemas/charge_response' - title: charges_data_response - order_response_charges_allOf: - properties: - data: - items: - $ref: '#/components/schemas/charges_data_response' - type: array - type: object order_response_charges: allOf: - $ref: '#/components/schemas/pagination' - - $ref: '#/components/schemas/order_response_charges_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/charges_data_response' + type: array + type: object description: The charges associated with the order order_response_checkout: properties: @@ -16178,6 +16830,12 @@ components: recurrent: example: false type: boolean + redirection_time: + description: number of seconds to wait before redirecting to the success_url + example: 2 + format: int8 + nullable: true + type: integer slug: example: 6fca054a85194c43971ecea35cc519bb type: string @@ -16200,42 +16858,32 @@ components: example: https://pay.stg.conekta.io/checkout/6fca054a85194c43971ecea35cc519bb type: string type: object - order_response_customer_info_allOf: - properties: - object: - example: customer_info - type: string - type: object order_response_customer_info: allOf: - - $ref: '#/components/schemas/order_response_customer_info_allOf' + - properties: + object: + example: customer_info + type: string + type: object - $ref: '#/components/schemas/order_customer_info_response' - $ref: '#/components/schemas/customer_info_just_customer_id_response' - discount_lines_data_response: - allOf: - - $ref: '#/components/schemas/discount_lines_response' - title: discount_lines_data_response - order_response_discount_lines_allOf: - properties: - data: - items: - $ref: '#/components/schemas/discount_lines_data_response' - type: array - type: object order_response_discount_lines: allOf: - $ref: '#/components/schemas/pagination' - - $ref: '#/components/schemas/order_response_discount_lines_allOf' - order_fiscal_entity_address_response_allOf: - properties: - object: - example: fiscal_entity_address - type: string - type: object + - properties: + data: + items: + $ref: '#/components/schemas/discount_lines_data_response' + type: array + type: object order_fiscal_entity_address_response: allOf: - $ref: '#/components/schemas/fiscal_entity_address' - - $ref: '#/components/schemas/order_fiscal_entity_address_response_allOf' + - properties: + object: + example: fiscal_entity_address + type: string + type: object description: Address of the fiscal entity title: order_fiscal_entity_address_response order_fiscal_entity_response: @@ -16280,7 +16928,7 @@ components: type: string phone: description: Phone of the fiscal entity - example: "525511223344" + example: "+525511223344" nullable: true type: string required: @@ -16290,32 +16938,28 @@ components: - object title: order_fiscal_entity_response type: object - product_data_response_allOf: - properties: - id: - type: string - object: - type: string - parent_id: - type: string - type: object product_data_response: allOf: - $ref: '#/components/schemas/product' - - $ref: '#/components/schemas/product_data_response_allOf' + - properties: + id: + type: string + object: + type: string + parent_id: + type: string + type: object title: product_data_response - order_response_products_allOf: - properties: - data: - items: - $ref: '#/components/schemas/product_data_response' - type: array - type: object order_response_products: allOf: - $ref: '#/components/schemas/pagination' - $ref: '#/components/schemas/page' - - $ref: '#/components/schemas/order_response_products_allOf' + - properties: + data: + items: + $ref: '#/components/schemas/product_data_response' + type: array + type: object title: order_response_products order_next_action_response_redirect_to_url: description: contains the following attributes that will guide to continue the @@ -16346,95 +16990,73 @@ components: type: string title: order_next_action_response type: object - order_response_shipping_contact_allOf: - properties: - created_at: - format: int64 - type: integer - id: - type: string - object: - type: string - type: object order_response_shipping_contact: allOf: - - $ref: '#/components/schemas/order_response_shipping_contact_allOf' + - properties: + created_at: + format: int64 + type: integer + id: + type: string + object: + type: string + type: object - $ref: '#/components/schemas/customer_shipping_contacts_response' - product_order_response_allOf: - properties: - id: - type: string - object: - type: string - parent_id: - type: string - type: object - example: null - payment_method_cash_response_allOf: - description: use for cash responses + payout_order_response_customer_info: + allOf: + - properties: + id: + description: The id of the customer. + example: cus_23874283647 + type: string + required: + - id + type: object + - $ref: '#/components/schemas/order_customer_info_response' + description: The customer information of the payout order. + payout_order_payouts_item: properties: - reference: - example: "93000262276908" - type: string - barcode: - example: "93000262276908" - type: string - barcode_url: - example: https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3UN6375MP4SLLCWV%2F20230203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230203T215750Z&X-Amz-Expires=604800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJGMEQCICd79cu7DYu%2F4%2B3HnVVswydgU9yHcE9kmQIIk2TLoZJrAiBVZ0HxVSeboK5lhdQSqADjwQF62XX35jhC%2F2riB0M8uCqQBAj2%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc5OTgwMTA4MTY4OCIMXWZds9ZI5hzUdbeGKuQDFreMyeWnWWPqDuGZ2%2BHk6usCr%2Fl096%2FNJh9xtf8htLu56K%2FhWUTx%2BjiqFWM2O%2FF5zTS%2BIV6TqkLDZ%2BQ5Jo1miQrRmR57YDz6uP2Yd1mNZ1ouq5ipnNjUuu5UWCCBAmqyZQsrVmeMQpSV2IB%2BTERCCcW2SukFEYU%2F20%2Fzy5orsoZ8DxOW460IymR3cWBk5u3Xh2cV6Y1RdPEwDEThhqYEF5w%2ByKbLENloMsI%2FUm6sG5PPrO3yQOAP9aK2muLJs9lXQRU%2FL%2FSsmS4FKSUFOqlN6YU%2Bi2Y%2FyGIKAJT2VDkngvz5Sl%2Fadj0j%2BPKftVRV5FcEhySB6Rl%2BSkPN7kVQMJp6pS8hMJ6JCyEA%2BA3eWYdIfKgQhWVXAR4oCBfJ62DH8FU3a7WfSjjpTwfVkiReWen3GGCYfUWETTVKp46MKnJ9PG0CD3KzxKV8VfmEGc5krK%2FI%2F%2BDV2wtSa%2F9qf1%2BK1YYJIK9qZGb25ljUiGhTB4T%2BMUOSQFjetiWUoOJc5Q3Jz%2FXJbiTAMTST39MhdbCgiMgfrc8OGKN5DOVbex33Z7dn0xf%2FOCkSqurhLaG08efKQBdhLNS0RlE9hbg9yZ2ywwtQIF39fI6A7eeH0T11a5HMlvm51u4rAffPHRuEJfwJoIuj%2F2s3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc + amount: + description: The amount of the payout. + example: 3000 + type: integer + currency: + description: The currency in which the payout is made. + example: MXN type: string expires_at: - example: 0 + description: The expiration date of the payout. + example: 1677626837 format: int64 type: integer - provider: - example: Oxxo - type: string - type: object - example: null - payment_method_card_response_allOf: - description: use for card responses - properties: - last4: - example: "6410" - type: string - bin: - example: "40276657" - type: string - card_type: - example: debit - type: string - exp_month: - example: "10" - type: string - exp_year: - example: "25" - type: string - brand: - example: visa - type: string - name: - example: Fulano Perez" + id: + description: The id of the payout. + example: payout_2vZwsRAhhGp2dFDJx type: string - default: - type: boolean - visible_on_checkout: + livemode: + description: The live mode of the payout. + example: true type: boolean - payment_source_status: - example: active + object: + description: The object of the payout. + example: payout type: string - type: object - example: null - payment_method_spei_recurrent_allOf: - description: use for spei responses - properties: - reference: - example: "93000262276908" + payout_order_id: + description: The id of the payout order. + example: f2654d66-d740-457a-9a8c-f96b5196f44e type: string - expires_at: - example: none + status: + description: The status of the payout. + example: open type: string + required: + - amount + - currency + - id + - livemode + - object + title: payout_order_payouts_item type: object - example: null customer_shipping_contacts_response_address: properties: object: @@ -16463,19 +17085,6 @@ components: nullable: true type: boolean type: object - update_order_tax_response_allOf: - properties: - id: - example: tax_lin_2tQ8dC5mg1UADmVPo - type: string - object: - example: tax_line - type: string - parent_id: - example: ord_2tPAmKCEJqh8RE6nY - type: string - type: object - example: null token_response_checkout: deprecated: true nullable: true @@ -16738,7 +17347,7 @@ components: type: string phone: description: Phone of the fiscal entity - example: "525511223344" + example: "+525511223344" type: string tax_id: description: Tax ID of the fiscal entity @@ -16775,7 +17384,7 @@ components: type: object phone: description: Phone of the fiscal entity - example: "525511223344" + example: "+525511223344" type: string tax_id: description: Tax ID of the fiscal entity @@ -16786,6 +17395,26 @@ components: - address title: order_update_fiscal_entity_request type: object + payout_method: + description: The payout method of the payout order. + properties: + type: + description: The type of the payout method. + example: cashout + type: string + required: + - type + title: payout_method + type: object + payout: + description: The payout information of the payout order. + properties: + payout_method: + $ref: '#/components/schemas/payout_method' + required: + - payout_method + title: payout + type: object checkout_order_template_customer_info: description: It is the information of the customer who will be created when receiving a new payment. @@ -16824,24 +17453,6 @@ components: - currency - line_items type: object - payment_method_card_request_allOf: - properties: - token_id: - description: "Token id that will be used to create a \"card\" type payment\ - \ method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription]\ - \ tutorial for more information on how to tokenize cards." - example: tok_32hj4g234as - type: string - type: object - example: null - payment_method_cash_request_allOf: - properties: - expires_at: - example: 1553273553 - format: int64 - type: integer - type: object - example: null customer_shipping_contacts_address: description: Address of the person who will receive the order properties: @@ -16934,135 +17545,14 @@ components: type: string title: details_error type: object - charge_data_payment_method_cash_response: - description: use for cash responses - properties: - auth_code: - example: 542563 - nullable: true - type: integer - cashier_id: - example: OINM01010 - nullable: true - type: string - reference: - example: "93000262276908" - type: string - barcode_url: - example: https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3UN6375MP4SLLCWV%2F20230203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230203T215750Z&X-Amz-Expires=604800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJGMEQCICd79cu7DYu%2F4%2B3HnVVswydgU9yHcE9kmQIIk2TLoZJrAiBVZ0HxVSeboK5lhdQSqADjwQF62XX35jhC%2F2riB0M8uCqQBAj2%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc5OTgwMTA4MTY4OCIMXWZds9ZI5hzUdbeGKuQDFreMyeWnWWPqDuGZ2%2BHk6usCr%2Fl096%2FNJh9xtf8htLu56K%2FhWUTx%2BjiqFWM2O%2FF5zTS%2BIV6TqkLDZ%2BQ5Jo1miQrRmR57YDz6uP2Yd1mNZ1ouq5ipnNjUuu5UWCCBAmqyZQsrVmeMQpSV2IB%2BTERCCcW2SukFEYU%2F20%2Fzy5orsoZ8DxOW460IymR3cWBk5u3Xh2cV6Y1RdPEwDEThhqYEF5w%2ByKbLENloMsI%2FUm6sG5PPrO3yQOAP9aK2muLJs9lXQRU%2FL%2FSsmS4FKSUFOqlN6YU%2Bi2Y%2FyGIKAJT2VDkngvz5Sl%2Fadj0j%2BPKftVRV5FcEhySB6Rl%2BSkPN7kVQMJp6pS8hMJ6JCyEA%2BA3eWYdIfKgQhWVXAR4oCBfJ62DH8FU3a7WfSjjpTwfVkiReWen3GGCYfUWETTVKp46MKnJ9PG0CD3KzxKV8VfmEGc5krK%2FI%2F%2BDV2wtSa%2F9qf1%2BK1YYJIK9qZGb25ljUiGhTB4T%2BMUOSQFjetiWUoOJc5Q3Jz%2FXJbiTAMTST39MhdbCgiMgfrc8OGKN5DOVbex33Z7dn0xf%2FOCkSqurhLaG08efKQBdhLNS0RlE9hbg9yZ2ywwtQIF39fI6A7eeH0T11a5HMlvm51u4rAffPHRuEJfwJoIuj%2F2s3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc - type: string - expires_at: - example: 0 - format: int64 - type: integer - service_name: - example: OxxoPay - type: string - store: - example: 10MON50EDI - nullable: true - type: string - store_name: - example: OXXO - type: string - title: charge_data_payment_method_cash_response - type: object - example: null - charge_data_payment_method_card_response: - description: use for card responses - properties: - account_type: - example: Credit - type: string - auth_code: - example: "867372" - type: string - brand: - example: visa - type: string - contract_id: - description: Id sent for recurrent charges. - example: S781317595 - type: string - country: - example: MX - type: string - exp_month: - example: "02" - type: string - exp_year: - example: "30" - type: string - fraud_indicators: - items: {} - type: array - issuer: - example: BANAMEX - type: string - last4: - example: "4242" - type: string - name: - example: Fulanito Perez - type: string - title: charge_data_payment_method_card_response - type: object - example: null - charge_data_payment_method_bank_transfer_response: - description: use for bank transfer responses - properties: - bank: - example: STP - type: string - clabe: - example: "646180111805034237" - type: string - description: - nullable: true - type: string - executed_at: - nullable: true - type: integer - expires_at: - example: 1683053729 - format: int64 - type: integer - issuing_account_bank: - nullable: true - type: string - issuing_account_number: - nullable: true - type: string - issuing_account_holder_name: - nullable: true - type: string - issuing_account_tax_id: - nullable: true - type: string - payment_attempts: - items: {} - type: array - receiving_account_holder_name: - nullable: true - type: string - receiving_account_number: - example: "646180111805034237" - type: string - receiving_account_bank: - example: STP - type: string - receiving_account_tax_id: - nullable: true - type: string - reference_number: - nullable: true - type: string - tracking_code: - nullable: true - type: string - title: charge_data_payment_method_bank_transfer_response - type: object - example: null + charges_data_response: + allOf: + - $ref: '#/components/schemas/charge_response' + title: charges_data_response + discount_lines_data_response: + allOf: + - $ref: '#/components/schemas/discount_lines_response' + title: discount_lines_data_response securitySchemes: bearerAuth: scheme: bearer diff --git a/config-netcore.json b/config-netcore.json index 8ad4120..9dde1c8 100644 --- a/config-netcore.json +++ b/config-netcore.json @@ -2,11 +2,11 @@ "targetFramework" : "netstandard2.0;net6.0", "testTargetFramework" : "net6.0", "files": { - "CODE_OF_CONDUCT.md" : {}, - "AUTHORS.md" : {}, - "LICENSE" : {}, - "conekta.png" : {}, - "CONTRIBUTING.md" : {}, + "/local/CODE_OF_CONDUCT.md" : {}, + "/local/AUTHORS.md" : {}, + "/local/LICENSE" : {}, + "/local/conekta.png" : {}, + "/local/CONTRIBUTING.md" : {}, "RuntimeInformation.mustache" : { "templateType": "SupportingFiles", "destinationFilename": "RuntimeInformation.cs", @@ -28,10 +28,10 @@ "packageAuthors" : "engineering@conekta.com", "packageCompany" : "Conekta", "useGenericHost" : false, - "templateDir": "templates/netcore", + "templateDir": "/local/templates/netcore", "useOneOfDiscriminatorLookup" : true, "packageCopyright" : "Conekta", - "PackageReleaseNotes" : "", + "PackageReleaseNotes" : "add support for payout orders", "releaseNote" : "support for resend event, api keys and webhook keys", - "packageVersion" : "6.0.7" + "packageVersion" : "6.0.8" } diff --git a/docs/ApiKeyCreateResponse.md b/docs/ApiKeyCreateResponse.md index e697aac..812e347 100644 --- a/docs/ApiKeyCreateResponse.md +++ b/docs/ApiKeyCreateResponse.md @@ -4,7 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AuthenticationToken** | **string** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] **Active** | **bool** | Indicates if the api key is active | [optional] **CreatedAt** | **long** | Unix timestamp in seconds of when the api key was created | [optional] **UpdatedAt** | **long** | Unix timestamp in seconds of when the api key was last updated | [optional] @@ -16,6 +15,7 @@ Name | Type | Description | Notes **VarObject** | **string** | Object name, value is 'api_key' | [optional] **Prefix** | **string** | The first few characters of the authentication_token | [optional] **Role** | **string** | Indicates if the api key is private or public | [optional] +**AuthenticationToken** | **string** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApiKeyCreateResponseAllOf.md b/docs/ApiKeyCreateResponseAllOf.md deleted file mode 100644 index e79764c..0000000 --- a/docs/ApiKeyCreateResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.ApiKeyCreateResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthenticationToken** | **string** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ChargeDataPaymentMethodBankTransferResponse.md b/docs/ChargeDataPaymentMethodBankTransferResponse.md deleted file mode 100644 index c3e0cb9..0000000 --- a/docs/ChargeDataPaymentMethodBankTransferResponse.md +++ /dev/null @@ -1,26 +0,0 @@ -# Conekta.net.Model.ChargeDataPaymentMethodBankTransferResponse -use for bank transfer responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bank** | **string** | | [optional] -**Clabe** | **string** | | [optional] -**Description** | **string** | | [optional] -**ExecutedAt** | **int?** | | [optional] -**ExpiresAt** | **long** | | [optional] -**IssuingAccountBank** | **string** | | [optional] -**IssuingAccountNumber** | **string** | | [optional] -**IssuingAccountHolderName** | **string** | | [optional] -**IssuingAccountTaxId** | **string** | | [optional] -**PaymentAttempts** | **List<Object>** | | [optional] -**ReceivingAccountHolderName** | **string** | | [optional] -**ReceivingAccountNumber** | **string** | | [optional] -**ReceivingAccountBank** | **string** | | [optional] -**ReceivingAccountTaxId** | **string** | | [optional] -**ReferenceNumber** | **string** | | [optional] -**TrackingCode** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ChargeDataPaymentMethodCardResponse.md b/docs/ChargeDataPaymentMethodCardResponse.md deleted file mode 100644 index 7e125b1..0000000 --- a/docs/ChargeDataPaymentMethodCardResponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# Conekta.net.Model.ChargeDataPaymentMethodCardResponse -use for card responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountType** | **string** | | [optional] -**AuthCode** | **string** | | [optional] -**Brand** | **string** | | [optional] -**ContractId** | **string** | Id sent for recurrent charges. | [optional] -**Country** | **string** | | [optional] -**ExpMonth** | **string** | | [optional] -**ExpYear** | **string** | | [optional] -**FraudIndicators** | **List<Object>** | | [optional] -**Issuer** | **string** | | [optional] -**Last4** | **string** | | [optional] -**Name** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ChargeDataPaymentMethodCashResponse.md b/docs/ChargeDataPaymentMethodCashResponse.md deleted file mode 100644 index 6fc32b3..0000000 --- a/docs/ChargeDataPaymentMethodCashResponse.md +++ /dev/null @@ -1,18 +0,0 @@ -# Conekta.net.Model.ChargeDataPaymentMethodCashResponse -use for cash responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthCode** | **int?** | | [optional] -**CashierId** | **string** | | [optional] -**Reference** | **string** | | [optional] -**BarcodeUrl** | **string** | | [optional] -**ExpiresAt** | **long** | | [optional] -**ServiceName** | **string** | | [optional] -**Store** | **string** | | [optional] -**StoreName** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ChargeResponseRefundsAllOf.md b/docs/ChargeResponseRefundsAllOf.md deleted file mode 100644 index f715aa1..0000000 --- a/docs/ChargeResponseRefundsAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.ChargeResponseRefundsAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<ChargeResponseRefundsData>**](ChargeResponseRefundsData.md) | refunds | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CheckoutRequest.md b/docs/CheckoutRequest.md index b52bbc0..aad4c4b 100644 --- a/docs/CheckoutRequest.md +++ b/docs/CheckoutRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **MonthlyInstallmentsOptions** | **List<int>** | | [optional] **Name** | **string** | Reason for payment | [optional] **OnDemandEnabled** | **bool** | | [optional] +**RedirectionTime** | **int** | number of seconds to wait before redirecting to the success_url | [optional] **SuccessUrl** | **string** | Redirection url back to the site in case of successful payment, applies only to HostedPayment | [optional] **Type** | **string** | This field represents the type of checkout | [optional] diff --git a/docs/CreateCustomerFiscalEntitiesResponse.md b/docs/CreateCustomerFiscalEntitiesResponse.md index 57049f7..20db1fd 100644 --- a/docs/CreateCustomerFiscalEntitiesResponse.md +++ b/docs/CreateCustomerFiscalEntitiesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**Address** | [**CustomerAddress**](CustomerAddress.md) | | **TaxId** | **string** | | [optional] **Email** | **string** | | [optional] **Phone** | **string** | | [optional] diff --git a/docs/CreateCustomerFiscalEntitiesResponseAllOf.md b/docs/CreateCustomerFiscalEntitiesResponseAllOf.md deleted file mode 100644 index 01e9545..0000000 --- a/docs/CreateCustomerFiscalEntitiesResponseAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# Conekta.net.Model.CreateCustomerFiscalEntitiesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**VarObject** | **string** | | -**CreatedAt** | **long** | | -**ParentId** | **string** | | [optional] -**VarDefault** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomerFiscalEntitiesDataResponse.md b/docs/CustomerFiscalEntitiesDataResponse.md index 4e2fd96..ab5d11a 100644 --- a/docs/CustomerFiscalEntitiesDataResponse.md +++ b/docs/CustomerFiscalEntitiesDataResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**Address** | [**CustomerAddress**](CustomerAddress.md) | | **TaxId** | **string** | | [optional] **Email** | **string** | | [optional] **Phone** | **string** | | [optional] diff --git a/docs/CustomerFiscalEntitiesRequest.md b/docs/CustomerFiscalEntitiesRequest.md index 984c062..3937b31 100644 --- a/docs/CustomerFiscalEntitiesRequest.md +++ b/docs/CustomerFiscalEntitiesRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**Address** | [**CustomerAddress**](CustomerAddress.md) | | **TaxId** | **string** | | [optional] **Email** | **string** | | [optional] **Phone** | **string** | | [optional] diff --git a/docs/CustomerFiscalEntitiesRequestAddress.md b/docs/CustomerFiscalEntitiesRequestAddress.md deleted file mode 100644 index 1ff8f16..0000000 --- a/docs/CustomerFiscalEntitiesRequestAddress.md +++ /dev/null @@ -1,17 +0,0 @@ -# Conekta.net.Model.CustomerFiscalEntitiesRequestAddress - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Street1** | **string** | | -**Street2** | **string** | | [optional] -**PostalCode** | **string** | | -**City** | **string** | | -**State** | **string** | | [optional] -**Country** | **string** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**Residential** | **bool** | | [optional] [default to false] -**ExternalNumber** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomerFiscalEntitiesResponseAllOf.md b/docs/CustomerFiscalEntitiesResponseAllOf.md deleted file mode 100644 index d32f943..0000000 --- a/docs/CustomerFiscalEntitiesResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.CustomerFiscalEntitiesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<CustomerFiscalEntitiesDataResponse>**](CustomerFiscalEntitiesDataResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomerPaymentMethods.md b/docs/CustomerPaymentMethods.md deleted file mode 100644 index 9168e87..0000000 --- a/docs/CustomerPaymentMethods.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.CustomerPaymentMethods - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<CustomerPaymentMethodsData>**](CustomerPaymentMethodsData.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomerResponseShippingContactsAllOf.md b/docs/CustomerResponseShippingContactsAllOf.md deleted file mode 100644 index 9a12a19..0000000 --- a/docs/CustomerResponseShippingContactsAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.CustomerResponseShippingContactsAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<CustomerShippingContactsDataResponse>**](CustomerShippingContactsDataResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomerShippingContactsDataResponseAllOf.md b/docs/CustomerShippingContactsDataResponseAllOf.md deleted file mode 100644 index e3f54a1..0000000 --- a/docs/CustomerShippingContactsDataResponseAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.CustomerShippingContactsDataResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**VarObject** | **string** | | -**CreatedAt** | **long** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomerUpdateFiscalEntitiesRequest.md b/docs/CustomerUpdateFiscalEntitiesRequest.md index 4eea372..fbe8fc6 100644 --- a/docs/CustomerUpdateFiscalEntitiesRequest.md +++ b/docs/CustomerUpdateFiscalEntitiesRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | [optional] +**Address** | [**CustomerAddress**](CustomerAddress.md) | | [optional] **TaxId** | **string** | | [optional] **Email** | **string** | | [optional] **Phone** | **string** | | [optional] diff --git a/docs/CustomersResponse.md b/docs/CustomersResponse.md index 9ce257a..667ab8a 100644 --- a/docs/CustomersResponse.md +++ b/docs/CustomersResponse.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**List<CustomerResponse>**](CustomerResponse.md) | | [optional] **HasMore** | **bool** | Indicates if there are more pages to be requested | **VarObject** | **string** | Object type, in this case is list | **NextPageUrl** | **string** | URL of the next page. | [optional] **PreviousPageUrl** | **string** | Url of the previous page. | [optional] +**Data** | [**List<CustomerResponse>**](CustomerResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DiscountLinesResponseAllOf.md b/docs/DiscountLinesResponseAllOf.md deleted file mode 100644 index aa51916..0000000 --- a/docs/DiscountLinesResponseAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.DiscountLinesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The discount line id | -**VarObject** | **string** | The object name | -**ParentId** | **string** | The order id | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ErrorAllOf.md b/docs/ErrorAllOf.md deleted file mode 100644 index 4cdd528..0000000 --- a/docs/ErrorAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.ErrorAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**LogId** | **string** | log id | [optional] -**Type** | **string** | | [optional] -**VarObject** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CheckoutsResponseAllOf.md b/docs/EventTypes.md similarity index 67% rename from docs/CheckoutsResponseAllOf.md rename to docs/EventTypes.md index 703183e..cadff74 100644 --- a/docs/CheckoutsResponseAllOf.md +++ b/docs/EventTypes.md @@ -1,10 +1,10 @@ -# Conekta.net.Model.CheckoutsResponseAllOf +# Conekta.net.Model.EventTypes +It is a parameter that allows to identify in the response, the type of event that is being generated. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**List<CheckoutResponse>**](CheckoutResponse.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GetApiKeysResponseAllOf.md b/docs/GetApiKeysResponseAllOf.md deleted file mode 100644 index a0c31aa..0000000 --- a/docs/GetApiKeysResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetApiKeysResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<ApiKeyResponse>**](ApiKeyResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetChargesResponseAllOf.md b/docs/GetChargesResponseAllOf.md deleted file mode 100644 index 630592f..0000000 --- a/docs/GetChargesResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetChargesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<ChargeResponse>**](ChargeResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetCompaniesResponseAllOf.md b/docs/GetCompaniesResponseAllOf.md deleted file mode 100644 index c2187c0..0000000 --- a/docs/GetCompaniesResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetCompaniesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<CompanyResponse>**](CompanyResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetEventsResponseAllOf.md b/docs/GetEventsResponseAllOf.md deleted file mode 100644 index f76a874..0000000 --- a/docs/GetEventsResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetEventsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<EventResponse>**](EventResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetOrderDiscountLinesResponseAllOf.md b/docs/GetOrderDiscountLinesResponseAllOf.md deleted file mode 100644 index 2a46876..0000000 --- a/docs/GetOrderDiscountLinesResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetOrderDiscountLinesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<DiscountLinesResponse>**](DiscountLinesResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetPaymentMethodResponseAllOf.md b/docs/GetPaymentMethodResponseAllOf.md deleted file mode 100644 index c56eb02..0000000 --- a/docs/GetPaymentMethodResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetPaymentMethodResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<GetCustomerPaymentMethodDataResponse>**](GetCustomerPaymentMethodDataResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetPlansResponseAllOf.md b/docs/GetPlansResponseAllOf.md deleted file mode 100644 index 9e79c3b..0000000 --- a/docs/GetPlansResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetPlansResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<PlanResponse>**](PlanResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetTransactionsResponseAllOf.md b/docs/GetTransactionsResponseAllOf.md deleted file mode 100644 index ce741aa..0000000 --- a/docs/GetTransactionsResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetTransactionsResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<TransactionResponse>**](TransactionResponse.md) | Transactions | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetTransfersResponseAllOf.md b/docs/GetTransfersResponseAllOf.md deleted file mode 100644 index ee4ca34..0000000 --- a/docs/GetTransfersResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetTransfersResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<TransfersResponse>**](TransfersResponse.md) | Transfers | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetWebhookKeysResponseAllOf.md b/docs/GetWebhookKeysResponseAllOf.md deleted file mode 100644 index 5e552c4..0000000 --- a/docs/GetWebhookKeysResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetWebhookKeysResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<WebhookKeyResponse>**](WebhookKeyResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/GetWebhooksResponseAllOf.md b/docs/GetWebhooksResponseAllOf.md deleted file mode 100644 index ec30ab5..0000000 --- a/docs/GetWebhooksResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.GetWebhooksResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<WebhookResponse>**](WebhookResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/OrderFiscalEntityAddressResponseAllOf.md b/docs/OrderFiscalEntityAddressResponseAllOf.md deleted file mode 100644 index db7a66d..0000000 --- a/docs/OrderFiscalEntityAddressResponseAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.OrderFiscalEntityAddressResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarObject** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/OrderResponseChargesAllOf.md b/docs/OrderResponseChargesAllOf.md deleted file mode 100644 index 9c91447..0000000 --- a/docs/OrderResponseChargesAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.OrderResponseChargesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<ChargesDataResponse>**](ChargesDataResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/OrderResponseCheckout.md b/docs/OrderResponseCheckout.md index 6bd43d4..890d078 100644 --- a/docs/OrderResponseCheckout.md +++ b/docs/OrderResponseCheckout.md @@ -23,6 +23,7 @@ Name | Type | Description | Notes **OnDemandEnabled** | **bool?** | | [optional] **PaidPaymentsCount** | **int** | | [optional] **Recurrent** | **bool** | | [optional] +**RedirectionTime** | **int?** | number of seconds to wait before redirecting to the success_url | [optional] **Slug** | **string** | | [optional] **SmsSent** | **int** | | [optional] **SuccessUrl** | **string** | | [optional] diff --git a/docs/OrderResponseCustomerInfo.md b/docs/OrderResponseCustomerInfo.md index 962a17e..92fb468 100644 --- a/docs/OrderResponseCustomerInfo.md +++ b/docs/OrderResponseCustomerInfo.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**VarObject** | **string** | | [optional] **CustomerCustomReference** | **string** | Custom reference | [optional] **Name** | **string** | | [optional] **Email** | **string** | | [optional] **Phone** | **string** | | [optional] **Corporate** | **bool** | | [optional] [default to false] +**VarObject** | **string** | | [optional] **CustomerId** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseCustomerInfoAllOf.md b/docs/OrderResponseCustomerInfoAllOf.md deleted file mode 100644 index ae9bd3e..0000000 --- a/docs/OrderResponseCustomerInfoAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.OrderResponseCustomerInfoAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarObject** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/OrderResponseDiscountLinesAllOf.md b/docs/OrderResponseDiscountLinesAllOf.md deleted file mode 100644 index 1176a8c..0000000 --- a/docs/OrderResponseDiscountLinesAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.OrderResponseDiscountLinesAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<DiscountLinesDataResponse>**](DiscountLinesDataResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/OrderResponseProductsAllOf.md b/docs/OrderResponseProductsAllOf.md deleted file mode 100644 index e36981b..0000000 --- a/docs/OrderResponseProductsAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.OrderResponseProductsAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<ProductDataResponse>**](ProductDataResponse.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/OrderResponseShippingContact.md b/docs/OrderResponseShippingContact.md index c20ea2e..2d2b914 100644 --- a/docs/OrderResponseShippingContact.md +++ b/docs/OrderResponseShippingContact.md @@ -4,16 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**CreatedAt** | **long** | | [optional] -**Id** | **string** | | [optional] -**VarObject** | **string** | | [optional] **Phone** | **string** | | [optional] **Receiver** | **string** | | [optional] **BetweenStreets** | **string** | | [optional] **Address** | [**CustomerShippingContactsResponseAddress**](CustomerShippingContactsResponseAddress.md) | | [optional] **ParentId** | **string** | | [optional] **VarDefault** | **bool** | | [optional] +**Id** | **string** | | [optional] +**CreatedAt** | **long** | | [optional] **Metadata** | **Dictionary<string, Object>** | Metadata associated with the shipping contact | [optional] +**VarObject** | **string** | | [optional] **Deleted** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrderResponseShippingContactAllOf.md b/docs/OrderResponseShippingContactAllOf.md deleted file mode 100644 index a666ab1..0000000 --- a/docs/OrderResponseShippingContactAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.OrderResponseShippingContactAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **long** | | [optional] -**Id** | **string** | | [optional] -**VarObject** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PaymentMethodCardRequestAllOf.md b/docs/PaymentMethodCardRequestAllOf.md deleted file mode 100644 index 209db77..0000000 --- a/docs/PaymentMethodCardRequestAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.PaymentMethodCardRequestAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TokenId** | **string** | Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PaymentMethodCardResponseAllOf.md b/docs/PaymentMethodCardResponseAllOf.md deleted file mode 100644 index 184effa..0000000 --- a/docs/PaymentMethodCardResponseAllOf.md +++ /dev/null @@ -1,20 +0,0 @@ -# Conekta.net.Model.PaymentMethodCardResponseAllOf -use for card responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Last4** | **string** | | [optional] -**Bin** | **string** | | [optional] -**CardType** | **string** | | [optional] -**ExpMonth** | **string** | | [optional] -**ExpYear** | **string** | | [optional] -**Brand** | **string** | | [optional] -**Name** | **string** | | [optional] -**VarDefault** | **bool** | | [optional] -**VisibleOnCheckout** | **bool** | | [optional] -**PaymentSourceStatus** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PaymentMethodCashRequestAllOf.md b/docs/PaymentMethodCashRequestAllOf.md deleted file mode 100644 index 9986ddc..0000000 --- a/docs/PaymentMethodCashRequestAllOf.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.PaymentMethodCashRequestAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresAt** | **long** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PaymentMethodCashResponseAllOf.md b/docs/PaymentMethodCashResponseAllOf.md deleted file mode 100644 index 2a68384..0000000 --- a/docs/PaymentMethodCashResponseAllOf.md +++ /dev/null @@ -1,15 +0,0 @@ -# Conekta.net.Model.PaymentMethodCashResponseAllOf -use for cash responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Reference** | **string** | | [optional] -**Barcode** | **string** | | [optional] -**BarcodeUrl** | **string** | | [optional] -**ExpiresAt** | **long** | | [optional] -**Provider** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/PaymentMethodSpeiRecurrentAllOf.md b/docs/PaymentMethodSpeiRecurrentAllOf.md deleted file mode 100644 index 792215e..0000000 --- a/docs/PaymentMethodSpeiRecurrentAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.PaymentMethodSpeiRecurrentAllOf -use for spei responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Reference** | **string** | | [optional] -**ExpiresAt** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/CustomersResponseAllOf.md b/docs/Payout.md similarity index 67% rename from docs/CustomersResponseAllOf.md rename to docs/Payout.md index 5c56ac1..3029780 100644 --- a/docs/CustomersResponseAllOf.md +++ b/docs/Payout.md @@ -1,10 +1,11 @@ -# Conekta.net.Model.CustomersResponseAllOf +# Conekta.net.Model.Payout +The payout information of the payout order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Data** | [**List<CustomerResponse>**](CustomerResponse.md) | | [optional] +**PayoutMethod** | [**PayoutMethod**](PayoutMethod.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteApiKeysResponseAllOf.md b/docs/PayoutMethod.md similarity index 67% rename from docs/DeleteApiKeysResponseAllOf.md rename to docs/PayoutMethod.md index b931042..87bd22d 100644 --- a/docs/DeleteApiKeysResponseAllOf.md +++ b/docs/PayoutMethod.md @@ -1,10 +1,11 @@ -# Conekta.net.Model.DeleteApiKeysResponseAllOf +# Conekta.net.Model.PayoutMethod +The payout method of the payout order. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Deleted** | **bool** | | [optional] +**Type** | **string** | The type of the payout method. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PayoutOrder.md b/docs/PayoutOrder.md new file mode 100644 index 0000000..197c289 --- /dev/null +++ b/docs/PayoutOrder.md @@ -0,0 +1,17 @@ +# Conekta.net.Model.PayoutOrder +a payout order + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedPayoutMethods** | **List<string>** | The payout methods that are allowed for the payout order. | +**Amount** | **int** | The amount of the payout order. | +**Currency** | **string** | The currency in which the payout order is made. | [default to "MXN"] +**CustomerInfo** | [**CustomerInfoJustCustomerId**](CustomerInfoJustCustomerId.md) | | +**Metadata** | **Dictionary<string, Object>** | The metadata of the payout order. | [optional] +**Payout** | [**Payout**](Payout.md) | | +**Reason** | **string** | The reason for the payout order. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PayoutOrderPayoutsItem.md b/docs/PayoutOrderPayoutsItem.md new file mode 100644 index 0000000..052d302 --- /dev/null +++ b/docs/PayoutOrderPayoutsItem.md @@ -0,0 +1,17 @@ +# Conekta.net.Model.PayoutOrderPayoutsItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | **int** | The amount of the payout. | +**Currency** | **string** | The currency in which the payout is made. | +**ExpiresAt** | **long** | The expiration date of the payout. | [optional] +**Id** | **string** | The id of the payout. | +**Livemode** | **bool** | The live mode of the payout. | +**VarObject** | **string** | The object of the payout. | +**PayoutOrderId** | **string** | The id of the payout order. | [optional] +**Status** | **string** | The status of the payout. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PayoutOrderResponse.md b/docs/PayoutOrderResponse.md new file mode 100644 index 0000000..76b2ad8 --- /dev/null +++ b/docs/PayoutOrderResponse.md @@ -0,0 +1,24 @@ +# Conekta.net.Model.PayoutOrderResponse +payout order model response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllowedPayoutMethods** | **List<string>** | The payout methods that are allowed for the payout order. | +**Amount** | **int** | The amount of the payout order. | +**CreatedAt** | **long** | The creation date of the payout order. | +**Currency** | **string** | The currency in which the payout order is made. | [default to "MXN"] +**CustomerInfo** | [**PayoutOrderResponseCustomerInfo**](PayoutOrderResponseCustomerInfo.md) | | +**ExpiresAt** | **long** | The expiration date of the payout order. | [optional] +**Id** | **string** | The id of the payout order. | +**Livemode** | **bool** | The live mode of the payout order. | +**VarObject** | **string** | The object of the payout order. | +**Metadata** | **Dictionary<string, Object>** | The metadata of the payout order. | [optional] +**Payouts** | [**List<PayoutOrderPayoutsItem>**](PayoutOrderPayoutsItem.md) | The payout information of the payout order. | +**Reason** | **string** | The reason for the payout order. | +**Status** | **string** | The status of the payout order. | [optional] +**UpdatedAt** | **long** | The update date of the payout order. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PayoutOrderResponseCustomerInfo.md b/docs/PayoutOrderResponseCustomerInfo.md new file mode 100644 index 0000000..7bf9471 --- /dev/null +++ b/docs/PayoutOrderResponseCustomerInfo.md @@ -0,0 +1,17 @@ +# Conekta.net.Model.PayoutOrderResponseCustomerInfo +The customer information of the payout order. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomerCustomReference** | **string** | Custom reference | [optional] +**Name** | **string** | | [optional] +**Email** | **string** | | [optional] +**Phone** | **string** | | [optional] +**Corporate** | **bool** | | [optional] [default to false] +**VarObject** | **string** | | [optional] +**Id** | **string** | The id of the customer. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/PayoutOrdersApi.md b/docs/PayoutOrdersApi.md new file mode 100644 index 0000000..a00495c --- /dev/null +++ b/docs/PayoutOrdersApi.md @@ -0,0 +1,314 @@ +# Conekta.net.Api.PayoutOrdersApi + +All URIs are relative to *https://api.conekta.io* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreatePayoutOrder**](PayoutOrdersApi.md#createpayoutorder) | **POST** /payout_orders | Create payout order | +| [**GetPayoutOrderById**](PayoutOrdersApi.md#getpayoutorderbyid) | **GET** /payout_orders/{id} | Get Payout Order | +| [**GetPayoutOrders**](PayoutOrdersApi.md#getpayoutorders) | **GET** /payout_orders | Get a list of Payout Orders | + + +# **CreatePayoutOrder** +> PayoutOrderResponse CreatePayoutOrder (PayoutOrder payoutOrder, string acceptLanguage = null) + +Create payout order + +Create a new payout order. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Conekta.net.Api; +using Conekta.net.Client; +using Conekta.net.Model; + +namespace Example +{ + public class CreatePayoutOrderExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.conekta.io"; + // Configure Bearer token for authorization: bearerAuth + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new PayoutOrdersApi(config); + var payoutOrder = new PayoutOrder(); // PayoutOrder | requested field for payout order + var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es) + + try + { + // Create payout order + PayoutOrderResponse result = apiInstance.CreatePayoutOrder(payoutOrder, acceptLanguage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PayoutOrdersApi.CreatePayoutOrder: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreatePayoutOrderWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create payout order + ApiResponse response = apiInstance.CreatePayoutOrderWithHttpInfo(payoutOrder, acceptLanguage); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PayoutOrdersApi.CreatePayoutOrderWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **payoutOrder** | [**PayoutOrder**](PayoutOrder.md) | requested field for payout order | | +| **acceptLanguage** | **string** | Use for knowing which language to use | [optional] [default to es] | + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/vnd.conekta-v2.1.0+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **422** | parameter validation error | - | +| **401** | authentication error | - | +| **402** | payment required error | - | +| **404** | not found entity | - | +| **500** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetPayoutOrderById** +> PayoutOrderResponse GetPayoutOrderById (string id, string acceptLanguage = null) + +Get Payout Order + +Gets a payout Order resource that corresponds to a payout order ID. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Conekta.net.Api; +using Conekta.net.Client; +using Conekta.net.Model; + +namespace Example +{ + public class GetPayoutOrderByIdExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.conekta.io"; + // Configure Bearer token for authorization: bearerAuth + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new PayoutOrdersApi(config); + var id = 6307a60c41de27127515a575; // string | Identifier of the resource + var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es) + + try + { + // Get Payout Order + PayoutOrderResponse result = apiInstance.GetPayoutOrderById(id, acceptLanguage); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PayoutOrdersApi.GetPayoutOrderById: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPayoutOrderByIdWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get Payout Order + ApiResponse response = apiInstance.GetPayoutOrderByIdWithHttpInfo(id, acceptLanguage); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PayoutOrdersApi.GetPayoutOrderByIdWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **id** | **string** | Identifier of the resource | | +| **acceptLanguage** | **string** | Use for knowing which language to use | [optional] [default to es] | + +### Return type + +[**PayoutOrderResponse**](PayoutOrderResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.conekta-v2.1.0+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **401** | authentication error | - | +| **404** | not found entity | - | +| **500** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetPayoutOrders** +> PayoutOrdersResponse GetPayoutOrders (string acceptLanguage = null, int? limit = null, string search = null, string next = null, string previous = null) + +Get a list of Payout Orders + +Get Payout order details in the form of a list + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Conekta.net.Api; +using Conekta.net.Client; +using Conekta.net.Model; + +namespace Example +{ + public class GetPayoutOrdersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.conekta.io"; + // Configure Bearer token for authorization: bearerAuth + config.AccessToken = "YOUR_BEARER_TOKEN"; + + var apiInstance = new PayoutOrdersApi(config); + var acceptLanguage = es; // string | Use for knowing which language to use (optional) (default to es) + var limit = 20; // int? | The numbers of items to return, the maximum value is 250 (optional) (default to 20) + var search = "search_example"; // string | General order search, e.g. by mail, reference etc. (optional) + var next = "next_example"; // string | next page (optional) + var previous = "previous_example"; // string | previous page (optional) + + try + { + // Get a list of Payout Orders + PayoutOrdersResponse result = apiInstance.GetPayoutOrders(acceptLanguage, limit, search, next, previous); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling PayoutOrdersApi.GetPayoutOrders: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the GetPayoutOrdersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Get a list of Payout Orders + ApiResponse response = apiInstance.GetPayoutOrdersWithHttpInfo(acceptLanguage, limit, search, next, previous); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling PayoutOrdersApi.GetPayoutOrdersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **acceptLanguage** | **string** | Use for knowing which language to use | [optional] [default to es] | +| **limit** | **int?** | The numbers of items to return, the maximum value is 250 | [optional] [default to 20] | +| **search** | **string** | General order search, e.g. by mail, reference etc. | [optional] | +| **next** | **string** | next page | [optional] | +| **previous** | **string** | previous page | [optional] | + +### Return type + +[**PayoutOrdersResponse**](PayoutOrdersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.conekta-v2.1.0+json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | successful operation | - | +| **401** | authentication error | - | +| **500** | internal server error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/PayoutOrdersResponse.md b/docs/PayoutOrdersResponse.md new file mode 100644 index 0000000..6587364 --- /dev/null +++ b/docs/PayoutOrdersResponse.md @@ -0,0 +1,14 @@ +# Conekta.net.Model.PayoutOrdersResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | **bool** | Indicates if there are more pages to be requested | +**VarObject** | **string** | Object type, in this case is list | +**NextPageUrl** | **string** | URL of the next page. | [optional] +**PreviousPageUrl** | **string** | Url of the previous page. | [optional] +**Data** | [**List<PayoutOrderResponse>**](PayoutOrderResponse.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/ProductDataResponseAllOf.md b/docs/ProductDataResponseAllOf.md deleted file mode 100644 index 71b9eed..0000000 --- a/docs/ProductDataResponseAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.ProductDataResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**VarObject** | **string** | | [optional] -**ParentId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/ProductOrderResponseAllOf.md b/docs/ProductOrderResponseAllOf.md deleted file mode 100644 index c47c3e9..0000000 --- a/docs/ProductOrderResponseAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.ProductOrderResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**VarObject** | **string** | | [optional] -**ParentId** | **string** | | [optional] - -[[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/RiskRules.md b/docs/RiskRules.md deleted file mode 100644 index 1de50d0..0000000 --- a/docs/RiskRules.md +++ /dev/null @@ -1,10 +0,0 @@ -# Conekta.net.Model.RiskRules - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Data** | [**List<RiskRulesData>**](RiskRulesData.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UpdateCustomerFiscalEntitiesResponse.md b/docs/UpdateCustomerFiscalEntitiesResponse.md index 8fc6b45..f028d62 100644 --- a/docs/UpdateCustomerFiscalEntitiesResponse.md +++ b/docs/UpdateCustomerFiscalEntitiesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Address** | [**CustomerFiscalEntitiesRequestAddress**](CustomerFiscalEntitiesRequestAddress.md) | | +**Address** | [**CustomerAddress**](CustomerAddress.md) | | **TaxId** | **string** | | [optional] **Email** | **string** | | [optional] **Phone** | **string** | | [optional] diff --git a/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md b/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md deleted file mode 100644 index 847a4e1..0000000 --- a/docs/UpdateCustomerFiscalEntitiesResponseAllOf.md +++ /dev/null @@ -1,14 +0,0 @@ -# Conekta.net.Model.UpdateCustomerFiscalEntitiesResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**VarObject** | **string** | | -**CreatedAt** | **long** | | -**ParentId** | **string** | | [optional] -**VarDefault** | **bool** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/docs/UpdateOrderTaxResponseAllOf.md b/docs/UpdateOrderTaxResponseAllOf.md deleted file mode 100644 index 5693b54..0000000 --- a/docs/UpdateOrderTaxResponseAllOf.md +++ /dev/null @@ -1,12 +0,0 @@ -# Conekta.net.Model.UpdateOrderTaxResponseAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | [optional] -**VarObject** | **string** | | [optional] -**ParentId** | **string** | | [optional] - -[[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/src/Conekta.net.Test/Api/CustomersApiTests.cs b/src/Conekta.net.Test/Api/CustomersApiTests.cs index ba11415..3307d00 100644 --- a/src/Conekta.net.Test/Api/CustomersApiTests.cs +++ b/src/Conekta.net.Test/Api/CustomersApiTests.cs @@ -73,7 +73,7 @@ public void CreateCustomerFiscalEntitiesTest() { string id = "cus_2tXyF9BwPG14UMkkg"; CustomerFiscalEntitiesRequest customerFiscalEntitiesRequest = new( - address: new CustomerFiscalEntitiesRequestAddress( + address: new CustomerAddress( street1: "av siem", city: "mexico", country: "MX", @@ -257,7 +257,7 @@ private static Customer GetFullCustomer() var fiscalEntities = new List() { new CustomerFiscalEntitiesRequest( - address: new CustomerFiscalEntitiesRequestAddress( + address: new CustomerAddress( street1: "av siempre viva", street2: "condensa", postalCode: "11011", diff --git a/src/Conekta.net.Test/Api/OrdersApiTests.cs b/src/Conekta.net.Test/Api/OrdersApiTests.cs index f0d0e22..45d99f1 100644 --- a/src/Conekta.net.Test/Api/OrdersApiTests.cs +++ b/src/Conekta.net.Test/Api/OrdersApiTests.cs @@ -177,7 +177,9 @@ public void CreateOrderMsiTest() expiresAt: (long)DateTime.UtcNow.AddSeconds(259200).Subtract(new DateTime(1970, 1, 1)).TotalSeconds, allowedPaymentMethods: new List { "cash", "card", "bank_transfer" }, monthlyInstallmentsEnabled: true, - monthlyInstallmentsOptions: new List { 3, 6, 12 } + monthlyInstallmentsOptions: new List { 3, 6, 12 }, + redirectionTime: 8 + ); OrderRequestCustomerInfo customerInfo = new(new CustomerInfoJustCustomerId("cus_msi_2o8jK3TDtejmz1sYd")); OrderRequest orderRequest = new( @@ -197,6 +199,7 @@ public void CreateOrderMsiTest() Assert.Equal("Integration", response.Checkout.Type); Assert.True(response.Checkout.MonthlyInstallmentsEnabled); Assert.Equal(new List { 3, 6, 12 }, response.Checkout.MonthlyInstallmentsOptions); + Assert.Equal(checkout.RedirectionTime, response.Checkout.RedirectionTime); } /// diff --git a/src/Conekta.net.Test/Api/PayoutOrdersApiTests.cs b/src/Conekta.net.Test/Api/PayoutOrdersApiTests.cs new file mode 100644 index 0000000..691ca29 --- /dev/null +++ b/src/Conekta.net.Test/Api/PayoutOrdersApiTests.cs @@ -0,0 +1,109 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System.Collections.Generic; +using Xunit; + +using Conekta.net.Client; +using Conekta.net.Api; +using Conekta.net.Model; + +// uncomment below to import models +//using Conekta.net.Model; + +namespace Conekta.net.Test.Api +{ + /// + /// Class for testing PayoutOrdersApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class PayoutOrdersApiTests + { + private readonly PayoutOrdersApi _instance; + + public PayoutOrdersApiTests() + { + Configuration configuration = new() + { + BasePath = BaseTest.BasePath, + AccessToken = "key_uMxL6X1txuxyzQzJEXt72Aaaa" + }; + _instance = new PayoutOrdersApi(configuration); + } + + /// + /// Test an instance of PayoutOrdersApi + /// + [Fact] + public void InstanceTest() + { + Assert.IsType(_instance); + } + + /// + /// Test CreatePayoutOrder + /// + [Fact] + public void CreatePayoutOrderTest() + { + PayoutOrder payoutOrder = new( + currency : "MXN", + amount : 3000, + reason : "Payout order description", + allowedPayoutMethods : new List { "cashout" }, + customerInfo: new CustomerInfoJustCustomerId("cus_2f3r56f3r56f3r56f"), + payout: new Payout(new PayoutMethod("cashout")) + ); + + var response = _instance.CreatePayoutOrder(payoutOrder); + + Assert.IsType(response); + Assert.Equal(payoutOrder.Amount, response.Amount); + Assert.NotNull(response.Id); + } + + /// + /// Test GetPayoutOrderById + /// + [Fact] + public void GetPayoutOrderByIdTest() + { + const string id = "f2654d66-d740-457a-9a8c-f96b5196f44e"; + + var response = _instance.GetPayoutOrderById(id, "es"); + + Assert.IsType(response); + Assert.Equal(id, response.Id); + Assert.Equal(3000, response.Amount); + } + + /// + /// Test GetPayoutOrders + /// + [Fact] + public void GetPayoutOrdersTest() + { + string acceptLanguage = "es"; + + var response = _instance.GetPayoutOrders(acceptLanguage); + + Assert.IsType(response); + Assert.False(response.HasMore); + Assert.Null(response.NextPageUrl); + Assert.Null(response.PreviousPageUrl); + Assert.Equal(3000, response.Data[0].Amount); + Assert.NotNull(response.Data[0].Id); + Assert.Equal(1710345479, response.Data[0].ExpiresAt); + } + } +} diff --git a/src/Conekta.net/Api/PayoutOrdersApi.cs b/src/Conekta.net/Api/PayoutOrdersApi.cs new file mode 100644 index 0000000..171b779 --- /dev/null +++ b/src/Conekta.net/Api/PayoutOrdersApi.cs @@ -0,0 +1,864 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Conekta.net.Client; +using Conekta.net.Model; + +namespace Conekta.net.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPayoutOrdersApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create payout order + /// + /// + /// Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// PayoutOrderResponse + PayoutOrderResponse CreatePayoutOrder(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0); + + /// + /// Create payout order + /// + /// + /// Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// ApiResponse of PayoutOrderResponse + ApiResponse CreatePayoutOrderWithHttpInfo(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0); + /// + /// Get Payout Order + /// + /// + /// Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// PayoutOrderResponse + PayoutOrderResponse GetPayoutOrderById(string id, string acceptLanguage = default(string), int operationIndex = 0); + + /// + /// Get Payout Order + /// + /// + /// Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// ApiResponse of PayoutOrderResponse + ApiResponse GetPayoutOrderByIdWithHttpInfo(string id, string acceptLanguage = default(string), int operationIndex = 0); + /// + /// Get a list of Payout Orders + /// + /// + /// Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// PayoutOrdersResponse + PayoutOrdersResponse GetPayoutOrders(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0); + + /// + /// Get a list of Payout Orders + /// + /// + /// Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// ApiResponse of PayoutOrdersResponse + ApiResponse GetPayoutOrdersWithHttpInfo(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPayoutOrdersApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create payout order + /// + /// + /// Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PayoutOrderResponse + System.Threading.Tasks.Task CreatePayoutOrderAsync(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create payout order + /// + /// + /// Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PayoutOrderResponse) + System.Threading.Tasks.Task> CreatePayoutOrderWithHttpInfoAsync(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get Payout Order + /// + /// + /// Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PayoutOrderResponse + System.Threading.Tasks.Task GetPayoutOrderByIdAsync(string id, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get Payout Order + /// + /// + /// Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PayoutOrderResponse) + System.Threading.Tasks.Task> GetPayoutOrderByIdWithHttpInfoAsync(string id, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Get a list of Payout Orders + /// + /// + /// Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PayoutOrdersResponse + System.Threading.Tasks.Task GetPayoutOrdersAsync(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Get a list of Payout Orders + /// + /// + /// Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PayoutOrdersResponse) + System.Threading.Tasks.Task> GetPayoutOrdersWithHttpInfoAsync(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IPayoutOrdersApi : IPayoutOrdersApiSync, IPayoutOrdersApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class PayoutOrdersApi : IPayoutOrdersApi + { + private Conekta.net.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public PayoutOrdersApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public PayoutOrdersApi(string basePath) + { + this.Configuration = Conekta.net.Client.Configuration.MergeConfigurations( + Conekta.net.Client.GlobalConfiguration.Instance, + new Conekta.net.Client.Configuration { BasePath = basePath } + ); + this.Client = new Conekta.net.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Conekta.net.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Conekta.net.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public PayoutOrdersApi(Conekta.net.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Conekta.net.Client.Configuration.MergeConfigurations( + Conekta.net.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Conekta.net.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Conekta.net.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Conekta.net.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public PayoutOrdersApi(Conekta.net.Client.ISynchronousClient client, Conekta.net.Client.IAsynchronousClient asyncClient, Conekta.net.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Conekta.net.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Conekta.net.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Conekta.net.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Conekta.net.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Conekta.net.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create payout order Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// PayoutOrderResponse + public PayoutOrderResponse CreatePayoutOrder(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0) + { + Conekta.net.Client.ApiResponse localVarResponse = CreatePayoutOrderWithHttpInfo(payoutOrder, acceptLanguage); + return localVarResponse.Data; + } + + /// + /// Create payout order Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// ApiResponse of PayoutOrderResponse + public Conekta.net.Client.ApiResponse CreatePayoutOrderWithHttpInfo(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0) + { + // verify the required parameter 'payoutOrder' is set + if (payoutOrder == null) + { + throw new Conekta.net.Client.ApiException(400, "Missing required parameter 'payoutOrder' when calling PayoutOrdersApi->CreatePayoutOrder"); + } + + Conekta.net.Client.RequestOptions localVarRequestOptions = new Conekta.net.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/vnd.conekta-v2.1.0+json" + }; + + var localVarContentType = Conekta.net.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Conekta.net.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (acceptLanguage != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept-Language", Conekta.net.Client.ClientUtils.ParameterToString(acceptLanguage)); // header parameter + } + localVarRequestOptions.Data = payoutOrder; + + localVarRequestOptions.Operation = "PayoutOrdersApi.CreatePayoutOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearerAuth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/payout_orders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePayoutOrder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create payout order Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PayoutOrderResponse + public async System.Threading.Tasks.Task CreatePayoutOrderAsync(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Conekta.net.Client.ApiResponse localVarResponse = await CreatePayoutOrderWithHttpInfoAsync(payoutOrder, acceptLanguage, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create payout order Create a new payout order. + /// + /// Thrown when fails to make API call + /// requested field for payout order + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PayoutOrderResponse) + public async System.Threading.Tasks.Task> CreatePayoutOrderWithHttpInfoAsync(PayoutOrder payoutOrder, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'payoutOrder' is set + if (payoutOrder == null) + { + throw new Conekta.net.Client.ApiException(400, "Missing required parameter 'payoutOrder' when calling PayoutOrdersApi->CreatePayoutOrder"); + } + + + Conekta.net.Client.RequestOptions localVarRequestOptions = new Conekta.net.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/vnd.conekta-v2.1.0+json" + }; + + var localVarContentType = Conekta.net.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Conekta.net.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (acceptLanguage != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept-Language", Conekta.net.Client.ClientUtils.ParameterToString(acceptLanguage)); // header parameter + } + localVarRequestOptions.Data = payoutOrder; + + localVarRequestOptions.Operation = "PayoutOrdersApi.CreatePayoutOrder"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearerAuth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/payout_orders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreatePayoutOrder", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Payout Order Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// PayoutOrderResponse + public PayoutOrderResponse GetPayoutOrderById(string id, string acceptLanguage = default(string), int operationIndex = 0) + { + Conekta.net.Client.ApiResponse localVarResponse = GetPayoutOrderByIdWithHttpInfo(id, acceptLanguage); + return localVarResponse.Data; + } + + /// + /// Get Payout Order Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// ApiResponse of PayoutOrderResponse + public Conekta.net.Client.ApiResponse GetPayoutOrderByIdWithHttpInfo(string id, string acceptLanguage = default(string), int operationIndex = 0) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Conekta.net.Client.ApiException(400, "Missing required parameter 'id' when calling PayoutOrdersApi->GetPayoutOrderById"); + } + + Conekta.net.Client.RequestOptions localVarRequestOptions = new Conekta.net.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/vnd.conekta-v2.1.0+json" + }; + + var localVarContentType = Conekta.net.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Conekta.net.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Conekta.net.Client.ClientUtils.ParameterToString(id)); // path parameter + if (acceptLanguage != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept-Language", Conekta.net.Client.ClientUtils.ParameterToString(acceptLanguage)); // header parameter + } + + localVarRequestOptions.Operation = "PayoutOrdersApi.GetPayoutOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearerAuth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/payout_orders/{id}", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPayoutOrderById", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get Payout Order Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PayoutOrderResponse + public async System.Threading.Tasks.Task GetPayoutOrderByIdAsync(string id, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Conekta.net.Client.ApiResponse localVarResponse = await GetPayoutOrderByIdWithHttpInfoAsync(id, acceptLanguage, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get Payout Order Gets a payout Order resource that corresponds to a payout order ID. + /// + /// Thrown when fails to make API call + /// Identifier of the resource + /// Use for knowing which language to use (optional, default to es) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PayoutOrderResponse) + public async System.Threading.Tasks.Task> GetPayoutOrderByIdWithHttpInfoAsync(string id, string acceptLanguage = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'id' is set + if (id == null) + { + throw new Conekta.net.Client.ApiException(400, "Missing required parameter 'id' when calling PayoutOrdersApi->GetPayoutOrderById"); + } + + + Conekta.net.Client.RequestOptions localVarRequestOptions = new Conekta.net.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/vnd.conekta-v2.1.0+json" + }; + + var localVarContentType = Conekta.net.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Conekta.net.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("id", Conekta.net.Client.ClientUtils.ParameterToString(id)); // path parameter + if (acceptLanguage != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept-Language", Conekta.net.Client.ClientUtils.ParameterToString(acceptLanguage)); // header parameter + } + + localVarRequestOptions.Operation = "PayoutOrdersApi.GetPayoutOrderById"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearerAuth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/payout_orders/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPayoutOrderById", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a list of Payout Orders Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// PayoutOrdersResponse + public PayoutOrdersResponse GetPayoutOrders(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0) + { + Conekta.net.Client.ApiResponse localVarResponse = GetPayoutOrdersWithHttpInfo(acceptLanguage, limit, search, next, previous); + return localVarResponse.Data; + } + + /// + /// Get a list of Payout Orders Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// ApiResponse of PayoutOrdersResponse + public Conekta.net.Client.ApiResponse GetPayoutOrdersWithHttpInfo(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0) + { + Conekta.net.Client.RequestOptions localVarRequestOptions = new Conekta.net.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/vnd.conekta-v2.1.0+json" + }; + + var localVarContentType = Conekta.net.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Conekta.net.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (search != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "search", search)); + } + if (next != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "next", next)); + } + if (previous != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "previous", previous)); + } + if (acceptLanguage != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept-Language", Conekta.net.Client.ClientUtils.ParameterToString(acceptLanguage)); // header parameter + } + + localVarRequestOptions.Operation = "PayoutOrdersApi.GetPayoutOrders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearerAuth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = this.Client.Get("/payout_orders", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPayoutOrders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Get a list of Payout Orders Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of PayoutOrdersResponse + public async System.Threading.Tasks.Task GetPayoutOrdersAsync(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Conekta.net.Client.ApiResponse localVarResponse = await GetPayoutOrdersWithHttpInfoAsync(acceptLanguage, limit, search, next, previous, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Get a list of Payout Orders Get Payout order details in the form of a list + /// + /// Thrown when fails to make API call + /// Use for knowing which language to use (optional, default to es) + /// The numbers of items to return, the maximum value is 250 (optional, default to 20) + /// General order search, e.g. by mail, reference etc. (optional) + /// next page (optional) + /// previous page (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (PayoutOrdersResponse) + public async System.Threading.Tasks.Task> GetPayoutOrdersWithHttpInfoAsync(string acceptLanguage = default(string), int? limit = default(int?), string search = default(string), string next = default(string), string previous = default(string), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Conekta.net.Client.RequestOptions localVarRequestOptions = new Conekta.net.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/vnd.conekta-v2.1.0+json" + }; + + var localVarContentType = Conekta.net.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Conekta.net.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (limit != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); + } + if (search != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "search", search)); + } + if (next != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "next", next)); + } + if (previous != null) + { + localVarRequestOptions.QueryParameters.Add(Conekta.net.Client.ClientUtils.ParameterToMultiMap("", "previous", previous)); + } + if (acceptLanguage != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept-Language", Conekta.net.Client.ClientUtils.ParameterToString(acceptLanguage)); // header parameter + } + + localVarRequestOptions.Operation = "PayoutOrdersApi.GetPayoutOrders"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (bearerAuth) required + // bearer authentication required + if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Bearer " + this.Configuration.AccessToken); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.GetAsync("/payout_orders", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("GetPayoutOrders", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Conekta.net/Client/Configuration.cs b/src/Conekta.net/Client/Configuration.cs index 156183b..dc32ed0 100644 --- a/src/Conekta.net/Client/Configuration.cs +++ b/src/Conekta.net/Client/Configuration.cs @@ -34,7 +34,7 @@ public class Configuration : IReadableConfiguration /// Version of the package. /// /// Version of the package. - public const string Version = "6.0.7"; + public const string Version = "6.0.8"; /// /// Identifier for ISO 8601 DateTime Format @@ -536,7 +536,7 @@ public static string ToDebugReport() report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; report += " Version of the API: 2.1.0\n"; - report += " SDK Package Version: 6.0.7\n"; + report += " SDK Package Version: 6.0.8\n"; return report; } diff --git a/src/Conekta.net/Conekta.net.csproj b/src/Conekta.net/Conekta.net.csproj index 682af62..00da71a 100644 --- a/src/Conekta.net/Conekta.net.csproj +++ b/src/Conekta.net/Conekta.net.csproj @@ -12,7 +12,7 @@ This is a .net library that allows interaction with https://api.conekta.io API. Conekta Conekta.net - 6.0.7 + 6.0.8 bin\$(Configuration)\$(TargetFramework)\Conekta.net.xml https://github.com/conekta/conekta-.net.git git diff --git a/src/Conekta.net/Model/ApiKeyCreateResponse.cs b/src/Conekta.net/Model/ApiKeyCreateResponse.cs index 7361a76..b98b7a2 100644 --- a/src/Conekta.net/Model/ApiKeyCreateResponse.cs +++ b/src/Conekta.net/Model/ApiKeyCreateResponse.cs @@ -30,12 +30,11 @@ namespace Conekta.net.Model /// ApiKeyCreateResponse /// [DataContract(Name = "api_key_create_response")] - public partial class ApiKeyCreateResponse : IEquatable, IValidatableObject + public partial class ApiKeyCreateResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.. /// Indicates if the api key is active. /// Unix timestamp in seconds of when the api key was created. /// Unix timestamp in seconds of when the api key was last updated. @@ -47,9 +46,9 @@ public partial class ApiKeyCreateResponse : IEquatable, IV /// Object name, value is 'api_key'. /// The first few characters of the authentication_token. /// Indicates if the api key is private or public. - public ApiKeyCreateResponse(string authenticationToken = default(string), bool active = default(bool), long createdAt = default(long), long updatedAt = default(long), long? deactivatedAt = default(long?), string description = default(string), string id = default(string), bool livemode = default(bool), bool deleted = default(bool), string varObject = default(string), string prefix = default(string), string role = default(string)) + /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.. + public ApiKeyCreateResponse(bool active = default(bool), long createdAt = default(long), long updatedAt = default(long), long? deactivatedAt = default(long?), string description = default(string), string id = default(string), bool livemode = default(bool), bool deleted = default(bool), string varObject = default(string), string prefix = default(string), string role = default(string), string authenticationToken = default(string)) { - this.AuthenticationToken = authenticationToken; this.Active = active; this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; @@ -61,16 +60,9 @@ public partial class ApiKeyCreateResponse : IEquatable, IV this.VarObject = varObject; this.Prefix = prefix; this.Role = role; + this.AuthenticationToken = authenticationToken; } - /// - /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. - /// - /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. - /// key_rpHzxufNgjFCdprEEFZRTKi - [DataMember(Name = "authentication_token", EmitDefaultValue = false)] - public string AuthenticationToken { get; set; } - /// /// Indicates if the api key is active /// @@ -158,6 +150,14 @@ public partial class ApiKeyCreateResponse : IEquatable, IV [DataMember(Name = "role", EmitDefaultValue = false)] public string Role { get; set; } + /// + /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. + /// + /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. + /// key_rpHzxufNgjFCdprEEFZRTKi + [DataMember(Name = "authentication_token", EmitDefaultValue = false)] + public string AuthenticationToken { get; set; } + /// /// Returns the string presentation of the object /// @@ -166,7 +166,6 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ApiKeyCreateResponse {\n"); - sb.Append(" AuthenticationToken: ").Append(AuthenticationToken).Append("\n"); sb.Append(" Active: ").Append(Active).Append("\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); @@ -178,6 +177,7 @@ public override string ToString() sb.Append(" VarObject: ").Append(VarObject).Append("\n"); sb.Append(" Prefix: ").Append(Prefix).Append("\n"); sb.Append(" Role: ").Append(Role).Append("\n"); + sb.Append(" AuthenticationToken: ").Append(AuthenticationToken).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -191,131 +191,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiKeyCreateResponse); - } - - /// - /// Returns true if ApiKeyCreateResponse instances are equal - /// - /// Instance of ApiKeyCreateResponse to be compared - /// Boolean - public bool Equals(ApiKeyCreateResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationToken == input.AuthenticationToken || - (this.AuthenticationToken != null && - this.AuthenticationToken.Equals(input.AuthenticationToken)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - this.UpdatedAt.Equals(input.UpdatedAt) - ) && - ( - this.DeactivatedAt == input.DeactivatedAt || - (this.DeactivatedAt != null && - this.DeactivatedAt.Equals(input.DeactivatedAt)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Prefix == input.Prefix || - (this.Prefix != null && - this.Prefix.Equals(input.Prefix)) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthenticationToken != null) - { - hashCode = (hashCode * 59) + this.AuthenticationToken.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - if (this.DeactivatedAt != null) - { - hashCode = (hashCode * 59) + this.DeactivatedAt.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Prefix != null) - { - hashCode = (hashCode * 59) + this.Prefix.GetHashCode(); - } - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ApiKeyCreateResponseAllOf.cs b/src/Conekta.net/Model/ApiKeyCreateResponseAllOf.cs deleted file mode 100644 index 75b56af..0000000 --- a/src/Conekta.net/Model/ApiKeyCreateResponseAllOf.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// ApiKeyCreateResponseAllOf - /// - [DataContract(Name = "api_key_create_response_allOf")] - public partial class ApiKeyCreateResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place.. - public ApiKeyCreateResponseAllOf(string authenticationToken = default(string)) - { - this.AuthenticationToken = authenticationToken; - } - - /// - /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. - /// - /// It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. - /// key_rpHzxufNgjFCdprEEFZRTKi - [DataMember(Name = "authentication_token", EmitDefaultValue = false)] - public string AuthenticationToken { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ApiKeyCreateResponseAllOf {\n"); - sb.Append(" AuthenticationToken: ").Append(AuthenticationToken).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiKeyCreateResponseAllOf); - } - - /// - /// Returns true if ApiKeyCreateResponseAllOf instances are equal - /// - /// Instance of ApiKeyCreateResponseAllOf to be compared - /// Boolean - public bool Equals(ApiKeyCreateResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthenticationToken == input.AuthenticationToken || - (this.AuthenticationToken != null && - this.AuthenticationToken.Equals(input.AuthenticationToken)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthenticationToken != null) - { - hashCode = (hashCode * 59) + this.AuthenticationToken.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/ApiKeyRequest.cs b/src/Conekta.net/Model/ApiKeyRequest.cs index 4db123e..6a66779 100644 --- a/src/Conekta.net/Model/ApiKeyRequest.cs +++ b/src/Conekta.net/Model/ApiKeyRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ApiKeyRequest /// [DataContract(Name = "api_key_request")] - public partial class ApiKeyRequest : IEquatable, IValidatableObject + public partial class ApiKeyRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -91,61 +91,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiKeyRequest); - } - - /// - /// Returns true if ApiKeyRequest instances are equal - /// - /// Instance of ApiKeyRequest to be compared - /// Boolean - public bool Equals(ApiKeyRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ApiKeyResponse.cs b/src/Conekta.net/Model/ApiKeyResponse.cs index 8f85082..062b27b 100644 --- a/src/Conekta.net/Model/ApiKeyResponse.cs +++ b/src/Conekta.net/Model/ApiKeyResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// api keys model /// [DataContract(Name = "api_key_response")] - public partial class ApiKeyResponse : IEquatable, IValidatableObject + public partial class ApiKeyResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -180,122 +180,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiKeyResponse); - } - - /// - /// Returns true if ApiKeyResponse instances are equal - /// - /// Instance of ApiKeyResponse to be compared - /// Boolean - public bool Equals(ApiKeyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - this.UpdatedAt.Equals(input.UpdatedAt) - ) && - ( - this.DeactivatedAt == input.DeactivatedAt || - (this.DeactivatedAt != null && - this.DeactivatedAt.Equals(input.DeactivatedAt)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Prefix == input.Prefix || - (this.Prefix != null && - this.Prefix.Equals(input.Prefix)) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - if (this.DeactivatedAt != null) - { - hashCode = (hashCode * 59) + this.DeactivatedAt.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Prefix != null) - { - hashCode = (hashCode * 59) + this.Prefix.GetHashCode(); - } - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ApiKeyResponseOnDelete.cs b/src/Conekta.net/Model/ApiKeyResponseOnDelete.cs index 0d772b6..3ccf205 100644 --- a/src/Conekta.net/Model/ApiKeyResponseOnDelete.cs +++ b/src/Conekta.net/Model/ApiKeyResponseOnDelete.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// api keys model /// [DataContract(Name = "api_key_response_on_delete")] - public partial class ApiKeyResponseOnDelete : IEquatable, IValidatableObject + public partial class ApiKeyResponseOnDelete : IValidatableObject { /// /// Initializes a new instance of the class. @@ -159,108 +159,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiKeyResponseOnDelete); - } - - /// - /// Returns true if ApiKeyResponseOnDelete instances are equal - /// - /// Instance of ApiKeyResponseOnDelete to be compared - /// Boolean - public bool Equals(ApiKeyResponseOnDelete input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Prefix == input.Prefix || - (this.Prefix != null && - this.Prefix.Equals(input.Prefix)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Prefix != null) - { - hashCode = (hashCode * 59) + this.Prefix.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ApiKeyUpdateRequest.cs b/src/Conekta.net/Model/ApiKeyUpdateRequest.cs index feede42..6e97a09 100644 --- a/src/Conekta.net/Model/ApiKeyUpdateRequest.cs +++ b/src/Conekta.net/Model/ApiKeyUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ApiKeyUpdateRequest /// [DataContract(Name = "api_key_update_request")] - public partial class ApiKeyUpdateRequest : IEquatable, IValidatableObject + public partial class ApiKeyUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,57 +82,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiKeyUpdateRequest); - } - - /// - /// Returns true if ApiKeyUpdateRequest instances are equal - /// - /// Instance of ApiKeyUpdateRequest to be compared - /// Boolean - public bool Equals(ApiKeyUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/BalanceCommonField.cs b/src/Conekta.net/Model/BalanceCommonField.cs index 06e2281..9af875a 100644 --- a/src/Conekta.net/Model/BalanceCommonField.cs +++ b/src/Conekta.net/Model/BalanceCommonField.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// balance common fields model /// [DataContract(Name = "balance_common_field")] - public partial class BalanceCommonField : IEquatable, IValidatableObject + public partial class BalanceCommonField : IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,57 +82,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceCommonField); - } - - /// - /// Returns true if BalanceCommonField instances are equal - /// - /// Instance of BalanceCommonField to be compared - /// Boolean - public bool Equals(BalanceCommonField input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/BalanceResponse.cs b/src/Conekta.net/Model/BalanceResponse.cs index 5609826..d4be4b2 100644 --- a/src/Conekta.net/Model/BalanceResponse.cs +++ b/src/Conekta.net/Model/BalanceResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// balance model /// [DataContract(Name = "balance_response")] - public partial class BalanceResponse : IEquatable, IValidatableObject + public partial class BalanceResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -160,142 +160,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BalanceResponse); - } - - /// - /// Returns true if BalanceResponse instances are equal - /// - /// Instance of BalanceResponse to be compared - /// Boolean - public bool Equals(BalanceResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Available == input.Available || - this.Available != null && - input.Available != null && - this.Available.SequenceEqual(input.Available) - ) && - ( - this.CashoutRetentionAmount == input.CashoutRetentionAmount || - this.CashoutRetentionAmount != null && - input.CashoutRetentionAmount != null && - this.CashoutRetentionAmount.SequenceEqual(input.CashoutRetentionAmount) - ) && - ( - this.ConektaRetention == input.ConektaRetention || - this.ConektaRetention != null && - input.ConektaRetention != null && - this.ConektaRetention.SequenceEqual(input.ConektaRetention) - ) && - ( - this.Gateway == input.Gateway || - this.Gateway != null && - input.Gateway != null && - this.Gateway.SequenceEqual(input.Gateway) - ) && - ( - this.Pending == input.Pending || - this.Pending != null && - input.Pending != null && - this.Pending.SequenceEqual(input.Pending) - ) && - ( - this.Retained == input.Retained || - this.Retained != null && - input.Retained != null && - this.Retained.SequenceEqual(input.Retained) - ) && - ( - this.RetentionAmount == input.RetentionAmount || - this.RetentionAmount != null && - input.RetentionAmount != null && - this.RetentionAmount.SequenceEqual(input.RetentionAmount) - ) && - ( - this.TargetCollateralAmount == input.TargetCollateralAmount || - (this.TargetCollateralAmount != null && - this.TargetCollateralAmount.Equals(input.TargetCollateralAmount)) - ) && - ( - this.TargetRetentionAmount == input.TargetRetentionAmount || - this.TargetRetentionAmount != null && - input.TargetRetentionAmount != null && - this.TargetRetentionAmount.SequenceEqual(input.TargetRetentionAmount) - ) && - ( - this.TemporarilyRetained == input.TemporarilyRetained || - this.TemporarilyRetained != null && - input.TemporarilyRetained != null && - this.TemporarilyRetained.SequenceEqual(input.TemporarilyRetained) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Available != null) - { - hashCode = (hashCode * 59) + this.Available.GetHashCode(); - } - if (this.CashoutRetentionAmount != null) - { - hashCode = (hashCode * 59) + this.CashoutRetentionAmount.GetHashCode(); - } - if (this.ConektaRetention != null) - { - hashCode = (hashCode * 59) + this.ConektaRetention.GetHashCode(); - } - if (this.Gateway != null) - { - hashCode = (hashCode * 59) + this.Gateway.GetHashCode(); - } - if (this.Pending != null) - { - hashCode = (hashCode * 59) + this.Pending.GetHashCode(); - } - if (this.Retained != null) - { - hashCode = (hashCode * 59) + this.Retained.GetHashCode(); - } - if (this.RetentionAmount != null) - { - hashCode = (hashCode * 59) + this.RetentionAmount.GetHashCode(); - } - if (this.TargetCollateralAmount != null) - { - hashCode = (hashCode * 59) + this.TargetCollateralAmount.GetHashCode(); - } - if (this.TargetRetentionAmount != null) - { - hashCode = (hashCode * 59) + this.TargetRetentionAmount.GetHashCode(); - } - if (this.TemporarilyRetained != null) - { - hashCode = (hashCode * 59) + this.TemporarilyRetained.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/BlacklistRuleResponse.cs b/src/Conekta.net/Model/BlacklistRuleResponse.cs index db21b6e..5dc40ad 100644 --- a/src/Conekta.net/Model/BlacklistRuleResponse.cs +++ b/src/Conekta.net/Model/BlacklistRuleResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// BlacklistRuleResponse /// [DataContract(Name = "blacklist_rule_response")] - public partial class BlacklistRuleResponse : IEquatable, IValidatableObject + public partial class BlacklistRuleResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -104,79 +104,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BlacklistRuleResponse); - } - - /// - /// Returns true if BlacklistRuleResponse instances are equal - /// - /// Instance of BlacklistRuleResponse to be compared - /// Boolean - public bool Equals(BlacklistRuleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeDataPaymentMethodBankTransferResponse.cs b/src/Conekta.net/Model/ChargeDataPaymentMethodBankTransferResponse.cs deleted file mode 100644 index 3694d89..0000000 --- a/src/Conekta.net/Model/ChargeDataPaymentMethodBankTransferResponse.cs +++ /dev/null @@ -1,401 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// use for bank transfer responses - /// - [DataContract(Name = "charge_data_payment_method_bank_transfer_response")] - public partial class ChargeDataPaymentMethodBankTransferResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// bank. - /// clabe. - /// description. - /// executedAt. - /// expiresAt. - /// issuingAccountBank. - /// issuingAccountNumber. - /// issuingAccountHolderName. - /// issuingAccountTaxId. - /// paymentAttempts. - /// receivingAccountHolderName. - /// receivingAccountNumber. - /// receivingAccountBank. - /// receivingAccountTaxId. - /// referenceNumber. - /// trackingCode. - public ChargeDataPaymentMethodBankTransferResponse(string bank = default(string), string clabe = default(string), string description = default(string), int? executedAt = default(int?), long expiresAt = default(long), string issuingAccountBank = default(string), string issuingAccountNumber = default(string), string issuingAccountHolderName = default(string), string issuingAccountTaxId = default(string), List paymentAttempts = default(List), string receivingAccountHolderName = default(string), string receivingAccountNumber = default(string), string receivingAccountBank = default(string), string receivingAccountTaxId = default(string), string referenceNumber = default(string), string trackingCode = default(string)) - { - this.Bank = bank; - this.Clabe = clabe; - this.Description = description; - this.ExecutedAt = executedAt; - this.ExpiresAt = expiresAt; - this.IssuingAccountBank = issuingAccountBank; - this.IssuingAccountNumber = issuingAccountNumber; - this.IssuingAccountHolderName = issuingAccountHolderName; - this.IssuingAccountTaxId = issuingAccountTaxId; - this.PaymentAttempts = paymentAttempts; - this.ReceivingAccountHolderName = receivingAccountHolderName; - this.ReceivingAccountNumber = receivingAccountNumber; - this.ReceivingAccountBank = receivingAccountBank; - this.ReceivingAccountTaxId = receivingAccountTaxId; - this.ReferenceNumber = referenceNumber; - this.TrackingCode = trackingCode; - } - - /// - /// Gets or Sets Bank - /// - /// STP - [DataMember(Name = "bank", EmitDefaultValue = false)] - public string Bank { get; set; } - - /// - /// Gets or Sets Clabe - /// - /// 646180111805034237 - [DataMember(Name = "clabe", EmitDefaultValue = false)] - public string Clabe { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets ExecutedAt - /// - [DataMember(Name = "executed_at", EmitDefaultValue = true)] - public int? ExecutedAt { get; set; } - - /// - /// Gets or Sets ExpiresAt - /// - /// 1683053729 - [DataMember(Name = "expires_at", EmitDefaultValue = false)] - public long ExpiresAt { get; set; } - - /// - /// Gets or Sets IssuingAccountBank - /// - [DataMember(Name = "issuing_account_bank", EmitDefaultValue = true)] - public string IssuingAccountBank { get; set; } - - /// - /// Gets or Sets IssuingAccountNumber - /// - [DataMember(Name = "issuing_account_number", EmitDefaultValue = true)] - public string IssuingAccountNumber { get; set; } - - /// - /// Gets or Sets IssuingAccountHolderName - /// - [DataMember(Name = "issuing_account_holder_name", EmitDefaultValue = true)] - public string IssuingAccountHolderName { get; set; } - - /// - /// Gets or Sets IssuingAccountTaxId - /// - [DataMember(Name = "issuing_account_tax_id", EmitDefaultValue = true)] - public string IssuingAccountTaxId { get; set; } - - /// - /// Gets or Sets PaymentAttempts - /// - [DataMember(Name = "payment_attempts", EmitDefaultValue = false)] - public List PaymentAttempts { get; set; } - - /// - /// Gets or Sets ReceivingAccountHolderName - /// - [DataMember(Name = "receiving_account_holder_name", EmitDefaultValue = true)] - public string ReceivingAccountHolderName { get; set; } - - /// - /// Gets or Sets ReceivingAccountNumber - /// - /// 646180111805034237 - [DataMember(Name = "receiving_account_number", EmitDefaultValue = false)] - public string ReceivingAccountNumber { get; set; } - - /// - /// Gets or Sets ReceivingAccountBank - /// - /// STP - [DataMember(Name = "receiving_account_bank", EmitDefaultValue = false)] - public string ReceivingAccountBank { get; set; } - - /// - /// Gets or Sets ReceivingAccountTaxId - /// - [DataMember(Name = "receiving_account_tax_id", EmitDefaultValue = true)] - public string ReceivingAccountTaxId { get; set; } - - /// - /// Gets or Sets ReferenceNumber - /// - [DataMember(Name = "reference_number", EmitDefaultValue = true)] - public string ReferenceNumber { get; set; } - - /// - /// Gets or Sets TrackingCode - /// - [DataMember(Name = "tracking_code", EmitDefaultValue = true)] - public string TrackingCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChargeDataPaymentMethodBankTransferResponse {\n"); - sb.Append(" Bank: ").Append(Bank).Append("\n"); - sb.Append(" Clabe: ").Append(Clabe).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" ExecutedAt: ").Append(ExecutedAt).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" IssuingAccountBank: ").Append(IssuingAccountBank).Append("\n"); - sb.Append(" IssuingAccountNumber: ").Append(IssuingAccountNumber).Append("\n"); - sb.Append(" IssuingAccountHolderName: ").Append(IssuingAccountHolderName).Append("\n"); - sb.Append(" IssuingAccountTaxId: ").Append(IssuingAccountTaxId).Append("\n"); - sb.Append(" PaymentAttempts: ").Append(PaymentAttempts).Append("\n"); - sb.Append(" ReceivingAccountHolderName: ").Append(ReceivingAccountHolderName).Append("\n"); - sb.Append(" ReceivingAccountNumber: ").Append(ReceivingAccountNumber).Append("\n"); - sb.Append(" ReceivingAccountBank: ").Append(ReceivingAccountBank).Append("\n"); - sb.Append(" ReceivingAccountTaxId: ").Append(ReceivingAccountTaxId).Append("\n"); - sb.Append(" ReferenceNumber: ").Append(ReferenceNumber).Append("\n"); - sb.Append(" TrackingCode: ").Append(TrackingCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeDataPaymentMethodBankTransferResponse); - } - - /// - /// Returns true if ChargeDataPaymentMethodBankTransferResponse instances are equal - /// - /// Instance of ChargeDataPaymentMethodBankTransferResponse to be compared - /// Boolean - public bool Equals(ChargeDataPaymentMethodBankTransferResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.Clabe == input.Clabe || - (this.Clabe != null && - this.Clabe.Equals(input.Clabe)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExecutedAt == input.ExecutedAt || - (this.ExecutedAt != null && - this.ExecutedAt.Equals(input.ExecutedAt)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.IssuingAccountBank == input.IssuingAccountBank || - (this.IssuingAccountBank != null && - this.IssuingAccountBank.Equals(input.IssuingAccountBank)) - ) && - ( - this.IssuingAccountNumber == input.IssuingAccountNumber || - (this.IssuingAccountNumber != null && - this.IssuingAccountNumber.Equals(input.IssuingAccountNumber)) - ) && - ( - this.IssuingAccountHolderName == input.IssuingAccountHolderName || - (this.IssuingAccountHolderName != null && - this.IssuingAccountHolderName.Equals(input.IssuingAccountHolderName)) - ) && - ( - this.IssuingAccountTaxId == input.IssuingAccountTaxId || - (this.IssuingAccountTaxId != null && - this.IssuingAccountTaxId.Equals(input.IssuingAccountTaxId)) - ) && - ( - this.PaymentAttempts == input.PaymentAttempts || - this.PaymentAttempts != null && - input.PaymentAttempts != null && - this.PaymentAttempts.SequenceEqual(input.PaymentAttempts) - ) && - ( - this.ReceivingAccountHolderName == input.ReceivingAccountHolderName || - (this.ReceivingAccountHolderName != null && - this.ReceivingAccountHolderName.Equals(input.ReceivingAccountHolderName)) - ) && - ( - this.ReceivingAccountNumber == input.ReceivingAccountNumber || - (this.ReceivingAccountNumber != null && - this.ReceivingAccountNumber.Equals(input.ReceivingAccountNumber)) - ) && - ( - this.ReceivingAccountBank == input.ReceivingAccountBank || - (this.ReceivingAccountBank != null && - this.ReceivingAccountBank.Equals(input.ReceivingAccountBank)) - ) && - ( - this.ReceivingAccountTaxId == input.ReceivingAccountTaxId || - (this.ReceivingAccountTaxId != null && - this.ReceivingAccountTaxId.Equals(input.ReceivingAccountTaxId)) - ) && - ( - this.ReferenceNumber == input.ReferenceNumber || - (this.ReferenceNumber != null && - this.ReferenceNumber.Equals(input.ReferenceNumber)) - ) && - ( - this.TrackingCode == input.TrackingCode || - (this.TrackingCode != null && - this.TrackingCode.Equals(input.TrackingCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - if (this.Clabe != null) - { - hashCode = (hashCode * 59) + this.Clabe.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExecutedAt != null) - { - hashCode = (hashCode * 59) + this.ExecutedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.IssuingAccountBank != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountBank.GetHashCode(); - } - if (this.IssuingAccountNumber != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountNumber.GetHashCode(); - } - if (this.IssuingAccountHolderName != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountHolderName.GetHashCode(); - } - if (this.IssuingAccountTaxId != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountTaxId.GetHashCode(); - } - if (this.PaymentAttempts != null) - { - hashCode = (hashCode * 59) + this.PaymentAttempts.GetHashCode(); - } - if (this.ReceivingAccountHolderName != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountHolderName.GetHashCode(); - } - if (this.ReceivingAccountNumber != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountNumber.GetHashCode(); - } - if (this.ReceivingAccountBank != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountBank.GetHashCode(); - } - if (this.ReceivingAccountTaxId != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountTaxId.GetHashCode(); - } - if (this.ReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.ReferenceNumber.GetHashCode(); - } - if (this.TrackingCode != null) - { - hashCode = (hashCode * 59) + this.TrackingCode.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/ChargeDataPaymentMethodCardResponse.cs b/src/Conekta.net/Model/ChargeDataPaymentMethodCardResponse.cs deleted file mode 100644 index 6323653..0000000 --- a/src/Conekta.net/Model/ChargeDataPaymentMethodCardResponse.cs +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// use for card responses - /// - [DataContract(Name = "charge_data_payment_method_card_response")] - public partial class ChargeDataPaymentMethodCardResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// accountType. - /// authCode. - /// brand. - /// Id sent for recurrent charges.. - /// country. - /// expMonth. - /// expYear. - /// fraudIndicators. - /// issuer. - /// last4. - /// name. - public ChargeDataPaymentMethodCardResponse(string accountType = default(string), string authCode = default(string), string brand = default(string), string contractId = default(string), string country = default(string), string expMonth = default(string), string expYear = default(string), List fraudIndicators = default(List), string issuer = default(string), string last4 = default(string), string name = default(string)) - { - this.AccountType = accountType; - this.AuthCode = authCode; - this.Brand = brand; - this.ContractId = contractId; - this.Country = country; - this.ExpMonth = expMonth; - this.ExpYear = expYear; - this.FraudIndicators = fraudIndicators; - this.Issuer = issuer; - this.Last4 = last4; - this.Name = name; - } - - /// - /// Gets or Sets AccountType - /// - /// Credit - [DataMember(Name = "account_type", EmitDefaultValue = false)] - public string AccountType { get; set; } - - /// - /// Gets or Sets AuthCode - /// - /// 867372 - [DataMember(Name = "auth_code", EmitDefaultValue = false)] - public string AuthCode { get; set; } - - /// - /// Gets or Sets Brand - /// - /// visa - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// Id sent for recurrent charges. - /// - /// Id sent for recurrent charges. - /// S781317595 - [DataMember(Name = "contract_id", EmitDefaultValue = false)] - public string ContractId { get; set; } - - /// - /// Gets or Sets Country - /// - /// MX - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets ExpMonth - /// - /// 02 - [DataMember(Name = "exp_month", EmitDefaultValue = false)] - public string ExpMonth { get; set; } - - /// - /// Gets or Sets ExpYear - /// - /// 30 - [DataMember(Name = "exp_year", EmitDefaultValue = false)] - public string ExpYear { get; set; } - - /// - /// Gets or Sets FraudIndicators - /// - [DataMember(Name = "fraud_indicators", EmitDefaultValue = false)] - public List FraudIndicators { get; set; } - - /// - /// Gets or Sets Issuer - /// - /// BANAMEX - [DataMember(Name = "issuer", EmitDefaultValue = false)] - public string Issuer { get; set; } - - /// - /// Gets or Sets Last4 - /// - /// 4242 - [DataMember(Name = "last4", EmitDefaultValue = false)] - public string Last4 { get; set; } - - /// - /// Gets or Sets Name - /// - /// Fulanito Perez - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChargeDataPaymentMethodCardResponse {\n"); - sb.Append(" AccountType: ").Append(AccountType).Append("\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" ContractId: ").Append(ContractId).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" ExpMonth: ").Append(ExpMonth).Append("\n"); - sb.Append(" ExpYear: ").Append(ExpYear).Append("\n"); - sb.Append(" FraudIndicators: ").Append(FraudIndicators).Append("\n"); - sb.Append(" Issuer: ").Append(Issuer).Append("\n"); - sb.Append(" Last4: ").Append(Last4).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeDataPaymentMethodCardResponse); - } - - /// - /// Returns true if ChargeDataPaymentMethodCardResponse instances are equal - /// - /// Instance of ChargeDataPaymentMethodCardResponse to be compared - /// Boolean - public bool Equals(ChargeDataPaymentMethodCardResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.ContractId == input.ContractId || - (this.ContractId != null && - this.ContractId.Equals(input.ContractId)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.ExpMonth == input.ExpMonth || - (this.ExpMonth != null && - this.ExpMonth.Equals(input.ExpMonth)) - ) && - ( - this.ExpYear == input.ExpYear || - (this.ExpYear != null && - this.ExpYear.Equals(input.ExpYear)) - ) && - ( - this.FraudIndicators == input.FraudIndicators || - this.FraudIndicators != null && - input.FraudIndicators != null && - this.FraudIndicators.SequenceEqual(input.FraudIndicators) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Last4 == input.Last4 || - (this.Last4 != null && - this.Last4.Equals(input.Last4)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.ContractId != null) - { - hashCode = (hashCode * 59) + this.ContractId.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.ExpMonth != null) - { - hashCode = (hashCode * 59) + this.ExpMonth.GetHashCode(); - } - if (this.ExpYear != null) - { - hashCode = (hashCode * 59) + this.ExpYear.GetHashCode(); - } - if (this.FraudIndicators != null) - { - hashCode = (hashCode * 59) + this.FraudIndicators.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.Last4 != null) - { - hashCode = (hashCode * 59) + this.Last4.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/ChargeDataPaymentMethodCashResponse.cs b/src/Conekta.net/Model/ChargeDataPaymentMethodCashResponse.cs deleted file mode 100644 index 4e486f5..0000000 --- a/src/Conekta.net/Model/ChargeDataPaymentMethodCashResponse.cs +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// use for cash responses - /// - [DataContract(Name = "charge_data_payment_method_cash_response")] - public partial class ChargeDataPaymentMethodCashResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// authCode. - /// cashierId. - /// reference. - /// barcodeUrl. - /// expiresAt. - /// serviceName. - /// store. - /// storeName. - public ChargeDataPaymentMethodCashResponse(int? authCode = default(int?), string cashierId = default(string), string reference = default(string), string barcodeUrl = default(string), long expiresAt = default(long), string serviceName = default(string), string store = default(string), string storeName = default(string)) - { - this.AuthCode = authCode; - this.CashierId = cashierId; - this.Reference = reference; - this.BarcodeUrl = barcodeUrl; - this.ExpiresAt = expiresAt; - this.ServiceName = serviceName; - this.Store = store; - this.StoreName = storeName; - } - - /// - /// Gets or Sets AuthCode - /// - /// 542563 - [DataMember(Name = "auth_code", EmitDefaultValue = true)] - public int? AuthCode { get; set; } - - /// - /// Gets or Sets CashierId - /// - /// OINM01010 - [DataMember(Name = "cashier_id", EmitDefaultValue = true)] - public string CashierId { get; set; } - - /// - /// Gets or Sets Reference - /// - /// 93000262276908 - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets BarcodeUrl - /// - /// https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3UN6375MP4SLLCWV%2F20230203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230203T215750Z&X-Amz-Expires=604800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJGMEQCICd79cu7DYu%2F4%2B3HnVVswydgU9yHcE9kmQIIk2TLoZJrAiBVZ0HxVSeboK5lhdQSqADjwQF62XX35jhC%2F2riB0M8uCqQBAj2%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc5OTgwMTA4MTY4OCIMXWZds9ZI5hzUdbeGKuQDFreMyeWnWWPqDuGZ2%2BHk6usCr%2Fl096%2FNJh9xtf8htLu56K%2FhWUTx%2BjiqFWM2O%2FF5zTS%2BIV6TqkLDZ%2BQ5Jo1miQrRmR57YDz6uP2Yd1mNZ1ouq5ipnNjUuu5UWCCBAmqyZQsrVmeMQpSV2IB%2BTERCCcW2SukFEYU%2F20%2Fzy5orsoZ8DxOW460IymR3cWBk5u3Xh2cV6Y1RdPEwDEThhqYEF5w%2ByKbLENloMsI%2FUm6sG5PPrO3yQOAP9aK2muLJs9lXQRU%2FL%2FSsmS4FKSUFOqlN6YU%2Bi2Y%2FyGIKAJT2VDkngvz5Sl%2Fadj0j%2BPKftVRV5FcEhySB6Rl%2BSkPN7kVQMJp6pS8hMJ6JCyEA%2BA3eWYdIfKgQhWVXAR4oCBfJ62DH8FU3a7WfSjjpTwfVkiReWen3GGCYfUWETTVKp46MKnJ9PG0CD3KzxKV8VfmEGc5krK%2FI%2F%2BDV2wtSa%2F9qf1%2BK1YYJIK9qZGb25ljUiGhTB4T%2BMUOSQFjetiWUoOJc5Q3Jz%2FXJbiTAMTST39MhdbCgiMgfrc8OGKN5DOVbex33Z7dn0xf%2FOCkSqurhLaG08efKQBdhLNS0RlE9hbg9yZ2ywwtQIF39fI6A7eeH0T11a5HMlvm51u4rAffPHRuEJfwJoIuj%2F2s3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc - [DataMember(Name = "barcode_url", EmitDefaultValue = false)] - public string BarcodeUrl { get; set; } - - /// - /// Gets or Sets ExpiresAt - /// - /// 0 - [DataMember(Name = "expires_at", EmitDefaultValue = false)] - public long ExpiresAt { get; set; } - - /// - /// Gets or Sets ServiceName - /// - /// OxxoPay - [DataMember(Name = "service_name", EmitDefaultValue = false)] - public string ServiceName { get; set; } - - /// - /// Gets or Sets Store - /// - /// 10MON50EDI - [DataMember(Name = "store", EmitDefaultValue = true)] - public string Store { get; set; } - - /// - /// Gets or Sets StoreName - /// - /// OXXO - [DataMember(Name = "store_name", EmitDefaultValue = false)] - public string StoreName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChargeDataPaymentMethodCashResponse {\n"); - sb.Append(" AuthCode: ").Append(AuthCode).Append("\n"); - sb.Append(" CashierId: ").Append(CashierId).Append("\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" BarcodeUrl: ").Append(BarcodeUrl).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" ServiceName: ").Append(ServiceName).Append("\n"); - sb.Append(" Store: ").Append(Store).Append("\n"); - sb.Append(" StoreName: ").Append(StoreName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeDataPaymentMethodCashResponse); - } - - /// - /// Returns true if ChargeDataPaymentMethodCashResponse instances are equal - /// - /// Instance of ChargeDataPaymentMethodCashResponse to be compared - /// Boolean - public bool Equals(ChargeDataPaymentMethodCashResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CashierId == input.CashierId || - (this.CashierId != null && - this.CashierId.Equals(input.CashierId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.BarcodeUrl == input.BarcodeUrl || - (this.BarcodeUrl != null && - this.BarcodeUrl.Equals(input.BarcodeUrl)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.ServiceName == input.ServiceName || - (this.ServiceName != null && - this.ServiceName.Equals(input.ServiceName)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreName == input.StoreName || - (this.StoreName != null && - this.StoreName.Equals(input.StoreName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.CashierId != null) - { - hashCode = (hashCode * 59) + this.CashierId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.BarcodeUrl != null) - { - hashCode = (hashCode * 59) + this.BarcodeUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.ServiceName != null) - { - hashCode = (hashCode * 59) + this.ServiceName.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.StoreName != null) - { - hashCode = (hashCode * 59) + this.StoreName.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/ChargeOrderResponse.cs b/src/Conekta.net/Model/ChargeOrderResponse.cs index 2e562ff..4681b7f 100644 --- a/src/Conekta.net/Model/ChargeOrderResponse.cs +++ b/src/Conekta.net/Model/ChargeOrderResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ChargeOrderResponse /// [DataContract(Name = "charge_order_response")] - public partial class ChargeOrderResponse : IEquatable, IValidatableObject + public partial class ChargeOrderResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -245,203 +245,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeOrderResponse); - } - - /// - /// Returns true if ChargeOrderResponse instances are equal - /// - /// Instance of ChargeOrderResponse to be compared - /// Boolean - public bool Equals(ChargeOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Channel == input.Channel || - (this.Channel != null && - this.Channel.Equals(input.Channel)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.FailureCode == input.FailureCode || - (this.FailureCode != null && - this.FailureCode.Equals(input.FailureCode)) - ) && - ( - this.FailureMessage == input.FailureMessage || - (this.FailureMessage != null && - this.FailureMessage.Equals(input.FailureMessage)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.MonthlyInstallments == input.MonthlyInstallments || - (this.MonthlyInstallments != null && - this.MonthlyInstallments.Equals(input.MonthlyInstallments)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.OrderId == input.OrderId || - (this.OrderId != null && - this.OrderId.Equals(input.OrderId)) - ) && - ( - this.PaidAt == input.PaidAt || - (this.PaidAt != null && - this.PaidAt.Equals(input.PaidAt)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ) && - ( - this.Refunds == input.Refunds || - this.Refunds != null && - input.Refunds != null && - this.Refunds.SequenceEqual(input.Refunds) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Channel != null) - { - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - if (this.FailureCode != null) - { - hashCode = (hashCode * 59) + this.FailureCode.GetHashCode(); - } - if (this.FailureMessage != null) - { - hashCode = (hashCode * 59) + this.FailureMessage.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.MonthlyInstallments != null) - { - hashCode = (hashCode * 59) + this.MonthlyInstallments.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.OrderId != null) - { - hashCode = (hashCode * 59) + this.OrderId.GetHashCode(); - } - if (this.PaidAt != null) - { - hashCode = (hashCode * 59) + this.PaidAt.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - if (this.Refunds != null) - { - hashCode = (hashCode * 59) + this.Refunds.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeOrderResponsePaymentMethod.cs b/src/Conekta.net/Model/ChargeOrderResponsePaymentMethod.cs index b76fa7a..a1058ef 100644 --- a/src/Conekta.net/Model/ChargeOrderResponsePaymentMethod.cs +++ b/src/Conekta.net/Model/ChargeOrderResponsePaymentMethod.cs @@ -33,7 +33,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(ChargeOrderResponsePaymentMethodJsonConverter))] [DataContract(Name = "charge_order_response_payment_method")] - public partial class ChargeOrderResponsePaymentMethod : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class ChargeOrderResponsePaymentMethod : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -280,43 +280,6 @@ public static ChargeOrderResponsePaymentMethod FromJson(string jsonString) return newChargeOrderResponsePaymentMethod; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeOrderResponsePaymentMethod); - } - - /// - /// Returns true if ChargeOrderResponsePaymentMethod instances are equal - /// - /// Instance of ChargeOrderResponsePaymentMethod to be compared - /// Boolean - public bool Equals(ChargeOrderResponsePaymentMethod input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -355,11 +318,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return ChargeOrderResponsePaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return ChargeOrderResponsePaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return ChargeOrderResponsePaymentMethod.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/ChargeRequest.cs b/src/Conekta.net/Model/ChargeRequest.cs index 377178a..78da3c8 100644 --- a/src/Conekta.net/Model/ChargeRequest.cs +++ b/src/Conekta.net/Model/ChargeRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// The charges to be made /// [DataContract(Name = "charge_request")] - public partial class ChargeRequest : IEquatable, IValidatableObject + public partial class ChargeRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -99,66 +99,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeRequest); - } - - /// - /// Returns true if ChargeRequest instances are equal - /// - /// Instance of ChargeRequest to be compared - /// Boolean - public bool Equals(ChargeRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeRequestPaymentMethod.cs b/src/Conekta.net/Model/ChargeRequestPaymentMethod.cs index 74540c7..2d4352b 100644 --- a/src/Conekta.net/Model/ChargeRequestPaymentMethod.cs +++ b/src/Conekta.net/Model/ChargeRequestPaymentMethod.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Payment method used in the charge. Go to the [payment methods](https://developers.conekta.com/reference/m%C3%A9todos-de-pago) section for more details /// [DataContract(Name = "charge_request_payment_method")] - public partial class ChargeRequestPaymentMethod : IEquatable, IValidatableObject + public partial class ChargeRequestPaymentMethod : IValidatableObject { /// /// Initializes a new instance of the class. @@ -132,89 +132,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeRequestPaymentMethod); - } - - /// - /// Returns true if ChargeRequestPaymentMethod instances are equal - /// - /// Instance of ChargeRequestPaymentMethod to be compared - /// Boolean - public bool Equals(ChargeRequestPaymentMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.MonthlyInstallments == input.MonthlyInstallments || - this.MonthlyInstallments.Equals(input.MonthlyInstallments) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.TokenId == input.TokenId || - (this.TokenId != null && - this.TokenId.Equals(input.TokenId)) - ) && - ( - this.PaymentSourceId == input.PaymentSourceId || - (this.PaymentSourceId != null && - this.PaymentSourceId.Equals(input.PaymentSourceId)) - ) && - ( - this.ContractId == input.ContractId || - (this.ContractId != null && - this.ContractId.Equals(input.ContractId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - hashCode = (hashCode * 59) + this.MonthlyInstallments.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.TokenId != null) - { - hashCode = (hashCode * 59) + this.TokenId.GetHashCode(); - } - if (this.PaymentSourceId != null) - { - hashCode = (hashCode * 59) + this.PaymentSourceId.GetHashCode(); - } - if (this.ContractId != null) - { - hashCode = (hashCode * 59) + this.ContractId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeResponse.cs b/src/Conekta.net/Model/ChargeResponse.cs index 0b6a79d..2699c19 100644 --- a/src/Conekta.net/Model/ChargeResponse.cs +++ b/src/Conekta.net/Model/ChargeResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ChargeResponse /// [DataContract(Name = "charge_response")] - public partial class ChargeResponse : IEquatable, IValidatableObject + public partial class ChargeResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -235,193 +235,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeResponse); - } - - /// - /// Returns true if ChargeResponse instances are equal - /// - /// Instance of ChargeResponse to be compared - /// Boolean - public bool Equals(ChargeResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Channel == input.Channel || - (this.Channel != null && - this.Channel.Equals(input.Channel)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.FailureCode == input.FailureCode || - (this.FailureCode != null && - this.FailureCode.Equals(input.FailureCode)) - ) && - ( - this.FailureMessage == input.FailureMessage || - (this.FailureMessage != null && - this.FailureMessage.Equals(input.FailureMessage)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.OrderId == input.OrderId || - (this.OrderId != null && - this.OrderId.Equals(input.OrderId)) - ) && - ( - this.PaidAt == input.PaidAt || - (this.PaidAt != null && - this.PaidAt.Equals(input.PaidAt)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ) && - ( - this.Refunds == input.Refunds || - (this.Refunds != null && - this.Refunds.Equals(input.Refunds)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Channel != null) - { - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - if (this.FailureCode != null) - { - hashCode = (hashCode * 59) + this.FailureCode.GetHashCode(); - } - if (this.FailureMessage != null) - { - hashCode = (hashCode * 59) + this.FailureMessage.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.OrderId != null) - { - hashCode = (hashCode * 59) + this.OrderId.GetHashCode(); - } - if (this.PaidAt != null) - { - hashCode = (hashCode * 59) + this.PaidAt.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - if (this.Refunds != null) - { - hashCode = (hashCode * 59) + this.Refunds.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeResponseChannel.cs b/src/Conekta.net/Model/ChargeResponseChannel.cs index 975864f..4ed631c 100644 --- a/src/Conekta.net/Model/ChargeResponseChannel.cs +++ b/src/Conekta.net/Model/ChargeResponseChannel.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ChargeResponseChannel /// [DataContract(Name = "charge_response_channel")] - public partial class ChargeResponseChannel : IEquatable, IValidatableObject + public partial class ChargeResponseChannel : IValidatableObject { /// /// Initializes a new instance of the class. @@ -100,79 +100,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeResponseChannel); - } - - /// - /// Returns true if ChargeResponseChannel instances are equal - /// - /// Instance of ChargeResponseChannel to be compared - /// Boolean - public bool Equals(ChargeResponseChannel input) - { - if (input == null) - { - return false; - } - return - ( - this.Segment == input.Segment || - (this.Segment != null && - this.Segment.Equals(input.Segment)) - ) && - ( - this.CheckoutRequestId == input.CheckoutRequestId || - (this.CheckoutRequestId != null && - this.CheckoutRequestId.Equals(input.CheckoutRequestId)) - ) && - ( - this.CheckoutRequestType == input.CheckoutRequestType || - (this.CheckoutRequestType != null && - this.CheckoutRequestType.Equals(input.CheckoutRequestType)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Segment != null) - { - hashCode = (hashCode * 59) + this.Segment.GetHashCode(); - } - if (this.CheckoutRequestId != null) - { - hashCode = (hashCode * 59) + this.CheckoutRequestId.GetHashCode(); - } - if (this.CheckoutRequestType != null) - { - hashCode = (hashCode * 59) + this.CheckoutRequestType.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeResponsePaymentMethod.cs b/src/Conekta.net/Model/ChargeResponsePaymentMethod.cs index 53a9c50..4d1447d 100644 --- a/src/Conekta.net/Model/ChargeResponsePaymentMethod.cs +++ b/src/Conekta.net/Model/ChargeResponsePaymentMethod.cs @@ -33,7 +33,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(ChargeResponsePaymentMethodJsonConverter))] [DataContract(Name = "charge_response_payment_method")] - public partial class ChargeResponsePaymentMethod : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class ChargeResponsePaymentMethod : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -280,43 +280,6 @@ public static ChargeResponsePaymentMethod FromJson(string jsonString) return newChargeResponsePaymentMethod; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeResponsePaymentMethod); - } - - /// - /// Returns true if ChargeResponsePaymentMethod instances are equal - /// - /// Instance of ChargeResponsePaymentMethod to be compared - /// Boolean - public bool Equals(ChargeResponsePaymentMethod input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -355,11 +318,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return ChargeResponsePaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return ChargeResponsePaymentMethod.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return ChargeResponsePaymentMethod.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/ChargeResponseRefunds.cs b/src/Conekta.net/Model/ChargeResponseRefunds.cs index 6ddfca5..3b5e721 100644 --- a/src/Conekta.net/Model/ChargeResponseRefunds.cs +++ b/src/Conekta.net/Model/ChargeResponseRefunds.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ChargeResponseRefunds /// [DataContract(Name = "charge_response_refunds")] - public partial class ChargeResponseRefunds : IEquatable, IValidatableObject + public partial class ChargeResponseRefunds : IValidatableObject { /// /// Initializes a new instance of the class. @@ -124,85 +124,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeResponseRefunds); - } - - /// - /// Returns true if ChargeResponseRefunds instances are equal - /// - /// Instance of ChargeResponseRefunds to be compared - /// Boolean - public bool Equals(ChargeResponseRefunds input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeResponseRefundsAllOf.cs b/src/Conekta.net/Model/ChargeResponseRefundsAllOf.cs deleted file mode 100644 index f12b411..0000000 --- a/src/Conekta.net/Model/ChargeResponseRefundsAllOf.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// ChargeResponseRefundsAllOf - /// - [DataContract(Name = "charge_response_refunds_allOf")] - public partial class ChargeResponseRefundsAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// refunds. - public ChargeResponseRefundsAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// refunds - /// - /// refunds - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ChargeResponseRefundsAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeResponseRefundsAllOf); - } - - /// - /// Returns true if ChargeResponseRefundsAllOf instances are equal - /// - /// Instance of ChargeResponseRefundsAllOf to be compared - /// Boolean - public bool Equals(ChargeResponseRefundsAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/ChargeResponseRefundsData.cs b/src/Conekta.net/Model/ChargeResponseRefundsData.cs index e87d3bd..4b52ee4 100644 --- a/src/Conekta.net/Model/ChargeResponseRefundsData.cs +++ b/src/Conekta.net/Model/ChargeResponseRefundsData.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ChargeResponseRefundsData /// [DataContract(Name = "charge_response_refunds_data")] - public partial class ChargeResponseRefundsData : IEquatable, IValidatableObject + public partial class ChargeResponseRefundsData : IValidatableObject { /// /// Initializes a new instance of the class. @@ -147,94 +147,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeResponseRefundsData); - } - - /// - /// Returns true if ChargeResponseRefundsData instances are equal - /// - /// Instance of ChargeResponseRefundsData to be compared - /// Boolean - public bool Equals(ChargeResponseRefundsData input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargeUpdateRequest.cs b/src/Conekta.net/Model/ChargeUpdateRequest.cs index 6eba8b8..152e21a 100644 --- a/src/Conekta.net/Model/ChargeUpdateRequest.cs +++ b/src/Conekta.net/Model/ChargeUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// requested field for update a charge /// [DataContract(Name = "charge_update_request")] - public partial class ChargeUpdateRequest : IEquatable, IValidatableObject + public partial class ChargeUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,52 +71,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargeUpdateRequest); - } - - /// - /// Returns true if ChargeUpdateRequest instances are equal - /// - /// Instance of ChargeUpdateRequest to be compared - /// Boolean - public bool Equals(ChargeUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ChargesDataResponse.cs b/src/Conekta.net/Model/ChargesDataResponse.cs index b7dbec7..a65453a 100644 --- a/src/Conekta.net/Model/ChargesDataResponse.cs +++ b/src/Conekta.net/Model/ChargesDataResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ChargesDataResponse /// [DataContract(Name = "charges_data_response")] - public partial class ChargesDataResponse : IEquatable, IValidatableObject + public partial class ChargesDataResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -235,193 +235,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ChargesDataResponse); - } - - /// - /// Returns true if ChargesDataResponse instances are equal - /// - /// Instance of ChargesDataResponse to be compared - /// Boolean - public bool Equals(ChargesDataResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Channel == input.Channel || - (this.Channel != null && - this.Channel.Equals(input.Channel)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.FailureCode == input.FailureCode || - (this.FailureCode != null && - this.FailureCode.Equals(input.FailureCode)) - ) && - ( - this.FailureMessage == input.FailureMessage || - (this.FailureMessage != null && - this.FailureMessage.Equals(input.FailureMessage)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.OrderId == input.OrderId || - (this.OrderId != null && - this.OrderId.Equals(input.OrderId)) - ) && - ( - this.PaidAt == input.PaidAt || - (this.PaidAt != null && - this.PaidAt.Equals(input.PaidAt)) - ) && - ( - this.PaymentMethod == input.PaymentMethod || - (this.PaymentMethod != null && - this.PaymentMethod.Equals(input.PaymentMethod)) - ) && - ( - this.ReferenceId == input.ReferenceId || - (this.ReferenceId != null && - this.ReferenceId.Equals(input.ReferenceId)) - ) && - ( - this.Refunds == input.Refunds || - (this.Refunds != null && - this.Refunds.Equals(input.Refunds)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Channel != null) - { - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - if (this.FailureCode != null) - { - hashCode = (hashCode * 59) + this.FailureCode.GetHashCode(); - } - if (this.FailureMessage != null) - { - hashCode = (hashCode * 59) + this.FailureMessage.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.OrderId != null) - { - hashCode = (hashCode * 59) + this.OrderId.GetHashCode(); - } - if (this.PaidAt != null) - { - hashCode = (hashCode * 59) + this.PaidAt.GetHashCode(); - } - if (this.PaymentMethod != null) - { - hashCode = (hashCode * 59) + this.PaymentMethod.GetHashCode(); - } - if (this.ReferenceId != null) - { - hashCode = (hashCode * 59) + this.ReferenceId.GetHashCode(); - } - if (this.Refunds != null) - { - hashCode = (hashCode * 59) + this.Refunds.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Checkout.cs b/src/Conekta.net/Model/Checkout.cs index 96ac155..1c78a6a 100644 --- a/src/Conekta.net/Model/Checkout.cs +++ b/src/Conekta.net/Model/Checkout.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// It is a sub-resource of the Order model that can be stipulated in order to configure its corresponding checkout /// [DataContract(Name = "checkout")] - public partial class Checkout : IEquatable, IValidatableObject + public partial class Checkout : IValidatableObject { /// /// Initializes a new instance of the class. @@ -204,124 +204,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Checkout); - } - - /// - /// Returns true if Checkout instances are equal - /// - /// Instance of Checkout to be compared - /// Boolean - public bool Equals(Checkout input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.MonthlyInstallmentsEnabled == input.MonthlyInstallmentsEnabled || - this.MonthlyInstallmentsEnabled.Equals(input.MonthlyInstallmentsEnabled) - ) && - ( - this.MonthlyInstallmentsOptions == input.MonthlyInstallmentsOptions || - this.MonthlyInstallmentsOptions != null && - input.MonthlyInstallmentsOptions != null && - this.MonthlyInstallmentsOptions.SequenceEqual(input.MonthlyInstallmentsOptions) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NeedsShippingContact == input.NeedsShippingContact || - this.NeedsShippingContact.Equals(input.NeedsShippingContact) - ) && - ( - this.OnDemandEnabled == input.OnDemandEnabled || - (this.OnDemandEnabled != null && - this.OnDemandEnabled.Equals(input.OnDemandEnabled)) - ) && - ( - this.OrderTemplate == input.OrderTemplate || - (this.OrderTemplate != null && - this.OrderTemplate.Equals(input.OrderTemplate)) - ) && - ( - this.PaymentsLimitCount == input.PaymentsLimitCount || - this.PaymentsLimitCount.Equals(input.PaymentsLimitCount) - ) && - ( - this.Recurrent == input.Recurrent || - this.Recurrent.Equals(input.Recurrent) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - hashCode = (hashCode * 59) + this.MonthlyInstallmentsEnabled.GetHashCode(); - if (this.MonthlyInstallmentsOptions != null) - { - hashCode = (hashCode * 59) + this.MonthlyInstallmentsOptions.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NeedsShippingContact.GetHashCode(); - if (this.OnDemandEnabled != null) - { - hashCode = (hashCode * 59) + this.OnDemandEnabled.GetHashCode(); - } - if (this.OrderTemplate != null) - { - hashCode = (hashCode * 59) + this.OrderTemplate.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PaymentsLimitCount.GetHashCode(); - hashCode = (hashCode * 59) + this.Recurrent.GetHashCode(); - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CheckoutOrderTemplate.cs b/src/Conekta.net/Model/CheckoutOrderTemplate.cs index 1d35520..be11aa2 100644 --- a/src/Conekta.net/Model/CheckoutOrderTemplate.cs +++ b/src/Conekta.net/Model/CheckoutOrderTemplate.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// It maintains the attributes with which the order will be created when receiving a new payment. /// [DataContract(Name = "checkout_order_template")] - public partial class CheckoutOrderTemplate : IEquatable, IValidatableObject + public partial class CheckoutOrderTemplate : IValidatableObject { /// /// Initializes a new instance of the class. @@ -116,81 +116,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutOrderTemplate); - } - - /// - /// Returns true if CheckoutOrderTemplate instances are equal - /// - /// Instance of CheckoutOrderTemplate to be compared - /// Boolean - public bool Equals(CheckoutOrderTemplate input) - { - if (input == null) - { - return false; - } - return - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerInfo == input.CustomerInfo || - (this.CustomerInfo != null && - this.CustomerInfo.Equals(input.CustomerInfo)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerInfo != null) - { - hashCode = (hashCode * 59) + this.CustomerInfo.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CheckoutOrderTemplateCustomerInfo.cs b/src/Conekta.net/Model/CheckoutOrderTemplateCustomerInfo.cs index 9f86b2a..67b4f01 100644 --- a/src/Conekta.net/Model/CheckoutOrderTemplateCustomerInfo.cs +++ b/src/Conekta.net/Model/CheckoutOrderTemplateCustomerInfo.cs @@ -32,7 +32,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(CheckoutOrderTemplateCustomerInfoJsonConverter))] [DataContract(Name = "checkout_order_template_customer_info")] - public partial class CheckoutOrderTemplateCustomerInfo : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class CheckoutOrderTemplateCustomerInfo : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -198,43 +198,6 @@ public static CheckoutOrderTemplateCustomerInfo FromJson(string jsonString) return newCheckoutOrderTemplateCustomerInfo; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutOrderTemplateCustomerInfo); - } - - /// - /// Returns true if CheckoutOrderTemplateCustomerInfo instances are equal - /// - /// Instance of CheckoutOrderTemplateCustomerInfo to be compared - /// Boolean - public bool Equals(CheckoutOrderTemplateCustomerInfo input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -273,11 +236,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return CheckoutOrderTemplateCustomerInfo.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return CheckoutOrderTemplateCustomerInfo.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return CheckoutOrderTemplateCustomerInfo.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/CheckoutRequest.cs b/src/Conekta.net/Model/CheckoutRequest.cs index a601e88..cd9fee1 100644 --- a/src/Conekta.net/Model/CheckoutRequest.cs +++ b/src/Conekta.net/Model/CheckoutRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details /// [DataContract(Name = "checkout_request")] - public partial class CheckoutRequest : IEquatable, IValidatableObject + public partial class CheckoutRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -47,9 +47,10 @@ protected CheckoutRequest() { } /// monthlyInstallmentsOptions. /// Reason for payment. /// onDemandEnabled. + /// number of seconds to wait before redirecting to the success_url. /// Redirection url back to the site in case of successful payment, applies only to HostedPayment. /// This field represents the type of checkout. - public CheckoutRequest(List allowedPaymentMethods = default(List), long expiresAt = default(long), string failureUrl = default(string), bool monthlyInstallmentsEnabled = default(bool), List monthlyInstallmentsOptions = default(List), string name = default(string), bool onDemandEnabled = default(bool), string successUrl = default(string), string type = default(string)) + public CheckoutRequest(List allowedPaymentMethods = default(List), long expiresAt = default(long), string failureUrl = default(string), bool monthlyInstallmentsEnabled = default(bool), List monthlyInstallmentsOptions = default(List), string name = default(string), bool onDemandEnabled = default(bool), int redirectionTime = default(int), string successUrl = default(string), string type = default(string)) { // to ensure "allowedPaymentMethods" is required (not null) if (allowedPaymentMethods == null) @@ -63,6 +64,7 @@ protected CheckoutRequest() { } this.MonthlyInstallmentsOptions = monthlyInstallmentsOptions; this.Name = name; this.OnDemandEnabled = onDemandEnabled; + this.RedirectionTime = redirectionTime; this.SuccessUrl = successUrl; this.Type = type; } @@ -117,6 +119,14 @@ protected CheckoutRequest() { } [DataMember(Name = "on_demand_enabled", EmitDefaultValue = true)] public bool OnDemandEnabled { get; set; } + /// + /// number of seconds to wait before redirecting to the success_url + /// + /// number of seconds to wait before redirecting to the success_url + /// 10 + [DataMember(Name = "redirection_time", EmitDefaultValue = false)] + public int RedirectionTime { get; set; } + /// /// Redirection url back to the site in case of successful payment, applies only to HostedPayment /// @@ -147,6 +157,7 @@ public override string ToString() sb.Append(" MonthlyInstallmentsOptions: ").Append(MonthlyInstallmentsOptions).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" OnDemandEnabled: ").Append(OnDemandEnabled).Append("\n"); + sb.Append(" RedirectionTime: ").Append(RedirectionTime).Append("\n"); sb.Append(" SuccessUrl: ").Append(SuccessUrl).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append("}\n"); @@ -162,114 +173,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutRequest); - } - - /// - /// Returns true if CheckoutRequest instances are equal - /// - /// Instance of CheckoutRequest to be compared - /// Boolean - public bool Equals(CheckoutRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.FailureUrl == input.FailureUrl || - (this.FailureUrl != null && - this.FailureUrl.Equals(input.FailureUrl)) - ) && - ( - this.MonthlyInstallmentsEnabled == input.MonthlyInstallmentsEnabled || - this.MonthlyInstallmentsEnabled.Equals(input.MonthlyInstallmentsEnabled) - ) && - ( - this.MonthlyInstallmentsOptions == input.MonthlyInstallmentsOptions || - this.MonthlyInstallmentsOptions != null && - input.MonthlyInstallmentsOptions != null && - this.MonthlyInstallmentsOptions.SequenceEqual(input.MonthlyInstallmentsOptions) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.OnDemandEnabled == input.OnDemandEnabled || - this.OnDemandEnabled.Equals(input.OnDemandEnabled) - ) && - ( - this.SuccessUrl == input.SuccessUrl || - (this.SuccessUrl != null && - this.SuccessUrl.Equals(input.SuccessUrl)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.FailureUrl != null) - { - hashCode = (hashCode * 59) + this.FailureUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MonthlyInstallmentsEnabled.GetHashCode(); - if (this.MonthlyInstallmentsOptions != null) - { - hashCode = (hashCode * 59) + this.MonthlyInstallmentsOptions.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.OnDemandEnabled.GetHashCode(); - if (this.SuccessUrl != null) - { - hashCode = (hashCode * 59) + this.SuccessUrl.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CheckoutResponse.cs b/src/Conekta.net/Model/CheckoutResponse.cs index 591714d..220606f 100644 --- a/src/Conekta.net/Model/CheckoutResponse.cs +++ b/src/Conekta.net/Model/CheckoutResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// checkout response /// [DataContract(Name = "checkout_response")] - public partial class CheckoutResponse : IEquatable, IValidatableObject + public partial class CheckoutResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -330,228 +330,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutResponse); - } - - /// - /// Returns true if CheckoutResponse instances are equal - /// - /// Instance of CheckoutResponse to be compared - /// Boolean - public bool Equals(CheckoutResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.CanNotExpire == input.CanNotExpire || - this.CanNotExpire.Equals(input.CanNotExpire) - ) && - ( - this.EmailsSent == input.EmailsSent || - this.EmailsSent.Equals(input.EmailsSent) - ) && - ( - this.ExcludeCardNetworks == input.ExcludeCardNetworks || - this.ExcludeCardNetworks != null && - input.ExcludeCardNetworks != null && - this.ExcludeCardNetworks.SequenceEqual(input.ExcludeCardNetworks) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.FailureUrl == input.FailureUrl || - (this.FailureUrl != null && - this.FailureUrl.Equals(input.FailureUrl)) - ) && - ( - this.Force3dsFlow == input.Force3dsFlow || - this.Force3dsFlow.Equals(input.Force3dsFlow) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MonthlyInstallmentsEnabled == input.MonthlyInstallmentsEnabled || - this.MonthlyInstallmentsEnabled.Equals(input.MonthlyInstallmentsEnabled) - ) && - ( - this.MonthlyInstallmentsOptions == input.MonthlyInstallmentsOptions || - this.MonthlyInstallmentsOptions != null && - input.MonthlyInstallmentsOptions != null && - this.MonthlyInstallmentsOptions.SequenceEqual(input.MonthlyInstallmentsOptions) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NeedsShippingContact == input.NeedsShippingContact || - this.NeedsShippingContact.Equals(input.NeedsShippingContact) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PaidPaymentsCount == input.PaidPaymentsCount || - this.PaidPaymentsCount.Equals(input.PaidPaymentsCount) - ) && - ( - this.PaymentsLimitCount == input.PaymentsLimitCount || - (this.PaymentsLimitCount != null && - this.PaymentsLimitCount.Equals(input.PaymentsLimitCount)) - ) && - ( - this.Recurrent == input.Recurrent || - this.Recurrent.Equals(input.Recurrent) - ) && - ( - this.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && - ( - this.SmsSent == input.SmsSent || - this.SmsSent.Equals(input.SmsSent) - ) && - ( - this.StartsAt == input.StartsAt || - this.StartsAt.Equals(input.StartsAt) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.SuccessUrl == input.SuccessUrl || - (this.SuccessUrl != null && - this.SuccessUrl.Equals(input.SuccessUrl)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CanNotExpire.GetHashCode(); - hashCode = (hashCode * 59) + this.EmailsSent.GetHashCode(); - if (this.ExcludeCardNetworks != null) - { - hashCode = (hashCode * 59) + this.ExcludeCardNetworks.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.FailureUrl != null) - { - hashCode = (hashCode * 59) + this.FailureUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Force3dsFlow.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MonthlyInstallmentsEnabled.GetHashCode(); - if (this.MonthlyInstallmentsOptions != null) - { - hashCode = (hashCode * 59) + this.MonthlyInstallmentsOptions.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NeedsShippingContact.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PaidPaymentsCount.GetHashCode(); - if (this.PaymentsLimitCount != null) - { - hashCode = (hashCode * 59) + this.PaymentsLimitCount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Recurrent.GetHashCode(); - if (this.Slug != null) - { - hashCode = (hashCode * 59) + this.Slug.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SmsSent.GetHashCode(); - hashCode = (hashCode * 59) + this.StartsAt.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.SuccessUrl != null) - { - hashCode = (hashCode * 59) + this.SuccessUrl.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CheckoutsResponse.cs b/src/Conekta.net/Model/CheckoutsResponse.cs index 49c54b0..66176a8 100644 --- a/src/Conekta.net/Model/CheckoutsResponse.cs +++ b/src/Conekta.net/Model/CheckoutsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CheckoutsResponse /// [DataContract(Name = "checkouts_response")] - public partial class CheckoutsResponse : IEquatable, IValidatableObject + public partial class CheckoutsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutsResponse); - } - - /// - /// Returns true if CheckoutsResponse instances are equal - /// - /// Instance of CheckoutsResponse to be compared - /// Boolean - public bool Equals(CheckoutsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CheckoutsResponseAllOf.cs b/src/Conekta.net/Model/CheckoutsResponseAllOf.cs deleted file mode 100644 index 50827dc..0000000 --- a/src/Conekta.net/Model/CheckoutsResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CheckoutsResponseAllOf - /// - [DataContract(Name = "checkouts_response_allOf")] - public partial class CheckoutsResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public CheckoutsResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CheckoutsResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CheckoutsResponseAllOf); - } - - /// - /// Returns true if CheckoutsResponseAllOf instances are equal - /// - /// Instance of CheckoutsResponseAllOf to be compared - /// Boolean - public bool Equals(CheckoutsResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CompanyFiscalInfoAddressResponse.cs b/src/Conekta.net/Model/CompanyFiscalInfoAddressResponse.cs index 04e07c7..a252af9 100644 --- a/src/Conekta.net/Model/CompanyFiscalInfoAddressResponse.cs +++ b/src/Conekta.net/Model/CompanyFiscalInfoAddressResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Company fiscal info address model /// [DataContract(Name = "company_fiscal_info_address_response")] - public partial class CompanyFiscalInfoAddressResponse : IEquatable, IValidatableObject + public partial class CompanyFiscalInfoAddressResponse : IValidatableObject { /// /// The resource's type @@ -172,120 +172,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyFiscalInfoAddressResponse); - } - - /// - /// Returns true if CompanyFiscalInfoAddressResponse instances are equal - /// - /// Instance of CompanyFiscalInfoAddressResponse to be compared - /// Boolean - public bool Equals(CompanyFiscalInfoAddressResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - this.VarObject.Equals(input.VarObject) - ) && - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.ExternalNumber == input.ExternalNumber || - (this.ExternalNumber != null && - this.ExternalNumber.Equals(input.ExternalNumber)) - ) && - ( - this.InternalNumber == input.InternalNumber || - (this.InternalNumber != null && - this.InternalNumber.Equals(input.InternalNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.ExternalNumber != null) - { - hashCode = (hashCode * 59) + this.ExternalNumber.GetHashCode(); - } - if (this.InternalNumber != null) - { - hashCode = (hashCode * 59) + this.InternalNumber.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CompanyFiscalInfoResponse.cs b/src/Conekta.net/Model/CompanyFiscalInfoResponse.cs index 7c6295f..523a7c6 100644 --- a/src/Conekta.net/Model/CompanyFiscalInfoResponse.cs +++ b/src/Conekta.net/Model/CompanyFiscalInfoResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Company fiscal info model /// [DataContract(Name = "company_fiscal_info_response")] - public partial class CompanyFiscalInfoResponse : IEquatable, IValidatableObject + public partial class CompanyFiscalInfoResponse : IValidatableObject { /// /// The resource's type @@ -147,102 +147,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyFiscalInfoResponse); - } - - /// - /// Returns true if CompanyFiscalInfoResponse instances are equal - /// - /// Instance of CompanyFiscalInfoResponse to be compared - /// Boolean - public bool Equals(CompanyFiscalInfoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - this.VarObject.Equals(input.VarObject) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.LegalEntityName == input.LegalEntityName || - (this.LegalEntityName != null && - this.LegalEntityName.Equals(input.LegalEntityName)) - ) && - ( - this.BusinessType == input.BusinessType || - (this.BusinessType != null && - this.BusinessType.Equals(input.BusinessType)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.PhysicalPersonBusinessType == input.PhysicalPersonBusinessType || - (this.PhysicalPersonBusinessType != null && - this.PhysicalPersonBusinessType.Equals(input.PhysicalPersonBusinessType)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.LegalEntityName != null) - { - hashCode = (hashCode * 59) + this.LegalEntityName.GetHashCode(); - } - if (this.BusinessType != null) - { - hashCode = (hashCode * 59) + this.BusinessType.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.PhysicalPersonBusinessType != null) - { - hashCode = (hashCode * 59) + this.PhysicalPersonBusinessType.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CompanyPayoutDestinationResponse.cs b/src/Conekta.net/Model/CompanyPayoutDestinationResponse.cs index 1fbc09e..08beeb3 100644 --- a/src/Conekta.net/Model/CompanyPayoutDestinationResponse.cs +++ b/src/Conekta.net/Model/CompanyPayoutDestinationResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Company payout destination model /// [DataContract(Name = "company_payout_destination_response")] - public partial class CompanyPayoutDestinationResponse : IEquatable, IValidatableObject + public partial class CompanyPayoutDestinationResponse : IValidatableObject { /// /// The resource's type @@ -152,89 +152,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyPayoutDestinationResponse); - } - - /// - /// Returns true if CompanyPayoutDestinationResponse instances are equal - /// - /// Instance of CompanyPayoutDestinationResponse to be compared - /// Boolean - public bool Equals(CompanyPayoutDestinationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - this.VarObject.Equals(input.VarObject) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.AccountHolderName == input.AccountHolderName || - (this.AccountHolderName != null && - this.AccountHolderName.Equals(input.AccountHolderName)) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.Type == input.Type || - this.Type.Equals(input.Type) - ) && - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.AccountHolderName != null) - { - hashCode = (hashCode * 59) + this.AccountHolderName.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CompanyResponse.cs b/src/Conekta.net/Model/CompanyResponse.cs index f9eabcf..391da2d 100644 --- a/src/Conekta.net/Model/CompanyResponse.cs +++ b/src/Conekta.net/Model/CompanyResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Company model /// [DataContract(Name = "company_response")] - public partial class CompanyResponse : IEquatable, IValidatableObject + public partial class CompanyResponse : IValidatableObject { /// /// The resource's type @@ -157,103 +157,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CompanyResponse); - } - - /// - /// Returns true if CompanyResponse instances are equal - /// - /// Instance of CompanyResponse to be compared - /// Boolean - public bool Equals(CompanyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.VarObject == input.VarObject || - this.VarObject.Equals(input.VarObject) - ) && - ( - this.ParentCompanyId == input.ParentCompanyId || - (this.ParentCompanyId != null && - this.ParentCompanyId.Equals(input.ParentCompanyId)) - ) && - ( - this.UseParentFiscalData == input.UseParentFiscalData || - this.UseParentFiscalData.Equals(input.UseParentFiscalData) - ) && - ( - this.PayoutDestination == input.PayoutDestination || - (this.PayoutDestination != null && - this.PayoutDestination.Equals(input.PayoutDestination)) - ) && - ( - this.FiscalInfo == input.FiscalInfo || - (this.FiscalInfo != null && - this.FiscalInfo.Equals(input.FiscalInfo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - if (this.ParentCompanyId != null) - { - hashCode = (hashCode * 59) + this.ParentCompanyId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UseParentFiscalData.GetHashCode(); - if (this.PayoutDestination != null) - { - hashCode = (hashCode * 59) + this.PayoutDestination.GetHashCode(); - } - if (this.FiscalInfo != null) - { - hashCode = (hashCode * 59) + this.FiscalInfo.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponse.cs b/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponse.cs index f3cc534..11bfaea 100644 --- a/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponse.cs +++ b/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CreateCustomerFiscalEntitiesResponse /// [DataContract(Name = "create_customer_fiscal_entities_response")] - public partial class CreateCustomerFiscalEntitiesResponse : IEquatable, IValidatableObject + public partial class CreateCustomerFiscalEntitiesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -51,7 +51,7 @@ protected CreateCustomerFiscalEntitiesResponse() { } /// createdAt (required). /// parentId. /// varDefault. - public CreateCustomerFiscalEntitiesResponse(CustomerFiscalEntitiesRequestAddress address = default(CustomerFiscalEntitiesRequestAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string), string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) + public CreateCustomerFiscalEntitiesResponse(CustomerAddress address = default(CustomerAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string), string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) { // to ensure "address" is required (not null) if (address == null) @@ -85,7 +85,7 @@ protected CreateCustomerFiscalEntitiesResponse() { } /// Gets or Sets Address /// [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] - public CustomerFiscalEntitiesRequestAddress Address { get; set; } + public CustomerAddress Address { get; set; } /// /// Gets or Sets TaxId @@ -184,135 +184,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCustomerFiscalEntitiesResponse); - } - - /// - /// Returns true if CreateCustomerFiscalEntitiesResponse instances are equal - /// - /// Instance of CreateCustomerFiscalEntitiesResponse to be compared - /// Boolean - public bool Equals(CreateCustomerFiscalEntitiesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponseAllOf.cs b/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponseAllOf.cs deleted file mode 100644 index 1d4126c..0000000 --- a/src/Conekta.net/Model/CreateCustomerFiscalEntitiesResponseAllOf.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CreateCustomerFiscalEntitiesResponseAllOf - /// - [DataContract(Name = "create_customer_fiscal_entities_response_allOf")] - public partial class CreateCustomerFiscalEntitiesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateCustomerFiscalEntitiesResponseAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// varObject (required). - /// createdAt (required). - /// parentId. - /// varDefault. - public CreateCustomerFiscalEntitiesResponseAllOf(string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) - { - // to ensure "id" is required (not null) - if (id == null) - { - throw new ArgumentNullException("id is a required property for CreateCustomerFiscalEntitiesResponseAllOf and cannot be null"); - } - this.Id = id; - // to ensure "varObject" is required (not null) - if (varObject == null) - { - throw new ArgumentNullException("varObject is a required property for CreateCustomerFiscalEntitiesResponseAllOf and cannot be null"); - } - this.VarObject = varObject; - this.CreatedAt = createdAt; - this.ParentId = parentId; - this.VarDefault = varDefault; - } - - /// - /// Gets or Sets Id - /// - /// ship_cont_2tKZsTYcsryyu7Ah8 - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - /// shipping_contact - [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] - public string VarObject { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - /// 1675715413 - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] - public long CreatedAt { get; set; } - - /// - /// Gets or Sets ParentId - /// - /// cus_2tKcHxhTz7xU5SymF - [DataMember(Name = "parent_id", EmitDefaultValue = false)] - public string ParentId { get; set; } - - /// - /// Gets or Sets VarDefault - /// - [DataMember(Name = "default", EmitDefaultValue = true)] - public bool VarDefault { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateCustomerFiscalEntitiesResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - sb.Append(" VarDefault: ").Append(VarDefault).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCustomerFiscalEntitiesResponseAllOf); - } - - /// - /// Returns true if CreateCustomerFiscalEntitiesResponseAllOf instances are equal - /// - /// Instance of CreateCustomerFiscalEntitiesResponseAllOf to be compared - /// Boolean - public bool Equals(CreateCustomerFiscalEntitiesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CreateCustomerPaymentMethodsRequest.cs b/src/Conekta.net/Model/CreateCustomerPaymentMethodsRequest.cs index 1fcd9b0..f19f3a0 100644 --- a/src/Conekta.net/Model/CreateCustomerPaymentMethodsRequest.cs +++ b/src/Conekta.net/Model/CreateCustomerPaymentMethodsRequest.cs @@ -32,7 +32,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(CreateCustomerPaymentMethodsRequestJsonConverter))] [DataContract(Name = "CreateCustomerPaymentMethods_request")] - public partial class CreateCustomerPaymentMethodsRequest : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class CreateCustomerPaymentMethodsRequest : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -244,43 +244,6 @@ public static CreateCustomerPaymentMethodsRequest FromJson(string jsonString) return newCreateCustomerPaymentMethodsRequest; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCustomerPaymentMethodsRequest); - } - - /// - /// Returns true if CreateCustomerPaymentMethodsRequest instances are equal - /// - /// Instance of CreateCustomerPaymentMethodsRequest to be compared - /// Boolean - public bool Equals(CreateCustomerPaymentMethodsRequest input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -319,11 +282,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return CreateCustomerPaymentMethodsRequest.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return CreateCustomerPaymentMethodsRequest.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return CreateCustomerPaymentMethodsRequest.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/CreateCustomerPaymentMethodsResponse.cs b/src/Conekta.net/Model/CreateCustomerPaymentMethodsResponse.cs index a226a8a..0e1c7eb 100644 --- a/src/Conekta.net/Model/CreateCustomerPaymentMethodsResponse.cs +++ b/src/Conekta.net/Model/CreateCustomerPaymentMethodsResponse.cs @@ -33,7 +33,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(CreateCustomerPaymentMethodsResponseJsonConverter))] [DataContract(Name = "create_customer_payment_methods_response")] - public partial class CreateCustomerPaymentMethodsResponse : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class CreateCustomerPaymentMethodsResponse : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -283,43 +283,6 @@ public static CreateCustomerPaymentMethodsResponse FromJson(string jsonString) return newCreateCustomerPaymentMethodsResponse; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateCustomerPaymentMethodsResponse); - } - - /// - /// Returns true if CreateCustomerPaymentMethodsResponse instances are equal - /// - /// Instance of CreateCustomerPaymentMethodsResponse to be compared - /// Boolean - public bool Equals(CreateCustomerPaymentMethodsResponse input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -358,11 +321,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return CreateCustomerPaymentMethodsResponse.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return CreateCustomerPaymentMethodsResponse.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return CreateCustomerPaymentMethodsResponse.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/CreateRiskRulesData.cs b/src/Conekta.net/Model/CreateRiskRulesData.cs index 5a5f681..c41f143 100644 --- a/src/Conekta.net/Model/CreateRiskRulesData.cs +++ b/src/Conekta.net/Model/CreateRiskRulesData.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CreateRiskRulesData /// [DataContract(Name = "create_risk_rules_data")] - public partial class CreateRiskRulesData : IEquatable, IValidatableObject + public partial class CreateRiskRulesData : IValidatableObject { /// /// Initializes a new instance of the class. @@ -113,70 +113,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CreateRiskRulesData); - } - - /// - /// Returns true if CreateRiskRulesData instances are equal - /// - /// Instance of CreateRiskRulesData to be compared - /// Boolean - public bool Equals(CreateRiskRulesData input) - { - if (input == null) - { - return false; - } - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Customer.cs b/src/Conekta.net/Model/Customer.cs index 723c782..4c346d5 100644 --- a/src/Conekta.net/Model/Customer.cs +++ b/src/Conekta.net/Model/Customer.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a customer /// [DataContract(Name = "customer")] - public partial class Customer : IEquatable, IValidatableObject + public partial class Customer : IValidatableObject { /// /// Initializes a new instance of the class. @@ -163,7 +163,7 @@ protected Customer() { } /// Is the customer's phone number /// /// Is the customer's phone number - /// 5215555555555 + /// +5215555555555 [DataMember(Name = "phone", IsRequired = true, EmitDefaultValue = true)] public string Phone { get; set; } @@ -223,169 +223,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Customer); - } - - /// - /// Returns true if Customer instances are equal - /// - /// Instance of Customer to be compared - /// Boolean - public bool Equals(Customer input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - (this.AntifraudInfo != null && - this.AntifraudInfo.Equals(input.AntifraudInfo)) - ) && - ( - this.Corporate == input.Corporate || - this.Corporate.Equals(input.Corporate) - ) && - ( - this.CustomReference == input.CustomReference || - (this.CustomReference != null && - this.CustomReference.Equals(input.CustomReference)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.DefaultPaymentSourceId == input.DefaultPaymentSourceId || - (this.DefaultPaymentSourceId != null && - this.DefaultPaymentSourceId.Equals(input.DefaultPaymentSourceId)) - ) && - ( - this.DefaultShippingContactId == input.DefaultShippingContactId || - (this.DefaultShippingContactId != null && - this.DefaultShippingContactId.Equals(input.DefaultShippingContactId)) - ) && - ( - this.FiscalEntities == input.FiscalEntities || - this.FiscalEntities != null && - input.FiscalEntities != null && - this.FiscalEntities.SequenceEqual(input.FiscalEntities) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PaymentSources == input.PaymentSources || - this.PaymentSources != null && - input.PaymentSources != null && - this.PaymentSources.SequenceEqual(input.PaymentSources) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.PlanId == input.PlanId || - (this.PlanId != null && - this.PlanId.Equals(input.PlanId)) - ) && - ( - this.ShippingContacts == input.ShippingContacts || - this.ShippingContacts != null && - input.ShippingContacts != null && - this.ShippingContacts.SequenceEqual(input.ShippingContacts) - ) && - ( - this.Subscription == input.Subscription || - (this.Subscription != null && - this.Subscription.Equals(input.Subscription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Corporate.GetHashCode(); - if (this.CustomReference != null) - { - hashCode = (hashCode * 59) + this.CustomReference.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.DefaultPaymentSourceId != null) - { - hashCode = (hashCode * 59) + this.DefaultPaymentSourceId.GetHashCode(); - } - if (this.DefaultShippingContactId != null) - { - hashCode = (hashCode * 59) + this.DefaultShippingContactId.GetHashCode(); - } - if (this.FiscalEntities != null) - { - hashCode = (hashCode * 59) + this.FiscalEntities.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.PaymentSources != null) - { - hashCode = (hashCode * 59) + this.PaymentSources.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.PlanId != null) - { - hashCode = (hashCode * 59) + this.PlanId.GetHashCode(); - } - if (this.ShippingContacts != null) - { - hashCode = (hashCode * 59) + this.ShippingContacts.GetHashCode(); - } - if (this.Subscription != null) - { - hashCode = (hashCode * 59) + this.Subscription.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerAddress.cs b/src/Conekta.net/Model/CustomerAddress.cs index 1f082a9..9a06763 100644 --- a/src/Conekta.net/Model/CustomerAddress.cs +++ b/src/Conekta.net/Model/CustomerAddress.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerAddress /// [DataContract(Name = "customer_address")] - public partial class CustomerAddress : IEquatable, IValidatableObject + public partial class CustomerAddress : IValidatableObject { /// /// Initializes a new instance of the class. @@ -160,111 +160,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerAddress); - } - - /// - /// Returns true if CustomerAddress instances are equal - /// - /// Instance of CustomerAddress to be compared - /// Boolean - public bool Equals(CustomerAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Residential == input.Residential || - this.Residential.Equals(input.Residential) - ) && - ( - this.ExternalNumber == input.ExternalNumber || - (this.ExternalNumber != null && - this.ExternalNumber.Equals(input.ExternalNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Residential.GetHashCode(); - if (this.ExternalNumber != null) - { - hashCode = (hashCode * 59) + this.ExternalNumber.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerAntifraudInfo.cs b/src/Conekta.net/Model/CustomerAntifraudInfo.cs index 780ebc7..01b94d6 100644 --- a/src/Conekta.net/Model/CustomerAntifraudInfo.cs +++ b/src/Conekta.net/Model/CustomerAntifraudInfo.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerAntifraudInfo /// [DataContract(Name = "customer_antifraud_info")] - public partial class CustomerAntifraudInfo : IEquatable, IValidatableObject + public partial class CustomerAntifraudInfo : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,53 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerAntifraudInfo); - } - - /// - /// Returns true if CustomerAntifraudInfo instances are equal - /// - /// Instance of CustomerAntifraudInfo to be compared - /// Boolean - public bool Equals(CustomerAntifraudInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCreatedAt == input.AccountCreatedAt || - this.AccountCreatedAt.Equals(input.AccountCreatedAt) - ) && - ( - this.FirstPaidAt == input.FirstPaidAt || - this.FirstPaidAt.Equals(input.FirstPaidAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountCreatedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.FirstPaidAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerAntifraudInfoResponse.cs b/src/Conekta.net/Model/CustomerAntifraudInfoResponse.cs index 0eb2dab..9dd370f 100644 --- a/src/Conekta.net/Model/CustomerAntifraudInfoResponse.cs +++ b/src/Conekta.net/Model/CustomerAntifraudInfoResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerAntifraudInfoResponse /// [DataContract(Name = "customer_antifraud_info_response")] - public partial class CustomerAntifraudInfoResponse : IEquatable, IValidatableObject + public partial class CustomerAntifraudInfoResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,53 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerAntifraudInfoResponse); - } - - /// - /// Returns true if CustomerAntifraudInfoResponse instances are equal - /// - /// Instance of CustomerAntifraudInfoResponse to be compared - /// Boolean - public bool Equals(CustomerAntifraudInfoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.FirstPaidAt == input.FirstPaidAt || - this.FirstPaidAt.Equals(input.FirstPaidAt) - ) && - ( - this.AccountCreatedAt == input.AccountCreatedAt || - this.AccountCreatedAt.Equals(input.AccountCreatedAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.FirstPaidAt.GetHashCode(); - hashCode = (hashCode * 59) + this.AccountCreatedAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerFiscalEntitiesDataResponse.cs b/src/Conekta.net/Model/CustomerFiscalEntitiesDataResponse.cs index b354e8e..448a8bb 100644 --- a/src/Conekta.net/Model/CustomerFiscalEntitiesDataResponse.cs +++ b/src/Conekta.net/Model/CustomerFiscalEntitiesDataResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerFiscalEntitiesDataResponse /// [DataContract(Name = "customer_fiscal_entities_data_response")] - public partial class CustomerFiscalEntitiesDataResponse : IEquatable, IValidatableObject + public partial class CustomerFiscalEntitiesDataResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -51,7 +51,7 @@ protected CustomerFiscalEntitiesDataResponse() { } /// createdAt (required). /// parentId. /// varDefault. - public CustomerFiscalEntitiesDataResponse(CustomerFiscalEntitiesRequestAddress address = default(CustomerFiscalEntitiesRequestAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string), string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) + public CustomerFiscalEntitiesDataResponse(CustomerAddress address = default(CustomerAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string), string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) { // to ensure "address" is required (not null) if (address == null) @@ -85,7 +85,7 @@ protected CustomerFiscalEntitiesDataResponse() { } /// Gets or Sets Address /// [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] - public CustomerFiscalEntitiesRequestAddress Address { get; set; } + public CustomerAddress Address { get; set; } /// /// Gets or Sets TaxId @@ -184,135 +184,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerFiscalEntitiesDataResponse); - } - - /// - /// Returns true if CustomerFiscalEntitiesDataResponse instances are equal - /// - /// Instance of CustomerFiscalEntitiesDataResponse to be compared - /// Boolean - public bool Equals(CustomerFiscalEntitiesDataResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerFiscalEntitiesRequest.cs b/src/Conekta.net/Model/CustomerFiscalEntitiesRequest.cs index a564a96..732db31 100644 --- a/src/Conekta.net/Model/CustomerFiscalEntitiesRequest.cs +++ b/src/Conekta.net/Model/CustomerFiscalEntitiesRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerFiscalEntitiesRequest /// [DataContract(Name = "customer_fiscal_entities_request")] - public partial class CustomerFiscalEntitiesRequest : IEquatable, IValidatableObject + public partial class CustomerFiscalEntitiesRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -46,7 +46,7 @@ protected CustomerFiscalEntitiesRequest() { } /// phone. /// metadata. /// companyName. - public CustomerFiscalEntitiesRequest(CustomerFiscalEntitiesRequestAddress address = default(CustomerFiscalEntitiesRequestAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string)) + public CustomerFiscalEntitiesRequest(CustomerAddress address = default(CustomerAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string)) { // to ensure "address" is required (not null) if (address == null) @@ -65,7 +65,7 @@ protected CustomerFiscalEntitiesRequest() { } /// Gets or Sets Address /// [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] - public CustomerFiscalEntitiesRequestAddress Address { get; set; } + public CustomerAddress Address { get; set; } /// /// Gets or Sets TaxId @@ -125,98 +125,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerFiscalEntitiesRequest); - } - - /// - /// Returns true if CustomerFiscalEntitiesRequest instances are equal - /// - /// Instance of CustomerFiscalEntitiesRequest to be compared - /// Boolean - public bool Equals(CustomerFiscalEntitiesRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerFiscalEntitiesRequestAddress.cs b/src/Conekta.net/Model/CustomerFiscalEntitiesRequestAddress.cs deleted file mode 100644 index 487a334..0000000 --- a/src/Conekta.net/Model/CustomerFiscalEntitiesRequestAddress.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CustomerFiscalEntitiesRequestAddress - /// - [DataContract(Name = "customer_fiscal_entities_request_address")] - public partial class CustomerFiscalEntitiesRequestAddress : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CustomerFiscalEntitiesRequestAddress() { } - /// - /// Initializes a new instance of the class. - /// - /// street1 (required). - /// street2. - /// postalCode (required). - /// city (required). - /// state. - /// this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). - /// residential (default to false). - /// externalNumber. - public CustomerFiscalEntitiesRequestAddress(string street1 = default(string), string street2 = default(string), string postalCode = default(string), string city = default(string), string state = default(string), string country = default(string), bool residential = false, string externalNumber = default(string)) - { - // to ensure "street1" is required (not null) - if (street1 == null) - { - throw new ArgumentNullException("street1 is a required property for CustomerFiscalEntitiesRequestAddress and cannot be null"); - } - this.Street1 = street1; - // to ensure "postalCode" is required (not null) - if (postalCode == null) - { - throw new ArgumentNullException("postalCode is a required property for CustomerFiscalEntitiesRequestAddress and cannot be null"); - } - this.PostalCode = postalCode; - // to ensure "city" is required (not null) - if (city == null) - { - throw new ArgumentNullException("city is a required property for CustomerFiscalEntitiesRequestAddress and cannot be null"); - } - this.City = city; - this.Street2 = street2; - this.State = state; - this.Country = country; - this.Residential = residential; - this.ExternalNumber = externalNumber; - } - - /// - /// Gets or Sets Street1 - /// - /// Nuevo Leon 254 - [DataMember(Name = "street1", IsRequired = true, EmitDefaultValue = true)] - public string Street1 { get; set; } - - /// - /// Gets or Sets Street2 - /// - /// Departamento 404 - [DataMember(Name = "street2", EmitDefaultValue = false)] - public string Street2 { get; set; } - - /// - /// Gets or Sets PostalCode - /// - /// 06100 - [DataMember(Name = "postal_code", IsRequired = true, EmitDefaultValue = true)] - public string PostalCode { get; set; } - - /// - /// Gets or Sets City - /// - /// Ciudad de Mexico - [DataMember(Name = "city", IsRequired = true, EmitDefaultValue = true)] - public string City { get; set; } - - /// - /// Gets or Sets State - /// - /// Ciudad de Mexico - [DataMember(Name = "state", EmitDefaultValue = false)] - public string State { get; set; } - - /// - /// this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - /// - /// this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) - /// MX - [DataMember(Name = "country", EmitDefaultValue = false)] - public string Country { get; set; } - - /// - /// Gets or Sets Residential - /// - /// true - [DataMember(Name = "residential", EmitDefaultValue = true)] - public bool Residential { get; set; } - - /// - /// Gets or Sets ExternalNumber - /// - [DataMember(Name = "external_number", EmitDefaultValue = false)] - public string ExternalNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomerFiscalEntitiesRequestAddress {\n"); - sb.Append(" Street1: ").Append(Street1).Append("\n"); - sb.Append(" Street2: ").Append(Street2).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Residential: ").Append(Residential).Append("\n"); - sb.Append(" ExternalNumber: ").Append(ExternalNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerFiscalEntitiesRequestAddress); - } - - /// - /// Returns true if CustomerFiscalEntitiesRequestAddress instances are equal - /// - /// Instance of CustomerFiscalEntitiesRequestAddress to be compared - /// Boolean - public bool Equals(CustomerFiscalEntitiesRequestAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Residential == input.Residential || - this.Residential.Equals(input.Residential) - ) && - ( - this.ExternalNumber == input.ExternalNumber || - (this.ExternalNumber != null && - this.ExternalNumber.Equals(input.ExternalNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Residential.GetHashCode(); - if (this.ExternalNumber != null) - { - hashCode = (hashCode * 59) + this.ExternalNumber.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CustomerFiscalEntitiesResponse.cs b/src/Conekta.net/Model/CustomerFiscalEntitiesResponse.cs index 3ed7b06..08c39ff 100644 --- a/src/Conekta.net/Model/CustomerFiscalEntitiesResponse.cs +++ b/src/Conekta.net/Model/CustomerFiscalEntitiesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerFiscalEntitiesResponse /// [DataContract(Name = "customer_fiscal_entities_response")] - public partial class CustomerFiscalEntitiesResponse : IEquatable, IValidatableObject + public partial class CustomerFiscalEntitiesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -101,67 +101,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerFiscalEntitiesResponse); - } - - /// - /// Returns true if CustomerFiscalEntitiesResponse instances are equal - /// - /// Instance of CustomerFiscalEntitiesResponse to be compared - /// Boolean - public bool Equals(CustomerFiscalEntitiesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerFiscalEntitiesResponseAllOf.cs b/src/Conekta.net/Model/CustomerFiscalEntitiesResponseAllOf.cs deleted file mode 100644 index d3145c9..0000000 --- a/src/Conekta.net/Model/CustomerFiscalEntitiesResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CustomerFiscalEntitiesResponseAllOf - /// - [DataContract(Name = "customer_fiscal_entities_response_allOf")] - public partial class CustomerFiscalEntitiesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public CustomerFiscalEntitiesResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomerFiscalEntitiesResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerFiscalEntitiesResponseAllOf); - } - - /// - /// Returns true if CustomerFiscalEntitiesResponseAllOf instances are equal - /// - /// Instance of CustomerFiscalEntitiesResponseAllOf to be compared - /// Boolean - public bool Equals(CustomerFiscalEntitiesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CustomerInfo.cs b/src/Conekta.net/Model/CustomerInfo.cs index 46d2142..56ec05d 100644 --- a/src/Conekta.net/Model/CustomerInfo.cs +++ b/src/Conekta.net/Model/CustomerInfo.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerInfo /// [DataContract(Name = "customer_info")] - public partial class CustomerInfo : IEquatable, IValidatableObject + public partial class CustomerInfo : IValidatableObject { /// /// Initializes a new instance of the class. @@ -129,84 +129,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerInfo); - } - - /// - /// Returns true if CustomerInfo instances are equal - /// - /// Instance of CustomerInfo to be compared - /// Boolean - public bool Equals(CustomerInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Corporate == input.Corporate || - this.Corporate.Equals(input.Corporate) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Corporate.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerInfoJustCustomerId.cs b/src/Conekta.net/Model/CustomerInfoJustCustomerId.cs index b98caae..b51d996 100644 --- a/src/Conekta.net/Model/CustomerInfoJustCustomerId.cs +++ b/src/Conekta.net/Model/CustomerInfoJustCustomerId.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerInfoJustCustomerId /// [DataContract(Name = "customer_info_just_customer_id")] - public partial class CustomerInfoJustCustomerId : IEquatable, IValidatableObject + public partial class CustomerInfoJustCustomerId : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,52 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerInfoJustCustomerId); - } - - /// - /// Returns true if CustomerInfoJustCustomerId instances are equal - /// - /// Instance of CustomerInfoJustCustomerId to be compared - /// Boolean - public bool Equals(CustomerInfoJustCustomerId input) - { - if (input == null) - { - return false; - } - return - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerInfoJustCustomerIdResponse.cs b/src/Conekta.net/Model/CustomerInfoJustCustomerIdResponse.cs index fd034e5..f262f90 100644 --- a/src/Conekta.net/Model/CustomerInfoJustCustomerIdResponse.cs +++ b/src/Conekta.net/Model/CustomerInfoJustCustomerIdResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerInfoJustCustomerIdResponse /// [DataContract(Name = "customer_info_just_customer_id_response")] - public partial class CustomerInfoJustCustomerIdResponse : IEquatable, IValidatableObject + public partial class CustomerInfoJustCustomerIdResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,52 +70,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerInfoJustCustomerIdResponse); - } - - /// - /// Returns true if CustomerInfoJustCustomerIdResponse instances are equal - /// - /// Instance of CustomerInfoJustCustomerIdResponse to be compared - /// Boolean - public bool Equals(CustomerInfoJustCustomerIdResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerPaymentMethodRequest.cs b/src/Conekta.net/Model/CustomerPaymentMethodRequest.cs index 5f3b770..38f9250 100644 --- a/src/Conekta.net/Model/CustomerPaymentMethodRequest.cs +++ b/src/Conekta.net/Model/CustomerPaymentMethodRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Contains details of the payment methods that the customer has active or has used in Conekta /// [DataContract(Name = "customer_payment_method_request")] - public partial class CustomerPaymentMethodRequest : IEquatable, IValidatableObject + public partial class CustomerPaymentMethodRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -81,52 +81,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerPaymentMethodRequest); - } - - /// - /// Returns true if CustomerPaymentMethodRequest instances are equal - /// - /// Instance of CustomerPaymentMethodRequest to be compared - /// Boolean - public bool Equals(CustomerPaymentMethodRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerPaymentMethods.cs b/src/Conekta.net/Model/CustomerPaymentMethods.cs deleted file mode 100644 index c8b8ed6..0000000 --- a/src/Conekta.net/Model/CustomerPaymentMethods.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CustomerPaymentMethods - /// - [DataContract(Name = "customerPaymentMethods")] - public partial class CustomerPaymentMethods : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public CustomerPaymentMethods(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomerPaymentMethods {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerPaymentMethods); - } - - /// - /// Returns true if CustomerPaymentMethods instances are equal - /// - /// Instance of CustomerPaymentMethods to be compared - /// Boolean - public bool Equals(CustomerPaymentMethods input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CustomerPaymentMethodsData.cs b/src/Conekta.net/Model/CustomerPaymentMethodsData.cs index 50f0842..937b4ae 100644 --- a/src/Conekta.net/Model/CustomerPaymentMethodsData.cs +++ b/src/Conekta.net/Model/CustomerPaymentMethodsData.cs @@ -33,7 +33,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(CustomerPaymentMethodsDataJsonConverter))] [DataContract(Name = "customer_payment_methods_data")] - public partial class CustomerPaymentMethodsData : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class CustomerPaymentMethodsData : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -283,43 +283,6 @@ public static CustomerPaymentMethodsData FromJson(string jsonString) return newCustomerPaymentMethodsData; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerPaymentMethodsData); - } - - /// - /// Returns true if CustomerPaymentMethodsData instances are equal - /// - /// Instance of CustomerPaymentMethodsData to be compared - /// Boolean - public bool Equals(CustomerPaymentMethodsData input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -358,11 +321,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return CustomerPaymentMethodsData.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return CustomerPaymentMethodsData.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return CustomerPaymentMethodsData.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/CustomerPaymentMethodsRequest.cs b/src/Conekta.net/Model/CustomerPaymentMethodsRequest.cs index 2ae653d..59213ad 100644 --- a/src/Conekta.net/Model/CustomerPaymentMethodsRequest.cs +++ b/src/Conekta.net/Model/CustomerPaymentMethodsRequest.cs @@ -32,7 +32,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(CustomerPaymentMethodsRequestJsonConverter))] [DataContract(Name = "customer_payment_methods_request")] - public partial class CustomerPaymentMethodsRequest : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class CustomerPaymentMethodsRequest : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -244,43 +244,6 @@ public static CustomerPaymentMethodsRequest FromJson(string jsonString) return newCustomerPaymentMethodsRequest; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerPaymentMethodsRequest); - } - - /// - /// Returns true if CustomerPaymentMethodsRequest instances are equal - /// - /// Instance of CustomerPaymentMethodsRequest to be compared - /// Boolean - public bool Equals(CustomerPaymentMethodsRequest input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -319,11 +282,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return CustomerPaymentMethodsRequest.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return CustomerPaymentMethodsRequest.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return CustomerPaymentMethodsRequest.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/CustomerPaymentMethodsResponse.cs b/src/Conekta.net/Model/CustomerPaymentMethodsResponse.cs index e130cf8..5b3665f 100644 --- a/src/Conekta.net/Model/CustomerPaymentMethodsResponse.cs +++ b/src/Conekta.net/Model/CustomerPaymentMethodsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerPaymentMethodsResponse /// [DataContract(Name = "customer_payment_methods_response")] - public partial class CustomerPaymentMethodsResponse : IEquatable, IValidatableObject + public partial class CustomerPaymentMethodsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerPaymentMethodsResponse); - } - - /// - /// Returns true if CustomerPaymentMethodsResponse instances are equal - /// - /// Instance of CustomerPaymentMethodsResponse to be compared - /// Boolean - public bool Equals(CustomerPaymentMethodsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerResponse.cs b/src/Conekta.net/Model/CustomerResponse.cs index e3c6b43..5485272 100644 --- a/src/Conekta.net/Model/CustomerResponse.cs +++ b/src/Conekta.net/Model/CustomerResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// customer response /// [DataContract(Name = "customer_response")] - public partial class CustomerResponse : IEquatable, IValidatableObject + public partial class CustomerResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -205,7 +205,7 @@ protected CustomerResponse() { } /// Customer's phone number /// /// Customer's phone number - /// 5215555555555 + /// +5215555555555 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -260,194 +260,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerResponse); - } - - /// - /// Returns true if CustomerResponse instances are equal - /// - /// Instance of CustomerResponse to be compared - /// Boolean - public bool Equals(CustomerResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - (this.AntifraudInfo != null && - this.AntifraudInfo.Equals(input.AntifraudInfo)) - ) && - ( - this.Corporate == input.Corporate || - this.Corporate.Equals(input.Corporate) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.CustomReference == input.CustomReference || - (this.CustomReference != null && - this.CustomReference.Equals(input.CustomReference)) - ) && - ( - this.DefaultFiscalEntityId == input.DefaultFiscalEntityId || - (this.DefaultFiscalEntityId != null && - this.DefaultFiscalEntityId.Equals(input.DefaultFiscalEntityId)) - ) && - ( - this.DefaultShippingContactId == input.DefaultShippingContactId || - (this.DefaultShippingContactId != null && - this.DefaultShippingContactId.Equals(input.DefaultShippingContactId)) - ) && - ( - this.DefaultPaymentSourceId == input.DefaultPaymentSourceId || - (this.DefaultPaymentSourceId != null && - this.DefaultPaymentSourceId.Equals(input.DefaultPaymentSourceId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.FiscalEntities == input.FiscalEntities || - (this.FiscalEntities != null && - this.FiscalEntities.Equals(input.FiscalEntities)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PaymentSources == input.PaymentSources || - (this.PaymentSources != null && - this.PaymentSources.Equals(input.PaymentSources)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.ShippingContacts == input.ShippingContacts || - (this.ShippingContacts != null && - this.ShippingContacts.Equals(input.ShippingContacts)) - ) && - ( - this.Subscription == input.Subscription || - (this.Subscription != null && - this.Subscription.Equals(input.Subscription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Corporate.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.CustomReference != null) - { - hashCode = (hashCode * 59) + this.CustomReference.GetHashCode(); - } - if (this.DefaultFiscalEntityId != null) - { - hashCode = (hashCode * 59) + this.DefaultFiscalEntityId.GetHashCode(); - } - if (this.DefaultShippingContactId != null) - { - hashCode = (hashCode * 59) + this.DefaultShippingContactId.GetHashCode(); - } - if (this.DefaultPaymentSourceId != null) - { - hashCode = (hashCode * 59) + this.DefaultPaymentSourceId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.FiscalEntities != null) - { - hashCode = (hashCode * 59) + this.FiscalEntities.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.PaymentSources != null) - { - hashCode = (hashCode * 59) + this.PaymentSources.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.ShippingContacts != null) - { - hashCode = (hashCode * 59) + this.ShippingContacts.GetHashCode(); - } - if (this.Subscription != null) - { - hashCode = (hashCode * 59) + this.Subscription.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerResponseShippingContacts.cs b/src/Conekta.net/Model/CustomerResponseShippingContacts.cs index efcc496..0909f6e 100644 --- a/src/Conekta.net/Model/CustomerResponseShippingContacts.cs +++ b/src/Conekta.net/Model/CustomerResponseShippingContacts.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerResponseShippingContacts /// [DataContract(Name = "customer_response_shipping_contacts")] - public partial class CustomerResponseShippingContacts : IEquatable, IValidatableObject + public partial class CustomerResponseShippingContacts : IValidatableObject { /// /// Initializes a new instance of the class. @@ -101,67 +101,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerResponseShippingContacts); - } - - /// - /// Returns true if CustomerResponseShippingContacts instances are equal - /// - /// Instance of CustomerResponseShippingContacts to be compared - /// Boolean - public bool Equals(CustomerResponseShippingContacts input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerResponseShippingContactsAllOf.cs b/src/Conekta.net/Model/CustomerResponseShippingContactsAllOf.cs deleted file mode 100644 index 3013b21..0000000 --- a/src/Conekta.net/Model/CustomerResponseShippingContactsAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CustomerResponseShippingContactsAllOf - /// - [DataContract(Name = "customer_response_shipping_contacts_allOf")] - public partial class CustomerResponseShippingContactsAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public CustomerResponseShippingContactsAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomerResponseShippingContactsAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerResponseShippingContactsAllOf); - } - - /// - /// Returns true if CustomerResponseShippingContactsAllOf instances are equal - /// - /// Instance of CustomerResponseShippingContactsAllOf to be compared - /// Boolean - public bool Equals(CustomerResponseShippingContactsAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CustomerShippingContacts.cs b/src/Conekta.net/Model/CustomerShippingContacts.cs index af07409..ecd6309 100644 --- a/src/Conekta.net/Model/CustomerShippingContacts.cs +++ b/src/Conekta.net/Model/CustomerShippingContacts.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// [Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used. /// [DataContract(Name = "customer_shipping_contacts")] - public partial class CustomerShippingContacts : IEquatable, IValidatableObject + public partial class CustomerShippingContacts : IValidatableObject { /// /// Initializes a new instance of the class. @@ -69,7 +69,7 @@ protected CustomerShippingContacts() { } /// Phone contact /// /// Phone contact - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -149,116 +149,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerShippingContacts); - } - - /// - /// Returns true if CustomerShippingContacts instances are equal - /// - /// Instance of CustomerShippingContacts to be compared - /// Boolean - public bool Equals(CustomerShippingContacts input) - { - if (input == null) - { - return false; - } - return - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Receiver == input.Receiver || - (this.Receiver != null && - this.Receiver.Equals(input.Receiver)) - ) && - ( - this.BetweenStreets == input.BetweenStreets || - (this.BetweenStreets != null && - this.BetweenStreets.Equals(input.BetweenStreets)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - (this.VarDefault != null && - this.VarDefault.Equals(input.VarDefault)) - ) && - ( - this.Deleted == input.Deleted || - (this.Deleted != null && - this.Deleted.Equals(input.Deleted)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Receiver != null) - { - hashCode = (hashCode * 59) + this.Receiver.GetHashCode(); - } - if (this.BetweenStreets != null) - { - hashCode = (hashCode * 59) + this.BetweenStreets.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - if (this.VarDefault != null) - { - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - } - if (this.Deleted != null) - { - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerShippingContactsAddress.cs b/src/Conekta.net/Model/CustomerShippingContactsAddress.cs index 4fe8f32..6d72eb3 100644 --- a/src/Conekta.net/Model/CustomerShippingContactsAddress.cs +++ b/src/Conekta.net/Model/CustomerShippingContactsAddress.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Address of the person who will receive the order /// [DataContract(Name = "customer_shipping_contacts_address")] - public partial class CustomerShippingContactsAddress : IEquatable, IValidatableObject + public partial class CustomerShippingContactsAddress : IValidatableObject { /// /// Initializes a new instance of the class. @@ -131,106 +131,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerShippingContactsAddress); - } - - /// - /// Returns true if CustomerShippingContactsAddress instances are equal - /// - /// Instance of CustomerShippingContactsAddress to be compared - /// Boolean - public bool Equals(CustomerShippingContactsAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Residential == input.Residential || - (this.Residential != null && - this.Residential.Equals(input.Residential)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Residential != null) - { - hashCode = (hashCode * 59) + this.Residential.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerShippingContactsDataResponse.cs b/src/Conekta.net/Model/CustomerShippingContactsDataResponse.cs index e59d51b..0b86520 100644 --- a/src/Conekta.net/Model/CustomerShippingContactsDataResponse.cs +++ b/src/Conekta.net/Model/CustomerShippingContactsDataResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerShippingContactsDataResponse /// [DataContract(Name = "customer_shipping_contacts_data_response")] - public partial class CustomerShippingContactsDataResponse : IEquatable, IValidatableObject + public partial class CustomerShippingContactsDataResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -85,7 +85,7 @@ protected CustomerShippingContactsDataResponse() { } /// Phone contact /// /// Phone contact - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -189,139 +189,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerShippingContactsDataResponse); - } - - /// - /// Returns true if CustomerShippingContactsDataResponse instances are equal - /// - /// Instance of CustomerShippingContactsDataResponse to be compared - /// Boolean - public bool Equals(CustomerShippingContactsDataResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Receiver == input.Receiver || - (this.Receiver != null && - this.Receiver.Equals(input.Receiver)) - ) && - ( - this.BetweenStreets == input.BetweenStreets || - (this.BetweenStreets != null && - this.BetweenStreets.Equals(input.BetweenStreets)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - (this.VarDefault != null && - this.VarDefault.Equals(input.VarDefault)) - ) && - ( - this.Deleted == input.Deleted || - (this.Deleted != null && - this.Deleted.Equals(input.Deleted)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Receiver != null) - { - hashCode = (hashCode * 59) + this.Receiver.GetHashCode(); - } - if (this.BetweenStreets != null) - { - hashCode = (hashCode * 59) + this.BetweenStreets.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - if (this.VarDefault != null) - { - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - } - if (this.Deleted != null) - { - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerShippingContactsDataResponseAllOf.cs b/src/Conekta.net/Model/CustomerShippingContactsDataResponseAllOf.cs deleted file mode 100644 index d364091..0000000 --- a/src/Conekta.net/Model/CustomerShippingContactsDataResponseAllOf.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CustomerShippingContactsDataResponseAllOf - /// - [DataContract(Name = "customer_shipping_contacts_data_response_allOf")] - public partial class CustomerShippingContactsDataResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CustomerShippingContactsDataResponseAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// varObject (required). - /// createdAt (required). - public CustomerShippingContactsDataResponseAllOf(string id = default(string), string varObject = default(string), long createdAt = default(long)) - { - // to ensure "id" is required (not null) - if (id == null) - { - throw new ArgumentNullException("id is a required property for CustomerShippingContactsDataResponseAllOf and cannot be null"); - } - this.Id = id; - // to ensure "varObject" is required (not null) - if (varObject == null) - { - throw new ArgumentNullException("varObject is a required property for CustomerShippingContactsDataResponseAllOf and cannot be null"); - } - this.VarObject = varObject; - this.CreatedAt = createdAt; - } - - /// - /// Gets or Sets Id - /// - /// ship_cont_2tKZsTYcsryyu7Ah8 - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - /// shipping_contact - [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] - public string VarObject { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - /// 1675715413 - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] - public long CreatedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomerShippingContactsDataResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerShippingContactsDataResponseAllOf); - } - - /// - /// Returns true if CustomerShippingContactsDataResponseAllOf instances are equal - /// - /// Instance of CustomerShippingContactsDataResponseAllOf to be compared - /// Boolean - public bool Equals(CustomerShippingContactsDataResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/CustomerShippingContactsResponse.cs b/src/Conekta.net/Model/CustomerShippingContactsResponse.cs index 5800a8a..2737d47 100644 --- a/src/Conekta.net/Model/CustomerShippingContactsResponse.cs +++ b/src/Conekta.net/Model/CustomerShippingContactsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Contains the detail of the shipping addresses that the client has active or has used in Conekta /// [DataContract(Name = "customer_shipping_contacts_response")] - public partial class CustomerShippingContactsResponse : IEquatable, IValidatableObject + public partial class CustomerShippingContactsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -64,7 +64,7 @@ public partial class CustomerShippingContactsResponse : IEquatable /// Gets or Sets Phone /// - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -168,131 +168,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerShippingContactsResponse); - } - - /// - /// Returns true if CustomerShippingContactsResponse instances are equal - /// - /// Instance of CustomerShippingContactsResponse to be compared - /// Boolean - public bool Equals(CustomerShippingContactsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Receiver == input.Receiver || - (this.Receiver != null && - this.Receiver.Equals(input.Receiver)) - ) && - ( - this.BetweenStreets == input.BetweenStreets || - (this.BetweenStreets != null && - this.BetweenStreets.Equals(input.BetweenStreets)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Receiver != null) - { - hashCode = (hashCode * 59) + this.Receiver.GetHashCode(); - } - if (this.BetweenStreets != null) - { - hashCode = (hashCode * 59) + this.BetweenStreets.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerShippingContactsResponseAddress.cs b/src/Conekta.net/Model/CustomerShippingContactsResponseAddress.cs index 2bcbfbf..7ab6d00 100644 --- a/src/Conekta.net/Model/CustomerShippingContactsResponseAddress.cs +++ b/src/Conekta.net/Model/CustomerShippingContactsResponseAddress.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerShippingContactsResponseAddress /// [DataContract(Name = "customer_shipping_contacts_response_address")] - public partial class CustomerShippingContactsResponseAddress : IEquatable, IValidatableObject + public partial class CustomerShippingContactsResponseAddress : IValidatableObject { /// /// Initializes a new instance of the class. @@ -140,115 +140,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerShippingContactsResponseAddress); - } - - /// - /// Returns true if CustomerShippingContactsResponseAddress instances are equal - /// - /// Instance of CustomerShippingContactsResponseAddress to be compared - /// Boolean - public bool Equals(CustomerShippingContactsResponseAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.Residential == input.Residential || - (this.Residential != null && - this.Residential.Equals(input.Residential)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.Residential != null) - { - hashCode = (hashCode * 59) + this.Residential.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerUpdateFiscalEntitiesRequest.cs b/src/Conekta.net/Model/CustomerUpdateFiscalEntitiesRequest.cs index 7a02c5b..ceeaa7e 100644 --- a/src/Conekta.net/Model/CustomerUpdateFiscalEntitiesRequest.cs +++ b/src/Conekta.net/Model/CustomerUpdateFiscalEntitiesRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomerUpdateFiscalEntitiesRequest /// [DataContract(Name = "customer_update_fiscal_entities_request")] - public partial class CustomerUpdateFiscalEntitiesRequest : IEquatable, IValidatableObject + public partial class CustomerUpdateFiscalEntitiesRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -41,7 +41,7 @@ public partial class CustomerUpdateFiscalEntitiesRequest : IEquatablephone. /// metadata. /// companyName. - public CustomerUpdateFiscalEntitiesRequest(CustomerFiscalEntitiesRequestAddress address = default(CustomerFiscalEntitiesRequestAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string)) + public CustomerUpdateFiscalEntitiesRequest(CustomerAddress address = default(CustomerAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string)) { this.Address = address; this.TaxId = taxId; @@ -55,7 +55,7 @@ public partial class CustomerUpdateFiscalEntitiesRequest : IEquatable [DataMember(Name = "address", EmitDefaultValue = false)] - public CustomerFiscalEntitiesRequestAddress Address { get; set; } + public CustomerAddress Address { get; set; } /// /// Gets or Sets TaxId @@ -115,98 +115,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerUpdateFiscalEntitiesRequest); - } - - /// - /// Returns true if CustomerUpdateFiscalEntitiesRequest instances are equal - /// - /// Instance of CustomerUpdateFiscalEntitiesRequest to be compared - /// Boolean - public bool Equals(CustomerUpdateFiscalEntitiesRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomerUpdateShippingContacts.cs b/src/Conekta.net/Model/CustomerUpdateShippingContacts.cs index e782cea..a17fe36 100644 --- a/src/Conekta.net/Model/CustomerUpdateShippingContacts.cs +++ b/src/Conekta.net/Model/CustomerUpdateShippingContacts.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// [Shipping](https://developers.conekta.com/v2.1.0/reference/createcustomershippingcontacts) details, required in case of sending a shipping. If we do not receive a shipping_contact on the order, the default shipping_contact of the customer will be used. /// [DataContract(Name = "customer_update_shipping_contacts")] - public partial class CustomerUpdateShippingContacts : IEquatable, IValidatableObject + public partial class CustomerUpdateShippingContacts : IValidatableObject { /// /// Initializes a new instance of the class. @@ -57,7 +57,7 @@ public partial class CustomerUpdateShippingContacts : IEquatable /// Phone contact - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -129,106 +129,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomerUpdateShippingContacts); - } - - /// - /// Returns true if CustomerUpdateShippingContacts instances are equal - /// - /// Instance of CustomerUpdateShippingContacts to be compared - /// Boolean - public bool Equals(CustomerUpdateShippingContacts input) - { - if (input == null) - { - return false; - } - return - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Receiver == input.Receiver || - (this.Receiver != null && - this.Receiver.Equals(input.Receiver)) - ) && - ( - this.BetweenStreets == input.BetweenStreets || - (this.BetweenStreets != null && - this.BetweenStreets.Equals(input.BetweenStreets)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - (this.VarDefault != null && - this.VarDefault.Equals(input.VarDefault)) - ) && - ( - this.Deleted == input.Deleted || - (this.Deleted != null && - this.Deleted.Equals(input.Deleted)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Receiver != null) - { - hashCode = (hashCode * 59) + this.Receiver.GetHashCode(); - } - if (this.BetweenStreets != null) - { - hashCode = (hashCode * 59) + this.BetweenStreets.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - if (this.VarDefault != null) - { - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - } - if (this.Deleted != null) - { - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomersResponse.cs b/src/Conekta.net/Model/CustomersResponse.cs index 2cb937b..ae278ba 100644 --- a/src/Conekta.net/Model/CustomersResponse.cs +++ b/src/Conekta.net/Model/CustomersResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// CustomersResponse /// [DataContract(Name = "customers_response")] - public partial class CustomersResponse : IEquatable, IValidatableObject + public partial class CustomersResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -40,12 +40,12 @@ protected CustomersResponse() { } /// /// Initializes a new instance of the class. /// - /// data. /// Indicates if there are more pages to be requested (required). /// Object type, in this case is list (required). /// URL of the next page.. /// Url of the previous page.. - public CustomersResponse(List data = default(List), bool hasMore = default(bool), string varObject = default(string), string nextPageUrl = default(string), string previousPageUrl = default(string)) + /// data. + public CustomersResponse(bool hasMore = default(bool), string varObject = default(string), string nextPageUrl = default(string), string previousPageUrl = default(string), List data = default(List)) { this.HasMore = hasMore; // to ensure "varObject" is required (not null) @@ -54,17 +54,11 @@ protected CustomersResponse() { } throw new ArgumentNullException("varObject is a required property for CustomersResponse and cannot be null"); } this.VarObject = varObject; - this.Data = data; this.NextPageUrl = nextPageUrl; this.PreviousPageUrl = previousPageUrl; + this.Data = data; } - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - /// /// Indicates if there are more pages to be requested /// @@ -97,6 +91,12 @@ protected CustomersResponse() { } [DataMember(Name = "previous_page_url", EmitDefaultValue = true)] public string PreviousPageUrl { get; set; } + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", EmitDefaultValue = false)] + public List Data { get; set; } + /// /// Returns the string presentation of the object /// @@ -105,11 +105,11 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class CustomersResponse {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append(" HasMore: ").Append(HasMore).Append("\n"); sb.Append(" VarObject: ").Append(VarObject).Append("\n"); sb.Append(" NextPageUrl: ").Append(NextPageUrl).Append("\n"); sb.Append(" PreviousPageUrl: ").Append(PreviousPageUrl).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomersResponse); - } - - /// - /// Returns true if CustomersResponse instances are equal - /// - /// Instance of CustomersResponse to be compared - /// Boolean - public bool Equals(CustomersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/CustomersResponseAllOf.cs b/src/Conekta.net/Model/CustomersResponseAllOf.cs deleted file mode 100644 index 6be3ddc..0000000 --- a/src/Conekta.net/Model/CustomersResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// CustomersResponseAllOf - /// - [DataContract(Name = "customers_response_allOf")] - public partial class CustomersResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public CustomersResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CustomersResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CustomersResponseAllOf); - } - - /// - /// Returns true if CustomersResponseAllOf instances are equal - /// - /// Instance of CustomersResponseAllOf to be compared - /// Boolean - public bool Equals(CustomersResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/DeleteApiKeysResponse.cs b/src/Conekta.net/Model/DeleteApiKeysResponse.cs index 11c3355..aac7dfd 100644 --- a/src/Conekta.net/Model/DeleteApiKeysResponse.cs +++ b/src/Conekta.net/Model/DeleteApiKeysResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// DeleteApiKeysResponse /// [DataContract(Name = "delete_api_keys_response")] - public partial class DeleteApiKeysResponse : IEquatable, IValidatableObject + public partial class DeleteApiKeysResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -158,108 +158,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteApiKeysResponse); - } - - /// - /// Returns true if DeleteApiKeysResponse instances are equal - /// - /// Instance of DeleteApiKeysResponse to be compared - /// Boolean - public bool Equals(DeleteApiKeysResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Prefix == input.Prefix || - (this.Prefix != null && - this.Prefix.Equals(input.Prefix)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.Role == input.Role || - (this.Role != null && - this.Role.Equals(input.Role)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Prefix != null) - { - hashCode = (hashCode * 59) + this.Prefix.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.Role != null) - { - hashCode = (hashCode * 59) + this.Role.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/DeleteApiKeysResponseAllOf.cs b/src/Conekta.net/Model/DeleteApiKeysResponseAllOf.cs deleted file mode 100644 index 5bf0709..0000000 --- a/src/Conekta.net/Model/DeleteApiKeysResponseAllOf.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// DeleteApiKeysResponseAllOf - /// - [DataContract(Name = "delete_api_keys_response_allOf")] - public partial class DeleteApiKeysResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// deleted. - public DeleteApiKeysResponseAllOf(bool deleted = default(bool)) - { - this.Deleted = deleted; - } - - /// - /// Gets or Sets Deleted - /// - /// true - [DataMember(Name = "deleted", EmitDefaultValue = true)] - public bool Deleted { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DeleteApiKeysResponseAllOf {\n"); - sb.Append(" Deleted: ").Append(Deleted).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeleteApiKeysResponseAllOf); - } - - /// - /// Returns true if DeleteApiKeysResponseAllOf instances are equal - /// - /// Instance of DeleteApiKeysResponseAllOf to be compared - /// Boolean - public bool Equals(DeleteApiKeysResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/DeletedBlacklistRuleResponse.cs b/src/Conekta.net/Model/DeletedBlacklistRuleResponse.cs index 113b78a..71c6efd 100644 --- a/src/Conekta.net/Model/DeletedBlacklistRuleResponse.cs +++ b/src/Conekta.net/Model/DeletedBlacklistRuleResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// DeletedBlacklistRuleResponse /// [DataContract(Name = "deleted_blacklist_rule_response")] - public partial class DeletedBlacklistRuleResponse : IEquatable, IValidatableObject + public partial class DeletedBlacklistRuleResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -104,79 +104,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeletedBlacklistRuleResponse); - } - - /// - /// Returns true if DeletedBlacklistRuleResponse instances are equal - /// - /// Instance of DeletedBlacklistRuleResponse to be compared - /// Boolean - public bool Equals(DeletedBlacklistRuleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/DeletedWhitelistRuleResponse.cs b/src/Conekta.net/Model/DeletedWhitelistRuleResponse.cs index 54fefcb..00ffb8e 100644 --- a/src/Conekta.net/Model/DeletedWhitelistRuleResponse.cs +++ b/src/Conekta.net/Model/DeletedWhitelistRuleResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// DeletedWhitelistRuleResponse /// [DataContract(Name = "deleted_whitelist_rule_response")] - public partial class DeletedWhitelistRuleResponse : IEquatable, IValidatableObject + public partial class DeletedWhitelistRuleResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -104,79 +104,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeletedWhitelistRuleResponse); - } - - /// - /// Returns true if DeletedWhitelistRuleResponse instances are equal - /// - /// Instance of DeletedWhitelistRuleResponse to be compared - /// Boolean - public bool Equals(DeletedWhitelistRuleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Details.cs b/src/Conekta.net/Model/Details.cs index 912b863..7495b8d 100644 --- a/src/Conekta.net/Model/Details.cs +++ b/src/Conekta.net/Model/Details.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Details /// [DataContract(Name = "details")] - public partial class Details : IEquatable
, IValidatableObject + public partial class Details : IValidatableObject { /// /// Initializes a new instance of the class. @@ -69,53 +69,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Details); - } - - /// - /// Returns true if Details instances are equal - /// - /// Instance of Details to be compared - /// Boolean - public bool Equals(Details input) - { - if (input == null) - { - return false; - } - return - ( - this.VarDetails == input.VarDetails || - this.VarDetails != null && - input.VarDetails != null && - this.VarDetails.SequenceEqual(input.VarDetails) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarDetails != null) - { - hashCode = (hashCode * 59) + this.VarDetails.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/DetailsError.cs b/src/Conekta.net/Model/DetailsError.cs index 20661bb..ab1d439 100644 --- a/src/Conekta.net/Model/DetailsError.cs +++ b/src/Conekta.net/Model/DetailsError.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// DetailsError /// [DataContract(Name = "details_error")] - public partial class DetailsError : IEquatable, IValidatableObject + public partial class DetailsError : IValidatableObject { /// /// Initializes a new instance of the class. @@ -99,79 +99,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DetailsError); - } - - /// - /// Returns true if DetailsError instances are equal - /// - /// Instance of DetailsError to be compared - /// Boolean - public bool Equals(DetailsError input) - { - if (input == null) - { - return false; - } - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Param == input.Param || - (this.Param != null && - this.Param.Equals(input.Param)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ) && - ( - this.DebugMessage == input.DebugMessage || - (this.DebugMessage != null && - this.DebugMessage.Equals(input.DebugMessage)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Param != null) - { - hashCode = (hashCode * 59) + this.Param.GetHashCode(); - } - if (this.Message != null) - { - hashCode = (hashCode * 59) + this.Message.GetHashCode(); - } - if (this.DebugMessage != null) - { - hashCode = (hashCode * 59) + this.DebugMessage.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/DiscountLinesDataResponse.cs b/src/Conekta.net/Model/DiscountLinesDataResponse.cs index 131fa22..5ce84b2 100644 --- a/src/Conekta.net/Model/DiscountLinesDataResponse.cs +++ b/src/Conekta.net/Model/DiscountLinesDataResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// DiscountLinesDataResponse /// [DataContract(Name = "discount_lines_data_response")] - public partial class DiscountLinesDataResponse : IEquatable, IValidatableObject + public partial class DiscountLinesDataResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -156,93 +156,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DiscountLinesDataResponse); - } - - /// - /// Returns true if DiscountLinesDataResponse instances are equal - /// - /// Instance of DiscountLinesDataResponse to be compared - /// Boolean - public bool Equals(DiscountLinesDataResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/DiscountLinesResponse.cs b/src/Conekta.net/Model/DiscountLinesResponse.cs index ed936b0..30a386e 100644 --- a/src/Conekta.net/Model/DiscountLinesResponse.cs +++ b/src/Conekta.net/Model/DiscountLinesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// DiscountLinesResponse /// [DataContract(Name = "discount_lines_response")] - public partial class DiscountLinesResponse : IEquatable, IValidatableObject + public partial class DiscountLinesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -156,93 +156,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DiscountLinesResponse); - } - - /// - /// Returns true if DiscountLinesResponse instances are equal - /// - /// Instance of DiscountLinesResponse to be compared - /// Boolean - public bool Equals(DiscountLinesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/DiscountLinesResponseAllOf.cs b/src/Conekta.net/Model/DiscountLinesResponseAllOf.cs deleted file mode 100644 index ecbb711..0000000 --- a/src/Conekta.net/Model/DiscountLinesResponseAllOf.cs +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// DiscountLinesResponseAllOf - /// - [DataContract(Name = "discount_lines_response_allOf")] - public partial class DiscountLinesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DiscountLinesResponseAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// The discount line id (required). - /// The object name (required). - /// The order id (required). - public DiscountLinesResponseAllOf(string id = default(string), string varObject = default(string), string parentId = default(string)) - { - // to ensure "id" is required (not null) - if (id == null) - { - throw new ArgumentNullException("id is a required property for DiscountLinesResponseAllOf and cannot be null"); - } - this.Id = id; - // to ensure "varObject" is required (not null) - if (varObject == null) - { - throw new ArgumentNullException("varObject is a required property for DiscountLinesResponseAllOf and cannot be null"); - } - this.VarObject = varObject; - // to ensure "parentId" is required (not null) - if (parentId == null) - { - throw new ArgumentNullException("parentId is a required property for DiscountLinesResponseAllOf and cannot be null"); - } - this.ParentId = parentId; - } - - /// - /// The discount line id - /// - /// The discount line id - /// dis_lin_2tQQ58HPgPw7StE8z - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public string Id { get; set; } - - /// - /// The object name - /// - /// The object name - /// discount_line - [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] - public string VarObject { get; set; } - - /// - /// The order id - /// - /// The order id - /// ord_2tPAmKCEJqh8RE6nY - [DataMember(Name = "parent_id", IsRequired = true, EmitDefaultValue = true)] - public string ParentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DiscountLinesResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DiscountLinesResponseAllOf); - } - - /// - /// Returns true if DiscountLinesResponseAllOf instances are equal - /// - /// Instance of DiscountLinesResponseAllOf to be compared - /// Boolean - public bool Equals(DiscountLinesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/EmailCheckoutRequest.cs b/src/Conekta.net/Model/EmailCheckoutRequest.cs index e80ec29..f9609f7 100644 --- a/src/Conekta.net/Model/EmailCheckoutRequest.cs +++ b/src/Conekta.net/Model/EmailCheckoutRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// EmailCheckoutRequest /// [DataContract(Name = "emailCheckout_request")] - public partial class EmailCheckoutRequest : IEquatable, IValidatableObject + public partial class EmailCheckoutRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,52 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EmailCheckoutRequest); - } - - /// - /// Returns true if EmailCheckoutRequest instances are equal - /// - /// Instance of EmailCheckoutRequest to be compared - /// Boolean - public bool Equals(EmailCheckoutRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Error.cs b/src/Conekta.net/Model/Error.cs index 52b5972..359f3e8 100644 --- a/src/Conekta.net/Model/Error.cs +++ b/src/Conekta.net/Model/Error.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// err model /// [DataContract(Name = "error")] - public partial class Error : IEquatable, IValidatableObject + public partial class Error : IValidatableObject { /// /// Initializes a new instance of the class. @@ -100,80 +100,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Error); - } - - /// - /// Returns true if Error instances are equal - /// - /// Instance of Error to be compared - /// Boolean - public bool Equals(Error input) - { - if (input == null) - { - return false; - } - return - ( - this.Details == input.Details || - this.Details != null && - input.Details != null && - this.Details.SequenceEqual(input.Details) - ) && - ( - this.LogId == input.LogId || - (this.LogId != null && - this.LogId.Equals(input.LogId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Details != null) - { - hashCode = (hashCode * 59) + this.Details.GetHashCode(); - } - if (this.LogId != null) - { - hashCode = (hashCode * 59) + this.LogId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ErrorAllOf.cs b/src/Conekta.net/Model/ErrorAllOf.cs deleted file mode 100644 index 9c326db..0000000 --- a/src/Conekta.net/Model/ErrorAllOf.cs +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// ErrorAllOf - /// - [DataContract(Name = "error_allOf")] - public partial class ErrorAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// log id. - /// type. - /// varObject. - public ErrorAllOf(string logId = default(string), string type = default(string), string varObject = default(string)) - { - this.LogId = logId; - this.Type = type; - this.VarObject = varObject; - } - - /// - /// log id - /// - /// log id - /// 507f1f77bcf86cd799439011 - [DataMember(Name = "log_id", EmitDefaultValue = true)] - public string LogId { get; set; } - - /// - /// Gets or Sets Type - /// - /// authentication_error - [DataMember(Name = "type", EmitDefaultValue = false)] - public string Type { get; set; } - - /// - /// Gets or Sets VarObject - /// - /// error - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ErrorAllOf {\n"); - sb.Append(" LogId: ").Append(LogId).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ErrorAllOf); - } - - /// - /// Returns true if ErrorAllOf instances are equal - /// - /// Instance of ErrorAllOf to be compared - /// Boolean - public bool Equals(ErrorAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.LogId == input.LogId || - (this.LogId != null && - this.LogId.Equals(input.LogId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.LogId != null) - { - hashCode = (hashCode * 59) + this.LogId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/EventResponse.cs b/src/Conekta.net/Model/EventResponse.cs index c6a5702..f05ab27 100644 --- a/src/Conekta.net/Model/EventResponse.cs +++ b/src/Conekta.net/Model/EventResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// event model /// [DataContract(Name = "event_response")] - public partial class EventResponse : IEquatable, IValidatableObject + public partial class EventResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -139,109 +139,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EventResponse); - } - - /// - /// Returns true if EventResponse instances are equal - /// - /// Instance of EventResponse to be compared - /// Boolean - public bool Equals(EventResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.WebhookLogs == input.WebhookLogs || - this.WebhookLogs != null && - input.WebhookLogs != null && - this.WebhookLogs.SequenceEqual(input.WebhookLogs) - ) && - ( - this.WebhookStatus == input.WebhookStatus || - (this.WebhookStatus != null && - this.WebhookStatus.Equals(input.WebhookStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.WebhookLogs != null) - { - hashCode = (hashCode * 59) + this.WebhookLogs.GetHashCode(); - } - if (this.WebhookStatus != null) - { - hashCode = (hashCode * 59) + this.WebhookStatus.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/EventTypes.cs b/src/Conekta.net/Model/EventTypes.cs new file mode 100644 index 0000000..582aa3a --- /dev/null +++ b/src/Conekta.net/Model/EventTypes.cs @@ -0,0 +1,67 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// It is a parameter that allows to identify in the response, the type of event that is being generated. + /// + /// It is a parameter that allows to identify in the response, the type of event that is being generated. + [JsonConverter(typeof(StringEnumConverter))] + public enum EventTypes + { + /// + /// Enum WebhookPing for value: webhook_ping + /// + [EnumMember(Value = "webhook_ping")] + WebhookPing = 1, + + /// + /// Enum OrderPaid for value: order.paid + /// + [EnumMember(Value = "order.paid")] + OrderPaid = 2, + + /// + /// Enum OrderExpired for value: order.expired + /// + [EnumMember(Value = "order.expired")] + OrderExpired = 3, + + /// + /// Enum OrderCanceled for value: order.canceled + /// + [EnumMember(Value = "order.canceled")] + OrderCanceled = 4, + + /// + /// Enum OrderPendingPayment for value: order.pending_payment + /// + [EnumMember(Value = "order.pending_payment")] + OrderPendingPayment = 5 + } + +} diff --git a/src/Conekta.net/Model/EventsResendResponse.cs b/src/Conekta.net/Model/EventsResendResponse.cs index 4b0261a..ff54a82 100644 --- a/src/Conekta.net/Model/EventsResendResponse.cs +++ b/src/Conekta.net/Model/EventsResendResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// event model /// [DataContract(Name = "events_resend_response")] - public partial class EventsResendResponse : IEquatable, IValidatableObject + public partial class EventsResendResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -120,86 +120,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EventsResendResponse); - } - - /// - /// Returns true if EventsResendResponse instances are equal - /// - /// Instance of EventsResendResponse to be compared - /// Boolean - public bool Equals(EventsResendResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.FailedAttempts == input.FailedAttempts || - this.FailedAttempts.Equals(input.FailedAttempts) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LastAttemptedAt == input.LastAttemptedAt || - this.LastAttemptedAt.Equals(input.LastAttemptedAt) - ) && - ( - this.LastHttpResponseStatus == input.LastHttpResponseStatus || - this.LastHttpResponseStatus.Equals(input.LastHttpResponseStatus) - ) && - ( - this.ResponseData == input.ResponseData || - this.ResponseData != null && - input.ResponseData != null && - this.ResponseData.SequenceEqual(input.ResponseData) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.FailedAttempts.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LastAttemptedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.LastHttpResponseStatus.GetHashCode(); - if (this.ResponseData != null) - { - hashCode = (hashCode * 59) + this.ResponseData.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/FiscalEntityAddress.cs b/src/Conekta.net/Model/FiscalEntityAddress.cs index a586477..ad8546e 100644 --- a/src/Conekta.net/Model/FiscalEntityAddress.cs +++ b/src/Conekta.net/Model/FiscalEntityAddress.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Address of the fiscal entity /// [DataContract(Name = "fiscal_entity_address")] - public partial class FiscalEntityAddress : IEquatable, IValidatableObject + public partial class FiscalEntityAddress : IValidatableObject { /// /// Initializes a new instance of the class. @@ -167,106 +167,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FiscalEntityAddress); - } - - /// - /// Returns true if FiscalEntityAddress instances are equal - /// - /// Instance of FiscalEntityAddress to be compared - /// Boolean - public bool Equals(FiscalEntityAddress input) - { - if (input == null) - { - return false; - } - return - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.ExternalNumber == input.ExternalNumber || - (this.ExternalNumber != null && - this.ExternalNumber.Equals(input.ExternalNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.ExternalNumber != null) - { - hashCode = (hashCode * 59) + this.ExternalNumber.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetApiKeysResponse.cs b/src/Conekta.net/Model/GetApiKeysResponse.cs index 0a6a909..2fe930b 100644 --- a/src/Conekta.net/Model/GetApiKeysResponse.cs +++ b/src/Conekta.net/Model/GetApiKeysResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetApiKeysResponse /// [DataContract(Name = "get_api_keys_response")] - public partial class GetApiKeysResponse : IEquatable, IValidatableObject + public partial class GetApiKeysResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetApiKeysResponse); - } - - /// - /// Returns true if GetApiKeysResponse instances are equal - /// - /// Instance of GetApiKeysResponse to be compared - /// Boolean - public bool Equals(GetApiKeysResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetApiKeysResponseAllOf.cs b/src/Conekta.net/Model/GetApiKeysResponseAllOf.cs deleted file mode 100644 index 0d22593..0000000 --- a/src/Conekta.net/Model/GetApiKeysResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetApiKeysResponseAllOf - /// - [DataContract(Name = "get_api_keys_response_allOf")] - public partial class GetApiKeysResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetApiKeysResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetApiKeysResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetApiKeysResponseAllOf); - } - - /// - /// Returns true if GetApiKeysResponseAllOf instances are equal - /// - /// Instance of GetApiKeysResponseAllOf to be compared - /// Boolean - public bool Equals(GetApiKeysResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetChargesResponse.cs b/src/Conekta.net/Model/GetChargesResponse.cs index f750e81..d38a54c 100644 --- a/src/Conekta.net/Model/GetChargesResponse.cs +++ b/src/Conekta.net/Model/GetChargesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetChargesResponse /// [DataContract(Name = "get_charges_response")] - public partial class GetChargesResponse : IEquatable, IValidatableObject + public partial class GetChargesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetChargesResponse); - } - - /// - /// Returns true if GetChargesResponse instances are equal - /// - /// Instance of GetChargesResponse to be compared - /// Boolean - public bool Equals(GetChargesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetChargesResponseAllOf.cs b/src/Conekta.net/Model/GetChargesResponseAllOf.cs deleted file mode 100644 index 610a2fb..0000000 --- a/src/Conekta.net/Model/GetChargesResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetChargesResponseAllOf - /// - [DataContract(Name = "get_charges_response_allOf")] - public partial class GetChargesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetChargesResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetChargesResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetChargesResponseAllOf); - } - - /// - /// Returns true if GetChargesResponseAllOf instances are equal - /// - /// Instance of GetChargesResponseAllOf to be compared - /// Boolean - public bool Equals(GetChargesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetCompaniesResponse.cs b/src/Conekta.net/Model/GetCompaniesResponse.cs index a25fd4b..4f8de46 100644 --- a/src/Conekta.net/Model/GetCompaniesResponse.cs +++ b/src/Conekta.net/Model/GetCompaniesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetCompaniesResponse /// [DataContract(Name = "get_companies_response")] - public partial class GetCompaniesResponse : IEquatable, IValidatableObject + public partial class GetCompaniesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetCompaniesResponse); - } - - /// - /// Returns true if GetCompaniesResponse instances are equal - /// - /// Instance of GetCompaniesResponse to be compared - /// Boolean - public bool Equals(GetCompaniesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetCompaniesResponseAllOf.cs b/src/Conekta.net/Model/GetCompaniesResponseAllOf.cs deleted file mode 100644 index 4eda5cf..0000000 --- a/src/Conekta.net/Model/GetCompaniesResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetCompaniesResponseAllOf - /// - [DataContract(Name = "get_companies_response_allOf")] - public partial class GetCompaniesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetCompaniesResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetCompaniesResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetCompaniesResponseAllOf); - } - - /// - /// Returns true if GetCompaniesResponseAllOf instances are equal - /// - /// Instance of GetCompaniesResponseAllOf to be compared - /// Boolean - public bool Equals(GetCompaniesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetCustomerPaymentMethodDataResponse.cs b/src/Conekta.net/Model/GetCustomerPaymentMethodDataResponse.cs index 1194d10..c5dd434 100644 --- a/src/Conekta.net/Model/GetCustomerPaymentMethodDataResponse.cs +++ b/src/Conekta.net/Model/GetCustomerPaymentMethodDataResponse.cs @@ -33,7 +33,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(GetCustomerPaymentMethodDataResponseJsonConverter))] [DataContract(Name = "get_customer_payment_method_data_response")] - public partial class GetCustomerPaymentMethodDataResponse : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class GetCustomerPaymentMethodDataResponse : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -283,43 +283,6 @@ public static GetCustomerPaymentMethodDataResponse FromJson(string jsonString) return newGetCustomerPaymentMethodDataResponse; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetCustomerPaymentMethodDataResponse); - } - - /// - /// Returns true if GetCustomerPaymentMethodDataResponse instances are equal - /// - /// Instance of GetCustomerPaymentMethodDataResponse to be compared - /// Boolean - public bool Equals(GetCustomerPaymentMethodDataResponse input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -358,11 +321,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return GetCustomerPaymentMethodDataResponse.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return GetCustomerPaymentMethodDataResponse.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return GetCustomerPaymentMethodDataResponse.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/GetEventsResponse.cs b/src/Conekta.net/Model/GetEventsResponse.cs index 11c0ee5..bb377b5 100644 --- a/src/Conekta.net/Model/GetEventsResponse.cs +++ b/src/Conekta.net/Model/GetEventsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetEventsResponse /// [DataContract(Name = "get_events_response")] - public partial class GetEventsResponse : IEquatable, IValidatableObject + public partial class GetEventsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetEventsResponse); - } - - /// - /// Returns true if GetEventsResponse instances are equal - /// - /// Instance of GetEventsResponse to be compared - /// Boolean - public bool Equals(GetEventsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetEventsResponseAllOf.cs b/src/Conekta.net/Model/GetEventsResponseAllOf.cs deleted file mode 100644 index 5774bb3..0000000 --- a/src/Conekta.net/Model/GetEventsResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetEventsResponseAllOf - /// - [DataContract(Name = "get_events_response_allOf")] - public partial class GetEventsResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetEventsResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetEventsResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetEventsResponseAllOf); - } - - /// - /// Returns true if GetEventsResponseAllOf instances are equal - /// - /// Instance of GetEventsResponseAllOf to be compared - /// Boolean - public bool Equals(GetEventsResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetOrderDiscountLinesResponse.cs b/src/Conekta.net/Model/GetOrderDiscountLinesResponse.cs index 751f160..b2a7084 100644 --- a/src/Conekta.net/Model/GetOrderDiscountLinesResponse.cs +++ b/src/Conekta.net/Model/GetOrderDiscountLinesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetOrderDiscountLinesResponse /// [DataContract(Name = "get_order_discount_lines_response")] - public partial class GetOrderDiscountLinesResponse : IEquatable, IValidatableObject + public partial class GetOrderDiscountLinesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetOrderDiscountLinesResponse); - } - - /// - /// Returns true if GetOrderDiscountLinesResponse instances are equal - /// - /// Instance of GetOrderDiscountLinesResponse to be compared - /// Boolean - public bool Equals(GetOrderDiscountLinesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetOrderDiscountLinesResponseAllOf.cs b/src/Conekta.net/Model/GetOrderDiscountLinesResponseAllOf.cs deleted file mode 100644 index 53d6072..0000000 --- a/src/Conekta.net/Model/GetOrderDiscountLinesResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetOrderDiscountLinesResponseAllOf - /// - [DataContract(Name = "get_order_discount_lines_response_allOf")] - public partial class GetOrderDiscountLinesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetOrderDiscountLinesResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetOrderDiscountLinesResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetOrderDiscountLinesResponseAllOf); - } - - /// - /// Returns true if GetOrderDiscountLinesResponseAllOf instances are equal - /// - /// Instance of GetOrderDiscountLinesResponseAllOf to be compared - /// Boolean - public bool Equals(GetOrderDiscountLinesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetOrdersResponse.cs b/src/Conekta.net/Model/GetOrdersResponse.cs index d44bf56..5484142 100644 --- a/src/Conekta.net/Model/GetOrdersResponse.cs +++ b/src/Conekta.net/Model/GetOrdersResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetOrdersResponse /// [DataContract(Name = "get_orders_response")] - public partial class GetOrdersResponse : IEquatable, IValidatableObject + public partial class GetOrdersResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -128,85 +128,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetOrdersResponse); - } - - /// - /// Returns true if GetOrdersResponse instances are equal - /// - /// Instance of GetOrdersResponse to be compared - /// Boolean - public bool Equals(GetOrdersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ) && - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetPaymentMethodResponse.cs b/src/Conekta.net/Model/GetPaymentMethodResponse.cs index f4ac59d..bde820b 100644 --- a/src/Conekta.net/Model/GetPaymentMethodResponse.cs +++ b/src/Conekta.net/Model/GetPaymentMethodResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetPaymentMethodResponse /// [DataContract(Name = "get_payment_method_response")] - public partial class GetPaymentMethodResponse : IEquatable, IValidatableObject + public partial class GetPaymentMethodResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPaymentMethodResponse); - } - - /// - /// Returns true if GetPaymentMethodResponse instances are equal - /// - /// Instance of GetPaymentMethodResponse to be compared - /// Boolean - public bool Equals(GetPaymentMethodResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetPaymentMethodResponseAllOf.cs b/src/Conekta.net/Model/GetPaymentMethodResponseAllOf.cs deleted file mode 100644 index 5a80712..0000000 --- a/src/Conekta.net/Model/GetPaymentMethodResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetPaymentMethodResponseAllOf - /// - [DataContract(Name = "get_payment_method_response_allOf")] - public partial class GetPaymentMethodResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetPaymentMethodResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetPaymentMethodResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPaymentMethodResponseAllOf); - } - - /// - /// Returns true if GetPaymentMethodResponseAllOf instances are equal - /// - /// Instance of GetPaymentMethodResponseAllOf to be compared - /// Boolean - public bool Equals(GetPaymentMethodResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetPlansResponse.cs b/src/Conekta.net/Model/GetPlansResponse.cs index 5e76e3b..94b59ee 100644 --- a/src/Conekta.net/Model/GetPlansResponse.cs +++ b/src/Conekta.net/Model/GetPlansResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetPlansResponse /// [DataContract(Name = "get_plans_response")] - public partial class GetPlansResponse : IEquatable, IValidatableObject + public partial class GetPlansResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPlansResponse); - } - - /// - /// Returns true if GetPlansResponse instances are equal - /// - /// Instance of GetPlansResponse to be compared - /// Boolean - public bool Equals(GetPlansResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetPlansResponseAllOf.cs b/src/Conekta.net/Model/GetPlansResponseAllOf.cs deleted file mode 100644 index a29e524..0000000 --- a/src/Conekta.net/Model/GetPlansResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetPlansResponseAllOf - /// - [DataContract(Name = "get_plans_response_allOf")] - public partial class GetPlansResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetPlansResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetPlansResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetPlansResponseAllOf); - } - - /// - /// Returns true if GetPlansResponseAllOf instances are equal - /// - /// Instance of GetPlansResponseAllOf to be compared - /// Boolean - public bool Equals(GetPlansResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetTransactionsResponse.cs b/src/Conekta.net/Model/GetTransactionsResponse.cs index 70952bb..e515ee4 100644 --- a/src/Conekta.net/Model/GetTransactionsResponse.cs +++ b/src/Conekta.net/Model/GetTransactionsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetTransactionsResponse /// [DataContract(Name = "get_transactions_response")] - public partial class GetTransactionsResponse : IEquatable, IValidatableObject + public partial class GetTransactionsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -124,85 +124,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTransactionsResponse); - } - - /// - /// Returns true if GetTransactionsResponse instances are equal - /// - /// Instance of GetTransactionsResponse to be compared - /// Boolean - public bool Equals(GetTransactionsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetTransactionsResponseAllOf.cs b/src/Conekta.net/Model/GetTransactionsResponseAllOf.cs deleted file mode 100644 index bf83abe..0000000 --- a/src/Conekta.net/Model/GetTransactionsResponseAllOf.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetTransactionsResponseAllOf - /// - [DataContract(Name = "get_transactions_response_allOf")] - public partial class GetTransactionsResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Transactions. - public GetTransactionsResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Transactions - /// - /// Transactions - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTransactionsResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTransactionsResponseAllOf); - } - - /// - /// Returns true if GetTransactionsResponseAllOf instances are equal - /// - /// Instance of GetTransactionsResponseAllOf to be compared - /// Boolean - public bool Equals(GetTransactionsResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetTransfersResponse.cs b/src/Conekta.net/Model/GetTransfersResponse.cs index b51e115..3145aa4 100644 --- a/src/Conekta.net/Model/GetTransfersResponse.cs +++ b/src/Conekta.net/Model/GetTransfersResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetTransfersResponse /// [DataContract(Name = "get_transfers_response")] - public partial class GetTransfersResponse : IEquatable, IValidatableObject + public partial class GetTransfersResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -124,85 +124,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTransfersResponse); - } - - /// - /// Returns true if GetTransfersResponse instances are equal - /// - /// Instance of GetTransfersResponse to be compared - /// Boolean - public bool Equals(GetTransfersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetTransfersResponseAllOf.cs b/src/Conekta.net/Model/GetTransfersResponseAllOf.cs deleted file mode 100644 index 4bb36a2..0000000 --- a/src/Conekta.net/Model/GetTransfersResponseAllOf.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetTransfersResponseAllOf - /// - [DataContract(Name = "get_transfers_response_allOf")] - public partial class GetTransfersResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Transfers. - public GetTransfersResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Transfers - /// - /// Transfers - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetTransfersResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTransfersResponseAllOf); - } - - /// - /// Returns true if GetTransfersResponseAllOf instances are equal - /// - /// Instance of GetTransfersResponseAllOf to be compared - /// Boolean - public bool Equals(GetTransfersResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetWebhookKeysResponse.cs b/src/Conekta.net/Model/GetWebhookKeysResponse.cs index 6470ce2..a47f372 100644 --- a/src/Conekta.net/Model/GetWebhookKeysResponse.cs +++ b/src/Conekta.net/Model/GetWebhookKeysResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetWebhookKeysResponse /// [DataContract(Name = "get_webhook_keys_response")] - public partial class GetWebhookKeysResponse : IEquatable, IValidatableObject + public partial class GetWebhookKeysResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetWebhookKeysResponse); - } - - /// - /// Returns true if GetWebhookKeysResponse instances are equal - /// - /// Instance of GetWebhookKeysResponse to be compared - /// Boolean - public bool Equals(GetWebhookKeysResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetWebhookKeysResponseAllOf.cs b/src/Conekta.net/Model/GetWebhookKeysResponseAllOf.cs deleted file mode 100644 index b38a6b2..0000000 --- a/src/Conekta.net/Model/GetWebhookKeysResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetWebhookKeysResponseAllOf - /// - [DataContract(Name = "get_webhook_keys_response_allOf")] - public partial class GetWebhookKeysResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetWebhookKeysResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetWebhookKeysResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetWebhookKeysResponseAllOf); - } - - /// - /// Returns true if GetWebhookKeysResponseAllOf instances are equal - /// - /// Instance of GetWebhookKeysResponseAllOf to be compared - /// Boolean - public bool Equals(GetWebhookKeysResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/GetWebhooksResponse.cs b/src/Conekta.net/Model/GetWebhooksResponse.cs index b37c65a..48b9ead 100644 --- a/src/Conekta.net/Model/GetWebhooksResponse.cs +++ b/src/Conekta.net/Model/GetWebhooksResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// GetWebhooksResponse /// [DataContract(Name = "get_webhooks_response")] - public partial class GetWebhooksResponse : IEquatable, IValidatableObject + public partial class GetWebhooksResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetWebhooksResponse); - } - - /// - /// Returns true if GetWebhooksResponse instances are equal - /// - /// Instance of GetWebhooksResponse to be compared - /// Boolean - public bool Equals(GetWebhooksResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/GetWebhooksResponseAllOf.cs b/src/Conekta.net/Model/GetWebhooksResponseAllOf.cs deleted file mode 100644 index 58545eb..0000000 --- a/src/Conekta.net/Model/GetWebhooksResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// GetWebhooksResponseAllOf - /// - [DataContract(Name = "get_webhooks_response_allOf")] - public partial class GetWebhooksResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public GetWebhooksResponseAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GetWebhooksResponseAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetWebhooksResponseAllOf); - } - - /// - /// Returns true if GetWebhooksResponseAllOf instances are equal - /// - /// Instance of GetWebhooksResponseAllOf to be compared - /// Boolean - public bool Equals(GetWebhooksResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/LogResponse.cs b/src/Conekta.net/Model/LogResponse.cs index c77f90f..24cae23 100644 --- a/src/Conekta.net/Model/LogResponse.cs +++ b/src/Conekta.net/Model/LogResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// log model /// [DataContract(Name = "log_response")] - public partial class LogResponse : IEquatable, IValidatableObject + public partial class LogResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -268,219 +268,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LogResponse); - } - - /// - /// Returns true if LogResponse instances are equal - /// - /// Instance of LogResponse to be compared - /// Boolean - public bool Equals(LogResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.LoggableId == input.LoggableId || - (this.LoggableId != null && - this.LoggableId.Equals(input.LoggableId)) - ) && - ( - this.LoggableType == input.LoggableType || - (this.LoggableType != null && - this.LoggableType.Equals(input.LoggableType)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.OauthTokenId == input.OauthTokenId || - (this.OauthTokenId != null && - this.OauthTokenId.Equals(input.OauthTokenId)) - ) && - ( - this.QueryString == input.QueryString || - this.QueryString != null && - input.QueryString != null && - this.QueryString.SequenceEqual(input.QueryString) - ) && - ( - this.Related == input.Related || - (this.Related != null && - this.Related.Equals(input.Related)) - ) && - ( - this.RequestBody == input.RequestBody || - (this.RequestBody != null && - this.RequestBody.Equals(input.RequestBody)) - ) && - ( - this.RequestHeaders == input.RequestHeaders || - this.RequestHeaders != null && - input.RequestHeaders != null && - this.RequestHeaders.SequenceEqual(input.RequestHeaders) - ) && - ( - this.ResponseBody == input.ResponseBody || - (this.ResponseBody != null && - this.ResponseBody.Equals(input.ResponseBody)) - ) && - ( - this.ResponseHeaders == input.ResponseHeaders || - this.ResponseHeaders != null && - input.ResponseHeaders != null && - this.ResponseHeaders.SequenceEqual(input.ResponseHeaders) - ) && - ( - this.SearchableTags == input.SearchableTags || - this.SearchableTags != null && - input.SearchableTags != null && - this.SearchableTags.SequenceEqual(input.SearchableTags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.UserAccountId == input.UserAccountId || - (this.UserAccountId != null && - this.UserAccountId.Equals(input.UserAccountId)) - ) && - ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.LoggableId != null) - { - hashCode = (hashCode * 59) + this.LoggableId.GetHashCode(); - } - if (this.LoggableType != null) - { - hashCode = (hashCode * 59) + this.LoggableType.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.OauthTokenId != null) - { - hashCode = (hashCode * 59) + this.OauthTokenId.GetHashCode(); - } - if (this.QueryString != null) - { - hashCode = (hashCode * 59) + this.QueryString.GetHashCode(); - } - if (this.Related != null) - { - hashCode = (hashCode * 59) + this.Related.GetHashCode(); - } - if (this.RequestBody != null) - { - hashCode = (hashCode * 59) + this.RequestBody.GetHashCode(); - } - if (this.RequestHeaders != null) - { - hashCode = (hashCode * 59) + this.RequestHeaders.GetHashCode(); - } - if (this.ResponseBody != null) - { - hashCode = (hashCode * 59) + this.ResponseBody.GetHashCode(); - } - if (this.ResponseHeaders != null) - { - hashCode = (hashCode * 59) + this.ResponseHeaders.GetHashCode(); - } - if (this.SearchableTags != null) - { - hashCode = (hashCode * 59) + this.SearchableTags.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.UserAccountId != null) - { - hashCode = (hashCode * 59) + this.UserAccountId.GetHashCode(); - } - if (this.VarVersion != null) - { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/LogsResponse.cs b/src/Conekta.net/Model/LogsResponse.cs index fe4bc65..ee22558 100644 --- a/src/Conekta.net/Model/LogsResponse.cs +++ b/src/Conekta.net/Model/LogsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// logs model /// [DataContract(Name = "logs_response")] - public partial class LogsResponse : IEquatable, IValidatableObject + public partial class LogsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -122,85 +122,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LogsResponse); - } - - /// - /// Returns true if LogsResponse instances are equal - /// - /// Instance of LogsResponse to be compared - /// Boolean - public bool Equals(LogsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/LogsResponseData.cs b/src/Conekta.net/Model/LogsResponseData.cs index 7e567de..1ff0907 100644 --- a/src/Conekta.net/Model/LogsResponseData.cs +++ b/src/Conekta.net/Model/LogsResponseData.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// LogsResponseData /// [DataContract(Name = "logs_response_data")] - public partial class LogsResponseData : IEquatable, IValidatableObject + public partial class LogsResponseData : IValidatableObject { /// /// Initializes a new instance of the class. @@ -258,219 +258,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as LogsResponseData); - } - - /// - /// Returns true if LogsResponseData instances are equal - /// - /// Instance of LogsResponseData to be compared - /// Boolean - public bool Equals(LogsResponseData input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IpAddress == input.IpAddress || - (this.IpAddress != null && - this.IpAddress.Equals(input.IpAddress)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.LoggableId == input.LoggableId || - (this.LoggableId != null && - this.LoggableId.Equals(input.LoggableId)) - ) && - ( - this.LoggableType == input.LoggableType || - (this.LoggableType != null && - this.LoggableType.Equals(input.LoggableType)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.OauthTokenId == input.OauthTokenId || - (this.OauthTokenId != null && - this.OauthTokenId.Equals(input.OauthTokenId)) - ) && - ( - this.QueryString == input.QueryString || - this.QueryString != null && - input.QueryString != null && - this.QueryString.SequenceEqual(input.QueryString) - ) && - ( - this.Related == input.Related || - (this.Related != null && - this.Related.Equals(input.Related)) - ) && - ( - this.RequestBody == input.RequestBody || - (this.RequestBody != null && - this.RequestBody.Equals(input.RequestBody)) - ) && - ( - this.RequestHeaders == input.RequestHeaders || - this.RequestHeaders != null && - input.RequestHeaders != null && - this.RequestHeaders.SequenceEqual(input.RequestHeaders) - ) && - ( - this.ResponseBody == input.ResponseBody || - (this.ResponseBody != null && - this.ResponseBody.Equals(input.ResponseBody)) - ) && - ( - this.ResponseHeaders == input.ResponseHeaders || - this.ResponseHeaders != null && - input.ResponseHeaders != null && - this.ResponseHeaders.SequenceEqual(input.ResponseHeaders) - ) && - ( - this.SearchableTags == input.SearchableTags || - this.SearchableTags != null && - input.SearchableTags != null && - this.SearchableTags.SequenceEqual(input.SearchableTags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.UserAccountId == input.UserAccountId || - (this.UserAccountId != null && - this.UserAccountId.Equals(input.UserAccountId)) - ) && - ( - this.VarVersion == input.VarVersion || - (this.VarVersion != null && - this.VarVersion.Equals(input.VarVersion)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.IpAddress != null) - { - hashCode = (hashCode * 59) + this.IpAddress.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.LoggableId != null) - { - hashCode = (hashCode * 59) + this.LoggableId.GetHashCode(); - } - if (this.LoggableType != null) - { - hashCode = (hashCode * 59) + this.LoggableType.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.OauthTokenId != null) - { - hashCode = (hashCode * 59) + this.OauthTokenId.GetHashCode(); - } - if (this.QueryString != null) - { - hashCode = (hashCode * 59) + this.QueryString.GetHashCode(); - } - if (this.Related != null) - { - hashCode = (hashCode * 59) + this.Related.GetHashCode(); - } - if (this.RequestBody != null) - { - hashCode = (hashCode * 59) + this.RequestBody.GetHashCode(); - } - if (this.RequestHeaders != null) - { - hashCode = (hashCode * 59) + this.RequestHeaders.GetHashCode(); - } - if (this.ResponseBody != null) - { - hashCode = (hashCode * 59) + this.ResponseBody.GetHashCode(); - } - if (this.ResponseHeaders != null) - { - hashCode = (hashCode * 59) + this.ResponseHeaders.GetHashCode(); - } - if (this.SearchableTags != null) - { - hashCode = (hashCode * 59) + this.SearchableTags.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.UpdatedAt != null) - { - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.UserAccountId != null) - { - hashCode = (hashCode * 59) + this.UserAccountId.GetHashCode(); - } - if (this.VarVersion != null) - { - hashCode = (hashCode * 59) + this.VarVersion.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderCaptureRequest.cs b/src/Conekta.net/Model/OrderCaptureRequest.cs index 1ae2e81..c2587b9 100644 --- a/src/Conekta.net/Model/OrderCaptureRequest.cs +++ b/src/Conekta.net/Model/OrderCaptureRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrderCaptureRequest /// [DataContract(Name = "order_capture_request")] - public partial class OrderCaptureRequest : IEquatable, IValidatableObject + public partial class OrderCaptureRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -76,48 +76,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderCaptureRequest); - } - - /// - /// Returns true if OrderCaptureRequest instances are equal - /// - /// Instance of OrderCaptureRequest to be compared - /// Boolean - public bool Equals(OrderCaptureRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderCustomerInfoResponse.cs b/src/Conekta.net/Model/OrderCustomerInfoResponse.cs index f671bea..0f29092 100644 --- a/src/Conekta.net/Model/OrderCustomerInfoResponse.cs +++ b/src/Conekta.net/Model/OrderCustomerInfoResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrderCustomerInfoResponse /// [DataContract(Name = "order_customer_info_response")] - public partial class OrderCustomerInfoResponse : IEquatable, IValidatableObject + public partial class OrderCustomerInfoResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -120,93 +120,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderCustomerInfoResponse); - } - - /// - /// Returns true if OrderCustomerInfoResponse instances are equal - /// - /// Instance of OrderCustomerInfoResponse to be compared - /// Boolean - public bool Equals(OrderCustomerInfoResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.CustomerCustomReference == input.CustomerCustomReference || - (this.CustomerCustomReference != null && - this.CustomerCustomReference.Equals(input.CustomerCustomReference)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Corporate == input.Corporate || - this.Corporate.Equals(input.Corporate) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CustomerCustomReference != null) - { - hashCode = (hashCode * 59) + this.CustomerCustomReference.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Corporate.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderDiscountLinesRequest.cs b/src/Conekta.net/Model/OrderDiscountLinesRequest.cs index 51f6217..3156328 100644 --- a/src/Conekta.net/Model/OrderDiscountLinesRequest.cs +++ b/src/Conekta.net/Model/OrderDiscountLinesRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// List of discounts that apply to the order. /// [DataContract(Name = "order_discount_lines_request")] - public partial class OrderDiscountLinesRequest : IEquatable, IValidatableObject + public partial class OrderDiscountLinesRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -108,66 +108,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderDiscountLinesRequest); - } - - /// - /// Returns true if OrderDiscountLinesRequest instances are equal - /// - /// Instance of OrderDiscountLinesRequest to be compared - /// Boolean - public bool Equals(OrderDiscountLinesRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderFiscalEntityAddressResponse.cs b/src/Conekta.net/Model/OrderFiscalEntityAddressResponse.cs index a0a4244..4830063 100644 --- a/src/Conekta.net/Model/OrderFiscalEntityAddressResponse.cs +++ b/src/Conekta.net/Model/OrderFiscalEntityAddressResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Address of the fiscal entity /// [DataContract(Name = "order_fiscal_entity_address_response")] - public partial class OrderFiscalEntityAddressResponse : IEquatable, IValidatableObject + public partial class OrderFiscalEntityAddressResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -177,115 +177,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderFiscalEntityAddressResponse); - } - - /// - /// Returns true if OrderFiscalEntityAddressResponse instances are equal - /// - /// Instance of OrderFiscalEntityAddressResponse to be compared - /// Boolean - public bool Equals(OrderFiscalEntityAddressResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Street1 == input.Street1 || - (this.Street1 != null && - this.Street1.Equals(input.Street1)) - ) && - ( - this.Street2 == input.Street2 || - (this.Street2 != null && - this.Street2.Equals(input.Street2)) - ) && - ( - this.PostalCode == input.PostalCode || - (this.PostalCode != null && - this.PostalCode.Equals(input.PostalCode)) - ) && - ( - this.City == input.City || - (this.City != null && - this.City.Equals(input.City)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.ExternalNumber == input.ExternalNumber || - (this.ExternalNumber != null && - this.ExternalNumber.Equals(input.ExternalNumber)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Street1 != null) - { - hashCode = (hashCode * 59) + this.Street1.GetHashCode(); - } - if (this.Street2 != null) - { - hashCode = (hashCode * 59) + this.Street2.GetHashCode(); - } - if (this.PostalCode != null) - { - hashCode = (hashCode * 59) + this.PostalCode.GetHashCode(); - } - if (this.City != null) - { - hashCode = (hashCode * 59) + this.City.GetHashCode(); - } - if (this.State != null) - { - hashCode = (hashCode * 59) + this.State.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.ExternalNumber != null) - { - hashCode = (hashCode * 59) + this.ExternalNumber.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderFiscalEntityAddressResponseAllOf.cs b/src/Conekta.net/Model/OrderFiscalEntityAddressResponseAllOf.cs deleted file mode 100644 index 900babc..0000000 --- a/src/Conekta.net/Model/OrderFiscalEntityAddressResponseAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// OrderFiscalEntityAddressResponseAllOf - /// - [DataContract(Name = "order_fiscal_entity_address_response_allOf")] - public partial class OrderFiscalEntityAddressResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varObject. - public OrderFiscalEntityAddressResponseAllOf(string varObject = default(string)) - { - this.VarObject = varObject; - } - - /// - /// Gets or Sets VarObject - /// - /// fiscal_entity_address - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderFiscalEntityAddressResponseAllOf {\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderFiscalEntityAddressResponseAllOf); - } - - /// - /// Returns true if OrderFiscalEntityAddressResponseAllOf instances are equal - /// - /// Instance of OrderFiscalEntityAddressResponseAllOf to be compared - /// Boolean - public bool Equals(OrderFiscalEntityAddressResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/OrderFiscalEntityRequest.cs b/src/Conekta.net/Model/OrderFiscalEntityRequest.cs index 30025e4..1b06010 100644 --- a/src/Conekta.net/Model/OrderFiscalEntityRequest.cs +++ b/src/Conekta.net/Model/OrderFiscalEntityRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Fiscal entity of the order, Currently it is a purely informative field /// [DataContract(Name = "order_fiscal_entity_request")] - public partial class OrderFiscalEntityRequest : IEquatable, IValidatableObject + public partial class OrderFiscalEntityRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -94,7 +94,7 @@ protected OrderFiscalEntityRequest() { } /// Phone of the fiscal entity /// /// Phone of the fiscal entity - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -133,98 +133,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderFiscalEntityRequest); - } - - /// - /// Returns true if OrderFiscalEntityRequest instances are equal - /// - /// Instance of OrderFiscalEntityRequest to be compared - /// Boolean - public bool Equals(OrderFiscalEntityRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderFiscalEntityResponse.cs b/src/Conekta.net/Model/OrderFiscalEntityResponse.cs index 53a4806..5676a9e 100644 --- a/src/Conekta.net/Model/OrderFiscalEntityResponse.cs +++ b/src/Conekta.net/Model/OrderFiscalEntityResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Fiscal entity of the order, Currently it is a purely informative field /// [DataContract(Name = "order_fiscal_entity_response")] - public partial class OrderFiscalEntityResponse : IEquatable, IValidatableObject + public partial class OrderFiscalEntityResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -141,7 +141,7 @@ protected OrderFiscalEntityResponse() { } /// Phone of the fiscal entity /// /// Phone of the fiscal entity - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = true)] public string Phone { get; set; } @@ -175,121 +175,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderFiscalEntityResponse); - } - - /// - /// Returns true if OrderFiscalEntityResponse instances are equal - /// - /// Instance of OrderFiscalEntityResponse to be compared - /// Boolean - public bool Equals(OrderFiscalEntityResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderNextActionResponse.cs b/src/Conekta.net/Model/OrderNextActionResponse.cs index c3e7c48..36b6446 100644 --- a/src/Conekta.net/Model/OrderNextActionResponse.cs +++ b/src/Conekta.net/Model/OrderNextActionResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// contains the following attributes that will guide to continue the flow /// [DataContract(Name = "order_next_action_response")] - public partial class OrderNextActionResponse : IEquatable, IValidatableObject + public partial class OrderNextActionResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,61 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderNextActionResponse); - } - - /// - /// Returns true if OrderNextActionResponse instances are equal - /// - /// Instance of OrderNextActionResponse to be compared - /// Boolean - public bool Equals(OrderNextActionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.RedirectToUrl == input.RedirectToUrl || - (this.RedirectToUrl != null && - this.RedirectToUrl.Equals(input.RedirectToUrl)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.RedirectToUrl != null) - { - hashCode = (hashCode * 59) + this.RedirectToUrl.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderNextActionResponseRedirectToUrl.cs b/src/Conekta.net/Model/OrderNextActionResponseRedirectToUrl.cs index f35933c..97b478b 100644 --- a/src/Conekta.net/Model/OrderNextActionResponseRedirectToUrl.cs +++ b/src/Conekta.net/Model/OrderNextActionResponseRedirectToUrl.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// contains the following attributes that will guide to continue the flow /// [DataContract(Name = "order_next_action_response_redirect_to_url")] - public partial class OrderNextActionResponseRedirectToUrl : IEquatable, IValidatableObject + public partial class OrderNextActionResponseRedirectToUrl : IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,61 +82,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderNextActionResponseRedirectToUrl); - } - - /// - /// Returns true if OrderNextActionResponseRedirectToUrl instances are equal - /// - /// Instance of OrderNextActionResponseRedirectToUrl to be compared - /// Boolean - public bool Equals(OrderNextActionResponseRedirectToUrl input) - { - if (input == null) - { - return false; - } - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderRefundRequest.cs b/src/Conekta.net/Model/OrderRefundRequest.cs index 1e8d78c..7fb5346 100644 --- a/src/Conekta.net/Model/OrderRefundRequest.cs +++ b/src/Conekta.net/Model/OrderRefundRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrderRefundRequest /// [DataContract(Name = "orderRefund_request")] - public partial class OrderRefundRequest : IEquatable, IValidatableObject + public partial class OrderRefundRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -100,66 +100,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderRefundRequest); - } - - /// - /// Returns true if OrderRefundRequest instances are equal - /// - /// Instance of OrderRefundRequest to be compared - /// Boolean - public bool Equals(OrderRefundRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ) && - ( - this.Reason == input.Reason || - (this.Reason != null && - this.Reason.Equals(input.Reason)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - if (this.Reason != null) - { - hashCode = (hashCode * 59) + this.Reason.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderRequest.cs b/src/Conekta.net/Model/OrderRequest.cs index 6a27039..06b8155 100644 --- a/src/Conekta.net/Model/OrderRequest.cs +++ b/src/Conekta.net/Model/OrderRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a order /// [DataContract(Name = "order_request")] - public partial class OrderRequest : IEquatable, IValidatableObject + public partial class OrderRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -240,185 +240,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderRequest); - } - - /// - /// Returns true if OrderRequest instances are equal - /// - /// Instance of OrderRequest to be compared - /// Boolean - public bool Equals(OrderRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Charges == input.Charges || - this.Charges != null && - input.Charges != null && - this.Charges.SequenceEqual(input.Charges) - ) && - ( - this.Checkout == input.Checkout || - (this.Checkout != null && - this.Checkout.Equals(input.Checkout)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerInfo == input.CustomerInfo || - (this.CustomerInfo != null && - this.CustomerInfo.Equals(input.CustomerInfo)) - ) && - ( - this.DiscountLines == input.DiscountLines || - this.DiscountLines != null && - input.DiscountLines != null && - this.DiscountLines.SequenceEqual(input.DiscountLines) - ) && - ( - this.FiscalEntity == input.FiscalEntity || - (this.FiscalEntity != null && - this.FiscalEntity.Equals(input.FiscalEntity)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.NeedsShippingContact == input.NeedsShippingContact || - this.NeedsShippingContact.Equals(input.NeedsShippingContact) - ) && - ( - this.PreAuthorize == input.PreAuthorize || - this.PreAuthorize.Equals(input.PreAuthorize) - ) && - ( - this.ProcessingMode == input.ProcessingMode || - (this.ProcessingMode != null && - this.ProcessingMode.Equals(input.ProcessingMode)) - ) && - ( - this.ReturnUrl == input.ReturnUrl || - (this.ReturnUrl != null && - this.ReturnUrl.Equals(input.ReturnUrl)) - ) && - ( - this.ShippingContact == input.ShippingContact || - (this.ShippingContact != null && - this.ShippingContact.Equals(input.ShippingContact)) - ) && - ( - this.ShippingLines == input.ShippingLines || - this.ShippingLines != null && - input.ShippingLines != null && - this.ShippingLines.SequenceEqual(input.ShippingLines) - ) && - ( - this.TaxLines == input.TaxLines || - this.TaxLines != null && - input.TaxLines != null && - this.TaxLines.SequenceEqual(input.TaxLines) - ) && - ( - this.ThreeDsMode == input.ThreeDsMode || - (this.ThreeDsMode != null && - this.ThreeDsMode.Equals(input.ThreeDsMode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Charges != null) - { - hashCode = (hashCode * 59) + this.Charges.GetHashCode(); - } - if (this.Checkout != null) - { - hashCode = (hashCode * 59) + this.Checkout.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerInfo != null) - { - hashCode = (hashCode * 59) + this.CustomerInfo.GetHashCode(); - } - if (this.DiscountLines != null) - { - hashCode = (hashCode * 59) + this.DiscountLines.GetHashCode(); - } - if (this.FiscalEntity != null) - { - hashCode = (hashCode * 59) + this.FiscalEntity.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NeedsShippingContact.GetHashCode(); - hashCode = (hashCode * 59) + this.PreAuthorize.GetHashCode(); - if (this.ProcessingMode != null) - { - hashCode = (hashCode * 59) + this.ProcessingMode.GetHashCode(); - } - if (this.ReturnUrl != null) - { - hashCode = (hashCode * 59) + this.ReturnUrl.GetHashCode(); - } - if (this.ShippingContact != null) - { - hashCode = (hashCode * 59) + this.ShippingContact.GetHashCode(); - } - if (this.ShippingLines != null) - { - hashCode = (hashCode * 59) + this.ShippingLines.GetHashCode(); - } - if (this.TaxLines != null) - { - hashCode = (hashCode * 59) + this.TaxLines.GetHashCode(); - } - if (this.ThreeDsMode != null) - { - hashCode = (hashCode * 59) + this.ThreeDsMode.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderRequestCustomerInfo.cs b/src/Conekta.net/Model/OrderRequestCustomerInfo.cs index 2fe5bb8..4d4dafe 100644 --- a/src/Conekta.net/Model/OrderRequestCustomerInfo.cs +++ b/src/Conekta.net/Model/OrderRequestCustomerInfo.cs @@ -32,7 +32,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(OrderRequestCustomerInfoJsonConverter))] [DataContract(Name = "order_request_customer_info")] - public partial class OrderRequestCustomerInfo : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class OrderRequestCustomerInfo : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -198,43 +198,6 @@ public static OrderRequestCustomerInfo FromJson(string jsonString) return newOrderRequestCustomerInfo; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderRequestCustomerInfo); - } - - /// - /// Returns true if OrderRequestCustomerInfo instances are equal - /// - /// Instance of OrderRequestCustomerInfo to be compared - /// Boolean - public bool Equals(OrderRequestCustomerInfo input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -273,11 +236,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return OrderRequestCustomerInfo.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return OrderRequestCustomerInfo.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return OrderRequestCustomerInfo.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/OrderResponse.cs b/src/Conekta.net/Model/OrderResponse.cs index 567f7f2..c4f26d7 100644 --- a/src/Conekta.net/Model/OrderResponse.cs +++ b/src/Conekta.net/Model/OrderResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// order response /// [DataContract(Name = "order_response")] - public partial class OrderResponse : IEquatable, IValidatableObject + public partial class OrderResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -270,209 +270,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponse); - } - - /// - /// Returns true if OrderResponse instances are equal - /// - /// Instance of OrderResponse to be compared - /// Boolean - public bool Equals(OrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.AmountRefunded == input.AmountRefunded || - this.AmountRefunded.Equals(input.AmountRefunded) - ) && - ( - this.Channel == input.Channel || - (this.Channel != null && - this.Channel.Equals(input.Channel)) - ) && - ( - this.Charges == input.Charges || - (this.Charges != null && - this.Charges.Equals(input.Charges)) - ) && - ( - this.Checkout == input.Checkout || - (this.Checkout != null && - this.Checkout.Equals(input.Checkout)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerInfo == input.CustomerInfo || - (this.CustomerInfo != null && - this.CustomerInfo.Equals(input.CustomerInfo)) - ) && - ( - this.DiscountLines == input.DiscountLines || - (this.DiscountLines != null && - this.DiscountLines.Equals(input.DiscountLines)) - ) && - ( - this.FiscalEntity == input.FiscalEntity || - (this.FiscalEntity != null && - this.FiscalEntity.Equals(input.FiscalEntity)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IsRefundable == input.IsRefundable || - this.IsRefundable.Equals(input.IsRefundable) - ) && - ( - this.LineItems == input.LineItems || - (this.LineItems != null && - this.LineItems.Equals(input.LineItems)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.NextAction == input.NextAction || - (this.NextAction != null && - this.NextAction.Equals(input.NextAction)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PaymentStatus == input.PaymentStatus || - (this.PaymentStatus != null && - this.PaymentStatus.Equals(input.PaymentStatus)) - ) && - ( - this.ProcessingMode == input.ProcessingMode || - (this.ProcessingMode != null && - this.ProcessingMode.Equals(input.ProcessingMode)) - ) && - ( - this.ShippingContact == input.ShippingContact || - (this.ShippingContact != null && - this.ShippingContact.Equals(input.ShippingContact)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - this.UpdatedAt.Equals(input.UpdatedAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - hashCode = (hashCode * 59) + this.AmountRefunded.GetHashCode(); - if (this.Channel != null) - { - hashCode = (hashCode * 59) + this.Channel.GetHashCode(); - } - if (this.Charges != null) - { - hashCode = (hashCode * 59) + this.Charges.GetHashCode(); - } - if (this.Checkout != null) - { - hashCode = (hashCode * 59) + this.Checkout.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerInfo != null) - { - hashCode = (hashCode * 59) + this.CustomerInfo.GetHashCode(); - } - if (this.DiscountLines != null) - { - hashCode = (hashCode * 59) + this.DiscountLines.GetHashCode(); - } - if (this.FiscalEntity != null) - { - hashCode = (hashCode * 59) + this.FiscalEntity.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsRefundable.GetHashCode(); - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.NextAction != null) - { - hashCode = (hashCode * 59) + this.NextAction.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.PaymentStatus != null) - { - hashCode = (hashCode * 59) + this.PaymentStatus.GetHashCode(); - } - if (this.ProcessingMode != null) - { - hashCode = (hashCode * 59) + this.ProcessingMode.GetHashCode(); - } - if (this.ShippingContact != null) - { - hashCode = (hashCode * 59) + this.ShippingContact.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UpdatedAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseCharges.cs b/src/Conekta.net/Model/OrderResponseCharges.cs index 06858f3..ec794c2 100644 --- a/src/Conekta.net/Model/OrderResponseCharges.cs +++ b/src/Conekta.net/Model/OrderResponseCharges.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// The charges associated with the order /// [DataContract(Name = "order_response_charges")] - public partial class OrderResponseCharges : IEquatable, IValidatableObject + public partial class OrderResponseCharges : IValidatableObject { /// /// Initializes a new instance of the class. @@ -101,67 +101,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseCharges); - } - - /// - /// Returns true if OrderResponseCharges instances are equal - /// - /// Instance of OrderResponseCharges to be compared - /// Boolean - public bool Equals(OrderResponseCharges input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseChargesAllOf.cs b/src/Conekta.net/Model/OrderResponseChargesAllOf.cs deleted file mode 100644 index 6ad7b53..0000000 --- a/src/Conekta.net/Model/OrderResponseChargesAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// OrderResponseChargesAllOf - /// - [DataContract(Name = "order_response_charges_allOf")] - public partial class OrderResponseChargesAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public OrderResponseChargesAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderResponseChargesAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseChargesAllOf); - } - - /// - /// Returns true if OrderResponseChargesAllOf instances are equal - /// - /// Instance of OrderResponseChargesAllOf to be compared - /// Boolean - public bool Equals(OrderResponseChargesAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/OrderResponseCheckout.cs b/src/Conekta.net/Model/OrderResponseCheckout.cs index f46d2ef..f12b849 100644 --- a/src/Conekta.net/Model/OrderResponseCheckout.cs +++ b/src/Conekta.net/Model/OrderResponseCheckout.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrderResponseCheckout /// [DataContract(Name = "order_response_checkout")] - public partial class OrderResponseCheckout : IEquatable, IValidatableObject + public partial class OrderResponseCheckout : IValidatableObject { /// /// Initializes a new instance of the class. @@ -54,6 +54,7 @@ public partial class OrderResponseCheckout : IEquatable, /// onDemandEnabled. /// paidPaymentsCount. /// recurrent. + /// number of seconds to wait before redirecting to the success_url. /// slug. /// smsSent. /// successUrl. @@ -61,7 +62,7 @@ public partial class OrderResponseCheckout : IEquatable, /// status. /// type. /// url. - public OrderResponseCheckout(List allowedPaymentMethods = default(List), bool canNotExpire = default(bool), int emailsSent = default(int), List excludeCardNetworks = default(List), long expiresAt = default(long), string failureUrl = default(string), bool force3dsFlow = default(bool), string id = default(string), bool isRedirectOnFailure = default(bool), bool livemode = default(bool), Dictionary metadata = default(Dictionary), bool monthlyInstallmentsEnabled = default(bool), List monthlyInstallmentsOptions = default(List), string name = default(string), bool needsShippingContact = default(bool), string varObject = default(string), bool? onDemandEnabled = default(bool?), int paidPaymentsCount = default(int), bool recurrent = default(bool), string slug = default(string), int smsSent = default(int), string successUrl = default(string), int startsAt = default(int), string status = default(string), string type = default(string), string url = default(string)) + public OrderResponseCheckout(List allowedPaymentMethods = default(List), bool canNotExpire = default(bool), int emailsSent = default(int), List excludeCardNetworks = default(List), long expiresAt = default(long), string failureUrl = default(string), bool force3dsFlow = default(bool), string id = default(string), bool isRedirectOnFailure = default(bool), bool livemode = default(bool), Dictionary metadata = default(Dictionary), bool monthlyInstallmentsEnabled = default(bool), List monthlyInstallmentsOptions = default(List), string name = default(string), bool needsShippingContact = default(bool), string varObject = default(string), bool? onDemandEnabled = default(bool?), int paidPaymentsCount = default(int), bool recurrent = default(bool), int? redirectionTime = default(int?), string slug = default(string), int smsSent = default(int), string successUrl = default(string), int startsAt = default(int), string status = default(string), string type = default(string), string url = default(string)) { this.AllowedPaymentMethods = allowedPaymentMethods; this.CanNotExpire = canNotExpire; @@ -82,6 +83,7 @@ public partial class OrderResponseCheckout : IEquatable, this.OnDemandEnabled = onDemandEnabled; this.PaidPaymentsCount = paidPaymentsCount; this.Recurrent = recurrent; + this.RedirectionTime = redirectionTime; this.Slug = slug; this.SmsSent = smsSent; this.SuccessUrl = successUrl; @@ -220,6 +222,14 @@ public partial class OrderResponseCheckout : IEquatable, [DataMember(Name = "recurrent", EmitDefaultValue = true)] public bool Recurrent { get; set; } + /// + /// number of seconds to wait before redirecting to the success_url + /// + /// number of seconds to wait before redirecting to the success_url + /// 2 + [DataMember(Name = "redirection_time", EmitDefaultValue = true)] + public int? RedirectionTime { get; set; } + /// /// Gets or Sets Slug /// @@ -296,6 +306,7 @@ public override string ToString() sb.Append(" OnDemandEnabled: ").Append(OnDemandEnabled).Append("\n"); sb.Append(" PaidPaymentsCount: ").Append(PaidPaymentsCount).Append("\n"); sb.Append(" Recurrent: ").Append(Recurrent).Append("\n"); + sb.Append(" RedirectionTime: ").Append(RedirectionTime).Append("\n"); sb.Append(" Slug: ").Append(Slug).Append("\n"); sb.Append(" SmsSent: ").Append(SmsSent).Append("\n"); sb.Append(" SuccessUrl: ").Append(SuccessUrl).Append("\n"); @@ -316,233 +327,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseCheckout); - } - - /// - /// Returns true if OrderResponseCheckout instances are equal - /// - /// Instance of OrderResponseCheckout to be compared - /// Boolean - public bool Equals(OrderResponseCheckout input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.CanNotExpire == input.CanNotExpire || - this.CanNotExpire.Equals(input.CanNotExpire) - ) && - ( - this.EmailsSent == input.EmailsSent || - this.EmailsSent.Equals(input.EmailsSent) - ) && - ( - this.ExcludeCardNetworks == input.ExcludeCardNetworks || - this.ExcludeCardNetworks != null && - input.ExcludeCardNetworks != null && - this.ExcludeCardNetworks.SequenceEqual(input.ExcludeCardNetworks) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.FailureUrl == input.FailureUrl || - (this.FailureUrl != null && - this.FailureUrl.Equals(input.FailureUrl)) - ) && - ( - this.Force3dsFlow == input.Force3dsFlow || - this.Force3dsFlow.Equals(input.Force3dsFlow) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.IsRedirectOnFailure == input.IsRedirectOnFailure || - this.IsRedirectOnFailure.Equals(input.IsRedirectOnFailure) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MonthlyInstallmentsEnabled == input.MonthlyInstallmentsEnabled || - this.MonthlyInstallmentsEnabled.Equals(input.MonthlyInstallmentsEnabled) - ) && - ( - this.MonthlyInstallmentsOptions == input.MonthlyInstallmentsOptions || - this.MonthlyInstallmentsOptions != null && - input.MonthlyInstallmentsOptions != null && - this.MonthlyInstallmentsOptions.SequenceEqual(input.MonthlyInstallmentsOptions) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NeedsShippingContact == input.NeedsShippingContact || - this.NeedsShippingContact.Equals(input.NeedsShippingContact) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.OnDemandEnabled == input.OnDemandEnabled || - (this.OnDemandEnabled != null && - this.OnDemandEnabled.Equals(input.OnDemandEnabled)) - ) && - ( - this.PaidPaymentsCount == input.PaidPaymentsCount || - this.PaidPaymentsCount.Equals(input.PaidPaymentsCount) - ) && - ( - this.Recurrent == input.Recurrent || - this.Recurrent.Equals(input.Recurrent) - ) && - ( - this.Slug == input.Slug || - (this.Slug != null && - this.Slug.Equals(input.Slug)) - ) && - ( - this.SmsSent == input.SmsSent || - this.SmsSent.Equals(input.SmsSent) - ) && - ( - this.SuccessUrl == input.SuccessUrl || - (this.SuccessUrl != null && - this.SuccessUrl.Equals(input.SuccessUrl)) - ) && - ( - this.StartsAt == input.StartsAt || - this.StartsAt.Equals(input.StartsAt) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CanNotExpire.GetHashCode(); - hashCode = (hashCode * 59) + this.EmailsSent.GetHashCode(); - if (this.ExcludeCardNetworks != null) - { - hashCode = (hashCode * 59) + this.ExcludeCardNetworks.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.FailureUrl != null) - { - hashCode = (hashCode * 59) + this.FailureUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Force3dsFlow.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsRedirectOnFailure.GetHashCode(); - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MonthlyInstallmentsEnabled.GetHashCode(); - if (this.MonthlyInstallmentsOptions != null) - { - hashCode = (hashCode * 59) + this.MonthlyInstallmentsOptions.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NeedsShippingContact.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.OnDemandEnabled != null) - { - hashCode = (hashCode * 59) + this.OnDemandEnabled.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PaidPaymentsCount.GetHashCode(); - hashCode = (hashCode * 59) + this.Recurrent.GetHashCode(); - if (this.Slug != null) - { - hashCode = (hashCode * 59) + this.Slug.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SmsSent.GetHashCode(); - if (this.SuccessUrl != null) - { - hashCode = (hashCode * 59) + this.SuccessUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.StartsAt.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseCustomerInfo.cs b/src/Conekta.net/Model/OrderResponseCustomerInfo.cs index f7f3db5..2ed5b4e 100644 --- a/src/Conekta.net/Model/OrderResponseCustomerInfo.cs +++ b/src/Conekta.net/Model/OrderResponseCustomerInfo.cs @@ -30,36 +30,29 @@ namespace Conekta.net.Model /// OrderResponseCustomerInfo /// [DataContract(Name = "order_response_customer_info")] - public partial class OrderResponseCustomerInfo : IEquatable, IValidatableObject + public partial class OrderResponseCustomerInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// varObject. /// Custom reference. /// name. /// email. /// phone. /// corporate (default to false). + /// varObject. /// customerId. - public OrderResponseCustomerInfo(string varObject = default(string), string customerCustomReference = default(string), string name = default(string), string email = default(string), string phone = default(string), bool corporate = false, string customerId = default(string)) + public OrderResponseCustomerInfo(string customerCustomReference = default(string), string name = default(string), string email = default(string), string phone = default(string), bool corporate = false, string varObject = default(string), string customerId = default(string)) { - this.VarObject = varObject; this.CustomerCustomReference = customerCustomReference; this.Name = name; this.Email = email; this.Phone = phone; this.Corporate = corporate; + this.VarObject = varObject; this.CustomerId = customerId; } - /// - /// Gets or Sets VarObject - /// - /// customer_info - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - /// /// Custom reference /// @@ -95,6 +88,13 @@ public partial class OrderResponseCustomerInfo : IEquatable + /// Gets or Sets VarObject + /// + /// customer_info + [DataMember(Name = "object", EmitDefaultValue = false)] + public string VarObject { get; set; } + /// /// Gets or Sets CustomerId /// @@ -110,12 +110,12 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OrderResponseCustomerInfo {\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); sb.Append(" CustomerCustomReference: ").Append(CustomerCustomReference).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" Email: ").Append(Email).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" Corporate: ").Append(Corporate).Append("\n"); + sb.Append(" VarObject: ").Append(VarObject).Append("\n"); sb.Append(" CustomerId: ").Append(CustomerId).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -130,102 +130,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseCustomerInfo); - } - - /// - /// Returns true if OrderResponseCustomerInfo instances are equal - /// - /// Instance of OrderResponseCustomerInfo to be compared - /// Boolean - public bool Equals(OrderResponseCustomerInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CustomerCustomReference == input.CustomerCustomReference || - (this.CustomerCustomReference != null && - this.CustomerCustomReference.Equals(input.CustomerCustomReference)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Corporate == input.Corporate || - this.Corporate.Equals(input.Corporate) - ) && - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.CustomerCustomReference != null) - { - hashCode = (hashCode * 59) + this.CustomerCustomReference.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Corporate.GetHashCode(); - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseCustomerInfoAllOf.cs b/src/Conekta.net/Model/OrderResponseCustomerInfoAllOf.cs deleted file mode 100644 index fa1e35c..0000000 --- a/src/Conekta.net/Model/OrderResponseCustomerInfoAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// OrderResponseCustomerInfoAllOf - /// - [DataContract(Name = "order_response_customer_info_allOf")] - public partial class OrderResponseCustomerInfoAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varObject. - public OrderResponseCustomerInfoAllOf(string varObject = default(string)) - { - this.VarObject = varObject; - } - - /// - /// Gets or Sets VarObject - /// - /// customer_info - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderResponseCustomerInfoAllOf {\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseCustomerInfoAllOf); - } - - /// - /// Returns true if OrderResponseCustomerInfoAllOf instances are equal - /// - /// Instance of OrderResponseCustomerInfoAllOf to be compared - /// Boolean - public bool Equals(OrderResponseCustomerInfoAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/OrderResponseDiscountLines.cs b/src/Conekta.net/Model/OrderResponseDiscountLines.cs index 1fc2224..2bba625 100644 --- a/src/Conekta.net/Model/OrderResponseDiscountLines.cs +++ b/src/Conekta.net/Model/OrderResponseDiscountLines.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrderResponseDiscountLines /// [DataContract(Name = "order_response_discount_lines")] - public partial class OrderResponseDiscountLines : IEquatable, IValidatableObject + public partial class OrderResponseDiscountLines : IValidatableObject { /// /// Initializes a new instance of the class. @@ -101,67 +101,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseDiscountLines); - } - - /// - /// Returns true if OrderResponseDiscountLines instances are equal - /// - /// Instance of OrderResponseDiscountLines to be compared - /// Boolean - public bool Equals(OrderResponseDiscountLines input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseDiscountLinesAllOf.cs b/src/Conekta.net/Model/OrderResponseDiscountLinesAllOf.cs deleted file mode 100644 index c876813..0000000 --- a/src/Conekta.net/Model/OrderResponseDiscountLinesAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// OrderResponseDiscountLinesAllOf - /// - [DataContract(Name = "order_response_discount_lines_allOf")] - public partial class OrderResponseDiscountLinesAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public OrderResponseDiscountLinesAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderResponseDiscountLinesAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseDiscountLinesAllOf); - } - - /// - /// Returns true if OrderResponseDiscountLinesAllOf instances are equal - /// - /// Instance of OrderResponseDiscountLinesAllOf to be compared - /// Boolean - public bool Equals(OrderResponseDiscountLinesAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/OrderResponseProducts.cs b/src/Conekta.net/Model/OrderResponseProducts.cs index 5025aa6..c07be4e 100644 --- a/src/Conekta.net/Model/OrderResponseProducts.cs +++ b/src/Conekta.net/Model/OrderResponseProducts.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrderResponseProducts /// [DataContract(Name = "order_response_products")] - public partial class OrderResponseProducts : IEquatable, IValidatableObject + public partial class OrderResponseProducts : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseProducts); - } - - /// - /// Returns true if OrderResponseProducts instances are equal - /// - /// Instance of OrderResponseProducts to be compared - /// Boolean - public bool Equals(OrderResponseProducts input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseProductsAllOf.cs b/src/Conekta.net/Model/OrderResponseProductsAllOf.cs deleted file mode 100644 index c19b622..0000000 --- a/src/Conekta.net/Model/OrderResponseProductsAllOf.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// OrderResponseProductsAllOf - /// - [DataContract(Name = "order_response_products_allOf")] - public partial class OrderResponseProductsAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// data. - public OrderResponseProductsAllOf(List data = default(List)) - { - this.Data = data; - } - - /// - /// Gets or Sets Data - /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderResponseProductsAllOf {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseProductsAllOf); - } - - /// - /// Returns true if OrderResponseProductsAllOf instances are equal - /// - /// Instance of OrderResponseProductsAllOf to be compared - /// Boolean - public bool Equals(OrderResponseProductsAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/OrderResponseShippingContact.cs b/src/Conekta.net/Model/OrderResponseShippingContact.cs index f94cc42..2a787c7 100644 --- a/src/Conekta.net/Model/OrderResponseShippingContact.cs +++ b/src/Conekta.net/Model/OrderResponseShippingContact.cs @@ -30,62 +30,41 @@ namespace Conekta.net.Model /// OrderResponseShippingContact /// [DataContract(Name = "order_response_shipping_contact")] - public partial class OrderResponseShippingContact : IEquatable, IValidatableObject + public partial class OrderResponseShippingContact : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// createdAt. - /// id. - /// varObject. /// phone. /// receiver. /// betweenStreets. /// address. /// parentId. /// varDefault. + /// id. + /// createdAt. /// Metadata associated with the shipping contact. + /// varObject. /// deleted. - public OrderResponseShippingContact(long createdAt = default(long), string id = default(string), string varObject = default(string), string phone = default(string), string receiver = default(string), string betweenStreets = default(string), CustomerShippingContactsResponseAddress address = default(CustomerShippingContactsResponseAddress), string parentId = default(string), bool varDefault = default(bool), Dictionary metadata = default(Dictionary), bool deleted = default(bool)) + public OrderResponseShippingContact(string phone = default(string), string receiver = default(string), string betweenStreets = default(string), CustomerShippingContactsResponseAddress address = default(CustomerShippingContactsResponseAddress), string parentId = default(string), bool varDefault = default(bool), string id = default(string), long createdAt = default(long), Dictionary metadata = default(Dictionary), string varObject = default(string), bool deleted = default(bool)) { - this.CreatedAt = createdAt; - this.Id = id; - this.VarObject = varObject; this.Phone = phone; this.Receiver = receiver; this.BetweenStreets = betweenStreets; this.Address = address; this.ParentId = parentId; this.VarDefault = varDefault; + this.Id = id; + this.CreatedAt = createdAt; this.Metadata = metadata; + this.VarObject = varObject; this.Deleted = deleted; } - /// - /// Gets or Sets CreatedAt - /// - /// 1675715413 - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public long CreatedAt { get; set; } - - /// - /// Gets or Sets Id - /// - /// adr_1234567890 - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - /// shipping_contact - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - /// /// Gets or Sets Phone /// - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -122,6 +101,18 @@ public partial class OrderResponseShippingContact : IEquatable + /// Gets or Sets Id + /// + [DataMember(Name = "id", EmitDefaultValue = false)] + public string Id { get; set; } + + /// + /// Gets or Sets CreatedAt + /// + [DataMember(Name = "created_at", EmitDefaultValue = false)] + public long CreatedAt { get; set; } + /// /// Metadata associated with the shipping contact /// @@ -129,6 +120,12 @@ public partial class OrderResponseShippingContact : IEquatable Metadata { get; set; } + /// + /// Gets or Sets VarObject + /// + [DataMember(Name = "object", EmitDefaultValue = false)] + public string VarObject { get; set; } + /// /// Gets or Sets Deleted /// @@ -144,16 +141,16 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OrderResponseShippingContact {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); sb.Append(" Phone: ").Append(Phone).Append("\n"); sb.Append(" Receiver: ").Append(Receiver).Append("\n"); sb.Append(" BetweenStreets: ").Append(BetweenStreets).Append("\n"); sb.Append(" Address: ").Append(Address).Append("\n"); sb.Append(" ParentId: ").Append(ParentId).Append("\n"); sb.Append(" VarDefault: ").Append(VarDefault).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" VarObject: ").Append(VarObject).Append("\n"); sb.Append(" Deleted: ").Append(Deleted).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -168,131 +165,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseShippingContact); - } - - /// - /// Returns true if OrderResponseShippingContact instances are equal - /// - /// Instance of OrderResponseShippingContact to be compared - /// Boolean - public bool Equals(OrderResponseShippingContact input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Receiver == input.Receiver || - (this.Receiver != null && - this.Receiver.Equals(input.Receiver)) - ) && - ( - this.BetweenStreets == input.BetweenStreets || - (this.BetweenStreets != null && - this.BetweenStreets.Equals(input.BetweenStreets)) - ) && - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Receiver != null) - { - hashCode = (hashCode * 59) + this.Receiver.GetHashCode(); - } - if (this.BetweenStreets != null) - { - hashCode = (hashCode * 59) + this.BetweenStreets.GetHashCode(); - } - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderResponseShippingContactAllOf.cs b/src/Conekta.net/Model/OrderResponseShippingContactAllOf.cs deleted file mode 100644 index 2d7ef0b..0000000 --- a/src/Conekta.net/Model/OrderResponseShippingContactAllOf.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// OrderResponseShippingContactAllOf - /// - [DataContract(Name = "order_response_shipping_contact_allOf")] - public partial class OrderResponseShippingContactAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// createdAt. - /// id. - /// varObject. - public OrderResponseShippingContactAllOf(long createdAt = default(long), string id = default(string), string varObject = default(string)) - { - this.CreatedAt = createdAt; - this.Id = id; - this.VarObject = varObject; - } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public long CreatedAt { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class OrderResponseShippingContactAllOf {\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderResponseShippingContactAllOf); - } - - /// - /// Returns true if OrderResponseShippingContactAllOf instances are equal - /// - /// Instance of OrderResponseShippingContactAllOf to be compared - /// Boolean - public bool Equals(OrderResponseShippingContactAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/OrderTaxRequest.cs b/src/Conekta.net/Model/OrderTaxRequest.cs index c5ebcad..2d1d02d 100644 --- a/src/Conekta.net/Model/OrderTaxRequest.cs +++ b/src/Conekta.net/Model/OrderTaxRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// create new taxes for an existing order /// [DataContract(Name = "order_tax_request")] - public partial class OrderTaxRequest : IEquatable, IValidatableObject + public partial class OrderTaxRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -102,67 +102,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderTaxRequest); - } - - /// - /// Returns true if OrderTaxRequest instances are equal - /// - /// Instance of OrderTaxRequest to be compared - /// Boolean - public bool Equals(OrderTaxRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderUpdateFiscalEntityRequest.cs b/src/Conekta.net/Model/OrderUpdateFiscalEntityRequest.cs index be90514..40fb93f 100644 --- a/src/Conekta.net/Model/OrderUpdateFiscalEntityRequest.cs +++ b/src/Conekta.net/Model/OrderUpdateFiscalEntityRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Fiscal entity of the order, Currently it is a purely informative field /// [DataContract(Name = "order_update_fiscal_entity_request")] - public partial class OrderUpdateFiscalEntityRequest : IEquatable, IValidatableObject + public partial class OrderUpdateFiscalEntityRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -94,7 +94,7 @@ protected OrderUpdateFiscalEntityRequest() { } /// Phone of the fiscal entity /// /// Phone of the fiscal entity - /// 525511223344 + /// +525511223344 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -133,98 +133,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderUpdateFiscalEntityRequest); - } - - /// - /// Returns true if OrderUpdateFiscalEntityRequest instances are equal - /// - /// Instance of OrderUpdateFiscalEntityRequest to be compared - /// Boolean - public bool Equals(OrderUpdateFiscalEntityRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderUpdateRequest.cs b/src/Conekta.net/Model/OrderUpdateRequest.cs index 120d29f..594616c 100644 --- a/src/Conekta.net/Model/OrderUpdateRequest.cs +++ b/src/Conekta.net/Model/OrderUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a order /// [DataContract(Name = "order_update_request")] - public partial class OrderUpdateRequest : IEquatable, IValidatableObject + public partial class OrderUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -174,153 +174,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderUpdateRequest); - } - - /// - /// Returns true if OrderUpdateRequest instances are equal - /// - /// Instance of OrderUpdateRequest to be compared - /// Boolean - public bool Equals(OrderUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Charges == input.Charges || - this.Charges != null && - input.Charges != null && - this.Charges.SequenceEqual(input.Charges) - ) && - ( - this.Checkout == input.Checkout || - (this.Checkout != null && - this.Checkout.Equals(input.Checkout)) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.CustomerInfo == input.CustomerInfo || - (this.CustomerInfo != null && - this.CustomerInfo.Equals(input.CustomerInfo)) - ) && - ( - this.DiscountLines == input.DiscountLines || - this.DiscountLines != null && - input.DiscountLines != null && - this.DiscountLines.SequenceEqual(input.DiscountLines) - ) && - ( - this.FiscalEntity == input.FiscalEntity || - (this.FiscalEntity != null && - this.FiscalEntity.Equals(input.FiscalEntity)) - ) && - ( - this.LineItems == input.LineItems || - this.LineItems != null && - input.LineItems != null && - this.LineItems.SequenceEqual(input.LineItems) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PreAuthorize == input.PreAuthorize || - this.PreAuthorize.Equals(input.PreAuthorize) - ) && - ( - this.ShippingContact == input.ShippingContact || - (this.ShippingContact != null && - this.ShippingContact.Equals(input.ShippingContact)) - ) && - ( - this.ShippingLines == input.ShippingLines || - this.ShippingLines != null && - input.ShippingLines != null && - this.ShippingLines.SequenceEqual(input.ShippingLines) - ) && - ( - this.TaxLines == input.TaxLines || - this.TaxLines != null && - input.TaxLines != null && - this.TaxLines.SequenceEqual(input.TaxLines) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Charges != null) - { - hashCode = (hashCode * 59) + this.Charges.GetHashCode(); - } - if (this.Checkout != null) - { - hashCode = (hashCode * 59) + this.Checkout.GetHashCode(); - } - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.CustomerInfo != null) - { - hashCode = (hashCode * 59) + this.CustomerInfo.GetHashCode(); - } - if (this.DiscountLines != null) - { - hashCode = (hashCode * 59) + this.DiscountLines.GetHashCode(); - } - if (this.FiscalEntity != null) - { - hashCode = (hashCode * 59) + this.FiscalEntity.GetHashCode(); - } - if (this.LineItems != null) - { - hashCode = (hashCode * 59) + this.LineItems.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.PreAuthorize.GetHashCode(); - if (this.ShippingContact != null) - { - hashCode = (hashCode * 59) + this.ShippingContact.GetHashCode(); - } - if (this.ShippingLines != null) - { - hashCode = (hashCode * 59) + this.ShippingLines.GetHashCode(); - } - if (this.TaxLines != null) - { - hashCode = (hashCode * 59) + this.TaxLines.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/OrderUpdateRequestCustomerInfo.cs b/src/Conekta.net/Model/OrderUpdateRequestCustomerInfo.cs index 6d00be4..25b08fa 100644 --- a/src/Conekta.net/Model/OrderUpdateRequestCustomerInfo.cs +++ b/src/Conekta.net/Model/OrderUpdateRequestCustomerInfo.cs @@ -32,7 +32,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(OrderUpdateRequestCustomerInfoJsonConverter))] [DataContract(Name = "order_update_request_customer_info")] - public partial class OrderUpdateRequestCustomerInfo : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class OrderUpdateRequestCustomerInfo : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -198,43 +198,6 @@ public static OrderUpdateRequestCustomerInfo FromJson(string jsonString) return newOrderUpdateRequestCustomerInfo; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrderUpdateRequestCustomerInfo); - } - - /// - /// Returns true if OrderUpdateRequestCustomerInfo instances are equal - /// - /// Instance of OrderUpdateRequestCustomerInfo to be compared - /// Boolean - public bool Equals(OrderUpdateRequestCustomerInfo input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -273,11 +236,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return OrderUpdateRequestCustomerInfo.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return OrderUpdateRequestCustomerInfo.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return OrderUpdateRequestCustomerInfo.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/OrdersResponse.cs b/src/Conekta.net/Model/OrdersResponse.cs index 21ab8bf..1bed870 100644 --- a/src/Conekta.net/Model/OrdersResponse.cs +++ b/src/Conekta.net/Model/OrdersResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// OrdersResponse /// [DataContract(Name = "orders_response")] - public partial class OrdersResponse : IEquatable, IValidatableObject + public partial class OrdersResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -79,53 +79,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OrdersResponse); - } - - /// - /// Returns true if OrdersResponse instances are equal - /// - /// Instance of OrdersResponse to be compared - /// Boolean - public bool Equals(OrdersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Page.cs b/src/Conekta.net/Model/Page.cs index cb44cb5..293fb5d 100644 --- a/src/Conekta.net/Model/Page.cs +++ b/src/Conekta.net/Model/Page.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// page metadata /// [DataContract(Name = "page")] - public partial class Page : IEquatable, IValidatableObject + public partial class Page : IValidatableObject { /// /// Initializes a new instance of the class. @@ -82,61 +82,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Page); - } - - /// - /// Returns true if Page instances are equal - /// - /// Instance of Page to be compared - /// Boolean - public bool Equals(Page input) - { - if (input == null) - { - return false; - } - return - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Pagination.cs b/src/Conekta.net/Model/Pagination.cs index 662c1ae..4f45c80 100644 --- a/src/Conekta.net/Model/Pagination.cs +++ b/src/Conekta.net/Model/Pagination.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// pagination metadata /// [DataContract(Name = "pagination")] - public partial class Pagination : IEquatable, IValidatableObject + public partial class Pagination : IValidatableObject { /// /// Initializes a new instance of the class. @@ -92,57 +92,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pagination); - } - - /// - /// Returns true if Pagination instances are equal - /// - /// Instance of Pagination to be compared - /// Boolean - public bool Equals(Pagination input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethod.cs b/src/Conekta.net/Model/PaymentMethod.cs index 6606ed2..b2920ad 100644 --- a/src/Conekta.net/Model/PaymentMethod.cs +++ b/src/Conekta.net/Model/PaymentMethod.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethod /// [DataContract(Name = "payment_method")] - public partial class PaymentMethod : IEquatable, IValidatableObject + public partial class PaymentMethod : IValidatableObject { /// /// Initializes a new instance of the class. @@ -89,61 +89,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethod); - } - - /// - /// Returns true if PaymentMethod instances are equal - /// - /// Instance of PaymentMethod to be compared - /// Boolean - public bool Equals(PaymentMethod input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodBankTransfer.cs b/src/Conekta.net/Model/PaymentMethodBankTransfer.cs index 12c40f7..44eb737 100644 --- a/src/Conekta.net/Model/PaymentMethodBankTransfer.cs +++ b/src/Conekta.net/Model/PaymentMethodBankTransfer.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodBankTransfer /// [DataContract(Name = "payment_method_bank_transfer")] - public partial class PaymentMethodBankTransfer : IEquatable, IValidatableObject + public partial class PaymentMethodBankTransfer : IValidatableObject { /// /// Initializes a new instance of the class. @@ -238,202 +238,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodBankTransfer); - } - - /// - /// Returns true if PaymentMethodBankTransfer instances are equal - /// - /// Instance of PaymentMethodBankTransfer to be compared - /// Boolean - public bool Equals(PaymentMethodBankTransfer input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.Clabe == input.Clabe || - (this.Clabe != null && - this.Clabe.Equals(input.Clabe)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExecutedAt == input.ExecutedAt || - (this.ExecutedAt != null && - this.ExecutedAt.Equals(input.ExecutedAt)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.IssuingAccountBank == input.IssuingAccountBank || - (this.IssuingAccountBank != null && - this.IssuingAccountBank.Equals(input.IssuingAccountBank)) - ) && - ( - this.IssuingAccountNumber == input.IssuingAccountNumber || - (this.IssuingAccountNumber != null && - this.IssuingAccountNumber.Equals(input.IssuingAccountNumber)) - ) && - ( - this.IssuingAccountHolderName == input.IssuingAccountHolderName || - (this.IssuingAccountHolderName != null && - this.IssuingAccountHolderName.Equals(input.IssuingAccountHolderName)) - ) && - ( - this.IssuingAccountTaxId == input.IssuingAccountTaxId || - (this.IssuingAccountTaxId != null && - this.IssuingAccountTaxId.Equals(input.IssuingAccountTaxId)) - ) && - ( - this.PaymentAttempts == input.PaymentAttempts || - this.PaymentAttempts != null && - input.PaymentAttempts != null && - this.PaymentAttempts.SequenceEqual(input.PaymentAttempts) - ) && - ( - this.ReceivingAccountHolderName == input.ReceivingAccountHolderName || - (this.ReceivingAccountHolderName != null && - this.ReceivingAccountHolderName.Equals(input.ReceivingAccountHolderName)) - ) && - ( - this.ReceivingAccountNumber == input.ReceivingAccountNumber || - (this.ReceivingAccountNumber != null && - this.ReceivingAccountNumber.Equals(input.ReceivingAccountNumber)) - ) && - ( - this.ReceivingAccountBank == input.ReceivingAccountBank || - (this.ReceivingAccountBank != null && - this.ReceivingAccountBank.Equals(input.ReceivingAccountBank)) - ) && - ( - this.ReceivingAccountTaxId == input.ReceivingAccountTaxId || - (this.ReceivingAccountTaxId != null && - this.ReceivingAccountTaxId.Equals(input.ReceivingAccountTaxId)) - ) && - ( - this.ReferenceNumber == input.ReferenceNumber || - (this.ReferenceNumber != null && - this.ReferenceNumber.Equals(input.ReferenceNumber)) - ) && - ( - this.TrackingCode == input.TrackingCode || - (this.TrackingCode != null && - this.TrackingCode.Equals(input.TrackingCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - if (this.Clabe != null) - { - hashCode = (hashCode * 59) + this.Clabe.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.ExecutedAt != null) - { - hashCode = (hashCode * 59) + this.ExecutedAt.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.IssuingAccountBank != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountBank.GetHashCode(); - } - if (this.IssuingAccountNumber != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountNumber.GetHashCode(); - } - if (this.IssuingAccountHolderName != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountHolderName.GetHashCode(); - } - if (this.IssuingAccountTaxId != null) - { - hashCode = (hashCode * 59) + this.IssuingAccountTaxId.GetHashCode(); - } - if (this.PaymentAttempts != null) - { - hashCode = (hashCode * 59) + this.PaymentAttempts.GetHashCode(); - } - if (this.ReceivingAccountHolderName != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountHolderName.GetHashCode(); - } - if (this.ReceivingAccountNumber != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountNumber.GetHashCode(); - } - if (this.ReceivingAccountBank != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountBank.GetHashCode(); - } - if (this.ReceivingAccountTaxId != null) - { - hashCode = (hashCode * 59) + this.ReceivingAccountTaxId.GetHashCode(); - } - if (this.ReferenceNumber != null) - { - hashCode = (hashCode * 59) + this.ReferenceNumber.GetHashCode(); - } - if (this.TrackingCode != null) - { - hashCode = (hashCode * 59) + this.TrackingCode.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCard.cs b/src/Conekta.net/Model/PaymentMethodCard.cs index 156e2d6..7a7007e 100644 --- a/src/Conekta.net/Model/PaymentMethodCard.cs +++ b/src/Conekta.net/Model/PaymentMethodCard.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodCard /// [DataContract(Name = "payment_method_card")] - public partial class PaymentMethodCard : IEquatable, IValidatableObject + public partial class PaymentMethodCard : IValidatableObject { /// /// Initializes a new instance of the class. @@ -199,161 +199,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCard); - } - - /// - /// Returns true if PaymentMethodCard instances are equal - /// - /// Instance of PaymentMethodCard to be compared - /// Boolean - public bool Equals(PaymentMethodCard input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.AccountType == input.AccountType || - (this.AccountType != null && - this.AccountType.Equals(input.AccountType)) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.ContractId == input.ContractId || - (this.ContractId != null && - this.ContractId.Equals(input.ContractId)) - ) && - ( - this.Country == input.Country || - (this.Country != null && - this.Country.Equals(input.Country)) - ) && - ( - this.ExpMonth == input.ExpMonth || - (this.ExpMonth != null && - this.ExpMonth.Equals(input.ExpMonth)) - ) && - ( - this.ExpYear == input.ExpYear || - (this.ExpYear != null && - this.ExpYear.Equals(input.ExpYear)) - ) && - ( - this.FraudIndicators == input.FraudIndicators || - this.FraudIndicators != null && - input.FraudIndicators != null && - this.FraudIndicators.SequenceEqual(input.FraudIndicators) - ) && - ( - this.Issuer == input.Issuer || - (this.Issuer != null && - this.Issuer.Equals(input.Issuer)) - ) && - ( - this.Last4 == input.Last4 || - (this.Last4 != null && - this.Last4.Equals(input.Last4)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.AccountType != null) - { - hashCode = (hashCode * 59) + this.AccountType.GetHashCode(); - } - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.ContractId != null) - { - hashCode = (hashCode * 59) + this.ContractId.GetHashCode(); - } - if (this.Country != null) - { - hashCode = (hashCode * 59) + this.Country.GetHashCode(); - } - if (this.ExpMonth != null) - { - hashCode = (hashCode * 59) + this.ExpMonth.GetHashCode(); - } - if (this.ExpYear != null) - { - hashCode = (hashCode * 59) + this.ExpYear.GetHashCode(); - } - if (this.FraudIndicators != null) - { - hashCode = (hashCode * 59) + this.FraudIndicators.GetHashCode(); - } - if (this.Issuer != null) - { - hashCode = (hashCode * 59) + this.Issuer.GetHashCode(); - } - if (this.Last4 != null) - { - hashCode = (hashCode * 59) + this.Last4.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCardRequest.cs b/src/Conekta.net/Model/PaymentMethodCardRequest.cs index 2f6ed42..9f7d1a2 100644 --- a/src/Conekta.net/Model/PaymentMethodCardRequest.cs +++ b/src/Conekta.net/Model/PaymentMethodCardRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodCardRequest /// [DataContract(Name = "payment_method_card_request")] - public partial class PaymentMethodCardRequest : IEquatable, IValidatableObject + public partial class PaymentMethodCardRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -97,61 +97,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCardRequest); - } - - /// - /// Returns true if PaymentMethodCardRequest instances are equal - /// - /// Instance of PaymentMethodCardRequest to be compared - /// Boolean - public bool Equals(PaymentMethodCardRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.TokenId == input.TokenId || - (this.TokenId != null && - this.TokenId.Equals(input.TokenId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.TokenId != null) - { - hashCode = (hashCode * 59) + this.TokenId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCardRequestAllOf.cs b/src/Conekta.net/Model/PaymentMethodCardRequestAllOf.cs deleted file mode 100644 index 5f21644..0000000 --- a/src/Conekta.net/Model/PaymentMethodCardRequestAllOf.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// PaymentMethodCardRequestAllOf - /// - [DataContract(Name = "payment_method_card_request_allOf")] - public partial class PaymentMethodCardRequestAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards.. - public PaymentMethodCardRequestAllOf(string tokenId = default(string)) - { - this.TokenId = tokenId; - } - - /// - /// Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. - /// - /// Token id that will be used to create a \"card\" type payment method. See the (subscriptions)[https://developers.conekta.com/v2.1.0/reference/createsubscription] tutorial for more information on how to tokenize cards. - /// tok_32hj4g234as - [DataMember(Name = "token_id", EmitDefaultValue = false)] - public string TokenId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodCardRequestAllOf {\n"); - sb.Append(" TokenId: ").Append(TokenId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCardRequestAllOf); - } - - /// - /// Returns true if PaymentMethodCardRequestAllOf instances are equal - /// - /// Instance of PaymentMethodCardRequestAllOf to be compared - /// Boolean - public bool Equals(PaymentMethodCardRequestAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.TokenId == input.TokenId || - (this.TokenId != null && - this.TokenId.Equals(input.TokenId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.TokenId != null) - { - hashCode = (hashCode * 59) + this.TokenId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/PaymentMethodCardResponse.cs b/src/Conekta.net/Model/PaymentMethodCardResponse.cs index d17eaf4..ca9406c 100644 --- a/src/Conekta.net/Model/PaymentMethodCardResponse.cs +++ b/src/Conekta.net/Model/PaymentMethodCardResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodCardResponse /// [DataContract(Name = "payment_method_card_response")] - public partial class PaymentMethodCardResponse : IEquatable, IValidatableObject + public partial class PaymentMethodCardResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -227,166 +227,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCardResponse); - } - - /// - /// Returns true if PaymentMethodCardResponse instances are equal - /// - /// Instance of PaymentMethodCardResponse to be compared - /// Boolean - public bool Equals(PaymentMethodCardResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.Last4 == input.Last4 || - (this.Last4 != null && - this.Last4.Equals(input.Last4)) - ) && - ( - this.Bin == input.Bin || - (this.Bin != null && - this.Bin.Equals(input.Bin)) - ) && - ( - this.CardType == input.CardType || - (this.CardType != null && - this.CardType.Equals(input.CardType)) - ) && - ( - this.ExpMonth == input.ExpMonth || - (this.ExpMonth != null && - this.ExpMonth.Equals(input.ExpMonth)) - ) && - ( - this.ExpYear == input.ExpYear || - (this.ExpYear != null && - this.ExpYear.Equals(input.ExpYear)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ) && - ( - this.VisibleOnCheckout == input.VisibleOnCheckout || - this.VisibleOnCheckout.Equals(input.VisibleOnCheckout) - ) && - ( - this.PaymentSourceStatus == input.PaymentSourceStatus || - (this.PaymentSourceStatus != null && - this.PaymentSourceStatus.Equals(input.PaymentSourceStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - if (this.Last4 != null) - { - hashCode = (hashCode * 59) + this.Last4.GetHashCode(); - } - if (this.Bin != null) - { - hashCode = (hashCode * 59) + this.Bin.GetHashCode(); - } - if (this.CardType != null) - { - hashCode = (hashCode * 59) + this.CardType.GetHashCode(); - } - if (this.ExpMonth != null) - { - hashCode = (hashCode * 59) + this.ExpMonth.GetHashCode(); - } - if (this.ExpYear != null) - { - hashCode = (hashCode * 59) + this.ExpYear.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - hashCode = (hashCode * 59) + this.VisibleOnCheckout.GetHashCode(); - if (this.PaymentSourceStatus != null) - { - hashCode = (hashCode * 59) + this.PaymentSourceStatus.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCardResponseAllOf.cs b/src/Conekta.net/Model/PaymentMethodCardResponseAllOf.cs deleted file mode 100644 index d153e1d..0000000 --- a/src/Conekta.net/Model/PaymentMethodCardResponseAllOf.cs +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// use for card responses - /// - [DataContract(Name = "payment_method_card_response_allOf")] - public partial class PaymentMethodCardResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// last4. - /// bin. - /// cardType. - /// expMonth. - /// expYear. - /// brand. - /// name. - /// varDefault. - /// visibleOnCheckout. - /// paymentSourceStatus. - public PaymentMethodCardResponseAllOf(string last4 = default(string), string bin = default(string), string cardType = default(string), string expMonth = default(string), string expYear = default(string), string brand = default(string), string name = default(string), bool varDefault = default(bool), bool visibleOnCheckout = default(bool), string paymentSourceStatus = default(string)) - { - this.Last4 = last4; - this.Bin = bin; - this.CardType = cardType; - this.ExpMonth = expMonth; - this.ExpYear = expYear; - this.Brand = brand; - this.Name = name; - this.VarDefault = varDefault; - this.VisibleOnCheckout = visibleOnCheckout; - this.PaymentSourceStatus = paymentSourceStatus; - } - - /// - /// Gets or Sets Last4 - /// - /// 6410 - [DataMember(Name = "last4", EmitDefaultValue = false)] - public string Last4 { get; set; } - - /// - /// Gets or Sets Bin - /// - /// 40276657 - [DataMember(Name = "bin", EmitDefaultValue = false)] - public string Bin { get; set; } - - /// - /// Gets or Sets CardType - /// - /// debit - [DataMember(Name = "card_type", EmitDefaultValue = false)] - public string CardType { get; set; } - - /// - /// Gets or Sets ExpMonth - /// - /// 10 - [DataMember(Name = "exp_month", EmitDefaultValue = false)] - public string ExpMonth { get; set; } - - /// - /// Gets or Sets ExpYear - /// - /// 25 - [DataMember(Name = "exp_year", EmitDefaultValue = false)] - public string ExpYear { get; set; } - - /// - /// Gets or Sets Brand - /// - /// visa - [DataMember(Name = "brand", EmitDefaultValue = false)] - public string Brand { get; set; } - - /// - /// Gets or Sets Name - /// - /// Fulano Perez" - [DataMember(Name = "name", EmitDefaultValue = false)] - public string Name { get; set; } - - /// - /// Gets or Sets VarDefault - /// - [DataMember(Name = "default", EmitDefaultValue = true)] - public bool VarDefault { get; set; } - - /// - /// Gets or Sets VisibleOnCheckout - /// - [DataMember(Name = "visible_on_checkout", EmitDefaultValue = true)] - public bool VisibleOnCheckout { get; set; } - - /// - /// Gets or Sets PaymentSourceStatus - /// - /// active - [DataMember(Name = "payment_source_status", EmitDefaultValue = false)] - public string PaymentSourceStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodCardResponseAllOf {\n"); - sb.Append(" Last4: ").Append(Last4).Append("\n"); - sb.Append(" Bin: ").Append(Bin).Append("\n"); - sb.Append(" CardType: ").Append(CardType).Append("\n"); - sb.Append(" ExpMonth: ").Append(ExpMonth).Append("\n"); - sb.Append(" ExpYear: ").Append(ExpYear).Append("\n"); - sb.Append(" Brand: ").Append(Brand).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" VarDefault: ").Append(VarDefault).Append("\n"); - sb.Append(" VisibleOnCheckout: ").Append(VisibleOnCheckout).Append("\n"); - sb.Append(" PaymentSourceStatus: ").Append(PaymentSourceStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCardResponseAllOf); - } - - /// - /// Returns true if PaymentMethodCardResponseAllOf instances are equal - /// - /// Instance of PaymentMethodCardResponseAllOf to be compared - /// Boolean - public bool Equals(PaymentMethodCardResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Last4 == input.Last4 || - (this.Last4 != null && - this.Last4.Equals(input.Last4)) - ) && - ( - this.Bin == input.Bin || - (this.Bin != null && - this.Bin.Equals(input.Bin)) - ) && - ( - this.CardType == input.CardType || - (this.CardType != null && - this.CardType.Equals(input.CardType)) - ) && - ( - this.ExpMonth == input.ExpMonth || - (this.ExpMonth != null && - this.ExpMonth.Equals(input.ExpMonth)) - ) && - ( - this.ExpYear == input.ExpYear || - (this.ExpYear != null && - this.ExpYear.Equals(input.ExpYear)) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ) && - ( - this.VisibleOnCheckout == input.VisibleOnCheckout || - this.VisibleOnCheckout.Equals(input.VisibleOnCheckout) - ) && - ( - this.PaymentSourceStatus == input.PaymentSourceStatus || - (this.PaymentSourceStatus != null && - this.PaymentSourceStatus.Equals(input.PaymentSourceStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Last4 != null) - { - hashCode = (hashCode * 59) + this.Last4.GetHashCode(); - } - if (this.Bin != null) - { - hashCode = (hashCode * 59) + this.Bin.GetHashCode(); - } - if (this.CardType != null) - { - hashCode = (hashCode * 59) + this.CardType.GetHashCode(); - } - if (this.ExpMonth != null) - { - hashCode = (hashCode * 59) + this.ExpMonth.GetHashCode(); - } - if (this.ExpYear != null) - { - hashCode = (hashCode * 59) + this.ExpYear.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - hashCode = (hashCode * 59) + this.VisibleOnCheckout.GetHashCode(); - if (this.PaymentSourceStatus != null) - { - hashCode = (hashCode * 59) + this.PaymentSourceStatus.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/PaymentMethodCash.cs b/src/Conekta.net/Model/PaymentMethodCash.cs index 0da28a9..e2235a7 100644 --- a/src/Conekta.net/Model/PaymentMethodCash.cs +++ b/src/Conekta.net/Model/PaymentMethodCash.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodCash /// [DataContract(Name = "payment_method_cash")] - public partial class PaymentMethodCash : IEquatable, IValidatableObject + public partial class PaymentMethodCash : IValidatableObject { /// /// Initializes a new instance of the class. @@ -169,129 +169,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCash); - } - - /// - /// Returns true if PaymentMethodCash instances are equal - /// - /// Instance of PaymentMethodCash to be compared - /// Boolean - public bool Equals(PaymentMethodCash input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.AuthCode == input.AuthCode || - (this.AuthCode != null && - this.AuthCode.Equals(input.AuthCode)) - ) && - ( - this.CashierId == input.CashierId || - (this.CashierId != null && - this.CashierId.Equals(input.CashierId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.BarcodeUrl == input.BarcodeUrl || - (this.BarcodeUrl != null && - this.BarcodeUrl.Equals(input.BarcodeUrl)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.ServiceName == input.ServiceName || - (this.ServiceName != null && - this.ServiceName.Equals(input.ServiceName)) - ) && - ( - this.Store == input.Store || - (this.Store != null && - this.Store.Equals(input.Store)) - ) && - ( - this.StoreName == input.StoreName || - (this.StoreName != null && - this.StoreName.Equals(input.StoreName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.AuthCode != null) - { - hashCode = (hashCode * 59) + this.AuthCode.GetHashCode(); - } - if (this.CashierId != null) - { - hashCode = (hashCode * 59) + this.CashierId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.BarcodeUrl != null) - { - hashCode = (hashCode * 59) + this.BarcodeUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.ServiceName != null) - { - hashCode = (hashCode * 59) + this.ServiceName.GetHashCode(); - } - if (this.Store != null) - { - hashCode = (hashCode * 59) + this.Store.GetHashCode(); - } - if (this.StoreName != null) - { - hashCode = (hashCode * 59) + this.StoreName.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCashRequest.cs b/src/Conekta.net/Model/PaymentMethodCashRequest.cs index 55cf692..50452f3 100644 --- a/src/Conekta.net/Model/PaymentMethodCashRequest.cs +++ b/src/Conekta.net/Model/PaymentMethodCashRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodCashRequest /// [DataContract(Name = "payment_method_cash_request")] - public partial class PaymentMethodCashRequest : IEquatable, IValidatableObject + public partial class PaymentMethodCashRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -91,57 +91,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCashRequest); - } - - /// - /// Returns true if PaymentMethodCashRequest instances are equal - /// - /// Instance of PaymentMethodCashRequest to be compared - /// Boolean - public bool Equals(PaymentMethodCashRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCashRequestAllOf.cs b/src/Conekta.net/Model/PaymentMethodCashRequestAllOf.cs deleted file mode 100644 index b538265..0000000 --- a/src/Conekta.net/Model/PaymentMethodCashRequestAllOf.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// PaymentMethodCashRequestAllOf - /// - [DataContract(Name = "payment_method_cash_request_allOf")] - public partial class PaymentMethodCashRequestAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// expiresAt. - public PaymentMethodCashRequestAllOf(long expiresAt = default(long)) - { - this.ExpiresAt = expiresAt; - } - - /// - /// Gets or Sets ExpiresAt - /// - /// 1553273553 - [DataMember(Name = "expires_at", EmitDefaultValue = false)] - public long ExpiresAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodCashRequestAllOf {\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCashRequestAllOf); - } - - /// - /// Returns true if PaymentMethodCashRequestAllOf instances are equal - /// - /// Instance of PaymentMethodCashRequestAllOf to be compared - /// Boolean - public bool Equals(PaymentMethodCashRequestAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/PaymentMethodCashResponse.cs b/src/Conekta.net/Model/PaymentMethodCashResponse.cs index 07cf5a5..d6364f6 100644 --- a/src/Conekta.net/Model/PaymentMethodCashResponse.cs +++ b/src/Conekta.net/Model/PaymentMethodCashResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodCashResponse /// [DataContract(Name = "payment_method_cash_response")] - public partial class PaymentMethodCashResponse : IEquatable, IValidatableObject + public partial class PaymentMethodCashResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -179,125 +179,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCashResponse); - } - - /// - /// Returns true if PaymentMethodCashResponse instances are equal - /// - /// Instance of PaymentMethodCashResponse to be compared - /// Boolean - public bool Equals(PaymentMethodCashResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Barcode == input.Barcode || - (this.Barcode != null && - this.Barcode.Equals(input.Barcode)) - ) && - ( - this.BarcodeUrl == input.BarcodeUrl || - (this.BarcodeUrl != null && - this.BarcodeUrl.Equals(input.BarcodeUrl)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Barcode != null) - { - hashCode = (hashCode * 59) + this.Barcode.GetHashCode(); - } - if (this.BarcodeUrl != null) - { - hashCode = (hashCode * 59) + this.BarcodeUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodCashResponseAllOf.cs b/src/Conekta.net/Model/PaymentMethodCashResponseAllOf.cs deleted file mode 100644 index 35adc7d..0000000 --- a/src/Conekta.net/Model/PaymentMethodCashResponseAllOf.cs +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// use for cash responses - /// - [DataContract(Name = "payment_method_cash_response_allOf")] - public partial class PaymentMethodCashResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// reference. - /// barcode. - /// barcodeUrl. - /// expiresAt. - /// provider. - public PaymentMethodCashResponseAllOf(string reference = default(string), string barcode = default(string), string barcodeUrl = default(string), long expiresAt = default(long), string provider = default(string)) - { - this.Reference = reference; - this.Barcode = barcode; - this.BarcodeUrl = barcodeUrl; - this.ExpiresAt = expiresAt; - this.Provider = provider; - } - - /// - /// Gets or Sets Reference - /// - /// 93000262276908 - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets Barcode - /// - /// 93000262276908 - [DataMember(Name = "barcode", EmitDefaultValue = false)] - public string Barcode { get; set; } - - /// - /// Gets or Sets BarcodeUrl - /// - /// https://pt-common-s3-stg.s3.amazonaws.com/644ebf80f2243197aad6cd8810375b905b613dbe.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA3UN6375MP4SLLCWV%2F20230203%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230203T215750Z&X-Amz-Expires=604800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEH4aCXVzLWVhc3QtMSJGMEQCICd79cu7DYu%2F4%2B3HnVVswydgU9yHcE9kmQIIk2TLoZJrAiBVZ0HxVSeboK5lhdQSqADjwQF62XX35jhC%2F2riB0M8uCqQBAj2%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDc5OTgwMTA4MTY4OCIMXWZds9ZI5hzUdbeGKuQDFreMyeWnWWPqDuGZ2%2BHk6usCr%2Fl096%2FNJh9xtf8htLu56K%2FhWUTx%2BjiqFWM2O%2FF5zTS%2BIV6TqkLDZ%2BQ5Jo1miQrRmR57YDz6uP2Yd1mNZ1ouq5ipnNjUuu5UWCCBAmqyZQsrVmeMQpSV2IB%2BTERCCcW2SukFEYU%2F20%2Fzy5orsoZ8DxOW460IymR3cWBk5u3Xh2cV6Y1RdPEwDEThhqYEF5w%2ByKbLENloMsI%2FUm6sG5PPrO3yQOAP9aK2muLJs9lXQRU%2FL%2FSsmS4FKSUFOqlN6YU%2Bi2Y%2FyGIKAJT2VDkngvz5Sl%2Fadj0j%2BPKftVRV5FcEhySB6Rl%2BSkPN7kVQMJp6pS8hMJ6JCyEA%2BA3eWYdIfKgQhWVXAR4oCBfJ62DH8FU3a7WfSjjpTwfVkiReWen3GGCYfUWETTVKp46MKnJ9PG0CD3KzxKV8VfmEGc5krK%2FI%2F%2BDV2wtSa%2F9qf1%2BK1YYJIK9qZGb25ljUiGhTB4T%2BMUOSQFjetiWUoOJc5Q3Jz%2FXJbiTAMTST39MhdbCgiMgfrc8OGKN5DOVbex33Z7dn0xf%2FOCkSqurhLaG08efKQBdhLNS0RlE9hbg9yZ2ywwtQIF39fI6A7eeH0T11a5HMlvm51u4rAffPHRuEJfwJoIuj%2F2s3QzDg7%2FWeBjqmAbnPOlGfysjrDdvHyG7HVnaX02kdG%2BI3Q4PFOO4Mjaa3ocpjcfPT70%2BZ5a%2FSv5vP0jDLGrLToeM9%2BAUlNepptICRu23a1tLGW4ri0twPA%2FZ4JDTtUUUgdblyG8bKpcUTNp4oOsdmLLBz3FVyr4c2xQbDZSu2zYOtoOxB18W0AC6kIbsMWVU55Bf0mBhPeBWxGrtM4Kw1SgHHlt%2F8vetQi2OwtUcg08c%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=d06dfa41550003359f2aabc8006063a80dfd806a13a54d244024946a76aa9abc - [DataMember(Name = "barcode_url", EmitDefaultValue = false)] - public string BarcodeUrl { get; set; } - - /// - /// Gets or Sets ExpiresAt - /// - /// 0 - [DataMember(Name = "expires_at", EmitDefaultValue = false)] - public long ExpiresAt { get; set; } - - /// - /// Gets or Sets Provider - /// - /// Oxxo - [DataMember(Name = "provider", EmitDefaultValue = false)] - public string Provider { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodCashResponseAllOf {\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" Barcode: ").Append(Barcode).Append("\n"); - sb.Append(" BarcodeUrl: ").Append(BarcodeUrl).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append(" Provider: ").Append(Provider).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodCashResponseAllOf); - } - - /// - /// Returns true if PaymentMethodCashResponseAllOf instances are equal - /// - /// Instance of PaymentMethodCashResponseAllOf to be compared - /// Boolean - public bool Equals(PaymentMethodCashResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.Barcode == input.Barcode || - (this.Barcode != null && - this.Barcode.Equals(input.Barcode)) - ) && - ( - this.BarcodeUrl == input.BarcodeUrl || - (this.BarcodeUrl != null && - this.BarcodeUrl.Equals(input.BarcodeUrl)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.Provider == input.Provider || - (this.Provider != null && - this.Provider.Equals(input.Provider)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.Barcode != null) - { - hashCode = (hashCode * 59) + this.Barcode.GetHashCode(); - } - if (this.BarcodeUrl != null) - { - hashCode = (hashCode * 59) + this.BarcodeUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.Provider != null) - { - hashCode = (hashCode * 59) + this.Provider.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/PaymentMethodResponse.cs b/src/Conekta.net/Model/PaymentMethodResponse.cs index 192984f..4a02970 100644 --- a/src/Conekta.net/Model/PaymentMethodResponse.cs +++ b/src/Conekta.net/Model/PaymentMethodResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodResponse /// [DataContract(Name = "payment_method_response")] - public partial class PaymentMethodResponse : IEquatable, IValidatableObject + public partial class PaymentMethodResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -129,84 +129,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodResponse); - } - - /// - /// Returns true if PaymentMethodResponse instances are equal - /// - /// Instance of PaymentMethodResponse to be compared - /// Boolean - public bool Equals(PaymentMethodResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodSpeiRecurrent.cs b/src/Conekta.net/Model/PaymentMethodSpeiRecurrent.cs index 440f9bc..07c8ddb 100644 --- a/src/Conekta.net/Model/PaymentMethodSpeiRecurrent.cs +++ b/src/Conekta.net/Model/PaymentMethodSpeiRecurrent.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodSpeiRecurrent /// [DataContract(Name = "payment_method_spei_recurrent")] - public partial class PaymentMethodSpeiRecurrent : IEquatable, IValidatableObject + public partial class PaymentMethodSpeiRecurrent : IValidatableObject { /// /// Initializes a new instance of the class. @@ -149,102 +149,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodSpeiRecurrent); - } - - /// - /// Returns true if PaymentMethodSpeiRecurrent instances are equal - /// - /// Instance of PaymentMethodSpeiRecurrent to be compared - /// Boolean - public bool Equals(PaymentMethodSpeiRecurrent input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PaymentMethodSpeiRecurrentAllOf.cs b/src/Conekta.net/Model/PaymentMethodSpeiRecurrentAllOf.cs deleted file mode 100644 index 4d4cf2f..0000000 --- a/src/Conekta.net/Model/PaymentMethodSpeiRecurrentAllOf.cs +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// use for spei responses - /// - [DataContract(Name = "payment_method_spei_recurrent_allOf")] - public partial class PaymentMethodSpeiRecurrentAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// reference. - /// expiresAt. - public PaymentMethodSpeiRecurrentAllOf(string reference = default(string), string expiresAt = default(string)) - { - this.Reference = reference; - this.ExpiresAt = expiresAt; - } - - /// - /// Gets or Sets Reference - /// - /// 93000262276908 - [DataMember(Name = "reference", EmitDefaultValue = false)] - public string Reference { get; set; } - - /// - /// Gets or Sets ExpiresAt - /// - /// none - [DataMember(Name = "expires_at", EmitDefaultValue = false)] - public string ExpiresAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PaymentMethodSpeiRecurrentAllOf {\n"); - sb.Append(" Reference: ").Append(Reference).Append("\n"); - sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodSpeiRecurrentAllOf); - } - - /// - /// Returns true if PaymentMethodSpeiRecurrentAllOf instances are equal - /// - /// Instance of PaymentMethodSpeiRecurrentAllOf to be compared - /// Boolean - public bool Equals(PaymentMethodSpeiRecurrentAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Reference == input.Reference || - (this.Reference != null && - this.Reference.Equals(input.Reference)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - (this.ExpiresAt != null && - this.ExpiresAt.Equals(input.ExpiresAt)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Reference != null) - { - hashCode = (hashCode * 59) + this.Reference.GetHashCode(); - } - if (this.ExpiresAt != null) - { - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/PaymentMethodSpeiRequest.cs b/src/Conekta.net/Model/PaymentMethodSpeiRequest.cs index d6290e8..ddd8010 100644 --- a/src/Conekta.net/Model/PaymentMethodSpeiRequest.cs +++ b/src/Conekta.net/Model/PaymentMethodSpeiRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// PaymentMethodSpeiRequest /// [DataContract(Name = "payment_method_spei_request")] - public partial class PaymentMethodSpeiRequest : IEquatable, IValidatableObject + public partial class PaymentMethodSpeiRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -91,57 +91,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PaymentMethodSpeiRequest); - } - - /// - /// Returns true if PaymentMethodSpeiRequest instances are equal - /// - /// Instance of PaymentMethodSpeiRequest to be compared - /// Boolean - public bool Equals(PaymentMethodSpeiRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/RiskRules.cs b/src/Conekta.net/Model/Payout.cs similarity index 50% rename from src/Conekta.net/Model/RiskRules.cs rename to src/Conekta.net/Model/Payout.cs index ff8b43b..66a32c2 100644 --- a/src/Conekta.net/Model/RiskRules.cs +++ b/src/Conekta.net/Model/Payout.cs @@ -27,25 +27,35 @@ namespace Conekta.net.Model { /// - /// RiskRules + /// The payout information of the payout order. /// - [DataContract(Name = "risk_rules")] - public partial class RiskRules : IEquatable, IValidatableObject + [DataContract(Name = "payout")] + public partial class Payout : IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// - /// data. - public RiskRules(List data = default(List)) + [JsonConstructorAttribute] + protected Payout() { } + /// + /// Initializes a new instance of the class. + /// + /// payoutMethod (required). + public Payout(PayoutMethod payoutMethod = default(PayoutMethod)) { - this.Data = data; + // to ensure "payoutMethod" is required (not null) + if (payoutMethod == null) + { + throw new ArgumentNullException("payoutMethod is a required property for Payout and cannot be null"); + } + this.PayoutMethod = payoutMethod; } /// - /// Gets or Sets Data + /// Gets or Sets PayoutMethod /// - [DataMember(Name = "data", EmitDefaultValue = false)] - public List Data { get; set; } + [DataMember(Name = "payout_method", IsRequired = true, EmitDefaultValue = true)] + public PayoutMethod PayoutMethod { get; set; } /// /// Returns the string presentation of the object @@ -54,8 +64,8 @@ public partial class RiskRules : IEquatable, IValidatableObject public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class RiskRules {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("class Payout {\n"); + sb.Append(" PayoutMethod: ").Append(PayoutMethod).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -69,53 +79,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RiskRules); - } - - /// - /// Returns true if RiskRules instances are equal - /// - /// Instance of RiskRules to be compared - /// Boolean - public bool Equals(RiskRules input) - { - if (input == null) - { - return false; - } - return - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PayoutMethod.cs b/src/Conekta.net/Model/PayoutMethod.cs new file mode 100644 index 0000000..40ae0e3 --- /dev/null +++ b/src/Conekta.net/Model/PayoutMethod.cs @@ -0,0 +1,95 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// The payout method of the payout order. + /// + [DataContract(Name = "payout_method")] + public partial class PayoutMethod : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PayoutMethod() { } + /// + /// Initializes a new instance of the class. + /// + /// The type of the payout method. (required). + public PayoutMethod(string type = default(string)) + { + // to ensure "type" is required (not null) + if (type == null) + { + throw new ArgumentNullException("type is a required property for PayoutMethod and cannot be null"); + } + this.Type = type; + } + + /// + /// The type of the payout method. + /// + /// The type of the payout method. + /// cashout + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PayoutMethod {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Conekta.net/Model/PayoutOrder.cs b/src/Conekta.net/Model/PayoutOrder.cs new file mode 100644 index 0000000..0a06fe9 --- /dev/null +++ b/src/Conekta.net/Model/PayoutOrder.cs @@ -0,0 +1,177 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// a payout order + /// + [DataContract(Name = "payout_order")] + public partial class PayoutOrder : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PayoutOrder() { } + /// + /// Initializes a new instance of the class. + /// + /// The payout methods that are allowed for the payout order. (required). + /// The amount of the payout order. (required). + /// The currency in which the payout order is made. (required) (default to "MXN"). + /// customerInfo (required). + /// The metadata of the payout order.. + /// payout (required). + /// The reason for the payout order. (required). + public PayoutOrder(List allowedPayoutMethods = default(List), int amount = default(int), string currency = @"MXN", CustomerInfoJustCustomerId customerInfo = default(CustomerInfoJustCustomerId), Dictionary metadata = default(Dictionary), Payout payout = default(Payout), string reason = default(string)) + { + // to ensure "allowedPayoutMethods" is required (not null) + if (allowedPayoutMethods == null) + { + throw new ArgumentNullException("allowedPayoutMethods is a required property for PayoutOrder and cannot be null"); + } + this.AllowedPayoutMethods = allowedPayoutMethods; + this.Amount = amount; + // to ensure "currency" is required (not null) + if (currency == null) + { + throw new ArgumentNullException("currency is a required property for PayoutOrder and cannot be null"); + } + this.Currency = currency; + // to ensure "customerInfo" is required (not null) + if (customerInfo == null) + { + throw new ArgumentNullException("customerInfo is a required property for PayoutOrder and cannot be null"); + } + this.CustomerInfo = customerInfo; + // to ensure "payout" is required (not null) + if (payout == null) + { + throw new ArgumentNullException("payout is a required property for PayoutOrder and cannot be null"); + } + this.Payout = payout; + // to ensure "reason" is required (not null) + if (reason == null) + { + throw new ArgumentNullException("reason is a required property for PayoutOrder and cannot be null"); + } + this.Reason = reason; + this.Metadata = metadata; + } + + /// + /// The payout methods that are allowed for the payout order. + /// + /// The payout methods that are allowed for the payout order. + /// ["cashout"] + [DataMember(Name = "allowed_payout_methods", IsRequired = true, EmitDefaultValue = true)] + public List AllowedPayoutMethods { get; set; } + + /// + /// The amount of the payout order. + /// + /// The amount of the payout order. + /// 100 + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] + public int Amount { get; set; } + + /// + /// The currency in which the payout order is made. + /// + /// The currency in which the payout order is made. + /// MXN + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)] + public string Currency { get; set; } + + /// + /// Gets or Sets CustomerInfo + /// + [DataMember(Name = "customer_info", IsRequired = true, EmitDefaultValue = true)] + public CustomerInfoJustCustomerId CustomerInfo { get; set; } + + /// + /// The metadata of the payout order. + /// + /// The metadata of the payout order. + /// {"custom_client_id":"12345"} + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } + + /// + /// Gets or Sets Payout + /// + [DataMember(Name = "payout", IsRequired = true, EmitDefaultValue = true)] + public Payout Payout { get; set; } + + /// + /// The reason for the payout order. + /// + /// The reason for the payout order. + /// Payout order for the customer + [DataMember(Name = "reason", IsRequired = true, EmitDefaultValue = true)] + public string Reason { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PayoutOrder {\n"); + sb.Append(" AllowedPayoutMethods: ").Append(AllowedPayoutMethods).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" CustomerInfo: ").Append(CustomerInfo).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Payout: ").Append(Payout).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Conekta.net/Model/PayoutOrderPayoutsItem.cs b/src/Conekta.net/Model/PayoutOrderPayoutsItem.cs new file mode 100644 index 0000000..841f9cd --- /dev/null +++ b/src/Conekta.net/Model/PayoutOrderPayoutsItem.cs @@ -0,0 +1,182 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// PayoutOrderPayoutsItem + /// + [DataContract(Name = "payout_order_payouts_item")] + public partial class PayoutOrderPayoutsItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PayoutOrderPayoutsItem() { } + /// + /// Initializes a new instance of the class. + /// + /// The amount of the payout. (required). + /// The currency in which the payout is made. (required). + /// The expiration date of the payout.. + /// The id of the payout. (required). + /// The live mode of the payout. (required). + /// The object of the payout. (required). + /// The id of the payout order.. + /// The status of the payout.. + public PayoutOrderPayoutsItem(int amount = default(int), string currency = default(string), long expiresAt = default(long), string id = default(string), bool livemode = default(bool), string varObject = default(string), string payoutOrderId = default(string), string status = default(string)) + { + this.Amount = amount; + // to ensure "currency" is required (not null) + if (currency == null) + { + throw new ArgumentNullException("currency is a required property for PayoutOrderPayoutsItem and cannot be null"); + } + this.Currency = currency; + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for PayoutOrderPayoutsItem and cannot be null"); + } + this.Id = id; + this.Livemode = livemode; + // to ensure "varObject" is required (not null) + if (varObject == null) + { + throw new ArgumentNullException("varObject is a required property for PayoutOrderPayoutsItem and cannot be null"); + } + this.VarObject = varObject; + this.ExpiresAt = expiresAt; + this.PayoutOrderId = payoutOrderId; + this.Status = status; + } + + /// + /// The amount of the payout. + /// + /// The amount of the payout. + /// 3000 + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] + public int Amount { get; set; } + + /// + /// The currency in which the payout is made. + /// + /// The currency in which the payout is made. + /// MXN + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)] + public string Currency { get; set; } + + /// + /// The expiration date of the payout. + /// + /// The expiration date of the payout. + /// 1677626837 + [DataMember(Name = "expires_at", EmitDefaultValue = false)] + public long ExpiresAt { get; set; } + + /// + /// The id of the payout. + /// + /// The id of the payout. + /// payout_2vZwsRAhhGp2dFDJx + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// The live mode of the payout. + /// + /// The live mode of the payout. + /// true + [DataMember(Name = "livemode", IsRequired = true, EmitDefaultValue = true)] + public bool Livemode { get; set; } + + /// + /// The object of the payout. + /// + /// The object of the payout. + /// payout + [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] + public string VarObject { get; set; } + + /// + /// The id of the payout order. + /// + /// The id of the payout order. + /// f2654d66-d740-457a-9a8c-f96b5196f44e + [DataMember(Name = "payout_order_id", EmitDefaultValue = false)] + public string PayoutOrderId { get; set; } + + /// + /// The status of the payout. + /// + /// The status of the payout. + /// open + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PayoutOrderPayoutsItem {\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Livemode: ").Append(Livemode).Append("\n"); + sb.Append(" VarObject: ").Append(VarObject).Append("\n"); + sb.Append(" PayoutOrderId: ").Append(PayoutOrderId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Conekta.net/Model/PayoutOrderResponse.cs b/src/Conekta.net/Model/PayoutOrderResponse.cs new file mode 100644 index 0000000..1ef55f8 --- /dev/null +++ b/src/Conekta.net/Model/PayoutOrderResponse.cs @@ -0,0 +1,265 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// payout order model response + /// + [DataContract(Name = "payout_order_response")] + public partial class PayoutOrderResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PayoutOrderResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// The payout methods that are allowed for the payout order. (required). + /// The amount of the payout order. (required). + /// The creation date of the payout order. (required). + /// The currency in which the payout order is made. (required) (default to "MXN"). + /// customerInfo (required). + /// The expiration date of the payout order.. + /// The id of the payout order. (required). + /// The live mode of the payout order. (required). + /// The object of the payout order. (required). + /// The metadata of the payout order.. + /// The payout information of the payout order. (required). + /// The reason for the payout order. (required). + /// The status of the payout order.. + /// The update date of the payout order. (required). + public PayoutOrderResponse(List allowedPayoutMethods = default(List), int amount = default(int), long createdAt = default(long), string currency = @"MXN", PayoutOrderResponseCustomerInfo customerInfo = default(PayoutOrderResponseCustomerInfo), long expiresAt = default(long), string id = default(string), bool livemode = default(bool), string varObject = default(string), Dictionary metadata = default(Dictionary), List payouts = default(List), string reason = default(string), string status = default(string), long updatedAt = default(long)) + { + // to ensure "allowedPayoutMethods" is required (not null) + if (allowedPayoutMethods == null) + { + throw new ArgumentNullException("allowedPayoutMethods is a required property for PayoutOrderResponse and cannot be null"); + } + this.AllowedPayoutMethods = allowedPayoutMethods; + this.Amount = amount; + this.CreatedAt = createdAt; + // to ensure "currency" is required (not null) + if (currency == null) + { + throw new ArgumentNullException("currency is a required property for PayoutOrderResponse and cannot be null"); + } + this.Currency = currency; + // to ensure "customerInfo" is required (not null) + if (customerInfo == null) + { + throw new ArgumentNullException("customerInfo is a required property for PayoutOrderResponse and cannot be null"); + } + this.CustomerInfo = customerInfo; + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for PayoutOrderResponse and cannot be null"); + } + this.Id = id; + this.Livemode = livemode; + // to ensure "varObject" is required (not null) + if (varObject == null) + { + throw new ArgumentNullException("varObject is a required property for PayoutOrderResponse and cannot be null"); + } + this.VarObject = varObject; + // to ensure "payouts" is required (not null) + if (payouts == null) + { + throw new ArgumentNullException("payouts is a required property for PayoutOrderResponse and cannot be null"); + } + this.Payouts = payouts; + // to ensure "reason" is required (not null) + if (reason == null) + { + throw new ArgumentNullException("reason is a required property for PayoutOrderResponse and cannot be null"); + } + this.Reason = reason; + this.UpdatedAt = updatedAt; + this.ExpiresAt = expiresAt; + this.Metadata = metadata; + this.Status = status; + } + + /// + /// The payout methods that are allowed for the payout order. + /// + /// The payout methods that are allowed for the payout order. + /// ["cashout"] + [DataMember(Name = "allowed_payout_methods", IsRequired = true, EmitDefaultValue = true)] + public List AllowedPayoutMethods { get; set; } + + /// + /// The amount of the payout order. + /// + /// The amount of the payout order. + /// 100 + [DataMember(Name = "amount", IsRequired = true, EmitDefaultValue = true)] + public int Amount { get; set; } + + /// + /// The creation date of the payout order. + /// + /// The creation date of the payout order. + /// 1677626837 + [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] + public long CreatedAt { get; set; } + + /// + /// The currency in which the payout order is made. + /// + /// The currency in which the payout order is made. + /// MXN + [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)] + public string Currency { get; set; } + + /// + /// Gets or Sets CustomerInfo + /// + [DataMember(Name = "customer_info", IsRequired = true, EmitDefaultValue = true)] + public PayoutOrderResponseCustomerInfo CustomerInfo { get; set; } + + /// + /// The expiration date of the payout order. + /// + /// The expiration date of the payout order. + /// 1677626837 + [DataMember(Name = "expires_at", EmitDefaultValue = false)] + public long ExpiresAt { get; set; } + + /// + /// The id of the payout order. + /// + /// The id of the payout order. + /// f2654d66-d740-457a-9a8c-f96b5196f44e + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// The live mode of the payout order. + /// + /// The live mode of the payout order. + /// true + [DataMember(Name = "livemode", IsRequired = true, EmitDefaultValue = true)] + public bool Livemode { get; set; } + + /// + /// The object of the payout order. + /// + /// The object of the payout order. + /// payout_order + [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] + public string VarObject { get; set; } + + /// + /// The metadata of the payout order. + /// + /// The metadata of the payout order. + /// {"custom_client_id":"12345"} + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } + + /// + /// The payout information of the payout order. + /// + /// The payout information of the payout order. + [DataMember(Name = "payouts", IsRequired = true, EmitDefaultValue = true)] + public List Payouts { get; set; } + + /// + /// The reason for the payout order. + /// + /// The reason for the payout order. + /// Payout order for the customer + [DataMember(Name = "reason", IsRequired = true, EmitDefaultValue = true)] + public string Reason { get; set; } + + /// + /// The status of the payout order. + /// + /// The status of the payout order. + /// open + [DataMember(Name = "status", EmitDefaultValue = false)] + public string Status { get; set; } + + /// + /// The update date of the payout order. + /// + /// The update date of the payout order. + /// 1677626837 + [DataMember(Name = "updated_at", IsRequired = true, EmitDefaultValue = true)] + public long UpdatedAt { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PayoutOrderResponse {\n"); + sb.Append(" AllowedPayoutMethods: ").Append(AllowedPayoutMethods).Append("\n"); + sb.Append(" Amount: ").Append(Amount).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" Currency: ").Append(Currency).Append("\n"); + sb.Append(" CustomerInfo: ").Append(CustomerInfo).Append("\n"); + sb.Append(" ExpiresAt: ").Append(ExpiresAt).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Livemode: ").Append(Livemode).Append("\n"); + sb.Append(" VarObject: ").Append(VarObject).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); + sb.Append(" Payouts: ").Append(Payouts).Append("\n"); + sb.Append(" Reason: ").Append(Reason).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Conekta.net/Model/PayoutOrderResponseCustomerInfo.cs b/src/Conekta.net/Model/PayoutOrderResponseCustomerInfo.cs new file mode 100644 index 0000000..78bed7a --- /dev/null +++ b/src/Conekta.net/Model/PayoutOrderResponseCustomerInfo.cs @@ -0,0 +1,155 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// The customer information of the payout order. + /// + [DataContract(Name = "payout_order_response_customer_info")] + public partial class PayoutOrderResponseCustomerInfo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PayoutOrderResponseCustomerInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// Custom reference. + /// name. + /// email. + /// phone. + /// corporate (default to false). + /// varObject. + /// The id of the customer. (required). + public PayoutOrderResponseCustomerInfo(string customerCustomReference = default(string), string name = default(string), string email = default(string), string phone = default(string), bool corporate = false, string varObject = default(string), string id = default(string)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for PayoutOrderResponseCustomerInfo and cannot be null"); + } + this.Id = id; + this.CustomerCustomReference = customerCustomReference; + this.Name = name; + this.Email = email; + this.Phone = phone; + this.Corporate = corporate; + this.VarObject = varObject; + } + + /// + /// Custom reference + /// + /// Custom reference + /// custom_reference + [DataMember(Name = "customer_custom_reference", EmitDefaultValue = true)] + public string CustomerCustomReference { get; set; } + + /// + /// Gets or Sets Name + /// + /// DevTest + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + /// + /// Gets or Sets Email + /// + /// test@conekta.com + [DataMember(Name = "email", EmitDefaultValue = false)] + public string Email { get; set; } + + /// + /// Gets or Sets Phone + /// + /// 5522997233 + [DataMember(Name = "phone", EmitDefaultValue = false)] + public string Phone { get; set; } + + /// + /// Gets or Sets Corporate + /// + [DataMember(Name = "corporate", EmitDefaultValue = true)] + public bool Corporate { get; set; } + + /// + /// Gets or Sets VarObject + /// + /// customer_info + [DataMember(Name = "object", EmitDefaultValue = false)] + public string VarObject { get; set; } + + /// + /// The id of the customer. + /// + /// The id of the customer. + /// cus_23874283647 + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PayoutOrderResponseCustomerInfo {\n"); + sb.Append(" CustomerCustomReference: ").Append(CustomerCustomReference).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" Corporate: ").Append(Corporate).Append("\n"); + sb.Append(" VarObject: ").Append(VarObject).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Conekta.net/Model/PayoutOrdersResponse.cs b/src/Conekta.net/Model/PayoutOrdersResponse.cs new file mode 100644 index 0000000..d886f97 --- /dev/null +++ b/src/Conekta.net/Model/PayoutOrdersResponse.cs @@ -0,0 +1,137 @@ +/* + * Conekta API + * + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; + +namespace Conekta.net.Model +{ + /// + /// PayoutOrdersResponse + /// + [DataContract(Name = "payout_orders_response")] + public partial class PayoutOrdersResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PayoutOrdersResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Indicates if there are more pages to be requested (required). + /// Object type, in this case is list (required). + /// URL of the next page.. + /// Url of the previous page.. + /// data. + public PayoutOrdersResponse(bool hasMore = default(bool), string varObject = default(string), string nextPageUrl = default(string), string previousPageUrl = default(string), List data = default(List)) + { + this.HasMore = hasMore; + // to ensure "varObject" is required (not null) + if (varObject == null) + { + throw new ArgumentNullException("varObject is a required property for PayoutOrdersResponse and cannot be null"); + } + this.VarObject = varObject; + this.NextPageUrl = nextPageUrl; + this.PreviousPageUrl = previousPageUrl; + this.Data = data; + } + + /// + /// Indicates if there are more pages to be requested + /// + /// Indicates if there are more pages to be requested + /// false + [DataMember(Name = "has_more", IsRequired = true, EmitDefaultValue = true)] + public bool HasMore { get; set; } + + /// + /// Object type, in this case is list + /// + /// Object type, in this case is list + /// list + [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] + public string VarObject { get; set; } + + /// + /// URL of the next page. + /// + /// URL of the next page. + /// https://api.conekta.io/resources?limit=10&next=chrg_1 + [DataMember(Name = "next_page_url", EmitDefaultValue = true)] + public string NextPageUrl { get; set; } + + /// + /// Url of the previous page. + /// + /// Url of the previous page. + /// https://api.conekta.io/resources?limit=10&previous=chrg_1 + [DataMember(Name = "previous_page_url", EmitDefaultValue = true)] + public string PreviousPageUrl { get; set; } + + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", EmitDefaultValue = false)] + public List Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PayoutOrdersResponse {\n"); + sb.Append(" HasMore: ").Append(HasMore).Append("\n"); + sb.Append(" VarObject: ").Append(VarObject).Append("\n"); + sb.Append(" NextPageUrl: ").Append(NextPageUrl).Append("\n"); + sb.Append(" PreviousPageUrl: ").Append(PreviousPageUrl).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Conekta.net/Model/PlanRequest.cs b/src/Conekta.net/Model/PlanRequest.cs index b530490..f52b239 100644 --- a/src/Conekta.net/Model/PlanRequest.cs +++ b/src/Conekta.net/Model/PlanRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a plan /// [DataContract(Name = "plan_request")] - public partial class PlanRequest : IEquatable, IValidatableObject + public partial class PlanRequest : IValidatableObject { /// /// The interval of time between each charge. @@ -189,95 +189,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlanRequest); - } - - /// - /// Returns true if PlanRequest instances are equal - /// - /// Instance of PlanRequest to be compared - /// Boolean - public bool Equals(PlanRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.ExpiryCount == input.ExpiryCount || - this.ExpiryCount.Equals(input.ExpiryCount) - ) && - ( - this.Frequency == input.Frequency || - this.Frequency.Equals(input.Frequency) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Interval == input.Interval || - this.Interval.Equals(input.Interval) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.TrialPeriodDays == input.TrialPeriodDays || - this.TrialPeriodDays.Equals(input.TrialPeriodDays) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiryCount.GetHashCode(); - hashCode = (hashCode * 59) + this.Frequency.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TrialPeriodDays.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PlanResponse.cs b/src/Conekta.net/Model/PlanResponse.cs index e165af2..9c789c2 100644 --- a/src/Conekta.net/Model/PlanResponse.cs +++ b/src/Conekta.net/Model/PlanResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// plans model /// [DataContract(Name = "plan_response")] - public partial class PlanResponse : IEquatable, IValidatableObject + public partial class PlanResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -170,126 +170,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlanResponse); - } - - /// - /// Returns true if PlanResponse instances are equal - /// - /// Instance of PlanResponse to be compared - /// Boolean - public bool Equals(PlanResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.ExpiryCount == input.ExpiryCount || - (this.ExpiryCount != null && - this.ExpiryCount.Equals(input.ExpiryCount)) - ) && - ( - this.Frequency == input.Frequency || - this.Frequency.Equals(input.Frequency) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Interval == input.Interval || - (this.Interval != null && - this.Interval.Equals(input.Interval)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.TrialPeriodDays == input.TrialPeriodDays || - (this.TrialPeriodDays != null && - this.TrialPeriodDays.Equals(input.TrialPeriodDays)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.ExpiryCount != null) - { - hashCode = (hashCode * 59) + this.ExpiryCount.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Frequency.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Interval != null) - { - hashCode = (hashCode * 59) + this.Interval.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.TrialPeriodDays != null) - { - hashCode = (hashCode * 59) + this.TrialPeriodDays.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/PlanUpdateRequest.cs b/src/Conekta.net/Model/PlanUpdateRequest.cs index 4300264..e11f32c 100644 --- a/src/Conekta.net/Model/PlanUpdateRequest.cs +++ b/src/Conekta.net/Model/PlanUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a plan /// [DataContract(Name = "plan_update_request")] - public partial class PlanUpdateRequest : IEquatable, IValidatableObject + public partial class PlanUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -104,71 +104,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as PlanUpdateRequest); - } - - /// - /// Returns true if PlanUpdateRequest instances are equal - /// - /// Instance of PlanUpdateRequest to be compared - /// Boolean - public bool Equals(PlanUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.ExpiryCount == input.ExpiryCount || - this.ExpiryCount.Equals(input.ExpiryCount) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiryCount.GetHashCode(); - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Product.cs b/src/Conekta.net/Model/Product.cs index fd41d36..4d6f263 100644 --- a/src/Conekta.net/Model/Product.cs +++ b/src/Conekta.net/Model/Product.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Product /// [DataContract(Name = "product")] - public partial class Product : IEquatable, IValidatableObject + public partial class Product : IValidatableObject { /// /// Initializes a new instance of the class. @@ -168,119 +168,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Product); - } - - /// - /// Returns true if Product instances are equal - /// - /// Instance of Product to be compared - /// Boolean - public bool Equals(Product input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - this.AntifraudInfo != null && - input.AntifraudInfo != null && - this.AntifraudInfo.SequenceEqual(input.AntifraudInfo) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ) && - ( - this.Sku == input.Sku || - (this.Sku != null && - this.Sku.Equals(input.Sku)) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.UnitPrice == input.UnitPrice || - this.UnitPrice.Equals(input.UnitPrice) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.Sku != null) - { - hashCode = (hashCode * 59) + this.Sku.GetHashCode(); - } - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UnitPrice.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ProductDataResponse.cs b/src/Conekta.net/Model/ProductDataResponse.cs index c457166..5b1bd9d 100644 --- a/src/Conekta.net/Model/ProductDataResponse.cs +++ b/src/Conekta.net/Model/ProductDataResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ProductDataResponse /// [DataContract(Name = "product_data_response")] - public partial class ProductDataResponse : IEquatable, IValidatableObject + public partial class ProductDataResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -195,146 +195,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ProductDataResponse); - } - - /// - /// Returns true if ProductDataResponse instances are equal - /// - /// Instance of ProductDataResponse to be compared - /// Boolean - public bool Equals(ProductDataResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - this.AntifraudInfo != null && - input.AntifraudInfo != null && - this.AntifraudInfo.SequenceEqual(input.AntifraudInfo) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ) && - ( - this.Sku == input.Sku || - (this.Sku != null && - this.Sku.Equals(input.Sku)) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.UnitPrice == input.UnitPrice || - this.UnitPrice.Equals(input.UnitPrice) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.Sku != null) - { - hashCode = (hashCode * 59) + this.Sku.GetHashCode(); - } - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UnitPrice.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ProductDataResponseAllOf.cs b/src/Conekta.net/Model/ProductDataResponseAllOf.cs deleted file mode 100644 index 13a9d09..0000000 --- a/src/Conekta.net/Model/ProductDataResponseAllOf.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// ProductDataResponseAllOf - /// - [DataContract(Name = "product_data_response_allOf")] - public partial class ProductDataResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// varObject. - /// parentId. - public ProductDataResponseAllOf(string id = default(string), string varObject = default(string), string parentId = default(string)) - { - this.Id = id; - this.VarObject = varObject; - this.ParentId = parentId; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Gets or Sets ParentId - /// - [DataMember(Name = "parent_id", EmitDefaultValue = false)] - public string ParentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ProductDataResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ProductDataResponseAllOf); - } - - /// - /// Returns true if ProductDataResponseAllOf instances are equal - /// - /// Instance of ProductDataResponseAllOf to be compared - /// Boolean - public bool Equals(ProductDataResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/ProductOrderResponse.cs b/src/Conekta.net/Model/ProductOrderResponse.cs index 74418ca..84fd0e8 100644 --- a/src/Conekta.net/Model/ProductOrderResponse.cs +++ b/src/Conekta.net/Model/ProductOrderResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ProductOrderResponse /// [DataContract(Name = "product_order_response")] - public partial class ProductOrderResponse : IEquatable, IValidatableObject + public partial class ProductOrderResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -195,146 +195,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ProductOrderResponse); - } - - /// - /// Returns true if ProductOrderResponse instances are equal - /// - /// Instance of ProductOrderResponse to be compared - /// Boolean - public bool Equals(ProductOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - this.AntifraudInfo != null && - input.AntifraudInfo != null && - this.AntifraudInfo.SequenceEqual(input.AntifraudInfo) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ) && - ( - this.Sku == input.Sku || - (this.Sku != null && - this.Sku.Equals(input.Sku)) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.UnitPrice == input.UnitPrice || - this.UnitPrice.Equals(input.UnitPrice) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.Sku != null) - { - hashCode = (hashCode * 59) + this.Sku.GetHashCode(); - } - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UnitPrice.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ProductOrderResponseAllOf.cs b/src/Conekta.net/Model/ProductOrderResponseAllOf.cs deleted file mode 100644 index fdc15aa..0000000 --- a/src/Conekta.net/Model/ProductOrderResponseAllOf.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// ProductOrderResponseAllOf - /// - [DataContract(Name = "product_order_response_allOf")] - public partial class ProductOrderResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// varObject. - /// parentId. - public ProductOrderResponseAllOf(string id = default(string), string varObject = default(string), string parentId = default(string)) - { - this.Id = id; - this.VarObject = varObject; - this.ParentId = parentId; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Gets or Sets ParentId - /// - [DataMember(Name = "parent_id", EmitDefaultValue = false)] - public string ParentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ProductOrderResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ProductOrderResponseAllOf); - } - - /// - /// Returns true if ProductOrderResponseAllOf instances are equal - /// - /// Instance of ProductOrderResponseAllOf to be compared - /// Boolean - public bool Equals(ProductOrderResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/RiskRulesData.cs b/src/Conekta.net/Model/RiskRulesData.cs index f600327..b3694f0 100644 --- a/src/Conekta.net/Model/RiskRulesData.cs +++ b/src/Conekta.net/Model/RiskRulesData.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// RiskRulesData /// [DataContract(Name = "risk_rules_data")] - public partial class RiskRulesData : IEquatable, IValidatableObject + public partial class RiskRulesData : IValidatableObject { /// /// Initializes a new instance of the class. @@ -137,98 +137,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RiskRulesData); - } - - /// - /// Returns true if RiskRulesData instances are equal - /// - /// Instance of RiskRulesData to be compared - /// Boolean - public bool Equals(RiskRulesData input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.CreatedAt == input.CreatedAt || - (this.CreatedAt != null && - this.CreatedAt.Equals(input.CreatedAt)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.IsGlobal == input.IsGlobal || - this.IsGlobal.Equals(input.IsGlobal) - ) && - ( - this.IsTest == input.IsTest || - this.IsTest.Equals(input.IsTest) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - if (this.CreatedAt != null) - { - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - hashCode = (hashCode * 59) + this.IsGlobal.GetHashCode(); - hashCode = (hashCode * 59) + this.IsTest.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/RiskRulesList.cs b/src/Conekta.net/Model/RiskRulesList.cs index f0ca9dd..b9edcf4 100644 --- a/src/Conekta.net/Model/RiskRulesList.cs +++ b/src/Conekta.net/Model/RiskRulesList.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// RiskRulesList /// [DataContract(Name = "risk_rules_list")] - public partial class RiskRulesList : IEquatable, IValidatableObject + public partial class RiskRulesList : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RiskRulesList); - } - - /// - /// Returns true if RiskRulesList instances are equal - /// - /// Instance of RiskRulesList to be compared - /// Boolean - public bool Equals(RiskRulesList input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ShippingOrderResponse.cs b/src/Conekta.net/Model/ShippingOrderResponse.cs index 4605e18..437c98d 100644 --- a/src/Conekta.net/Model/ShippingOrderResponse.cs +++ b/src/Conekta.net/Model/ShippingOrderResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ShippingOrderResponse /// [DataContract(Name = "shipping_order_response")] - public partial class ShippingOrderResponse : IEquatable, IValidatableObject + public partial class ShippingOrderResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -147,112 +147,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShippingOrderResponse); - } - - /// - /// Returns true if ShippingOrderResponse instances are equal - /// - /// Instance of ShippingOrderResponse to be compared - /// Boolean - public bool Equals(ShippingOrderResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Carrier == input.Carrier || - (this.Carrier != null && - this.Carrier.Equals(input.Carrier)) - ) && - ( - this.TrackingNumber == input.TrackingNumber || - (this.TrackingNumber != null && - this.TrackingNumber.Equals(input.TrackingNumber)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Carrier != null) - { - hashCode = (hashCode * 59) + this.Carrier.GetHashCode(); - } - if (this.TrackingNumber != null) - { - hashCode = (hashCode * 59) + this.TrackingNumber.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/ShippingRequest.cs b/src/Conekta.net/Model/ShippingRequest.cs index b70efe0..496567c 100644 --- a/src/Conekta.net/Model/ShippingRequest.cs +++ b/src/Conekta.net/Model/ShippingRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// ShippingRequest /// [DataContract(Name = "shipping_request")] - public partial class ShippingRequest : IEquatable, IValidatableObject + public partial class ShippingRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -120,85 +120,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ShippingRequest); - } - - /// - /// Returns true if ShippingRequest instances are equal - /// - /// Instance of ShippingRequest to be compared - /// Boolean - public bool Equals(ShippingRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Carrier == input.Carrier || - (this.Carrier != null && - this.Carrier.Equals(input.Carrier)) - ) && - ( - this.TrackingNumber == input.TrackingNumber || - (this.TrackingNumber != null && - this.TrackingNumber.Equals(input.TrackingNumber)) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Carrier != null) - { - hashCode = (hashCode * 59) + this.Carrier.GetHashCode(); - } - if (this.TrackingNumber != null) - { - hashCode = (hashCode * 59) + this.TrackingNumber.GetHashCode(); - } - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/SmsCheckoutRequest.cs b/src/Conekta.net/Model/SmsCheckoutRequest.cs index 1259e05..6cf454a 100644 --- a/src/Conekta.net/Model/SmsCheckoutRequest.cs +++ b/src/Conekta.net/Model/SmsCheckoutRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// SmsCheckoutRequest /// [DataContract(Name = "smsCheckout_request")] - public partial class SmsCheckoutRequest : IEquatable, IValidatableObject + public partial class SmsCheckoutRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,52 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SmsCheckoutRequest); - } - - /// - /// Returns true if SmsCheckoutRequest instances are equal - /// - /// Instance of SmsCheckoutRequest to be compared - /// Boolean - public bool Equals(SmsCheckoutRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Phonenumber == input.Phonenumber || - (this.Phonenumber != null && - this.Phonenumber.Equals(input.Phonenumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Phonenumber != null) - { - hashCode = (hashCode * 59) + this.Phonenumber.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/SubscriptionEventsResponse.cs b/src/Conekta.net/Model/SubscriptionEventsResponse.cs index 08dc7c8..cb91dde 100644 --- a/src/Conekta.net/Model/SubscriptionEventsResponse.cs +++ b/src/Conekta.net/Model/SubscriptionEventsResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// SubscriptionEventsResponse /// [DataContract(Name = "subscription_events_response")] - public partial class SubscriptionEventsResponse : IEquatable, IValidatableObject + public partial class SubscriptionEventsResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -123,85 +123,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubscriptionEventsResponse); - } - - /// - /// Returns true if SubscriptionEventsResponse instances are equal - /// - /// Instance of SubscriptionEventsResponse to be compared - /// Boolean - public bool Equals(SubscriptionEventsResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.HasMore == input.HasMore || - this.HasMore.Equals(input.HasMore) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.NextPageUrl == input.NextPageUrl || - (this.NextPageUrl != null && - this.NextPageUrl.Equals(input.NextPageUrl)) - ) && - ( - this.PreviousPageUrl == input.PreviousPageUrl || - (this.PreviousPageUrl != null && - this.PreviousPageUrl.Equals(input.PreviousPageUrl)) - ) && - ( - this.Data == input.Data || - this.Data != null && - input.Data != null && - this.Data.SequenceEqual(input.Data) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.HasMore.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.NextPageUrl != null) - { - hashCode = (hashCode * 59) + this.NextPageUrl.GetHashCode(); - } - if (this.PreviousPageUrl != null) - { - hashCode = (hashCode * 59) + this.PreviousPageUrl.GetHashCode(); - } - if (this.Data != null) - { - hashCode = (hashCode * 59) + this.Data.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/SubscriptionRequest.cs b/src/Conekta.net/Model/SubscriptionRequest.cs index 2c65b93..e986962 100644 --- a/src/Conekta.net/Model/SubscriptionRequest.cs +++ b/src/Conekta.net/Model/SubscriptionRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// It is a parameter that allows to identify in the response, the detailed content of the plans to which the client has subscribed /// [DataContract(Name = "subscription_request")] - public partial class SubscriptionRequest : IEquatable, IValidatableObject + public partial class SubscriptionRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -100,66 +100,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubscriptionRequest); - } - - /// - /// Returns true if SubscriptionRequest instances are equal - /// - /// Instance of SubscriptionRequest to be compared - /// Boolean - public bool Equals(SubscriptionRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.PlanId == input.PlanId || - (this.PlanId != null && - this.PlanId.Equals(input.PlanId)) - ) && - ( - this.CardId == input.CardId || - (this.CardId != null && - this.CardId.Equals(input.CardId)) - ) && - ( - this.TrialEnd == input.TrialEnd || - this.TrialEnd.Equals(input.TrialEnd) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PlanId != null) - { - hashCode = (hashCode * 59) + this.PlanId.GetHashCode(); - } - if (this.CardId != null) - { - hashCode = (hashCode * 59) + this.CardId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TrialEnd.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/SubscriptionResponse.cs b/src/Conekta.net/Model/SubscriptionResponse.cs index 57c3c54..8b50eb1 100644 --- a/src/Conekta.net/Model/SubscriptionResponse.cs +++ b/src/Conekta.net/Model/SubscriptionResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// subscription model /// [DataContract(Name = "subscription_response")] - public partial class SubscriptionResponse : IEquatable, IValidatableObject + public partial class SubscriptionResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -230,188 +230,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubscriptionResponse); - } - - /// - /// Returns true if SubscriptionResponse instances are equal - /// - /// Instance of SubscriptionResponse to be compared - /// Boolean - public bool Equals(SubscriptionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.BillingCycleStart == input.BillingCycleStart || - (this.BillingCycleStart != null && - this.BillingCycleStart.Equals(input.BillingCycleStart)) - ) && - ( - this.BillingCycleEnd == input.BillingCycleEnd || - (this.BillingCycleEnd != null && - this.BillingCycleEnd.Equals(input.BillingCycleEnd)) - ) && - ( - this.CanceledAt == input.CanceledAt || - (this.CanceledAt != null && - this.CanceledAt.Equals(input.CanceledAt)) - ) && - ( - this.CardId == input.CardId || - (this.CardId != null && - this.CardId.Equals(input.CardId)) - ) && - ( - this.ChargeId == input.ChargeId || - (this.ChargeId != null && - this.ChargeId.Equals(input.ChargeId)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.CustomerCustomReference == input.CustomerCustomReference || - (this.CustomerCustomReference != null && - this.CustomerCustomReference.Equals(input.CustomerCustomReference)) - ) && - ( - this.CustomerId == input.CustomerId || - (this.CustomerId != null && - this.CustomerId.Equals(input.CustomerId)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LastBillingCycleOrderId == input.LastBillingCycleOrderId || - (this.LastBillingCycleOrderId != null && - this.LastBillingCycleOrderId.Equals(input.LastBillingCycleOrderId)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PausedAt == input.PausedAt || - (this.PausedAt != null && - this.PausedAt.Equals(input.PausedAt)) - ) && - ( - this.PlanId == input.PlanId || - (this.PlanId != null && - this.PlanId.Equals(input.PlanId)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.SubscriptionStart == input.SubscriptionStart || - this.SubscriptionStart.Equals(input.SubscriptionStart) - ) && - ( - this.TrialStart == input.TrialStart || - (this.TrialStart != null && - this.TrialStart.Equals(input.TrialStart)) - ) && - ( - this.TrialEnd == input.TrialEnd || - (this.TrialEnd != null && - this.TrialEnd.Equals(input.TrialEnd)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.BillingCycleStart != null) - { - hashCode = (hashCode * 59) + this.BillingCycleStart.GetHashCode(); - } - if (this.BillingCycleEnd != null) - { - hashCode = (hashCode * 59) + this.BillingCycleEnd.GetHashCode(); - } - if (this.CanceledAt != null) - { - hashCode = (hashCode * 59) + this.CanceledAt.GetHashCode(); - } - if (this.CardId != null) - { - hashCode = (hashCode * 59) + this.CardId.GetHashCode(); - } - if (this.ChargeId != null) - { - hashCode = (hashCode * 59) + this.ChargeId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.CustomerCustomReference != null) - { - hashCode = (hashCode * 59) + this.CustomerCustomReference.GetHashCode(); - } - if (this.CustomerId != null) - { - hashCode = (hashCode * 59) + this.CustomerId.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.LastBillingCycleOrderId != null) - { - hashCode = (hashCode * 59) + this.LastBillingCycleOrderId.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.PausedAt != null) - { - hashCode = (hashCode * 59) + this.PausedAt.GetHashCode(); - } - if (this.PlanId != null) - { - hashCode = (hashCode * 59) + this.PlanId.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - hashCode = (hashCode * 59) + this.SubscriptionStart.GetHashCode(); - if (this.TrialStart != null) - { - hashCode = (hashCode * 59) + this.TrialStart.GetHashCode(); - } - if (this.TrialEnd != null) - { - hashCode = (hashCode * 59) + this.TrialEnd.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/SubscriptionUpdateRequest.cs b/src/Conekta.net/Model/SubscriptionUpdateRequest.cs index 6fa7139..0a61a2e 100644 --- a/src/Conekta.net/Model/SubscriptionUpdateRequest.cs +++ b/src/Conekta.net/Model/SubscriptionUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// You can modify the subscription to change the plan used by your customers. /// [DataContract(Name = "subscription_update_request")] - public partial class SubscriptionUpdateRequest : IEquatable, IValidatableObject + public partial class SubscriptionUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -90,66 +90,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SubscriptionUpdateRequest); - } - - /// - /// Returns true if SubscriptionUpdateRequest instances are equal - /// - /// Instance of SubscriptionUpdateRequest to be compared - /// Boolean - public bool Equals(SubscriptionUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.PlanId == input.PlanId || - (this.PlanId != null && - this.PlanId.Equals(input.PlanId)) - ) && - ( - this.CardId == input.CardId || - (this.CardId != null && - this.CardId.Equals(input.CardId)) - ) && - ( - this.TrialEnd == input.TrialEnd || - this.TrialEnd.Equals(input.TrialEnd) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PlanId != null) - { - hashCode = (hashCode * 59) + this.PlanId.GetHashCode(); - } - if (this.CardId != null) - { - hashCode = (hashCode * 59) + this.CardId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.TrialEnd.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/Token.cs b/src/Conekta.net/Model/Token.cs index 109587b..506deb7 100644 --- a/src/Conekta.net/Model/Token.cs +++ b/src/Conekta.net/Model/Token.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a token /// [DataContract(Name = "token")] - public partial class Token : IEquatable, IValidatableObject + public partial class Token : IValidatableObject { /// /// Initializes a new instance of the class. @@ -79,61 +79,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Token); - } - - /// - /// Returns true if Token instances are equal - /// - /// Instance of Token to be compared - /// Boolean - public bool Equals(Token input) - { - if (input == null) - { - return false; - } - return - ( - this.Card == input.Card || - (this.Card != null && - this.Card.Equals(input.Card)) - ) && - ( - this.Checkout == input.Checkout || - (this.Checkout != null && - this.Checkout.Equals(input.Checkout)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Card != null) - { - hashCode = (hashCode * 59) + this.Card.GetHashCode(); - } - if (this.Checkout != null) - { - hashCode = (hashCode * 59) + this.Checkout.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TokenCard.cs b/src/Conekta.net/Model/TokenCard.cs index a693dce..5f6ff53 100644 --- a/src/Conekta.net/Model/TokenCard.cs +++ b/src/Conekta.net/Model/TokenCard.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// TokenCard /// [DataContract(Name = "token_card")] - public partial class TokenCard : IEquatable, IValidatableObject + public partial class TokenCard : IValidatableObject { /// /// Initializes a new instance of the class. @@ -156,97 +156,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenCard); - } - - /// - /// Returns true if TokenCard instances are equal - /// - /// Instance of TokenCard to be compared - /// Boolean - public bool Equals(TokenCard input) - { - if (input == null) - { - return false; - } - return - ( - this.Cvc == input.Cvc || - (this.Cvc != null && - this.Cvc.Equals(input.Cvc)) - ) && - ( - this.DeviceFingerprint == input.DeviceFingerprint || - (this.DeviceFingerprint != null && - this.DeviceFingerprint.Equals(input.DeviceFingerprint)) - ) && - ( - this.ExpMonth == input.ExpMonth || - (this.ExpMonth != null && - this.ExpMonth.Equals(input.ExpMonth)) - ) && - ( - this.ExpYear == input.ExpYear || - (this.ExpYear != null && - this.ExpYear.Equals(input.ExpYear)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Number == input.Number || - (this.Number != null && - this.Number.Equals(input.Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Cvc != null) - { - hashCode = (hashCode * 59) + this.Cvc.GetHashCode(); - } - if (this.DeviceFingerprint != null) - { - hashCode = (hashCode * 59) + this.DeviceFingerprint.GetHashCode(); - } - if (this.ExpMonth != null) - { - hashCode = (hashCode * 59) + this.ExpMonth.GetHashCode(); - } - if (this.ExpYear != null) - { - hashCode = (hashCode * 59) + this.ExpYear.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Number != null) - { - hashCode = (hashCode * 59) + this.Number.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TokenCheckout.cs b/src/Conekta.net/Model/TokenCheckout.cs index 35bebda..ba95dad 100644 --- a/src/Conekta.net/Model/TokenCheckout.cs +++ b/src/Conekta.net/Model/TokenCheckout.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// TokenCheckout /// [DataContract(Name = "token_checkout")] - public partial class TokenCheckout : IEquatable, IValidatableObject + public partial class TokenCheckout : IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,52 +71,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenCheckout); - } - - /// - /// Returns true if TokenCheckout instances are equal - /// - /// Instance of TokenCheckout to be compared - /// Boolean - public bool Equals(TokenCheckout input) - { - if (input == null) - { - return false; - } - return - ( - this.ReturnsControlOn == input.ReturnsControlOn || - (this.ReturnsControlOn != null && - this.ReturnsControlOn.Equals(input.ReturnsControlOn)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ReturnsControlOn != null) - { - hashCode = (hashCode * 59) + this.ReturnsControlOn.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TokenResponse.cs b/src/Conekta.net/Model/TokenResponse.cs index e23d014..b3a935f 100644 --- a/src/Conekta.net/Model/TokenResponse.cs +++ b/src/Conekta.net/Model/TokenResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// token response /// [DataContract(Name = "token_response")] - public partial class TokenResponse : IEquatable, IValidatableObject + public partial class TokenResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -129,80 +129,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenResponse); - } - - /// - /// Returns true if TokenResponse instances are equal - /// - /// Instance of TokenResponse to be compared - /// Boolean - public bool Equals(TokenResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Checkout == input.Checkout || - (this.Checkout != null && - this.Checkout.Equals(input.Checkout)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Used == input.Used || - this.Used.Equals(input.Used) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Checkout != null) - { - hashCode = (hashCode * 59) + this.Checkout.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Used.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TokenResponseCheckout.cs b/src/Conekta.net/Model/TokenResponseCheckout.cs index 30a874d..c3cd0d7 100644 --- a/src/Conekta.net/Model/TokenResponseCheckout.cs +++ b/src/Conekta.net/Model/TokenResponseCheckout.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// TokenResponseCheckout /// [DataContract(Name = "token_response_checkout")] - public partial class TokenResponseCheckout : IEquatable, IValidatableObject + public partial class TokenResponseCheckout : IValidatableObject { /// /// Initializes a new instance of the class. @@ -301,206 +301,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TokenResponseCheckout); - } - - /// - /// Returns true if TokenResponseCheckout instances are equal - /// - /// Instance of TokenResponseCheckout to be compared - /// Boolean - public bool Equals(TokenResponseCheckout input) - { - if (input == null) - { - return false; - } - return - ( - this.AllowedPaymentMethods == input.AllowedPaymentMethods || - this.AllowedPaymentMethods != null && - input.AllowedPaymentMethods != null && - this.AllowedPaymentMethods.SequenceEqual(input.AllowedPaymentMethods) - ) && - ( - this.CanNotExpire == input.CanNotExpire || - this.CanNotExpire.Equals(input.CanNotExpire) - ) && - ( - this.EmailsSent == input.EmailsSent || - this.EmailsSent.Equals(input.EmailsSent) - ) && - ( - this.ExcludeCardNetworks == input.ExcludeCardNetworks || - this.ExcludeCardNetworks != null && - input.ExcludeCardNetworks != null && - this.ExcludeCardNetworks.SequenceEqual(input.ExcludeCardNetworks) - ) && - ( - this.ExpiresAt == input.ExpiresAt || - this.ExpiresAt.Equals(input.ExpiresAt) - ) && - ( - this.FailureUrl == input.FailureUrl || - (this.FailureUrl != null && - this.FailureUrl.Equals(input.FailureUrl)) - ) && - ( - this.Force3dsFlow == input.Force3dsFlow || - this.Force3dsFlow.Equals(input.Force3dsFlow) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.MonthlyInstallmentsEnabled == input.MonthlyInstallmentsEnabled || - this.MonthlyInstallmentsEnabled.Equals(input.MonthlyInstallmentsEnabled) - ) && - ( - this.MonthlyInstallmentsOptions == input.MonthlyInstallmentsOptions || - this.MonthlyInstallmentsOptions != null && - input.MonthlyInstallmentsOptions != null && - this.MonthlyInstallmentsOptions.SequenceEqual(input.MonthlyInstallmentsOptions) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.NeedsShippingContact == input.NeedsShippingContact || - this.NeedsShippingContact.Equals(input.NeedsShippingContact) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.OnDemandEnabled == input.OnDemandEnabled || - this.OnDemandEnabled.Equals(input.OnDemandEnabled) - ) && - ( - this.PaidPaymentsCount == input.PaidPaymentsCount || - this.PaidPaymentsCount.Equals(input.PaidPaymentsCount) - ) && - ( - this.Recurrent == input.Recurrent || - this.Recurrent.Equals(input.Recurrent) - ) && - ( - this.SmsSent == input.SmsSent || - this.SmsSent.Equals(input.SmsSent) - ) && - ( - this.StartsAt == input.StartsAt || - this.StartsAt.Equals(input.StartsAt) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.SuccessUrl == input.SuccessUrl || - (this.SuccessUrl != null && - this.SuccessUrl.Equals(input.SuccessUrl)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AllowedPaymentMethods != null) - { - hashCode = (hashCode * 59) + this.AllowedPaymentMethods.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CanNotExpire.GetHashCode(); - hashCode = (hashCode * 59) + this.EmailsSent.GetHashCode(); - if (this.ExcludeCardNetworks != null) - { - hashCode = (hashCode * 59) + this.ExcludeCardNetworks.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ExpiresAt.GetHashCode(); - if (this.FailureUrl != null) - { - hashCode = (hashCode * 59) + this.FailureUrl.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Force3dsFlow.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - hashCode = (hashCode * 59) + this.MonthlyInstallmentsEnabled.GetHashCode(); - if (this.MonthlyInstallmentsOptions != null) - { - hashCode = (hashCode * 59) + this.MonthlyInstallmentsOptions.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.NeedsShippingContact.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.OnDemandEnabled.GetHashCode(); - hashCode = (hashCode * 59) + this.PaidPaymentsCount.GetHashCode(); - hashCode = (hashCode * 59) + this.Recurrent.GetHashCode(); - hashCode = (hashCode * 59) + this.SmsSent.GetHashCode(); - hashCode = (hashCode * 59) + this.StartsAt.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.SuccessUrl != null) - { - hashCode = (hashCode * 59) + this.SuccessUrl.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TransactionResponse.cs b/src/Conekta.net/Model/TransactionResponse.cs index 35484b7..74ba5f6 100644 --- a/src/Conekta.net/Model/TransactionResponse.cs +++ b/src/Conekta.net/Model/TransactionResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// The Transaction object represents the actions or steps of an order. Statuses can be: unprocessed, pending, available, owen, paid_out, voided, capture, capture_reversal, liquidation, liquidation_reversal, payout, payout_reversal, refund, refund_reversal, chargeback, chargeback_reversal, rounding_adjustment, won_chargeback, transferred, and transferred. /// [DataContract(Name = "transaction_response")] - public partial class TransactionResponse : IEquatable, IValidatableObject + public partial class TransactionResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -216,122 +216,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionResponse); - } - - /// - /// Returns true if TransactionResponse instances are equal - /// - /// Instance of TransactionResponse to be compared - /// Boolean - public bool Equals(TransactionResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Charge == input.Charge || - (this.Charge != null && - this.Charge.Equals(input.Charge)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Fee == input.Fee || - this.Fee.Equals(input.Fee) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Net == input.Net || - this.Net.Equals(input.Net) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Charge != null) - { - hashCode = (hashCode * 59) + this.Charge.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Fee.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - hashCode = (hashCode * 59) + this.Net.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TransferDestinationResponse.cs b/src/Conekta.net/Model/TransferDestinationResponse.cs index 9f7181b..b2ff3d3 100644 --- a/src/Conekta.net/Model/TransferDestinationResponse.cs +++ b/src/Conekta.net/Model/TransferDestinationResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Method used to make the transfer. /// [DataContract(Name = "transfer_destination_response")] - public partial class TransferDestinationResponse : IEquatable, IValidatableObject + public partial class TransferDestinationResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -148,111 +148,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferDestinationResponse); - } - - /// - /// Returns true if TransferDestinationResponse instances are equal - /// - /// Instance of TransferDestinationResponse to be compared - /// Boolean - public bool Equals(TransferDestinationResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PayeeId == input.PayeeId || - (this.PayeeId != null && - this.PayeeId.Equals(input.PayeeId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.PayeeId != null) - { - hashCode = (hashCode * 59) + this.PayeeId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TransferMethodResponse.cs b/src/Conekta.net/Model/TransferMethodResponse.cs index 36807f7..5eb966e 100644 --- a/src/Conekta.net/Model/TransferMethodResponse.cs +++ b/src/Conekta.net/Model/TransferMethodResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// Method used to make the transfer. /// [DataContract(Name = "transfer_method_response")] - public partial class TransferMethodResponse : IEquatable, IValidatableObject + public partial class TransferMethodResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -148,111 +148,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferMethodResponse); - } - - /// - /// Returns true if TransferMethodResponse instances are equal - /// - /// Instance of TransferMethodResponse to be compared - /// Boolean - public bool Equals(TransferMethodResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountHolder == input.AccountHolder || - (this.AccountHolder != null && - this.AccountHolder.Equals(input.AccountHolder)) - ) && - ( - this.AccountNumber == input.AccountNumber || - (this.AccountNumber != null && - this.AccountNumber.Equals(input.AccountNumber)) - ) && - ( - this.Bank == input.Bank || - (this.Bank != null && - this.Bank.Equals(input.Bank)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PayeeId == input.PayeeId || - (this.PayeeId != null && - this.PayeeId.Equals(input.PayeeId)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AccountHolder != null) - { - hashCode = (hashCode * 59) + this.AccountHolder.GetHashCode(); - } - if (this.AccountNumber != null) - { - hashCode = (hashCode * 59) + this.AccountNumber.GetHashCode(); - } - if (this.Bank != null) - { - hashCode = (hashCode * 59) + this.Bank.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.PayeeId != null) - { - hashCode = (hashCode * 59) + this.PayeeId.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TransferResponse.cs b/src/Conekta.net/Model/TransferResponse.cs index a6c8eaa..d433190 100644 --- a/src/Conekta.net/Model/TransferResponse.cs +++ b/src/Conekta.net/Model/TransferResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// A transfer represents the action of sending an amount to a business bank account including the status, amount and method used to make the transfer. /// [DataContract(Name = "transfer_response")] - public partial class TransferResponse : IEquatable, IValidatableObject + public partial class TransferResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -168,121 +168,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransferResponse); - } - - /// - /// Returns true if TransferResponse instances are equal - /// - /// Instance of TransferResponse to be compared - /// Boolean - public bool Equals(TransferResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Destination == input.Destination || - (this.Destination != null && - this.Destination.Equals(input.Destination)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.StatementDescription == input.StatementDescription || - (this.StatementDescription != null && - this.StatementDescription.Equals(input.StatementDescription)) - ) && - ( - this.StatementReference == input.StatementReference || - (this.StatementReference != null && - this.StatementReference.Equals(input.StatementReference)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Destination != null) - { - hashCode = (hashCode * 59) + this.Destination.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.StatementDescription != null) - { - hashCode = (hashCode * 59) + this.StatementDescription.GetHashCode(); - } - if (this.StatementReference != null) - { - hashCode = (hashCode * 59) + this.StatementReference.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/TransfersResponse.cs b/src/Conekta.net/Model/TransfersResponse.cs index 10a136d..27b897c 100644 --- a/src/Conekta.net/Model/TransfersResponse.cs +++ b/src/Conekta.net/Model/TransfersResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// A transfer represents the action of sending an amount to a business bank account including the status, amount and method used to make the transfer. /// [DataContract(Name = "transfers_response")] - public partial class TransfersResponse : IEquatable, IValidatableObject + public partial class TransfersResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -168,121 +168,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransfersResponse); - } - - /// - /// Returns true if TransfersResponse instances are equal - /// - /// Instance of TransfersResponse to be compared - /// Boolean - public bool Equals(TransfersResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Currency == input.Currency || - (this.Currency != null && - this.Currency.Equals(input.Currency)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.Method == input.Method || - (this.Method != null && - this.Method.Equals(input.Method)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.StatementDescription == input.StatementDescription || - (this.StatementDescription != null && - this.StatementDescription.Equals(input.StatementDescription)) - ) && - ( - this.StatementReference == input.StatementReference || - (this.StatementReference != null && - this.StatementReference.Equals(input.StatementReference)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Currency != null) - { - hashCode = (hashCode * 59) + this.Currency.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.Method != null) - { - hashCode = (hashCode * 59) + this.Method.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.StatementDescription != null) - { - hashCode = (hashCode * 59) + this.StatementDescription.GetHashCode(); - } - if (this.StatementReference != null) - { - hashCode = (hashCode * 59) + this.StatementReference.GetHashCode(); - } - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateCustomer.cs b/src/Conekta.net/Model/UpdateCustomer.cs index 2595c86..b9098ca 100644 --- a/src/Conekta.net/Model/UpdateCustomer.cs +++ b/src/Conekta.net/Model/UpdateCustomer.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// update customer /// [DataContract(Name = "update_customer")] - public partial class UpdateCustomer : IEquatable, IValidatableObject + public partial class UpdateCustomer : IValidatableObject { /// /// Initializes a new instance of the class. @@ -101,7 +101,7 @@ public partial class UpdateCustomer : IEquatable, IValidatableOb /// Is the customer's phone number /// /// Is the customer's phone number - /// 5215555555555 + /// +5215555555555 [DataMember(Name = "phone", EmitDefaultValue = false)] public string Phone { get; set; } @@ -203,169 +203,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCustomer); - } - - /// - /// Returns true if UpdateCustomer instances are equal - /// - /// Instance of UpdateCustomer to be compared - /// Boolean - public bool Equals(UpdateCustomer input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - (this.AntifraudInfo != null && - this.AntifraudInfo.Equals(input.AntifraudInfo)) - ) && - ( - this.DefaultPaymentSourceId == input.DefaultPaymentSourceId || - (this.DefaultPaymentSourceId != null && - this.DefaultPaymentSourceId.Equals(input.DefaultPaymentSourceId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.PlanId == input.PlanId || - (this.PlanId != null && - this.PlanId.Equals(input.PlanId)) - ) && - ( - this.DefaultShippingContactId == input.DefaultShippingContactId || - (this.DefaultShippingContactId != null && - this.DefaultShippingContactId.Equals(input.DefaultShippingContactId)) - ) && - ( - this.Corporate == input.Corporate || - this.Corporate.Equals(input.Corporate) - ) && - ( - this.CustomReference == input.CustomReference || - (this.CustomReference != null && - this.CustomReference.Equals(input.CustomReference)) - ) && - ( - this.FiscalEntities == input.FiscalEntities || - this.FiscalEntities != null && - input.FiscalEntities != null && - this.FiscalEntities.SequenceEqual(input.FiscalEntities) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.PaymentSources == input.PaymentSources || - this.PaymentSources != null && - input.PaymentSources != null && - this.PaymentSources.SequenceEqual(input.PaymentSources) - ) && - ( - this.ShippingContacts == input.ShippingContacts || - this.ShippingContacts != null && - input.ShippingContacts != null && - this.ShippingContacts.SequenceEqual(input.ShippingContacts) - ) && - ( - this.Subscription == input.Subscription || - (this.Subscription != null && - this.Subscription.Equals(input.Subscription)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - if (this.DefaultPaymentSourceId != null) - { - hashCode = (hashCode * 59) + this.DefaultPaymentSourceId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.PlanId != null) - { - hashCode = (hashCode * 59) + this.PlanId.GetHashCode(); - } - if (this.DefaultShippingContactId != null) - { - hashCode = (hashCode * 59) + this.DefaultShippingContactId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Corporate.GetHashCode(); - if (this.CustomReference != null) - { - hashCode = (hashCode * 59) + this.CustomReference.GetHashCode(); - } - if (this.FiscalEntities != null) - { - hashCode = (hashCode * 59) + this.FiscalEntities.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.PaymentSources != null) - { - hashCode = (hashCode * 59) + this.PaymentSources.GetHashCode(); - } - if (this.ShippingContacts != null) - { - hashCode = (hashCode * 59) + this.ShippingContacts.GetHashCode(); - } - if (this.Subscription != null) - { - hashCode = (hashCode * 59) + this.Subscription.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateCustomerAntifraudInfo.cs b/src/Conekta.net/Model/UpdateCustomerAntifraudInfo.cs index 014c2fb..06dbc0f 100644 --- a/src/Conekta.net/Model/UpdateCustomerAntifraudInfo.cs +++ b/src/Conekta.net/Model/UpdateCustomerAntifraudInfo.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// UpdateCustomerAntifraudInfo /// [DataContract(Name = "update_customer_antifraud_info")] - public partial class UpdateCustomerAntifraudInfo : IEquatable, IValidatableObject + public partial class UpdateCustomerAntifraudInfo : IValidatableObject { /// /// Initializes a new instance of the class. @@ -80,53 +80,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCustomerAntifraudInfo); - } - - /// - /// Returns true if UpdateCustomerAntifraudInfo instances are equal - /// - /// Instance of UpdateCustomerAntifraudInfo to be compared - /// Boolean - public bool Equals(UpdateCustomerAntifraudInfo input) - { - if (input == null) - { - return false; - } - return - ( - this.AccountCreatedAt == input.AccountCreatedAt || - this.AccountCreatedAt.Equals(input.AccountCreatedAt) - ) && - ( - this.FirstPaidAt == input.FirstPaidAt || - this.FirstPaidAt.Equals(input.FirstPaidAt) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.AccountCreatedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.FirstPaidAt.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponse.cs b/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponse.cs index 57ca243..f184446 100644 --- a/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponse.cs +++ b/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// UpdateCustomerFiscalEntitiesResponse /// [DataContract(Name = "update_customer_fiscal_entities_response")] - public partial class UpdateCustomerFiscalEntitiesResponse : IEquatable, IValidatableObject + public partial class UpdateCustomerFiscalEntitiesResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -51,7 +51,7 @@ protected UpdateCustomerFiscalEntitiesResponse() { } /// createdAt (required). /// parentId. /// varDefault. - public UpdateCustomerFiscalEntitiesResponse(CustomerFiscalEntitiesRequestAddress address = default(CustomerFiscalEntitiesRequestAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string), string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) + public UpdateCustomerFiscalEntitiesResponse(CustomerAddress address = default(CustomerAddress), string taxId = default(string), string email = default(string), string phone = default(string), Dictionary metadata = default(Dictionary), string companyName = default(string), string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) { // to ensure "address" is required (not null) if (address == null) @@ -85,7 +85,7 @@ protected UpdateCustomerFiscalEntitiesResponse() { } /// Gets or Sets Address /// [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] - public CustomerFiscalEntitiesRequestAddress Address { get; set; } + public CustomerAddress Address { get; set; } /// /// Gets or Sets TaxId @@ -184,135 +184,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCustomerFiscalEntitiesResponse); - } - - /// - /// Returns true if UpdateCustomerFiscalEntitiesResponse instances are equal - /// - /// Instance of UpdateCustomerFiscalEntitiesResponse to be compared - /// Boolean - public bool Equals(UpdateCustomerFiscalEntitiesResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Address == input.Address || - (this.Address != null && - this.Address.Equals(input.Address)) - ) && - ( - this.TaxId == input.TaxId || - (this.TaxId != null && - this.TaxId.Equals(input.TaxId)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.CompanyName == input.CompanyName || - (this.CompanyName != null && - this.CompanyName.Equals(input.CompanyName)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Address != null) - { - hashCode = (hashCode * 59) + this.Address.GetHashCode(); - } - if (this.TaxId != null) - { - hashCode = (hashCode * 59) + this.TaxId.GetHashCode(); - } - if (this.Email != null) - { - hashCode = (hashCode * 59) + this.Email.GetHashCode(); - } - if (this.Phone != null) - { - hashCode = (hashCode * 59) + this.Phone.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.CompanyName != null) - { - hashCode = (hashCode * 59) + this.CompanyName.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponseAllOf.cs b/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponseAllOf.cs deleted file mode 100644 index b38c1f5..0000000 --- a/src/Conekta.net/Model/UpdateCustomerFiscalEntitiesResponseAllOf.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// UpdateCustomerFiscalEntitiesResponseAllOf - /// - [DataContract(Name = "update_customer_fiscal_entities_response_allOf")] - public partial class UpdateCustomerFiscalEntitiesResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateCustomerFiscalEntitiesResponseAllOf() { } - /// - /// Initializes a new instance of the class. - /// - /// id (required). - /// varObject (required). - /// createdAt (required). - /// parentId. - /// varDefault. - public UpdateCustomerFiscalEntitiesResponseAllOf(string id = default(string), string varObject = default(string), long createdAt = default(long), string parentId = default(string), bool varDefault = default(bool)) - { - // to ensure "id" is required (not null) - if (id == null) - { - throw new ArgumentNullException("id is a required property for UpdateCustomerFiscalEntitiesResponseAllOf and cannot be null"); - } - this.Id = id; - // to ensure "varObject" is required (not null) - if (varObject == null) - { - throw new ArgumentNullException("varObject is a required property for UpdateCustomerFiscalEntitiesResponseAllOf and cannot be null"); - } - this.VarObject = varObject; - this.CreatedAt = createdAt; - this.ParentId = parentId; - this.VarDefault = varDefault; - } - - /// - /// Gets or Sets Id - /// - /// fis_ent_2tKZsTYcsryyu7Ah8 - [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - /// fiscal_entities - [DataMember(Name = "object", IsRequired = true, EmitDefaultValue = true)] - public string VarObject { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - /// 1675715413 - [DataMember(Name = "created_at", IsRequired = true, EmitDefaultValue = true)] - public long CreatedAt { get; set; } - - /// - /// Gets or Sets ParentId - /// - /// cus_2tKcHxhTz7xU5SymF - [DataMember(Name = "parent_id", EmitDefaultValue = false)] - public string ParentId { get; set; } - - /// - /// Gets or Sets VarDefault - /// - [DataMember(Name = "default", EmitDefaultValue = true)] - public bool VarDefault { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateCustomerFiscalEntitiesResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - sb.Append(" VarDefault: ").Append(VarDefault).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCustomerFiscalEntitiesResponseAllOf); - } - - /// - /// Returns true if UpdateCustomerFiscalEntitiesResponseAllOf instances are equal - /// - /// Instance of UpdateCustomerFiscalEntitiesResponseAllOf to be compared - /// Boolean - public bool Equals(UpdateCustomerFiscalEntitiesResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ) && - ( - this.VarDefault == input.VarDefault || - this.VarDefault.Equals(input.VarDefault) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - hashCode = (hashCode * 59) + this.VarDefault.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/UpdateCustomerPaymentMethodsResponse.cs b/src/Conekta.net/Model/UpdateCustomerPaymentMethodsResponse.cs index 834aa8a..cbcf0de 100644 --- a/src/Conekta.net/Model/UpdateCustomerPaymentMethodsResponse.cs +++ b/src/Conekta.net/Model/UpdateCustomerPaymentMethodsResponse.cs @@ -33,7 +33,7 @@ namespace Conekta.net.Model /// [JsonConverter(typeof(UpdateCustomerPaymentMethodsResponseJsonConverter))] [DataContract(Name = "update_customer_payment_methods_response")] - public partial class UpdateCustomerPaymentMethodsResponse : AbstractOpenAPISchema, IEquatable, IValidatableObject + public partial class UpdateCustomerPaymentMethodsResponse : AbstractOpenAPISchema, IValidatableObject { /// /// Initializes a new instance of the class @@ -283,43 +283,6 @@ public static UpdateCustomerPaymentMethodsResponse FromJson(string jsonString) return newUpdateCustomerPaymentMethodsResponse; } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateCustomerPaymentMethodsResponse); - } - - /// - /// Returns true if UpdateCustomerPaymentMethodsResponse instances are equal - /// - /// Instance of UpdateCustomerPaymentMethodsResponse to be compared - /// Boolean - public bool Equals(UpdateCustomerPaymentMethodsResponse input) - { - if (input == null) - return false; - - return this.ActualInstance.Equals(input.ActualInstance); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ActualInstance != null) - hashCode = hashCode * 59 + this.ActualInstance.GetHashCode(); - return hashCode; - } - } /// /// To validate all properties of the instance @@ -358,11 +321,15 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s /// The object converted from the JSON string public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { - if(reader.TokenType != JsonToken.Null) + switch(reader.TokenType) { - return UpdateCustomerPaymentMethodsResponse.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartObject: + return UpdateCustomerPaymentMethodsResponse.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return UpdateCustomerPaymentMethodsResponse.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; } - return null; } /// diff --git a/src/Conekta.net/Model/UpdateOrderDiscountLinesRequest.cs b/src/Conekta.net/Model/UpdateOrderDiscountLinesRequest.cs index 7f1c01d..0d295a0 100644 --- a/src/Conekta.net/Model/UpdateOrderDiscountLinesRequest.cs +++ b/src/Conekta.net/Model/UpdateOrderDiscountLinesRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// List of discounts that apply to the order. /// [DataContract(Name = "update_order_discount_lines_request")] - public partial class UpdateOrderDiscountLinesRequest : IEquatable, IValidatableObject + public partial class UpdateOrderDiscountLinesRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -91,66 +91,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateOrderDiscountLinesRequest); - } - - /// - /// Returns true if UpdateOrderDiscountLinesRequest instances are equal - /// - /// Instance of UpdateOrderDiscountLinesRequest to be compared - /// Boolean - public bool Equals(UpdateOrderDiscountLinesRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Code != null) - { - hashCode = (hashCode * 59) + this.Code.GetHashCode(); - } - if (this.Type != null) - { - hashCode = (hashCode * 59) + this.Type.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateOrderTaxRequest.cs b/src/Conekta.net/Model/UpdateOrderTaxRequest.cs index 5e863cf..58ab102 100644 --- a/src/Conekta.net/Model/UpdateOrderTaxRequest.cs +++ b/src/Conekta.net/Model/UpdateOrderTaxRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// create new taxes for an existing order /// [DataContract(Name = "update_order_tax_request")] - public partial class UpdateOrderTaxRequest : IEquatable, IValidatableObject + public partial class UpdateOrderTaxRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -91,67 +91,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateOrderTaxRequest); - } - - /// - /// Returns true if UpdateOrderTaxRequest instances are equal - /// - /// Instance of UpdateOrderTaxRequest to be compared - /// Boolean - public bool Equals(UpdateOrderTaxRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateOrderTaxResponse.cs b/src/Conekta.net/Model/UpdateOrderTaxResponse.cs index cfc3ec5..4f765c6 100644 --- a/src/Conekta.net/Model/UpdateOrderTaxResponse.cs +++ b/src/Conekta.net/Model/UpdateOrderTaxResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// create new taxes for an existing order response /// [DataContract(Name = "update_order_tax_response")] - public partial class UpdateOrderTaxResponse : IEquatable, IValidatableObject + public partial class UpdateOrderTaxResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -137,94 +137,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateOrderTaxResponse); - } - - /// - /// Returns true if UpdateOrderTaxResponse instances are equal - /// - /// Instance of UpdateOrderTaxResponse to be compared - /// Boolean - public bool Equals(UpdateOrderTaxResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Amount == input.Amount || - this.Amount.Equals(input.Amount) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Amount.GetHashCode(); - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateOrderTaxResponseAllOf.cs b/src/Conekta.net/Model/UpdateOrderTaxResponseAllOf.cs deleted file mode 100644 index 6bef865..0000000 --- a/src/Conekta.net/Model/UpdateOrderTaxResponseAllOf.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Conekta API - * - * Conekta sdk - * - * The version of the OpenAPI document: 2.1.0 - * Contact: engineering@conekta.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Conekta.net.Client.OpenAPIDateConverter; - -namespace Conekta.net.Model -{ - /// - /// UpdateOrderTaxResponseAllOf - /// - [DataContract(Name = "update_order_tax_response_allOf")] - public partial class UpdateOrderTaxResponseAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// varObject. - /// parentId. - public UpdateOrderTaxResponseAllOf(string id = default(string), string varObject = default(string), string parentId = default(string)) - { - this.Id = id; - this.VarObject = varObject; - this.ParentId = parentId; - } - - /// - /// Gets or Sets Id - /// - /// tax_lin_2tQ8dC5mg1UADmVPo - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets VarObject - /// - /// tax_line - [DataMember(Name = "object", EmitDefaultValue = false)] - public string VarObject { get; set; } - - /// - /// Gets or Sets ParentId - /// - /// ord_2tPAmKCEJqh8RE6nY - [DataMember(Name = "parent_id", EmitDefaultValue = false)] - public string ParentId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateOrderTaxResponseAllOf {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarObject: ").Append(VarObject).Append("\n"); - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateOrderTaxResponseAllOf); - } - - /// - /// Returns true if UpdateOrderTaxResponseAllOf instances are equal - /// - /// Instance of UpdateOrderTaxResponseAllOf to be compared - /// Boolean - public bool Equals(UpdateOrderTaxResponseAllOf input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ParentId == input.ParentId || - (this.ParentId != null && - this.ParentId.Equals(input.ParentId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ParentId != null) - { - hashCode = (hashCode * 59) + this.ParentId.GetHashCode(); - } - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Conekta.net/Model/UpdatePaymentMethods.cs b/src/Conekta.net/Model/UpdatePaymentMethods.cs index 386d72e..9883812 100644 --- a/src/Conekta.net/Model/UpdatePaymentMethods.cs +++ b/src/Conekta.net/Model/UpdatePaymentMethods.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// UpdatePaymentMethods /// [DataContract(Name = "update_payment_methods")] - public partial class UpdatePaymentMethods : IEquatable, IValidatableObject + public partial class UpdatePaymentMethods : IValidatableObject { /// /// Initializes a new instance of the class. @@ -70,52 +70,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdatePaymentMethods); - } - - /// - /// Returns true if UpdatePaymentMethods instances are equal - /// - /// Instance of UpdatePaymentMethods to be compared - /// Boolean - public bool Equals(UpdatePaymentMethods input) - { - if (input == null) - { - return false; - } - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/UpdateProduct.cs b/src/Conekta.net/Model/UpdateProduct.cs index d0c9f01..98ac5cf 100644 --- a/src/Conekta.net/Model/UpdateProduct.cs +++ b/src/Conekta.net/Model/UpdateProduct.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// UpdateProduct /// [DataContract(Name = "update_product")] - public partial class UpdateProduct : IEquatable, IValidatableObject + public partial class UpdateProduct : IValidatableObject { /// /// Initializes a new instance of the class. @@ -144,119 +144,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as UpdateProduct); - } - - /// - /// Returns true if UpdateProduct instances are equal - /// - /// Instance of UpdateProduct to be compared - /// Boolean - public bool Equals(UpdateProduct input) - { - if (input == null) - { - return false; - } - return - ( - this.AntifraudInfo == input.AntifraudInfo || - this.AntifraudInfo != null && - input.AntifraudInfo != null && - this.AntifraudInfo.SequenceEqual(input.AntifraudInfo) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.Sku == input.Sku || - (this.Sku != null && - this.Sku.Equals(input.Sku)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.UnitPrice == input.UnitPrice || - this.UnitPrice.Equals(input.UnitPrice) - ) && - ( - this.Quantity == input.Quantity || - this.Quantity.Equals(input.Quantity) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Brand == input.Brand || - (this.Brand != null && - this.Brand.Equals(input.Brand)) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AntifraudInfo != null) - { - hashCode = (hashCode * 59) + this.AntifraudInfo.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - if (this.Sku != null) - { - hashCode = (hashCode * 59) + this.Sku.GetHashCode(); - } - if (this.Name != null) - { - hashCode = (hashCode * 59) + this.Name.GetHashCode(); - } - hashCode = (hashCode * 59) + this.UnitPrice.GetHashCode(); - hashCode = (hashCode * 59) + this.Quantity.GetHashCode(); - if (this.Tags != null) - { - hashCode = (hashCode * 59) + this.Tags.GetHashCode(); - } - if (this.Brand != null) - { - hashCode = (hashCode * 59) + this.Brand.GetHashCode(); - } - if (this.Metadata != null) - { - hashCode = (hashCode * 59) + this.Metadata.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookKeyCreateResponse.cs b/src/Conekta.net/Model/WebhookKeyCreateResponse.cs index 5650d54..ca52743 100644 --- a/src/Conekta.net/Model/WebhookKeyCreateResponse.cs +++ b/src/Conekta.net/Model/WebhookKeyCreateResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// webhook keys model /// [DataContract(Name = "webhook-key_create_response")] - public partial class WebhookKeyCreateResponse : IEquatable, IValidatableObject + public partial class WebhookKeyCreateResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -126,85 +126,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookKeyCreateResponse); - } - - /// - /// Returns true if WebhookKeyCreateResponse instances are equal - /// - /// Instance of WebhookKeyCreateResponse to be compared - /// Boolean - public bool Equals(WebhookKeyCreateResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.PublicKey == input.PublicKey || - (this.PublicKey != null && - this.PublicKey.Equals(input.PublicKey)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.PublicKey != null) - { - hashCode = (hashCode * 59) + this.PublicKey.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookKeyDeleteResponse.cs b/src/Conekta.net/Model/WebhookKeyDeleteResponse.cs index 9eebf79..2d0fe6a 100644 --- a/src/Conekta.net/Model/WebhookKeyDeleteResponse.cs +++ b/src/Conekta.net/Model/WebhookKeyDeleteResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// webhook keys model /// [DataContract(Name = "webhook-key_delete_response")] - public partial class WebhookKeyDeleteResponse : IEquatable, IValidatableObject + public partial class WebhookKeyDeleteResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -126,81 +126,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookKeyDeleteResponse); - } - - /// - /// Returns true if WebhookKeyDeleteResponse instances are equal - /// - /// Instance of WebhookKeyDeleteResponse to be compared - /// Boolean - public bool Equals(WebhookKeyDeleteResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.Deleted == input.Deleted || - this.Deleted.Equals(input.Deleted) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookKeyRequest.cs b/src/Conekta.net/Model/WebhookKeyRequest.cs index d1963f5..63dfc94 100644 --- a/src/Conekta.net/Model/WebhookKeyRequest.cs +++ b/src/Conekta.net/Model/WebhookKeyRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// WebhookKeyRequest /// [DataContract(Name = "webhook_key_request")] - public partial class WebhookKeyRequest : IEquatable, IValidatableObject + public partial class WebhookKeyRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,48 +71,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookKeyRequest); - } - - /// - /// Returns true if WebhookKeyRequest instances are equal - /// - /// Instance of WebhookKeyRequest to be compared - /// Boolean - public bool Equals(WebhookKeyRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookKeyResponse.cs b/src/Conekta.net/Model/WebhookKeyResponse.cs index d895938..2652631 100644 --- a/src/Conekta.net/Model/WebhookKeyResponse.cs +++ b/src/Conekta.net/Model/WebhookKeyResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// webhook keys model /// [DataContract(Name = "webhook-key_response")] - public partial class WebhookKeyResponse : IEquatable, IValidatableObject + public partial class WebhookKeyResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -136,94 +136,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookKeyResponse); - } - - /// - /// Returns true if WebhookKeyResponse instances are equal - /// - /// Instance of WebhookKeyResponse to be compared - /// Boolean - public bool Equals(WebhookKeyResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ) && - ( - this.CreatedAt == input.CreatedAt || - this.CreatedAt.Equals(input.CreatedAt) - ) && - ( - this.DeactivatedAt == input.DeactivatedAt || - (this.DeactivatedAt != null && - this.DeactivatedAt.Equals(input.DeactivatedAt)) - ) && - ( - this.PublicKey == input.PublicKey || - (this.PublicKey != null && - this.PublicKey.Equals(input.PublicKey)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - hashCode = (hashCode * 59) + this.CreatedAt.GetHashCode(); - if (this.DeactivatedAt != null) - { - hashCode = (hashCode * 59) + this.DeactivatedAt.GetHashCode(); - } - if (this.PublicKey != null) - { - hashCode = (hashCode * 59) + this.PublicKey.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookKeyUpdateRequest.cs b/src/Conekta.net/Model/WebhookKeyUpdateRequest.cs index 2b4d639..73ac467 100644 --- a/src/Conekta.net/Model/WebhookKeyUpdateRequest.cs +++ b/src/Conekta.net/Model/WebhookKeyUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// WebhookKeyUpdateRequest /// [DataContract(Name = "webhook_key_update_request")] - public partial class WebhookKeyUpdateRequest : IEquatable, IValidatableObject + public partial class WebhookKeyUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -71,48 +71,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookKeyUpdateRequest); - } - - /// - /// Returns true if WebhookKeyUpdateRequest instances are equal - /// - /// Instance of WebhookKeyUpdateRequest to be compared - /// Boolean - public bool Equals(WebhookKeyUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Active == input.Active || - this.Active.Equals(input.Active) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.Active.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookLog.cs b/src/Conekta.net/Model/WebhookLog.cs index de83479..cb8eae5 100644 --- a/src/Conekta.net/Model/WebhookLog.cs +++ b/src/Conekta.net/Model/WebhookLog.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// WebhookLog /// [DataContract(Name = "WebhookLog")] - public partial class WebhookLog : IEquatable, IValidatableObject + public partial class WebhookLog : IValidatableObject { /// /// Initializes a new instance of the class. @@ -130,95 +130,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookLog); - } - - /// - /// Returns true if WebhookLog instances are equal - /// - /// Instance of WebhookLog to be compared - /// Boolean - public bool Equals(WebhookLog input) - { - if (input == null) - { - return false; - } - return - ( - this.FailedAttempts == input.FailedAttempts || - this.FailedAttempts.Equals(input.FailedAttempts) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.LastAttemptedAt == input.LastAttemptedAt || - this.LastAttemptedAt.Equals(input.LastAttemptedAt) - ) && - ( - this.LastHttpResponseStatus == input.LastHttpResponseStatus || - this.LastHttpResponseStatus.Equals(input.LastHttpResponseStatus) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ResponseData == input.ResponseData || - this.ResponseData != null && - input.ResponseData != null && - this.ResponseData.SequenceEqual(input.ResponseData) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - hashCode = (hashCode * 59) + this.FailedAttempts.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.LastAttemptedAt.GetHashCode(); - hashCode = (hashCode * 59) + this.LastHttpResponseStatus.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - if (this.ResponseData != null) - { - hashCode = (hashCode * 59) + this.ResponseData.GetHashCode(); - } - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookRequest.cs b/src/Conekta.net/Model/WebhookRequest.cs index e0e5054..ac44c39 100644 --- a/src/Conekta.net/Model/WebhookRequest.cs +++ b/src/Conekta.net/Model/WebhookRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// a webhook /// [DataContract(Name = "webhook_request")] - public partial class WebhookRequest : IEquatable, IValidatableObject + public partial class WebhookRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -92,57 +92,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookRequest); - } - - /// - /// Returns true if WebhookRequest instances are equal - /// - /// Instance of WebhookRequest to be compared - /// Boolean - public bool Equals(WebhookRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Synchronous == input.Synchronous || - this.Synchronous.Equals(input.Synchronous) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Synchronous.GetHashCode(); - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookResponse.cs b/src/Conekta.net/Model/WebhookResponse.cs index fbbb6c7..becdb5e 100644 --- a/src/Conekta.net/Model/WebhookResponse.cs +++ b/src/Conekta.net/Model/WebhookResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// webhooks model /// [DataContract(Name = "webhook_response")] - public partial class WebhookResponse : IEquatable, IValidatableObject + public partial class WebhookResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -160,118 +160,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookResponse); - } - - /// - /// Returns true if WebhookResponse instances are equal - /// - /// Instance of WebhookResponse to be compared - /// Boolean - public bool Equals(WebhookResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Deleted == input.Deleted || - (this.Deleted != null && - this.Deleted.Equals(input.Deleted)) - ) && - ( - this.DevelopmentEnabled == input.DevelopmentEnabled || - this.DevelopmentEnabled.Equals(input.DevelopmentEnabled) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Livemode == input.Livemode || - this.Livemode.Equals(input.Livemode) - ) && - ( - this.VarObject == input.VarObject || - (this.VarObject != null && - this.VarObject.Equals(input.VarObject)) - ) && - ( - this.ProductionEnabled == input.ProductionEnabled || - this.ProductionEnabled.Equals(input.ProductionEnabled) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.SubscribedEvents == input.SubscribedEvents || - this.SubscribedEvents != null && - input.SubscribedEvents != null && - this.SubscribedEvents.SequenceEqual(input.SubscribedEvents) - ) && - ( - this.Synchronous == input.Synchronous || - this.Synchronous.Equals(input.Synchronous) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Deleted != null) - { - hashCode = (hashCode * 59) + this.Deleted.GetHashCode(); - } - hashCode = (hashCode * 59) + this.DevelopmentEnabled.GetHashCode(); - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Livemode.GetHashCode(); - if (this.VarObject != null) - { - hashCode = (hashCode * 59) + this.VarObject.GetHashCode(); - } - hashCode = (hashCode * 59) + this.ProductionEnabled.GetHashCode(); - if (this.Status != null) - { - hashCode = (hashCode * 59) + this.Status.GetHashCode(); - } - if (this.SubscribedEvents != null) - { - hashCode = (hashCode * 59) + this.SubscribedEvents.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Synchronous.GetHashCode(); - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WebhookUpdateRequest.cs b/src/Conekta.net/Model/WebhookUpdateRequest.cs index f17ca04..464fa87 100644 --- a/src/Conekta.net/Model/WebhookUpdateRequest.cs +++ b/src/Conekta.net/Model/WebhookUpdateRequest.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// an updated webhook /// [DataContract(Name = "webhook_update_request")] - public partial class WebhookUpdateRequest : IEquatable, IValidatableObject + public partial class WebhookUpdateRequest : IValidatableObject { /// /// Initializes a new instance of the class. @@ -102,67 +102,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WebhookUpdateRequest); - } - - /// - /// Returns true if WebhookUpdateRequest instances are equal - /// - /// Instance of WebhookUpdateRequest to be compared - /// Boolean - public bool Equals(WebhookUpdateRequest input) - { - if (input == null) - { - return false; - } - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Synchronous == input.Synchronous || - this.Synchronous.Equals(input.Synchronous) - ) && - ( - this.Events == input.Events || - this.Events != null && - input.Events != null && - this.Events.SequenceEqual(input.Events) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - { - hashCode = (hashCode * 59) + this.Url.GetHashCode(); - } - hashCode = (hashCode * 59) + this.Synchronous.GetHashCode(); - if (this.Events != null) - { - hashCode = (hashCode * 59) + this.Events.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/src/Conekta.net/Model/WhitelistlistRuleResponse.cs b/src/Conekta.net/Model/WhitelistlistRuleResponse.cs index f47555c..7678313 100644 --- a/src/Conekta.net/Model/WhitelistlistRuleResponse.cs +++ b/src/Conekta.net/Model/WhitelistlistRuleResponse.cs @@ -30,7 +30,7 @@ namespace Conekta.net.Model /// WhitelistlistRuleResponse /// [DataContract(Name = "whitelistlist_rule_response")] - public partial class WhitelistlistRuleResponse : IEquatable, IValidatableObject + public partial class WhitelistlistRuleResponse : IValidatableObject { /// /// Initializes a new instance of the class. @@ -104,79 +104,6 @@ public virtual string ToJson() return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as WhitelistlistRuleResponse); - } - - /// - /// Returns true if WhitelistlistRuleResponse instances are equal - /// - /// Instance of WhitelistlistRuleResponse to be compared - /// Boolean - public bool Equals(WhitelistlistRuleResponse input) - { - if (input == null) - { - return false; - } - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Field == input.Field || - (this.Field != null && - this.Field.Equals(input.Field)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - { - hashCode = (hashCode * 59) + this.Id.GetHashCode(); - } - if (this.Field != null) - { - hashCode = (hashCode * 59) + this.Field.GetHashCode(); - } - if (this.Value != null) - { - hashCode = (hashCode * 59) + this.Value.GetHashCode(); - } - if (this.Description != null) - { - hashCode = (hashCode * 59) + this.Description.GetHashCode(); - } - return hashCode; - } - } - /// /// To validate all properties of the instance /// diff --git a/templates/netcore/EnumValueDataType.mustache b/templates/netcore/EnumValueDataType.mustache index a788123..e92e67b 100644 --- a/templates/netcore/EnumValueDataType.mustache +++ b/templates/netcore/EnumValueDataType.mustache @@ -1 +1 @@ -{{#isString}}{{^isNumeric}}string{{/isNumeric}}{{/isString}}{{#isNumeric}}{{#isLong}}long{{/isLong}}{{#isFloat}}float{{/isFloat}}{{#isDouble}}double{{/isDouble}}{{#isDecimal}}decimal{{/isDecimal}}{{^isLong}}{{^isFloat}}{{^isDouble}}{{^isDecimal}}int{{/isDecimal}}{{/isDouble}}{{/isFloat}}{{/isLong}}{{/isNumeric}} \ No newline at end of file +{{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{^isNumeric}}string{{/isNumeric}}{{/isString}}{{#isNumeric}}{{#isLong}}long{{/isLong}}{{#isFloat}}float{{/isFloat}}{{#isDouble}}double{{/isDouble}}{{#isDecimal}}decimal{{/isDecimal}}{{^isLong}}{{^isFloat}}{{^isDouble}}{{^isDecimal}}int{{/isDecimal}}{{/isDouble}}{{/isFloat}}{{/isLong}}{{/isNumeric}}{{/-first}}{{/enumVars}}{{/allowableValues}} \ No newline at end of file