diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 6f88a0e..3662402 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -8,8 +8,12 @@ docs/ApiKeyCreateResponse.md docs/ApiKeyCreateResponseAllOf.md docs/ApiKeyRequest.md docs/ApiKeyResponse.md +docs/ApiKeyResponseOnDelete.md docs/ApiKeyUpdateRequest.md docs/ApiKeysApi.md +docs/BalanceCommonField.md +docs/BalanceResponse.md +docs/BalancesApi.md docs/BlacklistRuleResponse.md docs/ChargeDataPaymentMethodBankTransferResponse.md docs/ChargeDataPaymentMethodCardResponse.md @@ -100,6 +104,8 @@ 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 @@ -139,6 +145,7 @@ docs/OrderResponseShippingContact.md docs/OrderResponseShippingContactAllOf.md docs/OrderTaxRequest.md docs/OrderUpdateRequest.md +docs/OrderUpdateRequestCustomerInfo.md docs/OrdersApi.md docs/OrdersResponse.md docs/Page.md @@ -227,6 +234,7 @@ src/main/java/com/conekta/ApiClient.java src/main/java/com/conekta/ApiException.java src/main/java/com/conekta/ApiKeysApi.java src/main/java/com/conekta/ApiResponse.java +src/main/java/com/conekta/BalancesApi.java src/main/java/com/conekta/ChargesApi.java src/main/java/com/conekta/CompaniesApi.java src/main/java/com/conekta/Configuration.java @@ -264,7 +272,10 @@ src/main/java/com/conekta/model/ApiKeyCreateResponse.java src/main/java/com/conekta/model/ApiKeyCreateResponseAllOf.java src/main/java/com/conekta/model/ApiKeyRequest.java src/main/java/com/conekta/model/ApiKeyResponse.java +src/main/java/com/conekta/model/ApiKeyResponseOnDelete.java src/main/java/com/conekta/model/ApiKeyUpdateRequest.java +src/main/java/com/conekta/model/BalanceCommonField.java +src/main/java/com/conekta/model/BalanceResponse.java src/main/java/com/conekta/model/BlacklistRuleResponse.java src/main/java/com/conekta/model/ChargeDataPaymentMethodBankTransferResponse.java src/main/java/com/conekta/model/ChargeDataPaymentMethodCardResponse.java @@ -350,6 +361,8 @@ src/main/java/com/conekta/model/GetCompaniesResponseAllOf.java src/main/java/com/conekta/model/GetCustomerPaymentMethodDataResponse.java src/main/java/com/conekta/model/GetEventsResponse.java src/main/java/com/conekta/model/GetEventsResponseAllOf.java +src/main/java/com/conekta/model/GetOrderDiscountLinesResponse.java +src/main/java/com/conekta/model/GetOrderDiscountLinesResponseAllOf.java src/main/java/com/conekta/model/GetOrdersResponse.java src/main/java/com/conekta/model/GetPaymentMethodResponse.java src/main/java/com/conekta/model/GetPaymentMethodResponseAllOf.java @@ -388,6 +401,7 @@ src/main/java/com/conekta/model/OrderResponseShippingContact.java src/main/java/com/conekta/model/OrderResponseShippingContactAllOf.java src/main/java/com/conekta/model/OrderTaxRequest.java src/main/java/com/conekta/model/OrderUpdateRequest.java +src/main/java/com/conekta/model/OrderUpdateRequestCustomerInfo.java src/main/java/com/conekta/model/OrdersResponse.java src/main/java/com/conekta/model/Page.java src/main/java/com/conekta/model/Pagination.java diff --git a/README.md b/README.md index 0af8c5f..e9b8172 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ Class | Method | HTTP request | Description *ApiKeysApi* | [**getApiKey**](docs/ApiKeysApi.md#getApiKey) | **GET** /api_keys/{id} | Get Api Key *ApiKeysApi* | [**getApiKeys**](docs/ApiKeysApi.md#getApiKeys) | **GET** /api_keys | Get list of Api Keys *ApiKeysApi* | [**updateApiKey**](docs/ApiKeysApi.md#updateApiKey) | **PUT** /api_keys/{id} | Update Api Key +*BalancesApi* | [**getBalance**](docs/BalancesApi.md#getBalance) | **GET** /balances | Get a company's balance *ChargesApi* | [**getCharges**](docs/ChargesApi.md#getCharges) | **GET** /charges | Get A List of Charges *ChargesApi* | [**ordersCreateCharge**](docs/ChargesApi.md#ordersCreateCharge) | **POST** /orders/{id}/charges | Create charge *CompaniesApi* | [**getCompanies**](docs/CompaniesApi.md#getCompanies) | **GET** /companies | Get List of Companies @@ -143,6 +144,8 @@ Class | Method | HTTP request | Description *CustomersApi* | [**updateCustomerFiscalEntities**](docs/CustomersApi.md#updateCustomerFiscalEntities) | **PUT** /customers/{id}/fiscal_entities/{fiscal_entities_id} | Update Fiscal Entity *DiscountsApi* | [**ordersCreateDiscountLine**](docs/DiscountsApi.md#ordersCreateDiscountLine) | **POST** /orders/{id}/discount_lines | Create Discount *DiscountsApi* | [**ordersDeleteDiscountLines**](docs/DiscountsApi.md#ordersDeleteDiscountLines) | **DELETE** /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount +*DiscountsApi* | [**ordersGetDiscountLine**](docs/DiscountsApi.md#ordersGetDiscountLine) | **GET** /orders/{id}/discount_lines/{discount_lines_id} | Get Discount +*DiscountsApi* | [**ordersGetDiscountLines**](docs/DiscountsApi.md#ordersGetDiscountLines) | **GET** /orders/{id}/discount_lines | Get a List of Discount *DiscountsApi* | [**ordersUpdateDiscountLines**](docs/DiscountsApi.md#ordersUpdateDiscountLines) | **PUT** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount *EventsApi* | [**getEvent**](docs/EventsApi.md#getEvent) | **GET** /events/{id} | Get Event *EventsApi* | [**getEvents**](docs/EventsApi.md#getEvents) | **GET** /events | Get list of Events @@ -215,7 +218,10 @@ Class | Method | HTTP request | Description - [ApiKeyCreateResponseAllOf](docs/ApiKeyCreateResponseAllOf.md) - [ApiKeyRequest](docs/ApiKeyRequest.md) - [ApiKeyResponse](docs/ApiKeyResponse.md) + - [ApiKeyResponseOnDelete](docs/ApiKeyResponseOnDelete.md) - [ApiKeyUpdateRequest](docs/ApiKeyUpdateRequest.md) + - [BalanceCommonField](docs/BalanceCommonField.md) + - [BalanceResponse](docs/BalanceResponse.md) - [BlacklistRuleResponse](docs/BlacklistRuleResponse.md) - [ChargeDataPaymentMethodBankTransferResponse](docs/ChargeDataPaymentMethodBankTransferResponse.md) - [ChargeDataPaymentMethodCardResponse](docs/ChargeDataPaymentMethodCardResponse.md) @@ -301,6 +307,8 @@ Class | Method | HTTP request | Description - [GetCustomerPaymentMethodDataResponse](docs/GetCustomerPaymentMethodDataResponse.md) - [GetEventsResponse](docs/GetEventsResponse.md) - [GetEventsResponseAllOf](docs/GetEventsResponseAllOf.md) + - [GetOrderDiscountLinesResponse](docs/GetOrderDiscountLinesResponse.md) + - [GetOrderDiscountLinesResponseAllOf](docs/GetOrderDiscountLinesResponseAllOf.md) - [GetOrdersResponse](docs/GetOrdersResponse.md) - [GetPaymentMethodResponse](docs/GetPaymentMethodResponse.md) - [GetPaymentMethodResponseAllOf](docs/GetPaymentMethodResponseAllOf.md) @@ -339,6 +347,7 @@ Class | Method | HTTP request | Description - [OrderResponseShippingContactAllOf](docs/OrderResponseShippingContactAllOf.md) - [OrderTaxRequest](docs/OrderTaxRequest.md) - [OrderUpdateRequest](docs/OrderUpdateRequest.md) + - [OrderUpdateRequestCustomerInfo](docs/OrderUpdateRequestCustomerInfo.md) - [OrdersResponse](docs/OrdersResponse.md) - [Page](docs/Page.md) - [Pagination](docs/Pagination.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 6470fd2..773d325 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -555,12 +555,6 @@ paths: maximum: 250 minimum: 1 type: integer - - description: "General order search, e.g. by mail, reference etc." - in: query - name: search - required: false - schema: - type: string - description: next page in: query name: next @@ -573,6 +567,12 @@ paths: required: false schema: type: string + - description: "General search, e.g. by id, description, prefix" + in: query + name: search + required: false + schema: + type: string responses: "200": content: @@ -868,7 +868,7 @@ paths: content: application/vnd.conekta-v2.1.0+json: schema: - $ref: '#/components/schemas/api-key_response' + $ref: '#/components/schemas/api_key_response' description: successful headers: Content-Type: @@ -971,7 +971,7 @@ paths: content: application/vnd.conekta-v2.1.0+json: schema: - $ref: '#/components/schemas/api-key_response' + $ref: '#/components/schemas/api_key_response' description: successful operation "404": content: @@ -1027,6 +1027,97 @@ paths: - Api Keys x-content-type: application/json x-accepts: application/vnd.conekta-v2.1.0+json + /balances: + get: + description: Get a company's balance + operationId: getBalance + 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 + in: header + name: Accept-Language + required: false + schema: + default: es + enum: + - es + - en + type: string + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/balance_response' + description: successful + headers: + Date: + description: The date and time that the response was sent + schema: + example: "Fri, 03 Feb 2023 16:57:48 GMT" + type: string + Content-Type: + description: The format of the response body + schema: + example: application/json; charset=utf-8 + type: string + Content-Length: + description: The length of the response body in bytes + schema: + example: "2737" + type: string + Connection: + description: The type of connection used to transfer the response + schema: + example: keep-alive + type: string + Conekta-Media-Type: + schema: + example: conekta-v2.1.0; format=application/json + type: string + "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 company's balance + tags: + - Balances + x-accepts: application/vnd.conekta-v2.1.0+json /charges: get: operationId: getCharges @@ -2322,6 +2413,114 @@ paths: x-content-type: application/json x-accepts: application/vnd.conekta-v2.1.0+json /orders/{id}/discount_lines: + get: + description: Get discount lines for an existing orden + operationId: ordersGetDiscountLines + parameters: + - description: Identifier of the resource + example: 6307a60c41de27127515a575 + in: path + name: id + required: true + schema: + type: string + - 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 + in: header + name: Accept-Language + required: false + schema: + default: es + enum: + - es + - en + type: string + - description: "In the case of a holding company, the company id of the child\ + \ company to which will process the request." + example: 6441b6376b60c3a638da80af + in: header + name: X-Child-Company-Id + required: false + schema: + type: string + - description: "The numbers of items to return, the maximum value is 250" + in: query + name: limit + required: false + schema: + default: 20 + format: int32 + maximum: 250 + minimum: 1 + type: integer + - description: "General order search, e.g. by mail, reference etc." + in: query + name: search + required: false + schema: + type: string + - description: next page + in: query + name: next + required: false + schema: + type: string + - description: previous page + in: query + name: previous + required: false + schema: + type: string + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/get_order_discount_lines_response' + description: successful + "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 Discount + tags: + - Discounts + x-accepts: application/vnd.conekta-v2.1.0+json post: description: Create discount lines for an existing orden operationId: ordersCreateDiscountLine @@ -2433,7 +2632,7 @@ paths: required: true schema: type: string - - description: identifier + - description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG in: path name: discount_lines_id @@ -2540,6 +2739,124 @@ paths: tags: - Discounts x-accepts: application/vnd.conekta-v2.1.0+json + get: + description: Get an existing discount lines for an existing orden + operationId: ordersGetDiscountLine + parameters: + - description: Identifier of the resource + example: 6307a60c41de27127515a575 + in: path + name: id + required: true + schema: + type: string + - description: discount line id identifier + example: dis_lin_2tQ974hSHcsdeSZHG + in: path + name: discount_lines_id + required: true + schema: + type: string + - 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 + in: header + name: Accept-Language + required: false + schema: + default: es + enum: + - es + - en + type: string + - description: "In the case of a holding company, the company id of the child\ + \ company to which will process the request." + example: 6441b6376b60c3a638da80af + in: header + name: X-Child-Company-Id + required: false + schema: + type: string + responses: + "200": + content: + application/vnd.conekta-v2.1.0+json: + schema: + $ref: '#/components/schemas/discount_lines_response' + description: successful + "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 + "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 + "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 Discount + tags: + - Discounts + x-accepts: application/vnd.conekta-v2.1.0+json put: description: Update an existing discount lines for an existing orden operationId: ordersUpdateDiscountLines @@ -2551,7 +2868,7 @@ paths: required: true schema: type: string - - description: identifier + - description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG in: path name: discount_lines_id @@ -6753,6 +7070,23 @@ paths: schema: $ref: '#/components/schemas/error' description: parameter validation error + "428": + content: + application/vnd.conekta-v2.1.0+json: + example: + details: + - debug_message: The order cannot be modified because it has already + a charge which is pending payment. + message: The order cannot be modified because it has already a charge + which is pending payment. + param: null + code: conekta.errors.precondition_required.combo.order.cannot_be_updated_because_has_charge + log_id: 641b6e233cd9a50001515039 + object: error + type: precondition_required_error + schema: + $ref: '#/components/schemas/error' + description: Precondition Required "500": content: application/vnd.conekta-v2.1.0+json: @@ -10649,13 +10983,6 @@ components: maximum: 250 minimum: 1 type: integer - search: - description: "General order search, e.g. by mail, reference etc." - in: query - name: search - required: false - schema: - type: string next_page: description: next page in: query @@ -10670,6 +10997,13 @@ components: required: false schema: type: string + search: + description: "General order search, e.g. by mail, reference etc." + in: query + name: search + required: false + schema: + type: string fiscal_entities_id: description: identifier example: fis_ent_2tQ8HkkfbauaKP9Ho @@ -10679,7 +11013,7 @@ components: schema: type: string discount_lines_id: - description: identifier + description: discount line id identifier example: dis_lin_2tQ974hSHcsdeSZHG in: path name: discount_lines_id @@ -10755,7 +11089,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/api-key_request' + $ref: '#/components/schemas/api_key_request' description: requested field for a api keys required: true charge_create: @@ -11170,7 +11504,7 @@ components: - object title: pagination metadata type: object - api-key_response: + api_key_response: description: api keys model properties: active: @@ -11178,13 +11512,23 @@ components: example: true type: boolean created_at: - description: Unix timestamp in seconds with the creation date of the api - key + description: Unix timestamp in seconds of when the api key was created example: 1684167881 format: int64 type: integer + updated_at: + description: Unix timestamp in seconds of when the api key was last updated + example: 1684167923 + format: int64 + type: integer + deactivated_at: + description: Unix timestamp in seconds of when the api key was deleted + format: int64 + nullable: true + type: integer + example: null description: - description: Detail of the use that will be given to the api key + description: A name or brief explanation of what this api key is used for example: online store type: string id: @@ -11192,11 +11536,15 @@ components: example: 64625cc9f3e02c00163f5e4d type: string livemode: - description: Indicates if the api key is in live mode + description: Indicates if the api key is in production + example: false + type: boolean + deleted: + description: Indicates if the api key was deleted example: false type: boolean object: - description: "Object name, value is api_key" + description: "Object name, value is 'api_key'" example: api_key type: string prefix: @@ -11204,11 +11552,106 @@ components: example: key_rp type: string role: - description: Indicates the user account private=owner or public=public + description: Indicates if the api key is private or public example: private type: string title: api_key_response type: object + api_key_response_on_delete: + description: api keys model + properties: + active: + description: Indicates if the api key is active + example: true + type: boolean + created_at: + description: Unix timestamp in seconds of when the api key was created + example: 1684167881 + format: int64 + type: integer + description: + description: A name or brief explanation of what this api key is used for + example: online store + type: string + livemode: + description: Indicates if the api key is in production + example: false + type: boolean + prefix: + description: The first few characters of the authentication_token + example: key_rp + type: string + id: + description: Unique identifier of the api key + example: 64625cc9f3e02c00163f5e4d + type: string + object: + description: "Object name, value is 'api_key'" + example: api_key + type: string + deleted: + description: Indicates if the api key was deleted + example: false + type: boolean + role: + description: Indicates if the api key is private or public + example: private + type: string + title: api_key_response_delete + type: object + balance_response: + description: balance model + properties: + available: + description: The balance's available + items: + $ref: '#/components/schemas/balance_common_field' + type: array + cashout_retention_amount: + description: The balance's cashout retention amount + items: + $ref: '#/components/schemas/balance_common_field' + type: array + conekta_retention: + description: The balance's conekta retention + items: + $ref: '#/components/schemas/balance_common_field' + type: array + gateway: + description: The balance's gateway + items: + $ref: '#/components/schemas/balance_common_field' + type: array + pending: + description: The balance's pending + items: + $ref: '#/components/schemas/balance_common_field' + type: array + retained: + description: The balance's retained + items: + $ref: '#/components/schemas/balance_common_field' + type: array + retention_amount: + description: The balance's retention amount + items: + $ref: '#/components/schemas/balance_common_field' + type: array + target_collateral_amount: + description: The balance's target collateral amount + type: object + target_retention_amount: + description: The balance's target retention amount + items: + $ref: '#/components/schemas/balance_common_field' + type: array + temporarily_retained: + description: The balance's temporarily retained + items: + $ref: '#/components/schemas/balance_common_field' + type: array + title: balance_response + type: object charge_response: properties: amount: @@ -11743,6 +12186,11 @@ components: description: The payment status of the order. example: paid type: string + processing_mode: + description: "Indicates the processing mode for the order, either ecommerce,\ + \ recurrent or validation." + example: ecommerce + type: string shipping_contact: $ref: '#/components/schemas/order_response_shipping_contact' updated_at: @@ -12252,10 +12700,10 @@ components: deactivated_at: description: Unix timestamp in seconds with the deactivation date of the webhook key - example: 1577836800 format: int64 nullable: true type: integer + example: null public_key: description: Public key to be used in the webhook example: '-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqULpUc6D6mSAq5a0yLY/\noOjd1mWm6q+QI8y/FI4STr2F+XgKeNnMxSqnyFrHtKQ/ut4Zi45WFnJLfEQL7aW5\n67yE2dWyo6GaL7yZUfLC0Y3sHPGzaGtvDF36ISW7LliYNoMiA3Bx5/1Sr0G23pGW\n0Mp8IO1Nlz0sJWuU/d7zCz/UN6cl9g/BP4eaQ7deS56YuWcj5sTlwqFTlwN12kpA\nIzMZ7gnvYQnZTpPny5lben6QEuxTvZcPApcyOweiESjMnXfkfWOyuYtgMrbsU6oL\nA6sWa6j0pePW7AYeBqB4tyAlenkCSqzHg8bMk5Bm7hiT6I9Pls774lJbnOYmmuNE\n8QIDAQAB\n-----END @@ -12382,22 +12830,16 @@ components: type: string title: webhook_response type: object - api-key_request: + api_key_request: properties: - active: - description: Indicates if the api key is active - example: true - type: boolean description: - description: Detail of the use that will be given to the api key + description: A name or brief explanation of what this api key is used for example: online store type: string role: example: private type: string required: - - active - - description - role title: api_keys_request type: object @@ -12653,6 +13095,7 @@ components: type: array metadata: additionalProperties: true + description: Metadata associated with the order maxProperties: 100 type: object needs_shipping_contact: @@ -12663,6 +13106,11 @@ components: default: false description: Indicates whether the order charges must be preauthorized type: boolean + processing_mode: + description: "Indicates the processing mode for the order, either ecommerce,\ + \ recurrent or validation." + example: ecommerce + type: string shipping_contact: $ref: '#/components/schemas/customer_shipping_contacts' shipping_lines: @@ -12699,7 +13147,7 @@ components: maxLength: 3 type: string customer_info: - $ref: '#/components/schemas/order_request_customer_info' + $ref: '#/components/schemas/order_update_request_customer_info' discount_lines: description: "List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline)\ \ that are applied to the order. You must have at least one discount." @@ -13241,6 +13689,20 @@ components: $ref: '#/components/schemas/details_error' type: array type: object + balance_common_field: + description: balance common fields model + properties: + amount: + description: The balance's amount + example: 100 + format: int64 + type: integer + currency: + description: The balance's currency + example: MXN + type: string + title: balance_common_fiels_response + type: object payment_method_cash: allOf: - $ref: '#/components/schemas/payment_method' @@ -13398,7 +13860,7 @@ components: type: object checkout_request: description: | - [Checkout](https://developers.conekta.com/reference/checkout) details + [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details properties: allowed_payment_methods: description: Are the payment methods available for this link @@ -13627,7 +14089,7 @@ components: properties: data: items: - $ref: '#/components/schemas/api-key_response' + $ref: '#/components/schemas/api_key_response' type: array type: object get_api_keys_response: @@ -13641,14 +14103,14 @@ components: 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" + \ 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' - - $ref: '#/components/schemas/api-key_response' + - $ref: '#/components/schemas/api_key_response' title: api_key_create_response api_key_update_request: properties: @@ -13657,7 +14119,7 @@ components: example: true type: boolean description: - description: Detail of the use that will be given to the api key + description: A name or brief explanation of what this api key is used for example: online store type: string title: api_key_update_request @@ -13670,7 +14132,7 @@ components: type: object delete_api_keys_response: allOf: - - $ref: '#/components/schemas/api-key_response' + - $ref: '#/components/schemas/api_key_response_on_delete' - $ref: '#/components/schemas/delete_api_keys_response_allOf' title: delete_api_keys_response get_charges_response_allOf: @@ -13767,6 +14229,19 @@ components: - $ref: '#/components/schemas/customer_fiscal_entities_request' - $ref: '#/components/schemas/update_customer_fiscal_entities_response_allOf' 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' + title: get_order_discount_lines_response get_events_response_allOf: properties: data: @@ -14117,6 +14592,7 @@ components: charge_response_refunds_allOf: properties: data: + description: refunds items: $ref: '#/components/schemas/charge_response_refunds_data' type: array @@ -14237,14 +14713,21 @@ components: 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 WebhookLog: @@ -14902,6 +15385,13 @@ components: payment_source_id: example: src_2tLkkyfMPh6v7pFry type: string + contract_id: + description: Optional id sent to indicate the bank contract for recurrent + card charges. + example: S781317595 + maxLength: 10 + minLength: 10 + type: string required: - type type: object @@ -14935,6 +15425,11 @@ components: type: integer type: object order_request_customer_info: + description: Customer information + oneOf: + - $ref: '#/components/schemas/customer_info' + - $ref: '#/components/schemas/customer_info_just_customer_id' + order_update_request_customer_info: oneOf: - $ref: '#/components/schemas/customer_info' - $ref: '#/components/schemas/customer_info_just_customer_id' @@ -15132,6 +15627,12 @@ components: brand: example: visa type: string + contract_id: + description: Id sent for recurrent charges. + example: S781317595 + maxLength: 10 + minLength: 10 + type: string country: example: MX type: string diff --git a/docs/ApiKeyCreateResponse.md b/docs/ApiKeyCreateResponse.md index aff78d3..3df2a9d 100644 --- a/docs/ApiKeyCreateResponse.md +++ b/docs/ApiKeyCreateResponse.md @@ -7,15 +7,18 @@ | 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 | [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] | |**active** | **Boolean** | Indicates if the api key is active | [optional] | -|**createdAt** | **Long** | Unix timestamp in seconds with the creation date of the api key | [optional] | -|**description** | **String** | Detail of the use that will be given to the api key | [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] | +|**deactivatedAt** | **Long** | Unix timestamp in seconds of when the api key was deleted | [optional] | +|**description** | **String** | A name or brief explanation of what this api key is used for | [optional] | |**id** | **String** | Unique identifier of the api key | [optional] | -|**livemode** | **Boolean** | Indicates if the api key is in live mode | [optional] | -|**_object** | **String** | Object name, value is api_key | [optional] | +|**livemode** | **Boolean** | Indicates if the api key is in production | [optional] | +|**deleted** | **Boolean** | Indicates if the api key was deleted | [optional] | +|**_object** | **String** | Object name, value is 'api_key' | [optional] | |**prefix** | **String** | The first few characters of the authentication_token | [optional] | -|**role** | **String** | Indicates the user account private=owner or public=public | [optional] | +|**role** | **String** | Indicates if the api key is private or public | [optional] | diff --git a/docs/ApiKeyCreateResponseAllOf.md b/docs/ApiKeyCreateResponseAllOf.md index ce1a636..16a6723 100644 --- a/docs/ApiKeyCreateResponseAllOf.md +++ b/docs/ApiKeyCreateResponseAllOf.md @@ -7,7 +7,7 @@ | 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 | [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] | diff --git a/docs/ApiKeyRequest.md b/docs/ApiKeyRequest.md index 0296b5e..310dfe6 100644 --- a/docs/ApiKeyRequest.md +++ b/docs/ApiKeyRequest.md @@ -7,8 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**active** | **Boolean** | Indicates if the api key is active | | -|**description** | **String** | Detail of the use that will be given to the api key | | +|**description** | **String** | A name or brief explanation of what this api key is used for | [optional] | |**role** | **String** | | | diff --git a/docs/ApiKeyResponse.md b/docs/ApiKeyResponse.md index aff1b6e..9b17bb8 100644 --- a/docs/ApiKeyResponse.md +++ b/docs/ApiKeyResponse.md @@ -9,13 +9,16 @@ api keys model | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**active** | **Boolean** | Indicates if the api key is active | [optional] | -|**createdAt** | **Long** | Unix timestamp in seconds with the creation date of the api key | [optional] | -|**description** | **String** | Detail of the use that will be given to the api key | [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] | +|**deactivatedAt** | **Long** | Unix timestamp in seconds of when the api key was deleted | [optional] | +|**description** | **String** | A name or brief explanation of what this api key is used for | [optional] | |**id** | **String** | Unique identifier of the api key | [optional] | -|**livemode** | **Boolean** | Indicates if the api key is in live mode | [optional] | -|**_object** | **String** | Object name, value is api_key | [optional] | +|**livemode** | **Boolean** | Indicates if the api key is in production | [optional] | +|**deleted** | **Boolean** | Indicates if the api key was deleted | [optional] | +|**_object** | **String** | Object name, value is 'api_key' | [optional] | |**prefix** | **String** | The first few characters of the authentication_token | [optional] | -|**role** | **String** | Indicates the user account private=owner or public=public | [optional] | +|**role** | **String** | Indicates if the api key is private or public | [optional] | diff --git a/docs/ApiKeyResponseOnDelete.md b/docs/ApiKeyResponseOnDelete.md new file mode 100644 index 0000000..f77a7e0 --- /dev/null +++ b/docs/ApiKeyResponseOnDelete.md @@ -0,0 +1,22 @@ + + +# ApiKeyResponseOnDelete + +api keys model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**active** | **Boolean** | Indicates if the api key is active | [optional] | +|**createdAt** | **Long** | Unix timestamp in seconds of when the api key was created | [optional] | +|**description** | **String** | A name or brief explanation of what this api key is used for | [optional] | +|**livemode** | **Boolean** | Indicates if the api key is in production | [optional] | +|**prefix** | **String** | The first few characters of the authentication_token | [optional] | +|**id** | **String** | Unique identifier of the api key | [optional] | +|**_object** | **String** | Object name, value is 'api_key' | [optional] | +|**deleted** | **Boolean** | Indicates if the api key was deleted | [optional] | +|**role** | **String** | Indicates if the api key is private or public | [optional] | + + + diff --git a/docs/ApiKeyUpdateRequest.md b/docs/ApiKeyUpdateRequest.md index 4769c71..6e5dda0 100644 --- a/docs/ApiKeyUpdateRequest.md +++ b/docs/ApiKeyUpdateRequest.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**active** | **Boolean** | Indicates if the webhook key is active | [optional] | -|**description** | **String** | Detail of the use that will be given to the api key | [optional] | +|**description** | **String** | A name or brief explanation of what this api key is used for | [optional] | diff --git a/docs/ApiKeysApi.md b/docs/ApiKeysApi.md index b6e480c..f38c040 100644 --- a/docs/ApiKeysApi.md +++ b/docs/ApiKeysApi.md @@ -243,7 +243,7 @@ public class Example { ## getApiKeys -> GetApiKeysResponse getApiKeys(acceptLanguage, xChildCompanyId, limit, search, next, previous) +> GetApiKeysResponse getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search) Get list of Api Keys @@ -273,11 +273,11 @@ public class Example { String acceptLanguage = "es"; // String | Use for knowing which language to use String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request. Integer limit = 20; // Integer | The numbers of items to return, the maximum value is 250 - String search = "search_example"; // String | General order search, e.g. by mail, reference etc. String next = "next_example"; // String | next page String previous = "previous_example"; // String | previous page + String search = "search_example"; // String | General search, e.g. by id, description, prefix try { - GetApiKeysResponse result = apiInstance.getApiKeys(acceptLanguage, xChildCompanyId, limit, search, next, previous); + GetApiKeysResponse result = apiInstance.getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApiKeysApi#getApiKeys"); @@ -298,9 +298,9 @@ public class Example { | **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | | **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] | | **limit** | **Integer**| 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] | +| **search** | **String**| General search, e.g. by id, description, prefix | [optional] | ### Return type diff --git a/docs/BalanceCommonField.md b/docs/BalanceCommonField.md new file mode 100644 index 0000000..225079d --- /dev/null +++ b/docs/BalanceCommonField.md @@ -0,0 +1,15 @@ + + +# BalanceCommonField + +balance common fields model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**amount** | **Long** | The balance's amount | [optional] | +|**currency** | **String** | The balance's currency | [optional] | + + + diff --git a/docs/BalanceResponse.md b/docs/BalanceResponse.md new file mode 100644 index 0000000..4f05b68 --- /dev/null +++ b/docs/BalanceResponse.md @@ -0,0 +1,23 @@ + + +# BalanceResponse + +balance model + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**available** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's available | [optional] | +|**cashoutRetentionAmount** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's cashout retention amount | [optional] | +|**conektaRetention** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's conekta retention | [optional] | +|**gateway** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's gateway | [optional] | +|**pending** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's pending | [optional] | +|**retained** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's retained | [optional] | +|**retentionAmount** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's retention amount | [optional] | +|**targetCollateralAmount** | **Object** | The balance's target collateral amount | [optional] | +|**targetRetentionAmount** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's target retention amount | [optional] | +|**temporarilyRetained** | [**List<BalanceCommonField>**](BalanceCommonField.md) | The balance's temporarily retained | [optional] | + + + diff --git a/docs/BalancesApi.md b/docs/BalancesApi.md new file mode 100644 index 0000000..7e49ac3 --- /dev/null +++ b/docs/BalancesApi.md @@ -0,0 +1,81 @@ +# BalancesApi + +All URIs are relative to *https://api.conekta.io* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**getBalance**](BalancesApi.md#getBalance) | **GET** /balances | Get a company's balance | + + + +## getBalance + +> BalanceResponse getBalance(acceptLanguage) + +Get a company's balance + +Get a company's balance + +### Example + +```java +// Import classes: +import com.conekta.ApiClient; +import com.conekta.ApiException; +import com.conekta.Configuration; +import com.conekta.auth.*; +import com.conekta.model.*; +import com.conekta.BalancesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.conekta.io"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + BalancesApi apiInstance = new BalancesApi(defaultClient); + String acceptLanguage = "es"; // String | Use for knowing which language to use + try { + BalanceResponse result = apiInstance.getBalance(acceptLanguage); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BalancesApi#getBalance"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | + +### Return type + +[**BalanceResponse**](BalanceResponse.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 | * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
| +| **401** | authentication error | - | +| **500** | internal server error | - | + diff --git a/docs/ChargeDataPaymentMethodCardResponse.md b/docs/ChargeDataPaymentMethodCardResponse.md index c699895..090a122 100644 --- a/docs/ChargeDataPaymentMethodCardResponse.md +++ b/docs/ChargeDataPaymentMethodCardResponse.md @@ -11,6 +11,7 @@ use for card responses |**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] | diff --git a/docs/ChargeRequestPaymentMethod.md b/docs/ChargeRequestPaymentMethod.md index 7933910..69c9964 100644 --- a/docs/ChargeRequestPaymentMethod.md +++ b/docs/ChargeRequestPaymentMethod.md @@ -12,6 +12,7 @@ Payment method used in the charge. Go to the [payment methods](https://developer |**type** | **String** | | | |**tokenId** | **String** | | [optional] | |**paymentSourceId** | **String** | | [optional] | +|**contractId** | **String** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] | diff --git a/docs/ChargeResponseRefunds.md b/docs/ChargeResponseRefunds.md index 2e415d0..7af6883 100644 --- a/docs/ChargeResponseRefunds.md +++ b/docs/ChargeResponseRefunds.md @@ -11,7 +11,7 @@ |**_object** | **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<ChargeResponseRefundsData>**](ChargeResponseRefundsData.md) | | [optional] | +|**data** | [**List<ChargeResponseRefundsData>**](ChargeResponseRefundsData.md) | refunds | [optional] | diff --git a/docs/ChargeResponseRefundsAllOf.md b/docs/ChargeResponseRefundsAllOf.md index 8b9508d..bfd7a4b 100644 --- a/docs/ChargeResponseRefundsAllOf.md +++ b/docs/ChargeResponseRefundsAllOf.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**data** | [**List<ChargeResponseRefundsData>**](ChargeResponseRefundsData.md) | | [optional] | +|**data** | [**List<ChargeResponseRefundsData>**](ChargeResponseRefundsData.md) | refunds | [optional] | diff --git a/docs/CheckoutRequest.md b/docs/CheckoutRequest.md index 4cc5d65..926276e 100644 --- a/docs/CheckoutRequest.md +++ b/docs/CheckoutRequest.md @@ -2,7 +2,7 @@ # CheckoutRequest -[Checkout](https://developers.conekta.com/reference/checkout) details +[Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details ## Properties diff --git a/docs/DeleteApiKeysResponse.md b/docs/DeleteApiKeysResponse.md index 10d317d..7e53263 100644 --- a/docs/DeleteApiKeysResponse.md +++ b/docs/DeleteApiKeysResponse.md @@ -8,14 +8,14 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**active** | **Boolean** | Indicates if the api key is active | [optional] | -|**createdAt** | **Long** | Unix timestamp in seconds with the creation date of the api key | [optional] | -|**description** | **String** | Detail of the use that will be given to the api key | [optional] | -|**id** | **String** | Unique identifier of the api key | [optional] | -|**livemode** | **Boolean** | Indicates if the api key is in live mode | [optional] | -|**_object** | **String** | Object name, value is api_key | [optional] | +|**createdAt** | **Long** | Unix timestamp in seconds of when the api key was created | [optional] | +|**description** | **String** | A name or brief explanation of what this api key is used for | [optional] | +|**livemode** | **Boolean** | Indicates if the api key is in production | [optional] | |**prefix** | **String** | The first few characters of the authentication_token | [optional] | -|**role** | **String** | Indicates the user account private=owner or public=public | [optional] | +|**id** | **String** | Unique identifier of the api key | [optional] | +|**_object** | **String** | Object name, value is 'api_key' | [optional] | |**deleted** | **Boolean** | | [optional] | +|**role** | **String** | Indicates if the api key is private or public | [optional] | diff --git a/docs/DiscountLinesDataResponse.md b/docs/DiscountLinesDataResponse.md index d019afd..f7beff5 100644 --- a/docs/DiscountLinesDataResponse.md +++ b/docs/DiscountLinesDataResponse.md @@ -10,9 +10,9 @@ |**amount** | **Long** | The amount to be deducted from the total sum of all payments, in cents. | | |**code** | **String** | Discount code. | | |**type** | **String** | It can be 'loyalty', 'campaign', 'coupon' o 'sign' | | -|**id** | **String** | | [optional] | -|**_object** | **String** | | [optional] | -|**parentId** | **String** | | [optional] | +|**id** | **String** | The discount line id | | +|**_object** | **String** | The object name | | +|**parentId** | **String** | The order id | | diff --git a/docs/DiscountLinesResponse.md b/docs/DiscountLinesResponse.md index dd6eb0e..bd9e49b 100644 --- a/docs/DiscountLinesResponse.md +++ b/docs/DiscountLinesResponse.md @@ -10,9 +10,9 @@ |**amount** | **Long** | The amount to be deducted from the total sum of all payments, in cents. | | |**code** | **String** | Discount code. | | |**type** | **String** | It can be 'loyalty', 'campaign', 'coupon' o 'sign' | | -|**id** | **String** | | [optional] | -|**_object** | **String** | | [optional] | -|**parentId** | **String** | | [optional] | +|**id** | **String** | The discount line id | | +|**_object** | **String** | The object name | | +|**parentId** | **String** | The order id | | diff --git a/docs/DiscountLinesResponseAllOf.md b/docs/DiscountLinesResponseAllOf.md index d6d16ef..f011294 100644 --- a/docs/DiscountLinesResponseAllOf.md +++ b/docs/DiscountLinesResponseAllOf.md @@ -7,9 +7,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**_object** | **String** | | [optional] | -|**parentId** | **String** | | [optional] | +|**id** | **String** | The discount line id | | +|**_object** | **String** | The object name | | +|**parentId** | **String** | The order id | | diff --git a/docs/DiscountsApi.md b/docs/DiscountsApi.md index 6e2ea14..7a831a6 100644 --- a/docs/DiscountsApi.md +++ b/docs/DiscountsApi.md @@ -6,6 +6,8 @@ All URIs are relative to *https://api.conekta.io* |------------- | ------------- | -------------| | [**ordersCreateDiscountLine**](DiscountsApi.md#ordersCreateDiscountLine) | **POST** /orders/{id}/discount_lines | Create Discount | | [**ordersDeleteDiscountLines**](DiscountsApi.md#ordersDeleteDiscountLines) | **DELETE** /orders/{id}/discount_lines/{discount_lines_id} | Delete Discount | +| [**ordersGetDiscountLine**](DiscountsApi.md#ordersGetDiscountLine) | **GET** /orders/{id}/discount_lines/{discount_lines_id} | Get Discount | +| [**ordersGetDiscountLines**](DiscountsApi.md#ordersGetDiscountLines) | **GET** /orders/{id}/discount_lines | Get a List of Discount | | [**ordersUpdateDiscountLines**](DiscountsApi.md#ordersUpdateDiscountLines) | **PUT** /orders/{id}/discount_lines/{discount_lines_id} | Update Discount | @@ -119,7 +121,7 @@ public class Example { DiscountsApi apiInstance = new DiscountsApi(defaultClient); String id = "6307a60c41de27127515a575"; // String | Identifier of the resource - String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | identifier + String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | discount line id identifier String acceptLanguage = "es"; // String | Use for knowing which language to use String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request. try { @@ -142,7 +144,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **id** | **String**| Identifier of the resource | | -| **discountLinesId** | **String**| identifier | | +| **discountLinesId** | **String**| discount line id identifier | | | **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | | **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] | @@ -169,6 +171,170 @@ public class Example { | **500** | internal server error | - | +## ordersGetDiscountLine + +> DiscountLinesResponse ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId) + +Get Discount + +Get an existing discount lines for an existing orden + +### Example + +```java +// Import classes: +import com.conekta.ApiClient; +import com.conekta.ApiException; +import com.conekta.Configuration; +import com.conekta.auth.*; +import com.conekta.model.*; +import com.conekta.DiscountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.conekta.io"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DiscountsApi apiInstance = new DiscountsApi(defaultClient); + String id = "6307a60c41de27127515a575"; // String | Identifier of the resource + String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | discount line id identifier + String acceptLanguage = "es"; // String | Use for knowing which language to use + String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request. + try { + DiscountLinesResponse result = apiInstance.ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DiscountsApi#ordersGetDiscountLine"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| Identifier of the resource | | +| **discountLinesId** | **String**| discount line id identifier | | +| **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | +| **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] | + +### Return type + +[**DiscountLinesResponse**](DiscountLinesResponse.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 | - | +| **401** | authentication error | - | +| **404** | not found entity | - | +| **422** | parameter validation error | - | +| **500** | internal server error | - | + + +## ordersGetDiscountLines + +> GetOrderDiscountLinesResponse ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous) + +Get a List of Discount + +Get discount lines for an existing orden + +### Example + +```java +// Import classes: +import com.conekta.ApiClient; +import com.conekta.ApiException; +import com.conekta.Configuration; +import com.conekta.auth.*; +import com.conekta.model.*; +import com.conekta.DiscountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.conekta.io"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DiscountsApi apiInstance = new DiscountsApi(defaultClient); + String id = "6307a60c41de27127515a575"; // String | Identifier of the resource + String acceptLanguage = "es"; // String | Use for knowing which language to use + String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request. + Integer limit = 20; // Integer | The numbers of items to return, the maximum value is 250 + String search = "search_example"; // String | General order search, e.g. by mail, reference etc. + String next = "next_example"; // String | next page + String previous = "previous_example"; // String | previous page + try { + GetOrderDiscountLinesResponse result = apiInstance.ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DiscountsApi#ordersGetDiscountLines"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **String**| Identifier of the resource | | +| **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | +| **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] | +| **limit** | **Integer**| 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 + +[**GetOrderDiscountLinesResponse**](GetOrderDiscountLinesResponse.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 | - | +| **401** | authentication error | - | +| **500** | internal server error | - | + + ## ordersUpdateDiscountLines > DiscountLinesResponse ordersUpdateDiscountLines(id, discountLinesId, updateOrderDiscountLinesRequest, acceptLanguage, xChildCompanyId) @@ -199,7 +365,7 @@ public class Example { DiscountsApi apiInstance = new DiscountsApi(defaultClient); String id = "6307a60c41de27127515a575"; // String | Identifier of the resource - String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | identifier + String discountLinesId = "dis_lin_2tQ974hSHcsdeSZHG"; // String | discount line id identifier UpdateOrderDiscountLinesRequest updateOrderDiscountLinesRequest = new UpdateOrderDiscountLinesRequest(); // UpdateOrderDiscountLinesRequest | requested field for a discount lines String acceptLanguage = "es"; // String | Use for knowing which language to use String xChildCompanyId = "6441b6376b60c3a638da80af"; // String | In the case of a holding company, the company id of the child company to which will process the request. @@ -223,7 +389,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **id** | **String**| Identifier of the resource | | -| **discountLinesId** | **String**| identifier | | +| **discountLinesId** | **String**| discount line id identifier | | | **updateOrderDiscountLinesRequest** | [**UpdateOrderDiscountLinesRequest**](UpdateOrderDiscountLinesRequest.md)| requested field for a discount lines | | | **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to es] [enum: es, en] | | **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] | diff --git a/docs/GetOrderDiscountLinesResponse.md b/docs/GetOrderDiscountLinesResponse.md new file mode 100644 index 0000000..7e4d74f --- /dev/null +++ b/docs/GetOrderDiscountLinesResponse.md @@ -0,0 +1,17 @@ + + +# GetOrderDiscountLinesResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**hasMore** | **Boolean** | Indicates if there are more pages to be requested | | +|**_object** | **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<DiscountLinesResponse>**](DiscountLinesResponse.md) | | [optional] | + + + diff --git a/docs/GetOrderDiscountLinesResponseAllOf.md b/docs/GetOrderDiscountLinesResponseAllOf.md new file mode 100644 index 0000000..967ab89 --- /dev/null +++ b/docs/GetOrderDiscountLinesResponseAllOf.md @@ -0,0 +1,13 @@ + + +# GetOrderDiscountLinesResponseAllOf + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**data** | [**List<DiscountLinesResponse>**](DiscountLinesResponse.md) | | [optional] | + + + diff --git a/docs/OrderRequest.md b/docs/OrderRequest.md index 2baf7e5..a031682 100644 --- a/docs/OrderRequest.md +++ b/docs/OrderRequest.md @@ -14,9 +14,10 @@ a order |**customerInfo** | [**OrderRequestCustomerInfo**](OrderRequestCustomerInfo.md) | | | |**discountLines** | [**List<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] | |**lineItems** | [**List<Product>**](Product.md) | List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | | -|**metadata** | **Map<String, Object>** | | [optional] | +|**metadata** | **Map<String, Object>** | Metadata associated with the order | [optional] | |**needsShippingContact** | **Boolean** | Allows you to fill out the shipping information at checkout | [optional] | |**preAuthorize** | **Boolean** | Indicates whether the order charges must be preauthorized | [optional] | +|**processingMode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] | |**shippingContact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] | |**shippingLines** | [**List<ShippingRequest>**](ShippingRequest.md) | List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. | [optional] | |**taxLines** | [**List<OrderTaxRequest>**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] | diff --git a/docs/OrderRequestCustomerInfo.md b/docs/OrderRequestCustomerInfo.md index 51ad02f..1546207 100644 --- a/docs/OrderRequestCustomerInfo.md +++ b/docs/OrderRequestCustomerInfo.md @@ -2,6 +2,8 @@ # OrderRequestCustomerInfo +Customer information + ## oneOf schemas * [CustomerInfo](CustomerInfo.md) * [CustomerInfoJustCustomerId](CustomerInfoJustCustomerId.md) diff --git a/docs/OrderResponse.md b/docs/OrderResponse.md index b7c9949..aef328f 100644 --- a/docs/OrderResponse.md +++ b/docs/OrderResponse.md @@ -25,6 +25,7 @@ order response |**metadata** | **Map<String, Object>** | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. | [optional] | |**_object** | **String** | String representing the object’s type. Objects of the same type share the same value. | [optional] | |**paymentStatus** | **String** | The payment status of the order. | [optional] | +|**processingMode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] | |**shippingContact** | [**OrderResponseShippingContact**](OrderResponseShippingContact.md) | | [optional] | |**updatedAt** | **Long** | The time at which the object was last updated in seconds since the Unix epoch | [optional] | diff --git a/docs/OrderUpdateRequest.md b/docs/OrderUpdateRequest.md index 6b42e1a..9907e2b 100644 --- a/docs/OrderUpdateRequest.md +++ b/docs/OrderUpdateRequest.md @@ -11,7 +11,7 @@ a order |**charges** | [**List<ChargeRequest>**](ChargeRequest.md) | | [optional] | |**checkout** | [**CheckoutRequest**](CheckoutRequest.md) | | [optional] | |**currency** | **String** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | [optional] | -|**customerInfo** | [**OrderRequestCustomerInfo**](OrderRequestCustomerInfo.md) | | [optional] | +|**customerInfo** | [**OrderUpdateRequestCustomerInfo**](OrderUpdateRequestCustomerInfo.md) | | [optional] | |**discountLines** | [**List<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] | |**lineItems** | [**List<Product>**](Product.md) | List of [products](https://developers.conekta.com/v2.1.0/reference/orderscreateproduct) that are sold in the order. You must have at least one product. | [optional] | |**metadata** | **Map<String, String>** | | [optional] | diff --git a/docs/OrderUpdateRequestCustomerInfo.md b/docs/OrderUpdateRequestCustomerInfo.md new file mode 100644 index 0000000..dd661c8 --- /dev/null +++ b/docs/OrderUpdateRequestCustomerInfo.md @@ -0,0 +1,37 @@ + + +# OrderUpdateRequestCustomerInfo + +## oneOf schemas +* [CustomerInfo](CustomerInfo.md) +* [CustomerInfoJustCustomerId](CustomerInfoJustCustomerId.md) + +## Example +```java +// Import classes: +import com.conekta.model.OrderUpdateRequestCustomerInfo; +import com.conekta.model.CustomerInfo; +import com.conekta.model.CustomerInfoJustCustomerId; + +public class Example { + public static void main(String[] args) { + OrderUpdateRequestCustomerInfo exampleOrderUpdateRequestCustomerInfo = new OrderUpdateRequestCustomerInfo(); + + // create a new CustomerInfo + CustomerInfo exampleCustomerInfo = new CustomerInfo(); + // set OrderUpdateRequestCustomerInfo to CustomerInfo + exampleOrderUpdateRequestCustomerInfo.setActualInstance(exampleCustomerInfo); + // to get back the CustomerInfo set earlier + CustomerInfo testCustomerInfo = (CustomerInfo) exampleOrderUpdateRequestCustomerInfo.getActualInstance(); + + // create a new CustomerInfoJustCustomerId + CustomerInfoJustCustomerId exampleCustomerInfoJustCustomerId = new CustomerInfoJustCustomerId(); + // set OrderUpdateRequestCustomerInfo to CustomerInfoJustCustomerId + exampleOrderUpdateRequestCustomerInfo.setActualInstance(exampleCustomerInfoJustCustomerId); + // to get back the CustomerInfoJustCustomerId set earlier + CustomerInfoJustCustomerId testCustomerInfoJustCustomerId = (CustomerInfoJustCustomerId) exampleOrderUpdateRequestCustomerInfo.getActualInstance(); + } +} +``` + + diff --git a/docs/PaymentMethodCard.md b/docs/PaymentMethodCard.md index e206f02..fb8f86b 100644 --- a/docs/PaymentMethodCard.md +++ b/docs/PaymentMethodCard.md @@ -12,6 +12,7 @@ |**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] | diff --git a/docs/ShippingsApi.md b/docs/ShippingsApi.md index 0c1dd43..f6a5733 100644 --- a/docs/ShippingsApi.md +++ b/docs/ShippingsApi.md @@ -166,6 +166,7 @@ public class Example { | **401** | authentication error | - | | **404** | not found entity | - | | **422** | parameter validation error | - | +| **428** | Precondition Required | - | | **500** | internal server error | - | diff --git a/pom.xml b/pom.xml index bd661f8..56c4c17 100644 --- a/pom.xml +++ b/pom.xml @@ -12,8 +12,10 @@ scm:git:git@github.com:conekta/ct-conekta-java.git scm:git:git@github.com:conekta/ct-conekta-java.git https://github.com/conekta/ct-conekta-java/tree/main + HEAD + MIT License @@ -32,11 +34,6 @@ - - ossrh - Central Repository OSSRH - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - ossrh https://oss.sonatype.org/content/repositories/snapshots @@ -45,58 +42,6 @@ - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.0.0-M5 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - false - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - org.apache.maven.plugins maven-jar-plugin @@ -158,6 +103,53 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.0 + + + attach-sources + + jar-no-fork + + + + org.apache.maven.plugins maven-javadoc-plugin @@ -184,21 +176,50 @@ org.apache.maven.plugins - maven-source-plugin - 3.2.0 + maven-gpg-plugin + 3.0.1 - attach-sources + sign-artifacts + verify - jar-no-fork + sign + + 0x5F8EB601 + + - + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + false + + com.diffplug.spotless spotless-maven-plugin @@ -238,30 +259,6 @@ - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - - - - org.json diff --git a/src/main/java/com/conekta/ApiClient.java b/src/main/java/com/conekta/ApiClient.java index 466359a..96e5b17 100644 --- a/src/main/java/com/conekta/ApiClient.java +++ b/src/main/java/com/conekta/ApiClient.java @@ -81,7 +81,7 @@ public class ApiClient extends JavaTimeFormatter { protected String userAgent; private static final Logger log = Logger.getLogger(ApiClient.class.getName()); - JSONObject conektaUserAgent = getConektaUserAgent(); + JSONObject conektaUserAgent = getConektaUserAgent(); private JSONObject getConektaUserAgent() { JSONObject userAgent = new JSONObject(); diff --git a/src/main/java/com/conekta/ApiKeysApi.java b/src/main/java/com/conekta/ApiKeysApi.java index e1da493..01e7beb 100644 --- a/src/main/java/com/conekta/ApiKeysApi.java +++ b/src/main/java/com/conekta/ApiKeysApi.java @@ -244,9 +244,9 @@ public ApiResponse getApiKeyWithHttpInfo(String id, String accep * @param acceptLanguage Use for knowing which language to use (optional, default to es) * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) * @param limit The numbers of items to return, the maximum value is 250 (optional, default to 20) - * @param search General order search, e.g. by mail, reference etc. (optional) * @param next next page (optional) * @param previous previous page (optional) + * @param search General search, e.g. by id, description, prefix (optional) * @return GetApiKeysResponse * @throws ApiException if fails to make API call * @http.response.details @@ -257,8 +257,8 @@ public ApiResponse getApiKeyWithHttpInfo(String id, String accep 500 internal server error - */ - public GetApiKeysResponse getApiKeys(String acceptLanguage, String xChildCompanyId, Integer limit, String search, String next, String previous) throws ApiException { - return getApiKeysWithHttpInfo(acceptLanguage, xChildCompanyId, limit, search, next, previous).getData(); + public GetApiKeysResponse getApiKeys(String acceptLanguage, String xChildCompanyId, Integer limit, String next, String previous, String search) throws ApiException { + return getApiKeysWithHttpInfo(acceptLanguage, xChildCompanyId, limit, next, previous, search).getData(); } /** @@ -267,9 +267,9 @@ public GetApiKeysResponse getApiKeys(String acceptLanguage, String xChildCompany * @param acceptLanguage Use for knowing which language to use (optional, default to es) * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) * @param limit The numbers of items to return, the maximum value is 250 (optional, default to 20) - * @param search General order search, e.g. by mail, reference etc. (optional) * @param next next page (optional) * @param previous previous page (optional) + * @param search General search, e.g. by id, description, prefix (optional) * @return ApiResponse<GetApiKeysResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -280,14 +280,14 @@ public GetApiKeysResponse getApiKeys(String acceptLanguage, String xChildCompany 500 internal server error - */ - public ApiResponse getApiKeysWithHttpInfo(String acceptLanguage, String xChildCompanyId, Integer limit, String search, String next, String previous) throws ApiException { + public ApiResponse getApiKeysWithHttpInfo(String acceptLanguage, String xChildCompanyId, Integer limit, String next, String previous, String search) throws ApiException { // Query parameters List localVarQueryParams = new ArrayList<>( apiClient.parameterToPairs("", "limit", limit) ); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "next", next)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "previous", previous)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); // Header parameters Map localVarHeaderParams = new LinkedHashMap<>(); diff --git a/src/main/java/com/conekta/BalancesApi.java b/src/main/java/com/conekta/BalancesApi.java new file mode 100644 index 0000000..ec42ed5 --- /dev/null +++ b/src/main/java/com/conekta/BalancesApi.java @@ -0,0 +1,97 @@ +package com.conekta; + +import com.conekta.ApiException; +import com.conekta.ApiClient; +import com.conekta.ApiResponse; +import com.conekta.Configuration; +import com.conekta.Pair; + +import jakarta.ws.rs.core.GenericType; + +import com.conekta.model.BalanceResponse; +import com.conekta.model.Error; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalancesApi { + private ApiClient apiClient; + + public BalancesApi() { + this(Configuration.getDefaultApiClient()); + } + + public BalancesApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get the API client + * + * @return API client + */ + public ApiClient getApiClient() { + return apiClient; + } + + /** + * Set the API client + * + * @param apiClient an instance of API client + */ + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Get a company's balance + * Get a company's balance + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @return BalanceResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
401 authentication error -
500 internal server error -
+ */ + public BalanceResponse getBalance(String acceptLanguage) throws ApiException { + return getBalanceWithHttpInfo(acceptLanguage).getData(); + } + + /** + * Get a company's balance + * Get a company's balance + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @return ApiResponse<BalanceResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful * Date - The date and time that the response was sent
* Content-Type - The format of the response body
* Content-Length - The length of the response body in bytes
* Connection - The type of connection used to transfer the response
* Conekta-Media-Type -
401 authentication error -
500 internal server error -
+ */ + public ApiResponse getBalanceWithHttpInfo(String acceptLanguage) throws ApiException { + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage)); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"bearerAuth"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("BalancesApi.getBalance", "/balances", "GET", new ArrayList<>(), null, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } +} diff --git a/src/main/java/com/conekta/DiscountsApi.java b/src/main/java/com/conekta/DiscountsApi.java index 2f56979..bef926a 100644 --- a/src/main/java/com/conekta/DiscountsApi.java +++ b/src/main/java/com/conekta/DiscountsApi.java @@ -10,6 +10,7 @@ import com.conekta.model.DiscountLinesResponse; import com.conekta.model.Error; +import com.conekta.model.GetOrderDiscountLinesResponse; import com.conekta.model.OrderDiscountLinesRequest; import com.conekta.model.UpdateOrderDiscountLinesRequest; @@ -123,7 +124,7 @@ public ApiResponse ordersCreateDiscountLineWithHttpInfo(S * Delete Discount * Delete an existing discount lines for an existing orden * @param id Identifier of the resource (required) - * @param discountLinesId identifier (required) + * @param discountLinesId discount line id identifier (required) * @param acceptLanguage Use for knowing which language to use (optional, default to es) * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) * @return DiscountLinesResponse @@ -146,7 +147,7 @@ public DiscountLinesResponse ordersDeleteDiscountLines(String id, String discoun * Delete Discount * Delete an existing discount lines for an existing orden * @param id Identifier of the resource (required) - * @param discountLinesId identifier (required) + * @param discountLinesId discount line id identifier (required) * @param acceptLanguage Use for knowing which language to use (optional, default to es) * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) * @return ApiResponse<DiscountLinesResponse> @@ -192,11 +193,163 @@ public ApiResponse ordersDeleteDiscountLinesWithHttpInfo( localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType, false); } + /** + * Get Discount + * Get an existing discount lines for an existing orden + * @param id Identifier of the resource (required) + * @param discountLinesId discount line id identifier (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) + * @return DiscountLinesResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 successful -
401 authentication error -
404 not found entity -
422 parameter validation error -
500 internal server error -
+ */ + public DiscountLinesResponse ordersGetDiscountLine(String id, String discountLinesId, String acceptLanguage, String xChildCompanyId) throws ApiException { + return ordersGetDiscountLineWithHttpInfo(id, discountLinesId, acceptLanguage, xChildCompanyId).getData(); + } + + /** + * Get Discount + * Get an existing discount lines for an existing orden + * @param id Identifier of the resource (required) + * @param discountLinesId discount line id identifier (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) + * @return ApiResponse<DiscountLinesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 successful -
401 authentication error -
404 not found entity -
422 parameter validation error -
500 internal server error -
+ */ + public ApiResponse ordersGetDiscountLineWithHttpInfo(String id, String discountLinesId, String acceptLanguage, String xChildCompanyId) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling ordersGetDiscountLine"); + } + if (discountLinesId == null) { + throw new ApiException(400, "Missing the required parameter 'discountLinesId' when calling ordersGetDiscountLine"); + } + + // Path parameters + String localVarPath = "/orders/{id}/discount_lines/{discount_lines_id}" + .replaceAll("\\{id}", apiClient.escapeString(id)) + .replaceAll("\\{discount_lines_id}", apiClient.escapeString(discountLinesId)); + + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage)); + } + if (xChildCompanyId != null) { + localVarHeaderParams.put("X-Child-Company-Id", apiClient.parameterToString(xChildCompanyId)); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"bearerAuth"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("DiscountsApi.ordersGetDiscountLine", localVarPath, "GET", new ArrayList<>(), null, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + /** + * Get a List of Discount + * Get discount lines for an existing orden + * @param id Identifier of the resource (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) + * @param limit The numbers of items to return, the maximum value is 250 (optional, default to 20) + * @param search General order search, e.g. by mail, reference etc. (optional) + * @param next next page (optional) + * @param previous previous page (optional) + * @return GetOrderDiscountLinesResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful -
401 authentication error -
500 internal server error -
+ */ + public GetOrderDiscountLinesResponse ordersGetDiscountLines(String id, String acceptLanguage, String xChildCompanyId, Integer limit, String search, String next, String previous) throws ApiException { + return ordersGetDiscountLinesWithHttpInfo(id, acceptLanguage, xChildCompanyId, limit, search, next, previous).getData(); + } + + /** + * Get a List of Discount + * Get discount lines for an existing orden + * @param id Identifier of the resource (required) + * @param acceptLanguage Use for knowing which language to use (optional, default to es) + * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) + * @param limit The numbers of items to return, the maximum value is 250 (optional, default to 20) + * @param search General order search, e.g. by mail, reference etc. (optional) + * @param next next page (optional) + * @param previous previous page (optional) + * @return ApiResponse<GetOrderDiscountLinesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 successful -
401 authentication error -
500 internal server error -
+ */ + public ApiResponse ordersGetDiscountLinesWithHttpInfo(String id, String acceptLanguage, String xChildCompanyId, Integer limit, String search, String next, String previous) throws ApiException { + // Check required parameters + if (id == null) { + throw new ApiException(400, "Missing the required parameter 'id' when calling ordersGetDiscountLines"); + } + + // Path parameters + String localVarPath = "/orders/{id}/discount_lines" + .replaceAll("\\{id}", apiClient.escapeString(id)); + + // Query parameters + List localVarQueryParams = new ArrayList<>( + apiClient.parameterToPairs("", "limit", limit) + ); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "search", search)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "next", next)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "previous", previous)); + + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + if (acceptLanguage != null) { + localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage)); + } + if (xChildCompanyId != null) { + localVarHeaderParams.put("X-Child-Company-Id", apiClient.parameterToString(xChildCompanyId)); + } + + String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json"); + String localVarContentType = apiClient.selectHeaderContentType(); + String[] localVarAuthNames = new String[] {"bearerAuth"}; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI("DiscountsApi.ordersGetDiscountLines", localVarPath, "GET", localVarQueryParams, null, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } /** * Update Discount * Update an existing discount lines for an existing orden * @param id Identifier of the resource (required) - * @param discountLinesId identifier (required) + * @param discountLinesId discount line id identifier (required) * @param updateOrderDiscountLinesRequest requested field for a discount lines (required) * @param acceptLanguage Use for knowing which language to use (optional, default to es) * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) @@ -220,7 +373,7 @@ public DiscountLinesResponse ordersUpdateDiscountLines(String id, String discoun * Update Discount * Update an existing discount lines for an existing orden * @param id Identifier of the resource (required) - * @param discountLinesId identifier (required) + * @param discountLinesId discount line id identifier (required) * @param updateOrderDiscountLinesRequest requested field for a discount lines (required) * @param acceptLanguage Use for knowing which language to use (optional, default to es) * @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional) diff --git a/src/main/java/com/conekta/ShippingsApi.java b/src/main/java/com/conekta/ShippingsApi.java index e73a095..8c1d20e 100644 --- a/src/main/java/com/conekta/ShippingsApi.java +++ b/src/main/java/com/conekta/ShippingsApi.java @@ -134,6 +134,7 @@ public ApiResponse ordersCreateShippingWithHttpInfo(Strin 401 authentication error - 404 not found entity - 422 parameter validation error - + 428 Precondition Required - 500 internal server error - */ @@ -157,6 +158,7 @@ public ShippingOrderResponse ordersDeleteShipping(String id, String shippingId, 401 authentication error - 404 not found entity - 422 parameter validation error - + 428 Precondition Required - 500 internal server error - */ diff --git a/src/main/java/com/conekta/model/ApiKeyCreateResponse.java b/src/main/java/com/conekta/model/ApiKeyCreateResponse.java index 44704dc..492bcb2 100644 --- a/src/main/java/com/conekta/model/ApiKeyCreateResponse.java +++ b/src/main/java/com/conekta/model/ApiKeyCreateResponse.java @@ -33,9 +33,12 @@ ApiKeyCreateResponse.JSON_PROPERTY_AUTHENTICATION_TOKEN, ApiKeyCreateResponse.JSON_PROPERTY_ACTIVE, ApiKeyCreateResponse.JSON_PROPERTY_CREATED_AT, + ApiKeyCreateResponse.JSON_PROPERTY_UPDATED_AT, + ApiKeyCreateResponse.JSON_PROPERTY_DEACTIVATED_AT, ApiKeyCreateResponse.JSON_PROPERTY_DESCRIPTION, ApiKeyCreateResponse.JSON_PROPERTY_ID, ApiKeyCreateResponse.JSON_PROPERTY_LIVEMODE, + ApiKeyCreateResponse.JSON_PROPERTY_DELETED, ApiKeyCreateResponse.JSON_PROPERTY_OBJECT, ApiKeyCreateResponse.JSON_PROPERTY_PREFIX, ApiKeyCreateResponse.JSON_PROPERTY_ROLE @@ -52,6 +55,12 @@ public class ApiKeyCreateResponse { public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private Long createdAt; + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private Long updatedAt; + + public static final String JSON_PROPERTY_DEACTIVATED_AT = "deactivated_at"; + private Long deactivatedAt; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -61,6 +70,9 @@ public class ApiKeyCreateResponse { public static final String JSON_PROPERTY_LIVEMODE = "livemode"; private Boolean livemode; + public static final String JSON_PROPERTY_DELETED = "deleted"; + private Boolean deleted; + public static final String JSON_PROPERTY_OBJECT = "object"; private String _object; @@ -79,7 +91,7 @@ public ApiKeyCreateResponse authenticationToken(String 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 + * 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. * @return authenticationToken **/ @jakarta.annotation.Nullable @@ -129,7 +141,7 @@ public ApiKeyCreateResponse createdAt(Long createdAt) { } /** - * Unix timestamp in seconds with the creation date of the api key + * Unix timestamp in seconds of when the api key was created * @return createdAt **/ @jakarta.annotation.Nullable @@ -148,13 +160,63 @@ public void setCreatedAt(Long createdAt) { } + public ApiKeyCreateResponse updatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Unix timestamp in seconds of when the api key was last updated + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + + public ApiKeyCreateResponse deactivatedAt(Long deactivatedAt) { + this.deactivatedAt = deactivatedAt; + return this; + } + + /** + * Unix timestamp in seconds of when the api key was deleted + * @return deactivatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEACTIVATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getDeactivatedAt() { + return deactivatedAt; + } + + + @JsonProperty(JSON_PROPERTY_DEACTIVATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeactivatedAt(Long deactivatedAt) { + this.deactivatedAt = deactivatedAt; + } + + public ApiKeyCreateResponse description(String description) { this.description = description; return this; } /** - * Detail of the use that will be given to the api key + * A name or brief explanation of what this api key is used for * @return description **/ @jakarta.annotation.Nullable @@ -204,7 +266,7 @@ public ApiKeyCreateResponse livemode(Boolean livemode) { } /** - * Indicates if the api key is in live mode + * Indicates if the api key is in production * @return livemode **/ @jakarta.annotation.Nullable @@ -223,13 +285,38 @@ public void setLivemode(Boolean livemode) { } + public ApiKeyCreateResponse deleted(Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates if the api key was deleted + * @return deleted + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDeleted() { + return deleted; + } + + + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + public ApiKeyCreateResponse _object(String _object) { this._object = _object; return this; } /** - * Object name, value is api_key + * Object name, value is 'api_key' * @return _object **/ @jakarta.annotation.Nullable @@ -279,7 +366,7 @@ public ApiKeyCreateResponse role(String role) { } /** - * Indicates the user account private=owner or public=public + * Indicates if the api key is private or public * @return role **/ @jakarta.annotation.Nullable @@ -313,9 +400,12 @@ public boolean equals(Object o) { return Objects.equals(this.authenticationToken, apiKeyCreateResponse.authenticationToken) && Objects.equals(this.active, apiKeyCreateResponse.active) && Objects.equals(this.createdAt, apiKeyCreateResponse.createdAt) && + Objects.equals(this.updatedAt, apiKeyCreateResponse.updatedAt) && + Objects.equals(this.deactivatedAt, apiKeyCreateResponse.deactivatedAt) && Objects.equals(this.description, apiKeyCreateResponse.description) && Objects.equals(this.id, apiKeyCreateResponse.id) && Objects.equals(this.livemode, apiKeyCreateResponse.livemode) && + Objects.equals(this.deleted, apiKeyCreateResponse.deleted) && Objects.equals(this._object, apiKeyCreateResponse._object) && Objects.equals(this.prefix, apiKeyCreateResponse.prefix) && Objects.equals(this.role, apiKeyCreateResponse.role); @@ -323,7 +413,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(authenticationToken, active, createdAt, description, id, livemode, _object, prefix, role); + return Objects.hash(authenticationToken, active, createdAt, updatedAt, deactivatedAt, description, id, livemode, deleted, _object, prefix, role); } @Override @@ -333,9 +423,12 @@ public String toString() { sb.append(" authenticationToken: ").append(toIndentedString(authenticationToken)).append("\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" deactivatedAt: ").append(toIndentedString(deactivatedAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); diff --git a/src/main/java/com/conekta/model/ApiKeyCreateResponseAllOf.java b/src/main/java/com/conekta/model/ApiKeyCreateResponseAllOf.java index 0aaf982..46d16c1 100644 --- a/src/main/java/com/conekta/model/ApiKeyCreateResponseAllOf.java +++ b/src/main/java/com/conekta/model/ApiKeyCreateResponseAllOf.java @@ -47,7 +47,7 @@ public ApiKeyCreateResponseAllOf authenticationToken(String 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 + * 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. * @return authenticationToken **/ @jakarta.annotation.Nullable diff --git a/src/main/java/com/conekta/model/ApiKeyRequest.java b/src/main/java/com/conekta/model/ApiKeyRequest.java index 9e92877..cab4634 100644 --- a/src/main/java/com/conekta/model/ApiKeyRequest.java +++ b/src/main/java/com/conekta/model/ApiKeyRequest.java @@ -30,16 +30,12 @@ * ApiKeyRequest */ @JsonPropertyOrder({ - ApiKeyRequest.JSON_PROPERTY_ACTIVE, ApiKeyRequest.JSON_PROPERTY_DESCRIPTION, ApiKeyRequest.JSON_PROPERTY_ROLE }) -@JsonTypeName("api-key_request") +@JsonTypeName("api_key_request") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiKeyRequest { - public static final String JSON_PROPERTY_ACTIVE = "active"; - private Boolean active; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -49,43 +45,18 @@ public class ApiKeyRequest { public ApiKeyRequest() { } - public ApiKeyRequest active(Boolean active) { - this.active = active; - return this; - } - - /** - * Indicates if the api key is active - * @return active - **/ - @jakarta.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ACTIVE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getActive() { - return active; - } - - - @JsonProperty(JSON_PROPERTY_ACTIVE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setActive(Boolean active) { - this.active = active; - } - - public ApiKeyRequest description(String description) { this.description = description; return this; } /** - * Detail of the use that will be given to the api key + * A name or brief explanation of what this api key is used for * @return description **/ - @jakarta.annotation.Nonnull + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getDescription() { return description; @@ -93,7 +64,7 @@ public String getDescription() { @JsonProperty(JSON_PROPERTY_DESCRIPTION) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setDescription(String description) { this.description = description; } @@ -125,7 +96,7 @@ public void setRole(String role) { /** - * Return true if this api-key_request object is equal to o. + * Return true if this api_key_request object is equal to o. */ @Override public boolean equals(Object o) { @@ -136,21 +107,19 @@ public boolean equals(Object o) { return false; } ApiKeyRequest apiKeyRequest = (ApiKeyRequest) o; - return Objects.equals(this.active, apiKeyRequest.active) && - Objects.equals(this.description, apiKeyRequest.description) && + return Objects.equals(this.description, apiKeyRequest.description) && Objects.equals(this.role, apiKeyRequest.role); } @Override public int hashCode() { - return Objects.hash(active, description, role); + return Objects.hash(description, role); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ApiKeyRequest {\n"); - sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/conekta/model/ApiKeyResponse.java b/src/main/java/com/conekta/model/ApiKeyResponse.java index dd87da7..187f3fd 100644 --- a/src/main/java/com/conekta/model/ApiKeyResponse.java +++ b/src/main/java/com/conekta/model/ApiKeyResponse.java @@ -32,14 +32,17 @@ @JsonPropertyOrder({ ApiKeyResponse.JSON_PROPERTY_ACTIVE, ApiKeyResponse.JSON_PROPERTY_CREATED_AT, + ApiKeyResponse.JSON_PROPERTY_UPDATED_AT, + ApiKeyResponse.JSON_PROPERTY_DEACTIVATED_AT, ApiKeyResponse.JSON_PROPERTY_DESCRIPTION, ApiKeyResponse.JSON_PROPERTY_ID, ApiKeyResponse.JSON_PROPERTY_LIVEMODE, + ApiKeyResponse.JSON_PROPERTY_DELETED, ApiKeyResponse.JSON_PROPERTY_OBJECT, ApiKeyResponse.JSON_PROPERTY_PREFIX, ApiKeyResponse.JSON_PROPERTY_ROLE }) -@JsonTypeName("api-key_response") +@JsonTypeName("api_key_response") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiKeyResponse { public static final String JSON_PROPERTY_ACTIVE = "active"; @@ -48,6 +51,12 @@ public class ApiKeyResponse { public static final String JSON_PROPERTY_CREATED_AT = "created_at"; private Long createdAt; + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private Long updatedAt; + + public static final String JSON_PROPERTY_DEACTIVATED_AT = "deactivated_at"; + private Long deactivatedAt; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -57,6 +66,9 @@ public class ApiKeyResponse { public static final String JSON_PROPERTY_LIVEMODE = "livemode"; private Boolean livemode; + public static final String JSON_PROPERTY_DELETED = "deleted"; + private Boolean deleted; + public static final String JSON_PROPERTY_OBJECT = "object"; private String _object; @@ -100,7 +112,7 @@ public ApiKeyResponse createdAt(Long createdAt) { } /** - * Unix timestamp in seconds with the creation date of the api key + * Unix timestamp in seconds of when the api key was created * @return createdAt **/ @jakarta.annotation.Nullable @@ -119,13 +131,63 @@ public void setCreatedAt(Long createdAt) { } + public ApiKeyResponse updatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Unix timestamp in seconds of when the api key was last updated + * @return updatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getUpdatedAt() { + return updatedAt; + } + + + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + + public ApiKeyResponse deactivatedAt(Long deactivatedAt) { + this.deactivatedAt = deactivatedAt; + return this; + } + + /** + * Unix timestamp in seconds of when the api key was deleted + * @return deactivatedAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DEACTIVATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getDeactivatedAt() { + return deactivatedAt; + } + + + @JsonProperty(JSON_PROPERTY_DEACTIVATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeactivatedAt(Long deactivatedAt) { + this.deactivatedAt = deactivatedAt; + } + + public ApiKeyResponse description(String description) { this.description = description; return this; } /** - * Detail of the use that will be given to the api key + * A name or brief explanation of what this api key is used for * @return description **/ @jakarta.annotation.Nullable @@ -175,7 +237,7 @@ public ApiKeyResponse livemode(Boolean livemode) { } /** - * Indicates if the api key is in live mode + * Indicates if the api key is in production * @return livemode **/ @jakarta.annotation.Nullable @@ -194,13 +256,38 @@ public void setLivemode(Boolean livemode) { } + public ApiKeyResponse deleted(Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates if the api key was deleted + * @return deleted + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDeleted() { + return deleted; + } + + + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + public ApiKeyResponse _object(String _object) { this._object = _object; return this; } /** - * Object name, value is api_key + * Object name, value is 'api_key' * @return _object **/ @jakarta.annotation.Nullable @@ -250,7 +337,7 @@ public ApiKeyResponse role(String role) { } /** - * Indicates the user account private=owner or public=public + * Indicates if the api key is private or public * @return role **/ @jakarta.annotation.Nullable @@ -270,7 +357,7 @@ public void setRole(String role) { /** - * Return true if this api-key_response object is equal to o. + * Return true if this api_key_response object is equal to o. */ @Override public boolean equals(Object o) { @@ -283,9 +370,12 @@ public boolean equals(Object o) { ApiKeyResponse apiKeyResponse = (ApiKeyResponse) o; return Objects.equals(this.active, apiKeyResponse.active) && Objects.equals(this.createdAt, apiKeyResponse.createdAt) && + Objects.equals(this.updatedAt, apiKeyResponse.updatedAt) && + Objects.equals(this.deactivatedAt, apiKeyResponse.deactivatedAt) && Objects.equals(this.description, apiKeyResponse.description) && Objects.equals(this.id, apiKeyResponse.id) && Objects.equals(this.livemode, apiKeyResponse.livemode) && + Objects.equals(this.deleted, apiKeyResponse.deleted) && Objects.equals(this._object, apiKeyResponse._object) && Objects.equals(this.prefix, apiKeyResponse.prefix) && Objects.equals(this.role, apiKeyResponse.role); @@ -293,7 +383,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(active, createdAt, description, id, livemode, _object, prefix, role); + return Objects.hash(active, createdAt, updatedAt, deactivatedAt, description, id, livemode, deleted, _object, prefix, role); } @Override @@ -302,9 +392,12 @@ public String toString() { sb.append("class ApiKeyResponse {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" deactivatedAt: ").append(toIndentedString(deactivatedAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); sb.append(" role: ").append(toIndentedString(role)).append("\n"); diff --git a/src/main/java/com/conekta/model/ApiKeyResponseOnDelete.java b/src/main/java/com/conekta/model/ApiKeyResponseOnDelete.java new file mode 100644 index 0000000..31eb193 --- /dev/null +++ b/src/main/java/com/conekta/model/ApiKeyResponseOnDelete.java @@ -0,0 +1,358 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * api keys model + */ +@JsonPropertyOrder({ + ApiKeyResponseOnDelete.JSON_PROPERTY_ACTIVE, + ApiKeyResponseOnDelete.JSON_PROPERTY_CREATED_AT, + ApiKeyResponseOnDelete.JSON_PROPERTY_DESCRIPTION, + ApiKeyResponseOnDelete.JSON_PROPERTY_LIVEMODE, + ApiKeyResponseOnDelete.JSON_PROPERTY_PREFIX, + ApiKeyResponseOnDelete.JSON_PROPERTY_ID, + ApiKeyResponseOnDelete.JSON_PROPERTY_OBJECT, + ApiKeyResponseOnDelete.JSON_PROPERTY_DELETED, + ApiKeyResponseOnDelete.JSON_PROPERTY_ROLE +}) +@JsonTypeName("api_key_response_on_delete") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class ApiKeyResponseOnDelete { + public static final String JSON_PROPERTY_ACTIVE = "active"; + private Boolean active; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private Long createdAt; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LIVEMODE = "livemode"; + private Boolean livemode; + + public static final String JSON_PROPERTY_PREFIX = "prefix"; + private String prefix; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_OBJECT = "object"; + private String _object; + + public static final String JSON_PROPERTY_DELETED = "deleted"; + private Boolean deleted; + + public static final String JSON_PROPERTY_ROLE = "role"; + private String role; + + public ApiKeyResponseOnDelete() { + } + + public ApiKeyResponseOnDelete active(Boolean active) { + this.active = active; + return this; + } + + /** + * Indicates if the api key is active + * @return active + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getActive() { + return active; + } + + + @JsonProperty(JSON_PROPERTY_ACTIVE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActive(Boolean active) { + this.active = active; + } + + + public ApiKeyResponseOnDelete createdAt(Long createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Unix timestamp in seconds of when the api key was created + * @return createdAt + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getCreatedAt() { + return createdAt; + } + + + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + + public ApiKeyResponseOnDelete description(String description) { + this.description = description; + return this; + } + + /** + * A name or brief explanation of what this api key is used for + * @return description + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDescription() { + return description; + } + + + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDescription(String description) { + this.description = description; + } + + + public ApiKeyResponseOnDelete livemode(Boolean livemode) { + this.livemode = livemode; + return this; + } + + /** + * Indicates if the api key is in production + * @return livemode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIVEMODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getLivemode() { + return livemode; + } + + + @JsonProperty(JSON_PROPERTY_LIVEMODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLivemode(Boolean livemode) { + this.livemode = livemode; + } + + + public ApiKeyResponseOnDelete prefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * The first few characters of the authentication_token + * @return prefix + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPrefix() { + return prefix; + } + + + @JsonProperty(JSON_PROPERTY_PREFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + + public ApiKeyResponseOnDelete id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the api key + * @return id + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(String id) { + this.id = id; + } + + + public ApiKeyResponseOnDelete _object(String _object) { + this._object = _object; + return this; + } + + /** + * Object name, value is 'api_key' + * @return _object + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getObject() { + return _object; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setObject(String _object) { + this._object = _object; + } + + + public ApiKeyResponseOnDelete deleted(Boolean deleted) { + this.deleted = deleted; + return this; + } + + /** + * Indicates if the api key was deleted + * @return deleted + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Boolean getDeleted() { + return deleted; + } + + + @JsonProperty(JSON_PROPERTY_DELETED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDeleted(Boolean deleted) { + this.deleted = deleted; + } + + + public ApiKeyResponseOnDelete role(String role) { + this.role = role; + return this; + } + + /** + * Indicates if the api key is private or public + * @return role + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRole() { + return role; + } + + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRole(String role) { + this.role = role; + } + + + /** + * Return true if this api_key_response_on_delete object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ApiKeyResponseOnDelete apiKeyResponseOnDelete = (ApiKeyResponseOnDelete) o; + return Objects.equals(this.active, apiKeyResponseOnDelete.active) && + Objects.equals(this.createdAt, apiKeyResponseOnDelete.createdAt) && + Objects.equals(this.description, apiKeyResponseOnDelete.description) && + Objects.equals(this.livemode, apiKeyResponseOnDelete.livemode) && + Objects.equals(this.prefix, apiKeyResponseOnDelete.prefix) && + Objects.equals(this.id, apiKeyResponseOnDelete.id) && + Objects.equals(this._object, apiKeyResponseOnDelete._object) && + Objects.equals(this.deleted, apiKeyResponseOnDelete.deleted) && + Objects.equals(this.role, apiKeyResponseOnDelete.role); + } + + @Override + public int hashCode() { + return Objects.hash(active, createdAt, description, livemode, prefix, id, _object, deleted, role); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ApiKeyResponseOnDelete {\n"); + sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/ApiKeyUpdateRequest.java b/src/main/java/com/conekta/model/ApiKeyUpdateRequest.java index 93a0f43..ca8abe5 100644 --- a/src/main/java/com/conekta/model/ApiKeyUpdateRequest.java +++ b/src/main/java/com/conekta/model/ApiKeyUpdateRequest.java @@ -76,7 +76,7 @@ public ApiKeyUpdateRequest description(String description) { } /** - * Detail of the use that will be given to the api key + * A name or brief explanation of what this api key is used for * @return description **/ @jakarta.annotation.Nullable diff --git a/src/main/java/com/conekta/model/BalanceCommonField.java b/src/main/java/com/conekta/model/BalanceCommonField.java new file mode 100644 index 0000000..31642fe --- /dev/null +++ b/src/main/java/com/conekta/model/BalanceCommonField.java @@ -0,0 +1,141 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * balance common fields model + */ +@JsonPropertyOrder({ + BalanceCommonField.JSON_PROPERTY_AMOUNT, + BalanceCommonField.JSON_PROPERTY_CURRENCY +}) +@JsonTypeName("balance_common_field") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceCommonField { + public static final String JSON_PROPERTY_AMOUNT = "amount"; + private Long amount; + + public static final String JSON_PROPERTY_CURRENCY = "currency"; + private String currency; + + public BalanceCommonField() { + } + + public BalanceCommonField amount(Long amount) { + this.amount = amount; + return this; + } + + /** + * The balance's amount + * @return amount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getAmount() { + return amount; + } + + + @JsonProperty(JSON_PROPERTY_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAmount(Long amount) { + this.amount = amount; + } + + + public BalanceCommonField currency(String currency) { + this.currency = currency; + return this; + } + + /** + * The balance's currency + * @return currency + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getCurrency() { + return currency; + } + + + @JsonProperty(JSON_PROPERTY_CURRENCY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCurrency(String currency) { + this.currency = currency; + } + + + /** + * Return true if this balance_common_field object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceCommonField balanceCommonField = (BalanceCommonField) o; + return Objects.equals(this.amount, balanceCommonField.amount) && + Objects.equals(this.currency, balanceCommonField.currency); + } + + @Override + public int hashCode() { + return Objects.hash(amount, currency); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceCommonField {\n"); + sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); + sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/BalanceResponse.java b/src/main/java/com/conekta/model/BalanceResponse.java new file mode 100644 index 0000000..680990d --- /dev/null +++ b/src/main/java/com/conekta/model/BalanceResponse.java @@ -0,0 +1,464 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.conekta.model.BalanceCommonField; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * balance model + */ +@JsonPropertyOrder({ + BalanceResponse.JSON_PROPERTY_AVAILABLE, + BalanceResponse.JSON_PROPERTY_CASHOUT_RETENTION_AMOUNT, + BalanceResponse.JSON_PROPERTY_CONEKTA_RETENTION, + BalanceResponse.JSON_PROPERTY_GATEWAY, + BalanceResponse.JSON_PROPERTY_PENDING, + BalanceResponse.JSON_PROPERTY_RETAINED, + BalanceResponse.JSON_PROPERTY_RETENTION_AMOUNT, + BalanceResponse.JSON_PROPERTY_TARGET_COLLATERAL_AMOUNT, + BalanceResponse.JSON_PROPERTY_TARGET_RETENTION_AMOUNT, + BalanceResponse.JSON_PROPERTY_TEMPORARILY_RETAINED +}) +@JsonTypeName("balance_response") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BalanceResponse { + public static final String JSON_PROPERTY_AVAILABLE = "available"; + private List available; + + public static final String JSON_PROPERTY_CASHOUT_RETENTION_AMOUNT = "cashout_retention_amount"; + private List cashoutRetentionAmount; + + public static final String JSON_PROPERTY_CONEKTA_RETENTION = "conekta_retention"; + private List conektaRetention; + + public static final String JSON_PROPERTY_GATEWAY = "gateway"; + private List gateway; + + public static final String JSON_PROPERTY_PENDING = "pending"; + private List pending; + + public static final String JSON_PROPERTY_RETAINED = "retained"; + private List retained; + + public static final String JSON_PROPERTY_RETENTION_AMOUNT = "retention_amount"; + private List retentionAmount; + + public static final String JSON_PROPERTY_TARGET_COLLATERAL_AMOUNT = "target_collateral_amount"; + private Object targetCollateralAmount; + + public static final String JSON_PROPERTY_TARGET_RETENTION_AMOUNT = "target_retention_amount"; + private List targetRetentionAmount; + + public static final String JSON_PROPERTY_TEMPORARILY_RETAINED = "temporarily_retained"; + private List temporarilyRetained; + + public BalanceResponse() { + } + + public BalanceResponse available(List available) { + this.available = available; + return this; + } + + public BalanceResponse addAvailableItem(BalanceCommonField availableItem) { + if (this.available == null) { + this.available = new ArrayList<>(); + } + this.available.add(availableItem); + return this; + } + + /** + * The balance's available + * @return available + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getAvailable() { + return available; + } + + + @JsonProperty(JSON_PROPERTY_AVAILABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAvailable(List available) { + this.available = available; + } + + + public BalanceResponse cashoutRetentionAmount(List cashoutRetentionAmount) { + this.cashoutRetentionAmount = cashoutRetentionAmount; + return this; + } + + public BalanceResponse addCashoutRetentionAmountItem(BalanceCommonField cashoutRetentionAmountItem) { + if (this.cashoutRetentionAmount == null) { + this.cashoutRetentionAmount = new ArrayList<>(); + } + this.cashoutRetentionAmount.add(cashoutRetentionAmountItem); + return this; + } + + /** + * The balance's cashout retention amount + * @return cashoutRetentionAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASHOUT_RETENTION_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getCashoutRetentionAmount() { + return cashoutRetentionAmount; + } + + + @JsonProperty(JSON_PROPERTY_CASHOUT_RETENTION_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCashoutRetentionAmount(List cashoutRetentionAmount) { + this.cashoutRetentionAmount = cashoutRetentionAmount; + } + + + public BalanceResponse conektaRetention(List conektaRetention) { + this.conektaRetention = conektaRetention; + return this; + } + + public BalanceResponse addConektaRetentionItem(BalanceCommonField conektaRetentionItem) { + if (this.conektaRetention == null) { + this.conektaRetention = new ArrayList<>(); + } + this.conektaRetention.add(conektaRetentionItem); + return this; + } + + /** + * The balance's conekta retention + * @return conektaRetention + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONEKTA_RETENTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getConektaRetention() { + return conektaRetention; + } + + + @JsonProperty(JSON_PROPERTY_CONEKTA_RETENTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setConektaRetention(List conektaRetention) { + this.conektaRetention = conektaRetention; + } + + + public BalanceResponse gateway(List gateway) { + this.gateway = gateway; + return this; + } + + public BalanceResponse addGatewayItem(BalanceCommonField gatewayItem) { + if (this.gateway == null) { + this.gateway = new ArrayList<>(); + } + this.gateway.add(gatewayItem); + return this; + } + + /** + * The balance's gateway + * @return gateway + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GATEWAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getGateway() { + return gateway; + } + + + @JsonProperty(JSON_PROPERTY_GATEWAY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setGateway(List gateway) { + this.gateway = gateway; + } + + + public BalanceResponse pending(List pending) { + this.pending = pending; + return this; + } + + public BalanceResponse addPendingItem(BalanceCommonField pendingItem) { + if (this.pending == null) { + this.pending = new ArrayList<>(); + } + this.pending.add(pendingItem); + return this; + } + + /** + * The balance's pending + * @return pending + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getPending() { + return pending; + } + + + @JsonProperty(JSON_PROPERTY_PENDING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPending(List pending) { + this.pending = pending; + } + + + public BalanceResponse retained(List retained) { + this.retained = retained; + return this; + } + + public BalanceResponse addRetainedItem(BalanceCommonField retainedItem) { + if (this.retained == null) { + this.retained = new ArrayList<>(); + } + this.retained.add(retainedItem); + return this; + } + + /** + * The balance's retained + * @return retained + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETAINED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getRetained() { + return retained; + } + + + @JsonProperty(JSON_PROPERTY_RETAINED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRetained(List retained) { + this.retained = retained; + } + + + public BalanceResponse retentionAmount(List retentionAmount) { + this.retentionAmount = retentionAmount; + return this; + } + + public BalanceResponse addRetentionAmountItem(BalanceCommonField retentionAmountItem) { + if (this.retentionAmount == null) { + this.retentionAmount = new ArrayList<>(); + } + this.retentionAmount.add(retentionAmountItem); + return this; + } + + /** + * The balance's retention amount + * @return retentionAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RETENTION_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getRetentionAmount() { + return retentionAmount; + } + + + @JsonProperty(JSON_PROPERTY_RETENTION_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRetentionAmount(List retentionAmount) { + this.retentionAmount = retentionAmount; + } + + + public BalanceResponse targetCollateralAmount(Object targetCollateralAmount) { + this.targetCollateralAmount = targetCollateralAmount; + return this; + } + + /** + * The balance's target collateral amount + * @return targetCollateralAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_COLLATERAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Object getTargetCollateralAmount() { + return targetCollateralAmount; + } + + + @JsonProperty(JSON_PROPERTY_TARGET_COLLATERAL_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTargetCollateralAmount(Object targetCollateralAmount) { + this.targetCollateralAmount = targetCollateralAmount; + } + + + public BalanceResponse targetRetentionAmount(List targetRetentionAmount) { + this.targetRetentionAmount = targetRetentionAmount; + return this; + } + + public BalanceResponse addTargetRetentionAmountItem(BalanceCommonField targetRetentionAmountItem) { + if (this.targetRetentionAmount == null) { + this.targetRetentionAmount = new ArrayList<>(); + } + this.targetRetentionAmount.add(targetRetentionAmountItem); + return this; + } + + /** + * The balance's target retention amount + * @return targetRetentionAmount + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_RETENTION_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTargetRetentionAmount() { + return targetRetentionAmount; + } + + + @JsonProperty(JSON_PROPERTY_TARGET_RETENTION_AMOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTargetRetentionAmount(List targetRetentionAmount) { + this.targetRetentionAmount = targetRetentionAmount; + } + + + public BalanceResponse temporarilyRetained(List temporarilyRetained) { + this.temporarilyRetained = temporarilyRetained; + return this; + } + + public BalanceResponse addTemporarilyRetainedItem(BalanceCommonField temporarilyRetainedItem) { + if (this.temporarilyRetained == null) { + this.temporarilyRetained = new ArrayList<>(); + } + this.temporarilyRetained.add(temporarilyRetainedItem); + return this; + } + + /** + * The balance's temporarily retained + * @return temporarilyRetained + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPORARILY_RETAINED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getTemporarilyRetained() { + return temporarilyRetained; + } + + + @JsonProperty(JSON_PROPERTY_TEMPORARILY_RETAINED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTemporarilyRetained(List temporarilyRetained) { + this.temporarilyRetained = temporarilyRetained; + } + + + /** + * Return true if this balance_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BalanceResponse balanceResponse = (BalanceResponse) o; + return Objects.equals(this.available, balanceResponse.available) && + Objects.equals(this.cashoutRetentionAmount, balanceResponse.cashoutRetentionAmount) && + Objects.equals(this.conektaRetention, balanceResponse.conektaRetention) && + Objects.equals(this.gateway, balanceResponse.gateway) && + Objects.equals(this.pending, balanceResponse.pending) && + Objects.equals(this.retained, balanceResponse.retained) && + Objects.equals(this.retentionAmount, balanceResponse.retentionAmount) && + Objects.equals(this.targetCollateralAmount, balanceResponse.targetCollateralAmount) && + Objects.equals(this.targetRetentionAmount, balanceResponse.targetRetentionAmount) && + Objects.equals(this.temporarilyRetained, balanceResponse.temporarilyRetained); + } + + @Override + public int hashCode() { + return Objects.hash(available, cashoutRetentionAmount, conektaRetention, gateway, pending, retained, retentionAmount, targetCollateralAmount, targetRetentionAmount, temporarilyRetained); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BalanceResponse {\n"); + sb.append(" available: ").append(toIndentedString(available)).append("\n"); + sb.append(" cashoutRetentionAmount: ").append(toIndentedString(cashoutRetentionAmount)).append("\n"); + sb.append(" conektaRetention: ").append(toIndentedString(conektaRetention)).append("\n"); + sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); + sb.append(" pending: ").append(toIndentedString(pending)).append("\n"); + sb.append(" retained: ").append(toIndentedString(retained)).append("\n"); + sb.append(" retentionAmount: ").append(toIndentedString(retentionAmount)).append("\n"); + sb.append(" targetCollateralAmount: ").append(toIndentedString(targetCollateralAmount)).append("\n"); + sb.append(" targetRetentionAmount: ").append(toIndentedString(targetRetentionAmount)).append("\n"); + sb.append(" temporarilyRetained: ").append(toIndentedString(temporarilyRetained)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/ChargeDataPaymentMethodCardResponse.java b/src/main/java/com/conekta/model/ChargeDataPaymentMethodCardResponse.java index 04e479c..34b7b56 100644 --- a/src/main/java/com/conekta/model/ChargeDataPaymentMethodCardResponse.java +++ b/src/main/java/com/conekta/model/ChargeDataPaymentMethodCardResponse.java @@ -35,6 +35,7 @@ ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_ACCOUNT_TYPE, ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_AUTH_CODE, ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_BRAND, + ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_CONTRACT_ID, ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_COUNTRY, ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_EXP_MONTH, ChargeDataPaymentMethodCardResponse.JSON_PROPERTY_EXP_YEAR, @@ -55,6 +56,9 @@ public class ChargeDataPaymentMethodCardResponse { public static final String JSON_PROPERTY_BRAND = "brand"; private String brand; + public static final String JSON_PROPERTY_CONTRACT_ID = "contract_id"; + private String contractId; + public static final String JSON_PROPERTY_COUNTRY = "country"; private String country; @@ -154,6 +158,31 @@ public void setBrand(String brand) { } + public ChargeDataPaymentMethodCardResponse contractId(String contractId) { + this.contractId = contractId; + return this; + } + + /** + * Id sent for recurrent charges. + * @return contractId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContractId() { + return contractId; + } + + + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractId(String contractId) { + this.contractId = contractId; + } + + public ChargeDataPaymentMethodCardResponse country(String country) { this.country = country; return this; @@ -352,6 +381,7 @@ public boolean equals(Object o) { return Objects.equals(this.accountType, chargeDataPaymentMethodCardResponse.accountType) && Objects.equals(this.authCode, chargeDataPaymentMethodCardResponse.authCode) && Objects.equals(this.brand, chargeDataPaymentMethodCardResponse.brand) && + Objects.equals(this.contractId, chargeDataPaymentMethodCardResponse.contractId) && Objects.equals(this.country, chargeDataPaymentMethodCardResponse.country) && Objects.equals(this.expMonth, chargeDataPaymentMethodCardResponse.expMonth) && Objects.equals(this.expYear, chargeDataPaymentMethodCardResponse.expYear) && @@ -363,7 +393,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(accountType, authCode, brand, country, expMonth, expYear, fraudIndicators, issuer, last4, name); + return Objects.hash(accountType, authCode, brand, contractId, country, expMonth, expYear, fraudIndicators, issuer, last4, name); } @Override @@ -373,6 +403,7 @@ public String toString() { sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); sb.append(" authCode: ").append(toIndentedString(authCode)).append("\n"); sb.append(" brand: ").append(toIndentedString(brand)).append("\n"); + sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" expMonth: ").append(toIndentedString(expMonth)).append("\n"); sb.append(" expYear: ").append(toIndentedString(expYear)).append("\n"); diff --git a/src/main/java/com/conekta/model/ChargeRequestPaymentMethod.java b/src/main/java/com/conekta/model/ChargeRequestPaymentMethod.java index ea164c9..1dac4d6 100644 --- a/src/main/java/com/conekta/model/ChargeRequestPaymentMethod.java +++ b/src/main/java/com/conekta/model/ChargeRequestPaymentMethod.java @@ -33,7 +33,8 @@ ChargeRequestPaymentMethod.JSON_PROPERTY_EXPIRES_AT, ChargeRequestPaymentMethod.JSON_PROPERTY_TYPE, ChargeRequestPaymentMethod.JSON_PROPERTY_TOKEN_ID, - ChargeRequestPaymentMethod.JSON_PROPERTY_PAYMENT_SOURCE_ID + ChargeRequestPaymentMethod.JSON_PROPERTY_PAYMENT_SOURCE_ID, + ChargeRequestPaymentMethod.JSON_PROPERTY_CONTRACT_ID }) @JsonTypeName("charge_request_payment_method") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -50,6 +51,9 @@ public class ChargeRequestPaymentMethod { public static final String JSON_PROPERTY_PAYMENT_SOURCE_ID = "payment_source_id"; private String paymentSourceId; + public static final String JSON_PROPERTY_CONTRACT_ID = "contract_id"; + private String contractId; + public ChargeRequestPaymentMethod() { } @@ -153,6 +157,31 @@ public void setPaymentSourceId(String paymentSourceId) { } + public ChargeRequestPaymentMethod contractId(String contractId) { + this.contractId = contractId; + return this; + } + + /** + * Optional id sent to indicate the bank contract for recurrent card charges. + * @return contractId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContractId() { + return contractId; + } + + + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractId(String contractId) { + this.contractId = contractId; + } + + /** * Return true if this charge_request_payment_method object is equal to o. */ @@ -168,12 +197,13 @@ public boolean equals(Object o) { return Objects.equals(this.expiresAt, chargeRequestPaymentMethod.expiresAt) && Objects.equals(this.type, chargeRequestPaymentMethod.type) && Objects.equals(this.tokenId, chargeRequestPaymentMethod.tokenId) && - Objects.equals(this.paymentSourceId, chargeRequestPaymentMethod.paymentSourceId); + Objects.equals(this.paymentSourceId, chargeRequestPaymentMethod.paymentSourceId) && + Objects.equals(this.contractId, chargeRequestPaymentMethod.contractId); } @Override public int hashCode() { - return Objects.hash(expiresAt, type, tokenId, paymentSourceId); + return Objects.hash(expiresAt, type, tokenId, paymentSourceId, contractId); } @Override @@ -184,6 +214,7 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" tokenId: ").append(toIndentedString(tokenId)).append("\n"); sb.append(" paymentSourceId: ").append(toIndentedString(paymentSourceId)).append("\n"); + sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/ChargeResponseRefunds.java b/src/main/java/com/conekta/model/ChargeResponseRefunds.java index b66a140..992bfcb 100644 --- a/src/main/java/com/conekta/model/ChargeResponseRefunds.java +++ b/src/main/java/com/conekta/model/ChargeResponseRefunds.java @@ -174,7 +174,7 @@ public ChargeResponseRefunds addDataItem(ChargeResponseRefundsData dataItem) { } /** - * Get data + * refunds * @return data **/ @jakarta.annotation.Nullable diff --git a/src/main/java/com/conekta/model/ChargeResponseRefundsAllOf.java b/src/main/java/com/conekta/model/ChargeResponseRefundsAllOf.java index 8ee9c10..02b0b1e 100644 --- a/src/main/java/com/conekta/model/ChargeResponseRefundsAllOf.java +++ b/src/main/java/com/conekta/model/ChargeResponseRefundsAllOf.java @@ -58,7 +58,7 @@ public ChargeResponseRefundsAllOf addDataItem(ChargeResponseRefundsData dataItem } /** - * Get data + * refunds * @return data **/ @jakarta.annotation.Nullable diff --git a/src/main/java/com/conekta/model/CheckoutRequest.java b/src/main/java/com/conekta/model/CheckoutRequest.java index 60b4b4e..9c5b00d 100644 --- a/src/main/java/com/conekta/model/CheckoutRequest.java +++ b/src/main/java/com/conekta/model/CheckoutRequest.java @@ -29,7 +29,7 @@ /** - * [Checkout](https://developers.conekta.com/reference/checkout) details + * [Checkout](https://developers.conekta.com/v2.1.0/reference/payment-link) details */ @JsonPropertyOrder({ CheckoutRequest.JSON_PROPERTY_ALLOWED_PAYMENT_METHODS, diff --git a/src/main/java/com/conekta/model/DeleteApiKeysResponse.java b/src/main/java/com/conekta/model/DeleteApiKeysResponse.java index e254f4d..0e75d1a 100644 --- a/src/main/java/com/conekta/model/DeleteApiKeysResponse.java +++ b/src/main/java/com/conekta/model/DeleteApiKeysResponse.java @@ -33,12 +33,12 @@ DeleteApiKeysResponse.JSON_PROPERTY_ACTIVE, DeleteApiKeysResponse.JSON_PROPERTY_CREATED_AT, DeleteApiKeysResponse.JSON_PROPERTY_DESCRIPTION, - DeleteApiKeysResponse.JSON_PROPERTY_ID, DeleteApiKeysResponse.JSON_PROPERTY_LIVEMODE, - DeleteApiKeysResponse.JSON_PROPERTY_OBJECT, DeleteApiKeysResponse.JSON_PROPERTY_PREFIX, - DeleteApiKeysResponse.JSON_PROPERTY_ROLE, - DeleteApiKeysResponse.JSON_PROPERTY_DELETED + DeleteApiKeysResponse.JSON_PROPERTY_ID, + DeleteApiKeysResponse.JSON_PROPERTY_OBJECT, + DeleteApiKeysResponse.JSON_PROPERTY_DELETED, + DeleteApiKeysResponse.JSON_PROPERTY_ROLE }) @JsonTypeName("delete_api_keys_response") @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @@ -52,24 +52,24 @@ public class DeleteApiKeysResponse { public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; - public static final String JSON_PROPERTY_ID = "id"; - private String id; - public static final String JSON_PROPERTY_LIVEMODE = "livemode"; private Boolean livemode; - public static final String JSON_PROPERTY_OBJECT = "object"; - private String _object; - public static final String JSON_PROPERTY_PREFIX = "prefix"; private String prefix; - public static final String JSON_PROPERTY_ROLE = "role"; - private String role; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_OBJECT = "object"; + private String _object; public static final String JSON_PROPERTY_DELETED = "deleted"; private Boolean deleted; + public static final String JSON_PROPERTY_ROLE = "role"; + private String role; + public DeleteApiKeysResponse() { } @@ -104,7 +104,7 @@ public DeleteApiKeysResponse createdAt(Long createdAt) { } /** - * Unix timestamp in seconds with the creation date of the api key + * Unix timestamp in seconds of when the api key was created * @return createdAt **/ @jakarta.annotation.Nullable @@ -129,7 +129,7 @@ public DeleteApiKeysResponse description(String description) { } /** - * Detail of the use that will be given to the api key + * A name or brief explanation of what this api key is used for * @return description **/ @jakarta.annotation.Nullable @@ -148,38 +148,13 @@ public void setDescription(String description) { } - public DeleteApiKeysResponse id(String id) { - this.id = id; - return this; - } - - /** - * Unique identifier of the api key - * @return id - **/ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getId() { - return id; - } - - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(String id) { - this.id = id; - } - - public DeleteApiKeysResponse livemode(Boolean livemode) { this.livemode = livemode; return this; } /** - * Indicates if the api key is in live mode + * Indicates if the api key is in production * @return livemode **/ @jakarta.annotation.Nullable @@ -198,78 +173,78 @@ public void setLivemode(Boolean livemode) { } - public DeleteApiKeysResponse _object(String _object) { - this._object = _object; + public DeleteApiKeysResponse prefix(String prefix) { + this.prefix = prefix; return this; } /** - * Object name, value is api_key - * @return _object + * The first few characters of the authentication_token + * @return prefix **/ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonProperty(JSON_PROPERTY_PREFIX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getObject() { - return _object; + public String getPrefix() { + return prefix; } - @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonProperty(JSON_PROPERTY_PREFIX) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setObject(String _object) { - this._object = _object; + public void setPrefix(String prefix) { + this.prefix = prefix; } - public DeleteApiKeysResponse prefix(String prefix) { - this.prefix = prefix; + public DeleteApiKeysResponse id(String id) { + this.id = id; return this; } /** - * The first few characters of the authentication_token - * @return prefix + * Unique identifier of the api key + * @return id **/ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PREFIX) + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPrefix() { - return prefix; + public String getId() { + return id; } - @JsonProperty(JSON_PROPERTY_PREFIX) + @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPrefix(String prefix) { - this.prefix = prefix; + public void setId(String id) { + this.id = id; } - public DeleteApiKeysResponse role(String role) { - this.role = role; + public DeleteApiKeysResponse _object(String _object) { + this._object = _object; return this; } /** - * Indicates the user account private=owner or public=public - * @return role + * Object name, value is 'api_key' + * @return _object **/ @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ROLE) + @JsonProperty(JSON_PROPERTY_OBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getRole() { - return role; + public String getObject() { + return _object; } - @JsonProperty(JSON_PROPERTY_ROLE) + @JsonProperty(JSON_PROPERTY_OBJECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setRole(String role) { - this.role = role; + public void setObject(String _object) { + this._object = _object; } @@ -298,6 +273,31 @@ public void setDeleted(Boolean deleted) { } + public DeleteApiKeysResponse role(String role) { + this.role = role; + return this; + } + + /** + * Indicates if the api key is private or public + * @return role + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRole() { + return role; + } + + + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRole(String role) { + this.role = role; + } + + /** * Return true if this delete_api_keys_response object is equal to o. */ @@ -313,17 +313,17 @@ public boolean equals(Object o) { return Objects.equals(this.active, deleteApiKeysResponse.active) && Objects.equals(this.createdAt, deleteApiKeysResponse.createdAt) && Objects.equals(this.description, deleteApiKeysResponse.description) && - Objects.equals(this.id, deleteApiKeysResponse.id) && Objects.equals(this.livemode, deleteApiKeysResponse.livemode) && - Objects.equals(this._object, deleteApiKeysResponse._object) && Objects.equals(this.prefix, deleteApiKeysResponse.prefix) && - Objects.equals(this.role, deleteApiKeysResponse.role) && - Objects.equals(this.deleted, deleteApiKeysResponse.deleted); + Objects.equals(this.id, deleteApiKeysResponse.id) && + Objects.equals(this._object, deleteApiKeysResponse._object) && + Objects.equals(this.deleted, deleteApiKeysResponse.deleted) && + Objects.equals(this.role, deleteApiKeysResponse.role); } @Override public int hashCode() { - return Objects.hash(active, createdAt, description, id, livemode, _object, prefix, role, deleted); + return Objects.hash(active, createdAt, description, livemode, prefix, id, _object, deleted, role); } @Override @@ -333,12 +333,12 @@ public String toString() { sb.append(" active: ").append(toIndentedString(active)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" livemode: ").append(toIndentedString(livemode)).append("\n"); - sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/conekta/model/DiscountLinesDataResponse.java b/src/main/java/com/conekta/model/DiscountLinesDataResponse.java index 728a0aa..ed0444e 100644 --- a/src/main/java/com/conekta/model/DiscountLinesDataResponse.java +++ b/src/main/java/com/conekta/model/DiscountLinesDataResponse.java @@ -143,12 +143,12 @@ public DiscountLinesDataResponse id(String id) { } /** - * Get id + * The discount line id * @return id **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getId() { return id; @@ -156,7 +156,7 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setId(String id) { this.id = id; } @@ -168,12 +168,12 @@ public DiscountLinesDataResponse _object(String _object) { } /** - * Get _object + * The object name * @return _object **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getObject() { return _object; @@ -181,7 +181,7 @@ public String getObject() { @JsonProperty(JSON_PROPERTY_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setObject(String _object) { this._object = _object; } @@ -193,12 +193,12 @@ public DiscountLinesDataResponse parentId(String parentId) { } /** - * Get parentId + * The order id * @return parentId **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getParentId() { return parentId; @@ -206,7 +206,7 @@ public String getParentId() { @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/src/main/java/com/conekta/model/DiscountLinesResponse.java b/src/main/java/com/conekta/model/DiscountLinesResponse.java index e2255ac..f12a550 100644 --- a/src/main/java/com/conekta/model/DiscountLinesResponse.java +++ b/src/main/java/com/conekta/model/DiscountLinesResponse.java @@ -143,12 +143,12 @@ public DiscountLinesResponse id(String id) { } /** - * Get id + * The discount line id * @return id **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getId() { return id; @@ -156,7 +156,7 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setId(String id) { this.id = id; } @@ -168,12 +168,12 @@ public DiscountLinesResponse _object(String _object) { } /** - * Get _object + * The object name * @return _object **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getObject() { return _object; @@ -181,7 +181,7 @@ public String getObject() { @JsonProperty(JSON_PROPERTY_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setObject(String _object) { this._object = _object; } @@ -193,12 +193,12 @@ public DiscountLinesResponse parentId(String parentId) { } /** - * Get parentId + * The order id * @return parentId **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getParentId() { return parentId; @@ -206,7 +206,7 @@ public String getParentId() { @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/src/main/java/com/conekta/model/DiscountLinesResponseAllOf.java b/src/main/java/com/conekta/model/DiscountLinesResponseAllOf.java index 025faa6..a0d89c4 100644 --- a/src/main/java/com/conekta/model/DiscountLinesResponseAllOf.java +++ b/src/main/java/com/conekta/model/DiscountLinesResponseAllOf.java @@ -55,12 +55,12 @@ public DiscountLinesResponseAllOf id(String id) { } /** - * Get id + * The discount line id * @return id **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getId() { return id; @@ -68,7 +68,7 @@ public String getId() { @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setId(String id) { this.id = id; } @@ -80,12 +80,12 @@ public DiscountLinesResponseAllOf _object(String _object) { } /** - * Get _object + * The object name * @return _object **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getObject() { return _object; @@ -93,7 +93,7 @@ public String getObject() { @JsonProperty(JSON_PROPERTY_OBJECT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setObject(String _object) { this._object = _object; } @@ -105,12 +105,12 @@ public DiscountLinesResponseAllOf parentId(String parentId) { } /** - * Get parentId + * The order id * @return parentId **/ - @jakarta.annotation.Nullable + @jakarta.annotation.Nonnull @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getParentId() { return parentId; @@ -118,7 +118,7 @@ public String getParentId() { @JsonProperty(JSON_PROPERTY_PARENT_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public void setParentId(String parentId) { this.parentId = parentId; } diff --git a/src/main/java/com/conekta/model/GetOrderDiscountLinesResponse.java b/src/main/java/com/conekta/model/GetOrderDiscountLinesResponse.java new file mode 100644 index 0000000..e267320 --- /dev/null +++ b/src/main/java/com/conekta/model/GetOrderDiscountLinesResponse.java @@ -0,0 +1,245 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.conekta.model.DiscountLinesResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * GetOrderDiscountLinesResponse + */ +@JsonPropertyOrder({ + GetOrderDiscountLinesResponse.JSON_PROPERTY_HAS_MORE, + GetOrderDiscountLinesResponse.JSON_PROPERTY_OBJECT, + GetOrderDiscountLinesResponse.JSON_PROPERTY_NEXT_PAGE_URL, + GetOrderDiscountLinesResponse.JSON_PROPERTY_PREVIOUS_PAGE_URL, + GetOrderDiscountLinesResponse.JSON_PROPERTY_DATA +}) +@JsonTypeName("get_order_discount_lines_response") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetOrderDiscountLinesResponse { + public static final String JSON_PROPERTY_HAS_MORE = "has_more"; + private Boolean hasMore; + + public static final String JSON_PROPERTY_OBJECT = "object"; + private String _object; + + public static final String JSON_PROPERTY_NEXT_PAGE_URL = "next_page_url"; + private String nextPageUrl; + + public static final String JSON_PROPERTY_PREVIOUS_PAGE_URL = "previous_page_url"; + private String previousPageUrl; + + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public GetOrderDiscountLinesResponse() { + } + + public GetOrderDiscountLinesResponse hasMore(Boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * Indicates if there are more pages to be requested + * @return hasMore + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public Boolean getHasMore() { + return hasMore; + } + + + @JsonProperty(JSON_PROPERTY_HAS_MORE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setHasMore(Boolean hasMore) { + this.hasMore = hasMore; + } + + + public GetOrderDiscountLinesResponse _object(String _object) { + this._object = _object; + return this; + } + + /** + * Object type, in this case is list + * @return _object + **/ + @jakarta.annotation.Nonnull + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + + public String getObject() { + return _object; + } + + + @JsonProperty(JSON_PROPERTY_OBJECT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setObject(String _object) { + this._object = _object; + } + + + public GetOrderDiscountLinesResponse nextPageUrl(String nextPageUrl) { + this.nextPageUrl = nextPageUrl; + return this; + } + + /** + * URL of the next page. + * @return nextPageUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NEXT_PAGE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNextPageUrl() { + return nextPageUrl; + } + + + @JsonProperty(JSON_PROPERTY_NEXT_PAGE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNextPageUrl(String nextPageUrl) { + this.nextPageUrl = nextPageUrl; + } + + + public GetOrderDiscountLinesResponse previousPageUrl(String previousPageUrl) { + this.previousPageUrl = previousPageUrl; + return this; + } + + /** + * Url of the previous page. + * @return previousPageUrl + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREVIOUS_PAGE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getPreviousPageUrl() { + return previousPageUrl; + } + + + @JsonProperty(JSON_PROPERTY_PREVIOUS_PAGE_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPreviousPageUrl(String previousPageUrl) { + this.previousPageUrl = previousPageUrl; + } + + + public GetOrderDiscountLinesResponse data(List data) { + this.data = data; + return this; + } + + public GetOrderDiscountLinesResponse addDataItem(DiscountLinesResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this get_order_discount_lines_response object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrderDiscountLinesResponse getOrderDiscountLinesResponse = (GetOrderDiscountLinesResponse) o; + return Objects.equals(this.hasMore, getOrderDiscountLinesResponse.hasMore) && + Objects.equals(this._object, getOrderDiscountLinesResponse._object) && + Objects.equals(this.nextPageUrl, getOrderDiscountLinesResponse.nextPageUrl) && + Objects.equals(this.previousPageUrl, getOrderDiscountLinesResponse.previousPageUrl) && + Objects.equals(this.data, getOrderDiscountLinesResponse.data); + } + + @Override + public int hashCode() { + return Objects.hash(hasMore, _object, nextPageUrl, previousPageUrl, data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOrderDiscountLinesResponse {\n"); + sb.append(" hasMore: ").append(toIndentedString(hasMore)).append("\n"); + sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); + sb.append(" nextPageUrl: ").append(toIndentedString(nextPageUrl)).append("\n"); + sb.append(" previousPageUrl: ").append(toIndentedString(previousPageUrl)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/GetOrderDiscountLinesResponseAllOf.java b/src/main/java/com/conekta/model/GetOrderDiscountLinesResponseAllOf.java new file mode 100644 index 0000000..2c23778 --- /dev/null +++ b/src/main/java/com/conekta/model/GetOrderDiscountLinesResponseAllOf.java @@ -0,0 +1,121 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.conekta.model.DiscountLinesResponse; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + + +/** + * GetOrderDiscountLinesResponseAllOf + */ +@JsonPropertyOrder({ + GetOrderDiscountLinesResponseAllOf.JSON_PROPERTY_DATA +}) +@JsonTypeName("get_order_discount_lines_response_allOf") +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class GetOrderDiscountLinesResponseAllOf { + public static final String JSON_PROPERTY_DATA = "data"; + private List data; + + public GetOrderDiscountLinesResponseAllOf() { + } + + public GetOrderDiscountLinesResponseAllOf data(List data) { + this.data = data; + return this; + } + + public GetOrderDiscountLinesResponseAllOf addDataItem(DiscountLinesResponse dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getData() { + return data; + } + + + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setData(List data) { + this.data = data; + } + + + /** + * Return true if this get_order_discount_lines_response_allOf object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetOrderDiscountLinesResponseAllOf getOrderDiscountLinesResponseAllOf = (GetOrderDiscountLinesResponseAllOf) o; + return Objects.equals(this.data, getOrderDiscountLinesResponseAllOf.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetOrderDiscountLinesResponseAllOf {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/conekta/model/OrderRequest.java b/src/main/java/com/conekta/model/OrderRequest.java index c60c296..81a28de 100644 --- a/src/main/java/com/conekta/model/OrderRequest.java +++ b/src/main/java/com/conekta/model/OrderRequest.java @@ -51,6 +51,7 @@ OrderRequest.JSON_PROPERTY_METADATA, OrderRequest.JSON_PROPERTY_NEEDS_SHIPPING_CONTACT, OrderRequest.JSON_PROPERTY_PRE_AUTHORIZE, + OrderRequest.JSON_PROPERTY_PROCESSING_MODE, OrderRequest.JSON_PROPERTY_SHIPPING_CONTACT, OrderRequest.JSON_PROPERTY_SHIPPING_LINES, OrderRequest.JSON_PROPERTY_TAX_LINES @@ -85,6 +86,9 @@ public class OrderRequest { public static final String JSON_PROPERTY_PRE_AUTHORIZE = "pre_authorize"; private Boolean preAuthorize = false; + public static final String JSON_PROPERTY_PROCESSING_MODE = "processing_mode"; + private String processingMode; + public static final String JSON_PROPERTY_SHIPPING_CONTACT = "shipping_contact"; private CustomerShippingContacts shippingContact; @@ -285,7 +289,7 @@ public OrderRequest putMetadataItem(String key, Object metadataItem) { } /** - * Get metadata + * Metadata associated with the order * @return metadata **/ @jakarta.annotation.Nullable @@ -354,6 +358,31 @@ public void setPreAuthorize(Boolean preAuthorize) { } + public OrderRequest processingMode(String processingMode) { + this.processingMode = processingMode; + return this; + } + + /** + * Indicates the processing mode for the order, either ecommerce, recurrent or validation. + * @return processingMode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getProcessingMode() { + return processingMode; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingMode(String processingMode) { + this.processingMode = processingMode; + } + + public OrderRequest shippingContact(CustomerShippingContacts shippingContact) { this.shippingContact = shippingContact; return this; @@ -466,6 +495,7 @@ public boolean equals(Object o) { Objects.equals(this.metadata, orderRequest.metadata) && Objects.equals(this.needsShippingContact, orderRequest.needsShippingContact) && Objects.equals(this.preAuthorize, orderRequest.preAuthorize) && + Objects.equals(this.processingMode, orderRequest.processingMode) && Objects.equals(this.shippingContact, orderRequest.shippingContact) && Objects.equals(this.shippingLines, orderRequest.shippingLines) && Objects.equals(this.taxLines, orderRequest.taxLines); @@ -473,7 +503,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(charges, checkout, currency, customerInfo, discountLines, lineItems, metadata, needsShippingContact, preAuthorize, shippingContact, shippingLines, taxLines); + return Objects.hash(charges, checkout, currency, customerInfo, discountLines, lineItems, metadata, needsShippingContact, preAuthorize, processingMode, shippingContact, shippingLines, taxLines); } @Override @@ -489,6 +519,7 @@ public String toString() { sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" needsShippingContact: ").append(toIndentedString(needsShippingContact)).append("\n"); sb.append(" preAuthorize: ").append(toIndentedString(preAuthorize)).append("\n"); + sb.append(" processingMode: ").append(toIndentedString(processingMode)).append("\n"); sb.append(" shippingContact: ").append(toIndentedString(shippingContact)).append("\n"); sb.append(" shippingLines: ").append(toIndentedString(shippingLines)).append("\n"); sb.append(" taxLines: ").append(toIndentedString(taxLines)).append("\n"); diff --git a/src/main/java/com/conekta/model/OrderResponse.java b/src/main/java/com/conekta/model/OrderResponse.java index c56fae2..5d49d0c 100644 --- a/src/main/java/com/conekta/model/OrderResponse.java +++ b/src/main/java/com/conekta/model/OrderResponse.java @@ -57,6 +57,7 @@ OrderResponse.JSON_PROPERTY_METADATA, OrderResponse.JSON_PROPERTY_OBJECT, OrderResponse.JSON_PROPERTY_PAYMENT_STATUS, + OrderResponse.JSON_PROPERTY_PROCESSING_MODE, OrderResponse.JSON_PROPERTY_SHIPPING_CONTACT, OrderResponse.JSON_PROPERTY_UPDATED_AT }) @@ -114,6 +115,9 @@ public class OrderResponse { public static final String JSON_PROPERTY_PAYMENT_STATUS = "payment_status"; private String paymentStatus; + public static final String JSON_PROPERTY_PROCESSING_MODE = "processing_mode"; + private String processingMode; + public static final String JSON_PROPERTY_SHIPPING_CONTACT = "shipping_contact"; private OrderResponseShippingContact shippingContact; @@ -556,6 +560,31 @@ public void setPaymentStatus(String paymentStatus) { } + public OrderResponse processingMode(String processingMode) { + this.processingMode = processingMode; + return this; + } + + /** + * Indicates the processing mode for the order, either ecommerce, recurrent or validation. + * @return processingMode + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getProcessingMode() { + return processingMode; + } + + + @JsonProperty(JSON_PROPERTY_PROCESSING_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setProcessingMode(String processingMode) { + this.processingMode = processingMode; + } + + public OrderResponse shippingContact(OrderResponseShippingContact shippingContact) { this.shippingContact = shippingContact; return this; @@ -635,13 +664,14 @@ public boolean equals(Object o) { Objects.equals(this.metadata, orderResponse.metadata) && Objects.equals(this._object, orderResponse._object) && Objects.equals(this.paymentStatus, orderResponse.paymentStatus) && + Objects.equals(this.processingMode, orderResponse.processingMode) && Objects.equals(this.shippingContact, orderResponse.shippingContact) && Objects.equals(this.updatedAt, orderResponse.updatedAt); } @Override public int hashCode() { - return Objects.hash(amount, amountRefunded, channel, charges, checkout, createdAt, currency, customerInfo, discountLines, fiscalEntity, id, isRefundable, lineItems, livemode, metadata, _object, paymentStatus, shippingContact, updatedAt); + return Objects.hash(amount, amountRefunded, channel, charges, checkout, createdAt, currency, customerInfo, discountLines, fiscalEntity, id, isRefundable, lineItems, livemode, metadata, _object, paymentStatus, processingMode, shippingContact, updatedAt); } @Override @@ -665,6 +695,7 @@ public String toString() { sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); sb.append(" _object: ").append(toIndentedString(_object)).append("\n"); sb.append(" paymentStatus: ").append(toIndentedString(paymentStatus)).append("\n"); + sb.append(" processingMode: ").append(toIndentedString(processingMode)).append("\n"); sb.append(" shippingContact: ").append(toIndentedString(shippingContact)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); diff --git a/src/main/java/com/conekta/model/OrderUpdateRequest.java b/src/main/java/com/conekta/model/OrderUpdateRequest.java index 1fff395..b45be39 100644 --- a/src/main/java/com/conekta/model/OrderUpdateRequest.java +++ b/src/main/java/com/conekta/model/OrderUpdateRequest.java @@ -21,8 +21,8 @@ import com.conekta.model.CheckoutRequest; import com.conekta.model.CustomerShippingContacts; import com.conekta.model.OrderDiscountLinesRequest; -import com.conekta.model.OrderRequestCustomerInfo; import com.conekta.model.OrderTaxRequest; +import com.conekta.model.OrderUpdateRequestCustomerInfo; import com.conekta.model.Product; import com.conekta.model.ShippingRequest; import com.fasterxml.jackson.annotation.JsonInclude; @@ -67,7 +67,7 @@ public class OrderUpdateRequest { private String currency; public static final String JSON_PROPERTY_CUSTOMER_INFO = "customer_info"; - private OrderRequestCustomerInfo customerInfo; + private OrderUpdateRequestCustomerInfo customerInfo; public static final String JSON_PROPERTY_DISCOUNT_LINES = "discount_lines"; private List discountLines; @@ -176,7 +176,7 @@ public void setCurrency(String currency) { } - public OrderUpdateRequest customerInfo(OrderRequestCustomerInfo customerInfo) { + public OrderUpdateRequest customerInfo(OrderUpdateRequestCustomerInfo customerInfo) { this.customerInfo = customerInfo; return this; } @@ -189,14 +189,14 @@ public OrderUpdateRequest customerInfo(OrderRequestCustomerInfo customerInfo) { @JsonProperty(JSON_PROPERTY_CUSTOMER_INFO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OrderRequestCustomerInfo getCustomerInfo() { + public OrderUpdateRequestCustomerInfo getCustomerInfo() { return customerInfo; } @JsonProperty(JSON_PROPERTY_CUSTOMER_INFO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCustomerInfo(OrderRequestCustomerInfo customerInfo) { + public void setCustomerInfo(OrderUpdateRequestCustomerInfo customerInfo) { this.customerInfo = customerInfo; } diff --git a/src/main/java/com/conekta/model/OrderUpdateRequestCustomerInfo.java b/src/main/java/com/conekta/model/OrderUpdateRequestCustomerInfo.java new file mode 100644 index 0000000..2950dde --- /dev/null +++ b/src/main/java/com/conekta/model/OrderUpdateRequestCustomerInfo.java @@ -0,0 +1,250 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta.model; + +import java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.conekta.model.CustomerInfo; +import com.conekta.model.CustomerInfoJustCustomerId; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.conekta.JSON; + +import com.fasterxml.jackson.core.type.TypeReference; + +import jakarta.ws.rs.core.GenericType; +import jakarta.ws.rs.core.Response; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashSet; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import com.conekta.JSON; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +@JsonDeserialize(using = OrderUpdateRequestCustomerInfo.OrderUpdateRequestCustomerInfoDeserializer.class) +@JsonSerialize(using = OrderUpdateRequestCustomerInfo.OrderUpdateRequestCustomerInfoSerializer.class) +public class OrderUpdateRequestCustomerInfo extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(OrderUpdateRequestCustomerInfo.class.getName()); + + public static class OrderUpdateRequestCustomerInfoSerializer extends StdSerializer { + public OrderUpdateRequestCustomerInfoSerializer(Class t) { + super(t); + } + + public OrderUpdateRequestCustomerInfoSerializer() { + this(null); + } + + @Override + public void serialize(OrderUpdateRequestCustomerInfo value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class OrderUpdateRequestCustomerInfoDeserializer extends StdDeserializer { + public OrderUpdateRequestCustomerInfoDeserializer() { + this(OrderUpdateRequestCustomerInfo.class); + } + + public OrderUpdateRequestCustomerInfoDeserializer(Class vc) { + super(vc); + } + + @Override + public OrderUpdateRequestCustomerInfo deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize CustomerInfo + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CustomerInfo.class.equals(Integer.class) || CustomerInfo.class.equals(Long.class) || CustomerInfo.class.equals(Float.class) || CustomerInfo.class.equals(Double.class) || CustomerInfo.class.equals(Boolean.class) || CustomerInfo.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CustomerInfo.class.equals(Integer.class) || CustomerInfo.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CustomerInfo.class.equals(Float.class) || CustomerInfo.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CustomerInfo.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CustomerInfo.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CustomerInfo.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CustomerInfo'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CustomerInfo'", e); + } + + // deserialize CustomerInfoJustCustomerId + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (CustomerInfoJustCustomerId.class.equals(Integer.class) || CustomerInfoJustCustomerId.class.equals(Long.class) || CustomerInfoJustCustomerId.class.equals(Float.class) || CustomerInfoJustCustomerId.class.equals(Double.class) || CustomerInfoJustCustomerId.class.equals(Boolean.class) || CustomerInfoJustCustomerId.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= ((CustomerInfoJustCustomerId.class.equals(Integer.class) || CustomerInfoJustCustomerId.class.equals(Long.class)) && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= ((CustomerInfoJustCustomerId.class.equals(Float.class) || CustomerInfoJustCustomerId.class.equals(Double.class)) && token == JsonToken.VALUE_NUMBER_FLOAT); + attemptParsing |= (CustomerInfoJustCustomerId.class.equals(Boolean.class) && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (CustomerInfoJustCustomerId.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + deserialized = tree.traverse(jp.getCodec()).readValueAs(CustomerInfoJustCustomerId.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + match++; + log.log(Level.FINER, "Input data matches schema 'CustomerInfoJustCustomerId'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'CustomerInfoJustCustomerId'", e); + } + + if (match == 1) { + OrderUpdateRequestCustomerInfo ret = new OrderUpdateRequestCustomerInfo(); + ret.setActualInstance(deserialized); + return ret; + } + throw new IOException(String.format("Failed deserialization for OrderUpdateRequestCustomerInfo: %d classes match result, expected 1", match)); + } + + /** + * Handle deserialization of the 'null' value. + */ + @Override + public OrderUpdateRequestCustomerInfo getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "OrderUpdateRequestCustomerInfo cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap<>(); + + public OrderUpdateRequestCustomerInfo() { + super("oneOf", Boolean.FALSE); + } + + public OrderUpdateRequestCustomerInfo(CustomerInfo o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public OrderUpdateRequestCustomerInfo(CustomerInfoJustCustomerId o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("CustomerInfo", new GenericType() { + }); + schemas.put("CustomerInfoJustCustomerId", new GenericType() { + }); + JSON.registerDescendants(OrderUpdateRequestCustomerInfo.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return OrderUpdateRequestCustomerInfo.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check + * the instance parameter is valid against the oneOf child schemas: + * CustomerInfo, CustomerInfoJustCustomerId + * + * It could be an instance of the 'oneOf' schemas. + * The oneOf child schemas may themselves be a composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(CustomerInfo.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(CustomerInfoJustCustomerId.class, instance, new HashSet<>())) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException("Invalid instance type. Must be CustomerInfo, CustomerInfoJustCustomerId"); + } + + /** + * Get the actual instance, which can be the following: + * CustomerInfo, CustomerInfoJustCustomerId + * + * @return The actual instance (CustomerInfo, CustomerInfoJustCustomerId) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `CustomerInfo`. If the actual instance is not `CustomerInfo`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CustomerInfo` + * @throws ClassCastException if the instance is not `CustomerInfo` + */ + public CustomerInfo getCustomerInfo() throws ClassCastException { + return (CustomerInfo)super.getActualInstance(); + } + + /** + * Get the actual instance of `CustomerInfoJustCustomerId`. If the actual instance is not `CustomerInfoJustCustomerId`, + * the ClassCastException will be thrown. + * + * @return The actual instance of `CustomerInfoJustCustomerId` + * @throws ClassCastException if the instance is not `CustomerInfoJustCustomerId` + */ + public CustomerInfoJustCustomerId getCustomerInfoJustCustomerId() throws ClassCastException { + return (CustomerInfoJustCustomerId)super.getActualInstance(); + } + +} + diff --git a/src/main/java/com/conekta/model/PaymentMethodCard.java b/src/main/java/com/conekta/model/PaymentMethodCard.java index 15b6707..caf96db 100644 --- a/src/main/java/com/conekta/model/PaymentMethodCard.java +++ b/src/main/java/com/conekta/model/PaymentMethodCard.java @@ -37,6 +37,7 @@ PaymentMethodCard.JSON_PROPERTY_ACCOUNT_TYPE, PaymentMethodCard.JSON_PROPERTY_AUTH_CODE, PaymentMethodCard.JSON_PROPERTY_BRAND, + PaymentMethodCard.JSON_PROPERTY_CONTRACT_ID, PaymentMethodCard.JSON_PROPERTY_COUNTRY, PaymentMethodCard.JSON_PROPERTY_EXP_MONTH, PaymentMethodCard.JSON_PROPERTY_EXP_YEAR, @@ -63,6 +64,9 @@ public class PaymentMethodCard { public static final String JSON_PROPERTY_BRAND = "brand"; private String brand; + public static final String JSON_PROPERTY_CONTRACT_ID = "contract_id"; + private String contractId; + public static final String JSON_PROPERTY_COUNTRY = "country"; private String country; @@ -212,6 +216,31 @@ public void setBrand(String brand) { } + public PaymentMethodCard contractId(String contractId) { + this.contractId = contractId; + return this; + } + + /** + * Id sent for recurrent charges. + * @return contractId + **/ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContractId() { + return contractId; + } + + + @JsonProperty(JSON_PROPERTY_CONTRACT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContractId(String contractId) { + this.contractId = contractId; + } + + public PaymentMethodCard country(String country) { this.country = country; return this; @@ -412,6 +441,7 @@ public boolean equals(Object o) { Objects.equals(this.accountType, paymentMethodCard.accountType) && Objects.equals(this.authCode, paymentMethodCard.authCode) && Objects.equals(this.brand, paymentMethodCard.brand) && + Objects.equals(this.contractId, paymentMethodCard.contractId) && Objects.equals(this.country, paymentMethodCard.country) && Objects.equals(this.expMonth, paymentMethodCard.expMonth) && Objects.equals(this.expYear, paymentMethodCard.expYear) && @@ -423,7 +453,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(type, _object, accountType, authCode, brand, country, expMonth, expYear, fraudIndicators, issuer, last4, name); + return Objects.hash(type, _object, accountType, authCode, brand, contractId, country, expMonth, expYear, fraudIndicators, issuer, last4, name); } @Override @@ -435,6 +465,7 @@ public String toString() { sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n"); sb.append(" authCode: ").append(toIndentedString(authCode)).append("\n"); sb.append(" brand: ").append(toIndentedString(brand)).append("\n"); + sb.append(" contractId: ").append(toIndentedString(contractId)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); sb.append(" expMonth: ").append(toIndentedString(expMonth)).append("\n"); sb.append(" expYear: ").append(toIndentedString(expYear)).append("\n"); diff --git a/src/test/java/com/conekta/ApiKeysApiTest.java b/src/test/java/com/conekta/ApiKeysApiTest.java index 73568c9..dc406c0 100644 --- a/src/test/java/com/conekta/ApiKeysApiTest.java +++ b/src/test/java/com/conekta/ApiKeysApiTest.java @@ -49,7 +49,6 @@ public class ApiKeysApiTest { @Test public void createApiKeyTest() throws ApiException { ApiKeyRequest apiKeyRequest = new ApiKeyRequest(); - apiKeyRequest.setActive(true); apiKeyRequest.setDescription("description"); apiKeyRequest.setRole("private"); String acceptLanguage = "es"; diff --git a/src/test/java/com/conekta/BalancesApiTest.java b/src/test/java/com/conekta/BalancesApiTest.java new file mode 100644 index 0000000..fdd94d6 --- /dev/null +++ b/src/test/java/com/conekta/BalancesApiTest.java @@ -0,0 +1,51 @@ +/* + * Conekta API + * Conekta sdk + * + * The version of the OpenAPI document: 2.1.0 + * Contact: engineering@conekta.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.conekta; + +import com.conekta.*; +import com.conekta.auth.*; +import com.conekta.model.BalanceResponse; +import com.conekta.model.Error; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for BalancesApi + */ +public class BalancesApiTest { + + private final BalancesApi api = new BalancesApi(); + + /** + * Get a company's balance + * + * Get a company's balance + * + * @throws ApiException if the Api call fails + */ + @Test + public void getBalanceTest() throws ApiException { + //String acceptLanguage = null; + //BalanceResponse response = api.getBalance(acceptLanguage); + // TODO: test validations + } + +}