diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0dac6ff..3dd8ea5 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -21,13 +21,18 @@ jobs: with: sdk: ${{ matrix.sdk }} - uses: actions/setup-node@v2 + + - name: Run Mockoon CLI + uses: mockoon/cli-action@v1 + with: + version: 'latest' + data-file: 'https://raw.githubusercontent.com/conekta/openapi/main/mocks/conekta_api.json' + port: 3000 - name: dart install, build and test run: | dart pub get dart run build_runner clean && dart run build_runner build --delete-conflicting-outputs - npm install -g @mockoon/cli - npx mockoon-cli start --data https://raw.githubusercontent.com/conekta/openapi/v6.0.3/mocks/conekta_api.json --port 3000 dart run test env: BASE_PATH: http://localhost:3000 diff --git a/.gitignore b/.gitignore index 4298cdc..568b9cc 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ pubspec.lock # Mac .DS_Store +**/*.g.dart diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 7484ee5..40a5ed1 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -21,3 +21,4 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md +README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a15c981..f2165b0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,7 +3,6 @@ AUTHORS.md CODE_OF_CONDUCT.md CONTRIBUTING.md LICENSE -README.md VERSION analysis_options.yaml conekta.png @@ -12,6 +11,7 @@ doc/ApiKeyCreateResponse.md doc/ApiKeyCreateResponseAllOf.md doc/ApiKeyRequest.md doc/ApiKeyResponse.md +doc/ApiKeyResponseOnDelete.md doc/ApiKeyUpdateRequest.md doc/ApiKeysApi.md doc/BalanceCommonField.md @@ -31,6 +31,7 @@ doc/ChargeResponsePaymentMethod.md doc/ChargeResponseRefunds.md doc/ChargeResponseRefundsAllOf.md doc/ChargeResponseRefundsData.md +doc/ChargeUpdateRequest.md doc/ChargesApi.md doc/ChargesDataResponse.md doc/Checkout.md @@ -62,7 +63,6 @@ doc/CustomerFiscalEntitiesResponseAllOf.md doc/CustomerInfo.md doc/CustomerInfoJustCustomerId.md doc/CustomerInfoJustCustomerIdResponse.md -doc/CustomerInfoResponse.md doc/CustomerPaymentMethodRequest.md doc/CustomerPaymentMethods.md doc/CustomerPaymentMethodsData.md @@ -98,6 +98,7 @@ doc/ErrorAllOf.md doc/EventResponse.md doc/EventsApi.md doc/EventsResendResponse.md +doc/FiscalEntityAddress.md doc/GetApiKeysResponse.md doc/GetApiKeysResponseAllOf.md doc/GetChargesResponse.md @@ -127,7 +128,14 @@ doc/LogsApi.md doc/LogsResponse.md doc/LogsResponseData.md doc/OrderCaptureRequest.md +doc/OrderCustomerInfoResponse.md doc/OrderDiscountLinesRequest.md +doc/OrderFiscalEntityAddressResponse.md +doc/OrderFiscalEntityAddressResponseAllOf.md +doc/OrderFiscalEntityRequest.md +doc/OrderFiscalEntityResponse.md +doc/OrderNextActionResponse.md +doc/OrderNextActionResponseRedirectToUrl.md doc/OrderRefundRequest.md doc/OrderRequest.md doc/OrderRequestCustomerInfo.md @@ -139,14 +147,12 @@ doc/OrderResponseCustomerInfo.md doc/OrderResponseCustomerInfoAllOf.md doc/OrderResponseDiscountLines.md doc/OrderResponseDiscountLinesAllOf.md -doc/OrderResponseFiscalEntity.md -doc/OrderResponseFiscalEntityAddress.md -doc/OrderResponseFiscalEntityAddressAllOf.md doc/OrderResponseProducts.md doc/OrderResponseProductsAllOf.md doc/OrderResponseShippingContact.md doc/OrderResponseShippingContactAllOf.md doc/OrderTaxRequest.md +doc/OrderUpdateFiscalEntityRequest.md doc/OrderUpdateRequest.md doc/OrderUpdateRequestCustomerInfo.md doc/OrdersApi.md @@ -267,6 +273,7 @@ lib/src/model/api_key_create_response.dart lib/src/model/api_key_create_response_all_of.dart lib/src/model/api_key_request.dart lib/src/model/api_key_response.dart +lib/src/model/api_key_response_on_delete.dart lib/src/model/api_key_update_request.dart lib/src/model/balance_common_field.dart lib/src/model/balance_response.dart @@ -284,6 +291,7 @@ lib/src/model/charge_response_payment_method.dart lib/src/model/charge_response_refunds.dart lib/src/model/charge_response_refunds_all_of.dart lib/src/model/charge_response_refunds_data.dart +lib/src/model/charge_update_request.dart lib/src/model/charges_data_response.dart lib/src/model/checkout.dart lib/src/model/checkout_order_template.dart @@ -313,7 +321,6 @@ lib/src/model/customer_fiscal_entities_response_all_of.dart lib/src/model/customer_info.dart lib/src/model/customer_info_just_customer_id.dart lib/src/model/customer_info_just_customer_id_response.dart -lib/src/model/customer_info_response.dart lib/src/model/customer_payment_method_request.dart lib/src/model/customer_payment_methods.dart lib/src/model/customer_payment_methods_data.dart @@ -347,6 +354,7 @@ lib/src/model/error.dart lib/src/model/error_all_of.dart lib/src/model/event_response.dart lib/src/model/events_resend_response.dart +lib/src/model/fiscal_entity_address.dart lib/src/model/get_api_keys_response.dart lib/src/model/get_api_keys_response_all_of.dart lib/src/model/get_charges_response.dart @@ -375,7 +383,14 @@ lib/src/model/log_response.dart lib/src/model/logs_response.dart lib/src/model/logs_response_data.dart lib/src/model/order_capture_request.dart +lib/src/model/order_customer_info_response.dart lib/src/model/order_discount_lines_request.dart +lib/src/model/order_fiscal_entity_address_response.dart +lib/src/model/order_fiscal_entity_address_response_all_of.dart +lib/src/model/order_fiscal_entity_request.dart +lib/src/model/order_fiscal_entity_response.dart +lib/src/model/order_next_action_response.dart +lib/src/model/order_next_action_response_redirect_to_url.dart lib/src/model/order_refund_request.dart lib/src/model/order_request.dart lib/src/model/order_request_customer_info.dart @@ -387,14 +402,12 @@ lib/src/model/order_response_customer_info.dart lib/src/model/order_response_customer_info_all_of.dart lib/src/model/order_response_discount_lines.dart lib/src/model/order_response_discount_lines_all_of.dart -lib/src/model/order_response_fiscal_entity.dart -lib/src/model/order_response_fiscal_entity_address.dart -lib/src/model/order_response_fiscal_entity_address_all_of.dart lib/src/model/order_response_products.dart lib/src/model/order_response_products_all_of.dart lib/src/model/order_response_shipping_contact.dart lib/src/model/order_response_shipping_contact_all_of.dart lib/src/model/order_tax_request.dart +lib/src/model/order_update_fiscal_entity_request.dart lib/src/model/order_update_request.dart lib/src/model/order_update_request_customer_info.dart lib/src/model/orders_response.dart diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index cd802a1..3769235 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -6.6.0 \ No newline at end of file +7.1.0 \ No newline at end of file diff --git a/Makefile b/Makefile index 374fda8..4257de1 100644 --- a/Makefile +++ b/Makefile @@ -2,4 +2,15 @@ build: dart run build_runner clean && dart run build_runner build --delete-conflicting-outputs dart-test: - dart run test \ No newline at end of file + dart run test +dart: + rm -rf ../conekta-dart/lib && \ + rm -rf ../conekta-dart/doc && \ + rm -rf ../conekta-dart/lib/src/model && \ + docker run --rm \ + -v ${PWD}:/local openapitools/openapi-generator-cli:v7.1.0 generate \ + -i https://raw.githubusercontent.com/conekta/openapi/main/_build/api.yaml \ + -g dart-dio \ + -o /local \ + -c /local/config-dart.json \ + --global-property modelTests=false diff --git a/README.md b/README.md index 169c5e9..d24e515 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# conekta (EXPERIMENTAL) +# conekta Conekta sdk This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -18,7 +18,7 @@ For more information, please visit [https://github.com/conekta/openapi/issues](h To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml ```yaml dependencies: - conekta: 6.0.0-beta.2 + conekta: 6.0.0 ``` ### Github @@ -54,7 +54,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = await api.createRuleBlacklist(createRiskRulesData, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print("Exception when calling AntifraudApi->createRuleBlacklist: $e\n"); } @@ -77,9 +77,10 @@ Class | Method | HTTP request | Description [*ApiKeysApi*](doc/ApiKeysApi.md) | [**getApiKey**](doc/ApiKeysApi.md#getapikey) | **GET** /api_keys/{id} | Get Api Key [*ApiKeysApi*](doc/ApiKeysApi.md) | [**getApiKeys**](doc/ApiKeysApi.md#getapikeys) | **GET** /api_keys | Get list of Api Keys [*ApiKeysApi*](doc/ApiKeysApi.md) | [**updateApiKey**](doc/ApiKeysApi.md#updateapikey) | **PUT** /api_keys/{id} | Update Api Key -[*BalancesApi*](doc/BalancesApi.md) | [**getBalance**](doc/BalancesApi.md#getbalance) | **GET** /balances | Get a company's balance +[*BalancesApi*](doc/BalancesApi.md) | [**getBalance**](doc/BalancesApi.md#getbalance) | **GET** /balance | Get a company's balance [*ChargesApi*](doc/ChargesApi.md) | [**getCharges**](doc/ChargesApi.md#getcharges) | **GET** /charges | Get A List of Charges [*ChargesApi*](doc/ChargesApi.md) | [**ordersCreateCharge**](doc/ChargesApi.md#orderscreatecharge) | **POST** /orders/{id}/charges | Create charge +[*ChargesApi*](doc/ChargesApi.md) | [**updateCharge**](doc/ChargesApi.md#updatecharge) | **PUT** /charges/{id} | Update a charge [*CompaniesApi*](doc/CompaniesApi.md) | [**getCompanies**](doc/CompaniesApi.md#getcompanies) | **GET** /companies | Get List of Companies [*CompaniesApi*](doc/CompaniesApi.md) | [**getCompany**](doc/CompaniesApi.md#getcompany) | **GET** /companies/{id} | Get Company [*CustomersApi*](doc/CustomersApi.md) | [**createCustomer**](doc/CustomersApi.md#createcustomer) | **POST** /customers | Create customer @@ -165,6 +166,7 @@ Class | Method | HTTP request | Description - [ApiKeyCreateResponseAllOf](doc/ApiKeyCreateResponseAllOf.md) - [ApiKeyRequest](doc/ApiKeyRequest.md) - [ApiKeyResponse](doc/ApiKeyResponse.md) + - [ApiKeyResponseOnDelete](doc/ApiKeyResponseOnDelete.md) - [ApiKeyUpdateRequest](doc/ApiKeyUpdateRequest.md) - [BalanceCommonField](doc/BalanceCommonField.md) - [BalanceResponse](doc/BalanceResponse.md) @@ -182,6 +184,7 @@ Class | Method | HTTP request | Description - [ChargeResponseRefunds](doc/ChargeResponseRefunds.md) - [ChargeResponseRefundsAllOf](doc/ChargeResponseRefundsAllOf.md) - [ChargeResponseRefundsData](doc/ChargeResponseRefundsData.md) + - [ChargeUpdateRequest](doc/ChargeUpdateRequest.md) - [ChargesDataResponse](doc/ChargesDataResponse.md) - [Checkout](doc/Checkout.md) - [CheckoutOrderTemplate](doc/CheckoutOrderTemplate.md) @@ -211,7 +214,6 @@ Class | Method | HTTP request | Description - [CustomerInfo](doc/CustomerInfo.md) - [CustomerInfoJustCustomerId](doc/CustomerInfoJustCustomerId.md) - [CustomerInfoJustCustomerIdResponse](doc/CustomerInfoJustCustomerIdResponse.md) - - [CustomerInfoResponse](doc/CustomerInfoResponse.md) - [CustomerPaymentMethodRequest](doc/CustomerPaymentMethodRequest.md) - [CustomerPaymentMethods](doc/CustomerPaymentMethods.md) - [CustomerPaymentMethodsData](doc/CustomerPaymentMethodsData.md) @@ -244,6 +246,7 @@ Class | Method | HTTP request | Description - [ErrorAllOf](doc/ErrorAllOf.md) - [EventResponse](doc/EventResponse.md) - [EventsResendResponse](doc/EventsResendResponse.md) + - [FiscalEntityAddress](doc/FiscalEntityAddress.md) - [GetApiKeysResponse](doc/GetApiKeysResponse.md) - [GetApiKeysResponseAllOf](doc/GetApiKeysResponseAllOf.md) - [GetChargesResponse](doc/GetChargesResponse.md) @@ -272,7 +275,14 @@ Class | Method | HTTP request | Description - [LogsResponse](doc/LogsResponse.md) - [LogsResponseData](doc/LogsResponseData.md) - [OrderCaptureRequest](doc/OrderCaptureRequest.md) + - [OrderCustomerInfoResponse](doc/OrderCustomerInfoResponse.md) - [OrderDiscountLinesRequest](doc/OrderDiscountLinesRequest.md) + - [OrderFiscalEntityAddressResponse](doc/OrderFiscalEntityAddressResponse.md) + - [OrderFiscalEntityAddressResponseAllOf](doc/OrderFiscalEntityAddressResponseAllOf.md) + - [OrderFiscalEntityRequest](doc/OrderFiscalEntityRequest.md) + - [OrderFiscalEntityResponse](doc/OrderFiscalEntityResponse.md) + - [OrderNextActionResponse](doc/OrderNextActionResponse.md) + - [OrderNextActionResponseRedirectToUrl](doc/OrderNextActionResponseRedirectToUrl.md) - [OrderRefundRequest](doc/OrderRefundRequest.md) - [OrderRequest](doc/OrderRequest.md) - [OrderRequestCustomerInfo](doc/OrderRequestCustomerInfo.md) @@ -284,14 +294,12 @@ Class | Method | HTTP request | Description - [OrderResponseCustomerInfoAllOf](doc/OrderResponseCustomerInfoAllOf.md) - [OrderResponseDiscountLines](doc/OrderResponseDiscountLines.md) - [OrderResponseDiscountLinesAllOf](doc/OrderResponseDiscountLinesAllOf.md) - - [OrderResponseFiscalEntity](doc/OrderResponseFiscalEntity.md) - - [OrderResponseFiscalEntityAddress](doc/OrderResponseFiscalEntityAddress.md) - - [OrderResponseFiscalEntityAddressAllOf](doc/OrderResponseFiscalEntityAddressAllOf.md) - [OrderResponseProducts](doc/OrderResponseProducts.md) - [OrderResponseProductsAllOf](doc/OrderResponseProductsAllOf.md) - [OrderResponseShippingContact](doc/OrderResponseShippingContact.md) - [OrderResponseShippingContactAllOf](doc/OrderResponseShippingContactAllOf.md) - [OrderTaxRequest](doc/OrderTaxRequest.md) + - [OrderUpdateFiscalEntityRequest](doc/OrderUpdateFiscalEntityRequest.md) - [OrderUpdateRequest](doc/OrderUpdateRequest.md) - [OrderUpdateRequestCustomerInfo](doc/OrderUpdateRequestCustomerInfo.md) - [OrdersResponse](doc/OrdersResponse.md) @@ -370,7 +378,7 @@ Class | Method | HTTP request | Description Authentication schemes defined for the API: ### bearerAuth -- **Type**: HTTP basic authentication +- **Type**: HTTP Bearer Token authentication ## Author diff --git a/VERSION b/VERSION index 7bdb826..09b254e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -6.0.0-beta.2 +6.0.0 diff --git a/config-dart.json b/config-dart.json new file mode 100644 index 0000000..a9b0c79 --- /dev/null +++ b/config-dart.json @@ -0,0 +1,32 @@ +{ + "useEnumExtension": true, + "pubAuthor": "conekta", + "pubLibrary": "conekta", + "pubVersion": "6.0.0", + "pubName": "conekta", + "pubRepository": "https://www.github.com/conekta/conekta-dart", + "pubHomepage" : "https://www.github.com/conekta/conekta-dart", + "pubAuthorEmail": "engineering@conekta.com", + "pubDescription": "Conekta dart Library", + "serializationLibrary" : "built_value", + "templateDir": "/local/templates/dart", + "files" : { + "/local/CODE_OF_CONDUCT.md" : {}, + "/local/AUTHORS.md" : {}, + "/local/LICENSE" : {}, + "/local/conekta.png" : {}, + "/local/CONTRIBUTING.md" : {}, + "utils.mustache" : { + "templateType": "SupportingFiles", + "destinationFilename": "utils.dart", + "folder": "lib/src/utils" + }, + "VERSION.mustache" : { + "templateType": "SupportingFiles", + "destinationFilename": "VERSION" + } + }, + "httpUserAgent": "Conekta/v2 DartBindings", + "gitUserId": "conekta", + "gitRepoId": "conekta-dart" +} \ No newline at end of file diff --git a/doc/AntifraudApi.md b/doc/AntifraudApi.md index db3679f..b8b568e 100644 --- a/doc/AntifraudApi.md +++ b/doc/AntifraudApi.md @@ -25,9 +25,6 @@ Create blacklisted rule ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getAntifraudApi(); final CreateRiskRulesData createRiskRulesData = ; // CreateRiskRulesData | requested field for blacklist rule @@ -36,7 +33,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.createRuleBlacklist(createRiskRulesData, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AntifraudApi->createRuleBlacklist: $e\n'); } ``` @@ -71,9 +68,6 @@ Create whitelisted rule ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getAntifraudApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -82,7 +76,7 @@ final CreateRiskRulesData createRiskRulesData = ; // CreateRiskRulesData | try { final response = api.createRuleWhitelist(acceptLanguage, createRiskRulesData); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AntifraudApi->createRuleWhitelist: $e\n'); } ``` @@ -117,9 +111,6 @@ Delete blacklisted rule ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getAntifraudApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -129,7 +120,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.deleteRuleBlacklist(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AntifraudApi->deleteRuleBlacklist: $e\n'); } ``` @@ -165,9 +156,6 @@ Delete whitelisted rule ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getAntifraudApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -177,7 +165,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.deleteRuleWhitelist(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AntifraudApi->deleteRuleWhitelist: $e\n'); } ``` @@ -215,9 +203,6 @@ Return all rules ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getAntifraudApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -225,7 +210,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.getRuleBlacklist(acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AntifraudApi->getRuleBlacklist: $e\n'); } ``` @@ -261,9 +246,6 @@ Return all rules ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getAntifraudApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -271,7 +253,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.getRuleWhitelist(acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling AntifraudApi->getRuleWhitelist: $e\n'); } ``` diff --git a/doc/ApiKeyCreateResponse.md b/doc/ApiKeyCreateResponse.md index 485a2af..ba4502e 100644 --- a/doc/ApiKeyCreateResponse.md +++ b/doc/ApiKeyCreateResponse.md @@ -8,15 +8,18 @@ import 'package:conekta/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authenticationToken** | **String** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key | [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** | **bool** | Indicates if the api key is active | [optional] -**createdAt** | **int** | 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** | **int** | Unix timestamp in seconds of when the api key was created | [optional] +**updatedAt** | **int** | Unix timestamp in seconds of when the api key was last updated | [optional] +**deactivatedAt** | **int** | 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** | **bool** | Indicates if the api key is in live mode | [optional] -**object** | **String** | Object name, value is api_key | [optional] +**livemode** | **bool** | Indicates if the api key is in production | [optional] +**deleted** | **bool** | 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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ApiKeyCreateResponseAllOf.md b/doc/ApiKeyCreateResponseAllOf.md index bde773d..db7acdf 100644 --- a/doc/ApiKeyCreateResponseAllOf.md +++ b/doc/ApiKeyCreateResponseAllOf.md @@ -8,7 +8,7 @@ import 'package:conekta/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**authenticationToken** | **String** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key | [optional] +**authenticationToken** | **String** | It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ApiKeyRequest.md b/doc/ApiKeyRequest.md index 6a30dac..4d179c9 100644 --- a/doc/ApiKeyRequest.md +++ b/doc/ApiKeyRequest.md @@ -8,8 +8,7 @@ import 'package:conekta/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**active** | **bool** | 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** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ApiKeyResponse.md b/doc/ApiKeyResponse.md index 54b320c..0de89be 100644 --- a/doc/ApiKeyResponse.md +++ b/doc/ApiKeyResponse.md @@ -9,13 +9,16 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the api key is active | [optional] -**createdAt** | **int** | 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** | **int** | Unix timestamp in seconds of when the api key was created | [optional] +**updatedAt** | **int** | Unix timestamp in seconds of when the api key was last updated | [optional] +**deactivatedAt** | **int** | 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** | **bool** | Indicates if the api key is in live mode | [optional] -**object** | **String** | Object name, value is api_key | [optional] +**livemode** | **bool** | Indicates if the api key is in production | [optional] +**deleted** | **bool** | 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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ApiKeyResponseOnDelete.md b/doc/ApiKeyResponseOnDelete.md new file mode 100644 index 0000000..c91b0d6 --- /dev/null +++ b/doc/ApiKeyResponseOnDelete.md @@ -0,0 +1,23 @@ +# conekta.model.ApiKeyResponseOnDelete + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **bool** | Indicates if the api key is active | [optional] +**createdAt** | **int** | 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** | **bool** | 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** | **bool** | Indicates if the api key was deleted | [optional] +**role** | **String** | Indicates if the api key is private or public | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/ApiKeyUpdateRequest.md b/doc/ApiKeyUpdateRequest.md index a6acd0e..b5ee619 100644 --- a/doc/ApiKeyUpdateRequest.md +++ b/doc/ApiKeyUpdateRequest.md @@ -9,7 +9,7 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | 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] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ApiKeysApi.md b/doc/ApiKeysApi.md index 8ec9660..f268d68 100644 --- a/doc/ApiKeysApi.md +++ b/doc/ApiKeysApi.md @@ -26,9 +26,6 @@ Create a api key ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getApiKeysApi(); final ApiKeyRequest apiKeyRequest = ; // ApiKeyRequest | requested field for a api keys @@ -38,7 +35,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createApiKey(apiKeyRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ApiKeysApi->createApiKey: $e\n'); } ``` @@ -76,9 +73,6 @@ Deletes a api key that corresponds to a api key ID ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getApiKeysApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -87,7 +81,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.deleteApiKey(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ApiKeysApi->deleteApiKey: $e\n'); } ``` @@ -124,9 +118,6 @@ Gets a api key that corresponds to a api key ID ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getApiKeysApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -136,7 +127,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getApiKey(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ApiKeysApi->getApiKey: $e\n'); } ``` @@ -165,7 +156,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getApiKeys** -> GetApiKeysResponse getApiKeys(acceptLanguage, xChildCompanyId, limit, search, next, previous) +> GetApiKeysResponse getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search) Get list of Api Keys @@ -174,22 +165,19 @@ Consume the list of api keys you have ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getApiKeysApi(); final String acceptLanguage = es; // String | Use for knowing which language to use final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case of a holding company, the company id of the child company to which will process the request. final int limit = 56; // int | The numbers of items to return, the maximum value is 250 -final String search = search_example; // String | General order search, e.g. by mail, reference etc. final String next = next_example; // String | next page final String previous = previous_example; // String | previous page +final String search = search_example; // String | General search, e.g. by id, description, prefix try { - final response = api.getApiKeys(acceptLanguage, xChildCompanyId, limit, search, next, previous); + final response = api.getApiKeys(acceptLanguage, xChildCompanyId, limit, next, previous, search); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ApiKeysApi->getApiKeys: $e\n'); } ``` @@ -201,9 +189,9 @@ Name | Type | Description | Notes **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to 'es'] **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] **limit** | **int**| The numbers of items to return, the maximum value is 250 | [optional] [default to 20] - **search** | **String**| General order search, e.g. by mail, reference etc. | [optional] **next** | **String**| next page | [optional] **previous** | **String**| previous page | [optional] + **search** | **String**| General search, e.g. by id, description, prefix | [optional] ### Return type @@ -230,9 +218,6 @@ Update an existing api key ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getApiKeysApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -242,7 +227,7 @@ final ApiKeyUpdateRequest apiKeyUpdateRequest = ; // ApiKeyUpdateRequest | try { final response = api.updateApiKey(id, acceptLanguage, apiKeyUpdateRequest); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ApiKeysApi->updateApiKey: $e\n'); } ``` diff --git a/doc/BalancesApi.md b/doc/BalancesApi.md index 4244e08..b25b7d6 100644 --- a/doc/BalancesApi.md +++ b/doc/BalancesApi.md @@ -9,7 +9,7 @@ All URIs are relative to *https://api.conekta.io* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getBalance**](BalancesApi.md#getbalance) | **GET** /balances | Get a company's balance +[**getBalance**](BalancesApi.md#getbalance) | **GET** /balance | Get a company's balance # **getBalance** @@ -22,9 +22,6 @@ Get a company's balance ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getBalancesApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -32,7 +29,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.getBalance(acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling BalancesApi->getBalance: $e\n'); } ``` diff --git a/doc/ChargeDataPaymentMethodCardResponse.md b/doc/ChargeDataPaymentMethodCardResponse.md index 2c40791..c357a87 100644 --- a/doc/ChargeDataPaymentMethodCardResponse.md +++ b/doc/ChargeDataPaymentMethodCardResponse.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **accountType** | **String** | | [optional] **authCode** | **String** | | [optional] **brand** | **String** | | [optional] +**contractId** | **String** | Id sent for recurrent charges. | [optional] **country** | **String** | | [optional] **expMonth** | **String** | | [optional] **expYear** | **String** | | [optional] diff --git a/doc/ChargeOrderResponse.md b/doc/ChargeOrderResponse.md index c595441..9949fc0 100644 --- a/doc/ChargeOrderResponse.md +++ b/doc/ChargeOrderResponse.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **deviceFingerprint** | **String** | | [optional] **failureCode** | **String** | | [optional] **failureMessage** | **String** | | [optional] -**fee** | **int** | | [optional] **id** | **String** | | [optional] **livemode** | **bool** | | [optional] **monthlyInstallments** | **int** | | [optional] diff --git a/doc/ChargeOrderResponsePaymentMethod.md b/doc/ChargeOrderResponsePaymentMethod.md index d6892ef..f49dc31 100644 --- a/doc/ChargeOrderResponsePaymentMethod.md +++ b/doc/ChargeOrderResponsePaymentMethod.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **storeName** | **String** | | [optional] **accountType** | **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/doc/ChargeRequest.md b/doc/ChargeRequest.md index c697070..b5c519c 100644 --- a/doc/ChargeRequest.md +++ b/doc/ChargeRequest.md @@ -9,7 +9,6 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **amount** | **int** | | [optional] -**monthlyInstallments** | **int** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] **paymentMethod** | [**ChargeRequestPaymentMethod**](ChargeRequestPaymentMethod.md) | | **referenceId** | **String** | Custom reference to add to the charge | [optional] diff --git a/doc/ChargeRequestPaymentMethod.md b/doc/ChargeRequestPaymentMethod.md index c36192b..a32cde5 100644 --- a/doc/ChargeRequestPaymentMethod.md +++ b/doc/ChargeRequestPaymentMethod.md @@ -9,9 +9,11 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **expiresAt** | **int** | Method expiration date as unix timestamp | [optional] +**monthlyInstallments** | **int** | How many months without interest to apply, it can be 3, 6, 9, 12 or 18 | [optional] **type** | **String** | | **tokenId** | **String** | | [optional] **paymentSourceId** | **String** | | [optional] +**contractId** | **String** | Optional id sent to indicate the bank contract for recurrent card charges. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ChargeResponse.md b/doc/ChargeResponse.md index fce70b7..3f22f6c 100644 --- a/doc/ChargeResponse.md +++ b/doc/ChargeResponse.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **deviceFingerprint** | **String** | | [optional] **failureCode** | **String** | | [optional] **failureMessage** | **String** | | [optional] -**fee** | **int** | | [optional] **id** | **String** | | [optional] **livemode** | **bool** | | [optional] **object** | **String** | | [optional] diff --git a/doc/ChargeResponsePaymentMethod.md b/doc/ChargeResponsePaymentMethod.md index 5ed1d7b..33293d6 100644 --- a/doc/ChargeResponsePaymentMethod.md +++ b/doc/ChargeResponsePaymentMethod.md @@ -20,6 +20,7 @@ Name | Type | Description | Notes **storeName** | **String** | | [optional] **accountType** | **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/doc/OrderResponseFiscalEntity.md b/doc/ChargeUpdateRequest.md similarity index 56% rename from doc/OrderResponseFiscalEntity.md rename to doc/ChargeUpdateRequest.md index 6c658e2..5d5921d 100644 --- a/doc/OrderResponseFiscalEntity.md +++ b/doc/ChargeUpdateRequest.md @@ -1,4 +1,4 @@ -# conekta.model.OrderResponseFiscalEntity +# conekta.model.ChargeUpdateRequest ## Load the model package ```dart @@ -8,10 +8,7 @@ import 'package:conekta/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**address** | [**OrderResponseFiscalEntityAddress**](OrderResponseFiscalEntityAddress.md) | | [optional] -**taxId** | **String** | | [optional] -**id** | **String** | | [optional] -**object** | **String** | | [optional] +**referenceId** | **String** | custom reference id | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/ChargesApi.md b/doc/ChargesApi.md index ac0e15a..d23905d 100644 --- a/doc/ChargesApi.md +++ b/doc/ChargesApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**getCharges**](ChargesApi.md#getcharges) | **GET** /charges | Get A List of Charges [**ordersCreateCharge**](ChargesApi.md#orderscreatecharge) | **POST** /orders/{id}/charges | Create charge +[**updateCharge**](ChargesApi.md#updatecharge) | **PUT** /charges/{id} | Update a charge # **getCharges** @@ -21,9 +22,6 @@ Get A List of Charges ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getChargesApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -36,7 +34,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getCharges(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ChargesApi->getCharges: $e\n'); } ``` @@ -77,9 +75,6 @@ Create charge for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getChargesApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -90,7 +85,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersCreateCharge(id, chargeRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ChargesApi->ordersCreateCharge: $e\n'); } ``` @@ -119,3 +114,50 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **updateCharge** +> ChargeResponse updateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId) + +Update a charge + +### Example +```dart +import 'package:conekta/api.dart'; + +final api = Conekta().getChargesApi(); +final String id = 6307a60c41de27127515a575; // String | Identifier of the resource +final ChargeUpdateRequest chargeUpdateRequest = ; // ChargeUpdateRequest | requested field for update a charge +final String acceptLanguage = es; // String | Use for knowing which language to use +final 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 { + final response = api.updateCharge(id, chargeUpdateRequest, acceptLanguage, xChildCompanyId); + print(response); +} catch on DioException (e) { + print('Exception when calling ChargesApi->updateCharge: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| Identifier of the resource | + **chargeUpdateRequest** | [**ChargeUpdateRequest**](ChargeUpdateRequest.md)| requested field for update a charge | + **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to 'es'] + **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] + +### Return type + +[**ChargeResponse**](ChargeResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/vnd.conekta-v2.1.0+json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/doc/ChargesDataResponse.md b/doc/ChargesDataResponse.md index 58f6f0f..2882433 100644 --- a/doc/ChargesDataResponse.md +++ b/doc/ChargesDataResponse.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **deviceFingerprint** | **String** | | [optional] **failureCode** | **String** | | [optional] **failureMessage** | **String** | | [optional] -**fee** | **int** | | [optional] **id** | **String** | | [optional] **livemode** | **bool** | | [optional] **object** | **String** | | [optional] diff --git a/doc/CompaniesApi.md b/doc/CompaniesApi.md index fd3ce53..0d7cf2d 100644 --- a/doc/CompaniesApi.md +++ b/doc/CompaniesApi.md @@ -23,9 +23,6 @@ Consume the list of child companies. This is used for holding companies with se ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCompaniesApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -37,7 +34,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getCompanies(acceptLanguage, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CompaniesApi->getCompanies: $e\n'); } ``` @@ -75,9 +72,6 @@ Get Company ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCompaniesApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -86,7 +80,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.getCompany(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CompaniesApi->getCompany: $e\n'); } ``` diff --git a/doc/CustomerAddress.md b/doc/CustomerAddress.md index be18d1c..53d798f 100644 --- a/doc/CustomerAddress.md +++ b/doc/CustomerAddress.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **city** | **String** | | **state** | **String** | | [optional] **country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**residential** | **bool** | | [optional] +**residential** | **bool** | | [optional] [default to false] **externalNumber** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/CustomerFiscalEntitiesRequestAddress.md b/doc/CustomerFiscalEntitiesRequestAddress.md index cf3719b..8958614 100644 --- a/doc/CustomerFiscalEntitiesRequestAddress.md +++ b/doc/CustomerFiscalEntitiesRequestAddress.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **city** | **String** | | **state** | **String** | | [optional] **country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**residential** | **bool** | | [optional] +**residential** | **bool** | | [optional] [default to false] **externalNumber** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/CustomerResponse.md b/doc/CustomerResponse.md index 59611fe..daaf930 100644 --- a/doc/CustomerResponse.md +++ b/doc/CustomerResponse.md @@ -9,20 +9,21 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **antifraudInfo** | [**CustomerAntifraudInfoResponse**](CustomerAntifraudInfoResponse.md) | | [optional] -**corporate** | **bool** | | [optional] -**createdAt** | **int** | | -**customReference** | **String** | | [optional] +**corporate** | **bool** | true if the customer is a company | [optional] +**createdAt** | **int** | Creation date of the object | +**customReference** | **String** | Custom reference | [optional] **defaultFiscalEntityId** | **String** | | [optional] **defaultShippingContactId** | **String** | | [optional] **defaultPaymentSourceId** | **String** | | [optional] **email** | **String** | | [optional] **fiscalEntities** | [**CustomerFiscalEntitiesResponse**](CustomerFiscalEntitiesResponse.md) | | [optional] -**id** | **String** | | -**livemode** | **bool** | | -**name** | **String** | | [optional] +**id** | **String** | Customer's ID | +**livemode** | **bool** | true if the object exists in live mode or the value false if the object exists in test mode | +**name** | **String** | Customer's name | +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | | [optional] **object** | **String** | | **paymentSources** | [**CustomerPaymentMethodsResponse**](CustomerPaymentMethodsResponse.md) | | [optional] -**phone** | **String** | | [optional] +**phone** | **String** | Customer's phone number | [optional] **shippingContacts** | [**CustomerResponseShippingContacts**](CustomerResponseShippingContacts.md) | | [optional] **subscription** | [**SubscriptionResponse**](SubscriptionResponse.md) | | [optional] diff --git a/doc/CustomerShippingContacts.md b/doc/CustomerShippingContacts.md index 6fe6530..9a2cc7c 100644 --- a/doc/CustomerShippingContacts.md +++ b/doc/CustomerShippingContacts.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **parentId** | **String** | | [optional] **default_** | **bool** | | [optional] **deleted** | **bool** | | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the shipping contact | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/CustomerShippingContactsDataResponse.md b/doc/CustomerShippingContactsDataResponse.md index 729ceef..17b8b26 100644 --- a/doc/CustomerShippingContactsDataResponse.md +++ b/doc/CustomerShippingContactsDataResponse.md @@ -15,6 +15,7 @@ Name | Type | Description | Notes **parentId** | **String** | | [optional] **default_** | **bool** | | [optional] **deleted** | **bool** | | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the shipping contact | [optional] **id** | **String** | | **object** | **String** | | **createdAt** | **int** | | diff --git a/doc/CustomerShippingContactsResponse.md b/doc/CustomerShippingContactsResponse.md index 66c7953..4cfcb47 100644 --- a/doc/CustomerShippingContactsResponse.md +++ b/doc/CustomerShippingContactsResponse.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **default_** | **bool** | | [optional] **id** | **String** | | [optional] **createdAt** | **int** | | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the shipping contact | [optional] **object** | **String** | | [optional] **deleted** | **bool** | | [optional] diff --git a/doc/CustomersApi.md b/doc/CustomersApi.md index 78ef631..72ebaec 100644 --- a/doc/CustomersApi.md +++ b/doc/CustomersApi.md @@ -28,9 +28,6 @@ The purpose of business is to create and keep a customer, you will learn what el ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final Customer customer = ; // Customer | requested field for customer @@ -40,7 +37,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createCustomer(customer, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->createCustomer: $e\n'); } ``` @@ -78,9 +75,6 @@ Create Fiscal entity resource that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -91,7 +85,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createCustomerFiscalEntities(id, customerFiscalEntitiesRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->createCustomerFiscalEntities: $e\n'); } ``` @@ -130,9 +124,6 @@ Deleted a customer resource that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -142,7 +133,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.deleteCustomerById(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->deleteCustomerById: $e\n'); } ``` @@ -180,9 +171,6 @@ Gets a customer resource that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -192,7 +180,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getCustomerById(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->getCustomerById: $e\n'); } ``` @@ -230,9 +218,6 @@ The purpose of business is to create and maintain a client, you will learn what ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -245,7 +230,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getCustomers(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->getCustomers: $e\n'); } ``` @@ -286,9 +271,6 @@ You can update customer-related data ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -299,7 +281,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updateCustomer(id, updateCustomer, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->updateCustomer: $e\n'); } ``` @@ -338,9 +320,6 @@ Update Fiscal Entity resource that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getCustomersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -352,7 +331,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updateCustomerFiscalEntities(id, fiscalEntitiesId, customerUpdateFiscalEntitiesRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling CustomersApi->updateCustomerFiscalEntities: $e\n'); } ``` diff --git a/doc/DeleteApiKeysResponse.md b/doc/DeleteApiKeysResponse.md index 57a8c28..6970454 100644 --- a/doc/DeleteApiKeysResponse.md +++ b/doc/DeleteApiKeysResponse.md @@ -9,14 +9,14 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | Indicates if the api key is active | [optional] -**createdAt** | **int** | 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** | **bool** | Indicates if the api key is in live mode | [optional] -**object** | **String** | Object name, value is api_key | [optional] +**createdAt** | **int** | 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** | **bool** | 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** | **bool** | | [optional] +**role** | **String** | Indicates if the api key is private or public | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/DiscountsApi.md b/doc/DiscountsApi.md index 203852c..0b3a0db 100644 --- a/doc/DiscountsApi.md +++ b/doc/DiscountsApi.md @@ -26,9 +26,6 @@ Create discount lines for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getDiscountsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -39,7 +36,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersCreateDiscountLine(id, orderDiscountLinesRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DiscountsApi->ordersCreateDiscountLine: $e\n'); } ``` @@ -78,9 +75,6 @@ Delete an existing discount lines for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getDiscountsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -91,7 +85,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersDeleteDiscountLines(id, discountLinesId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DiscountsApi->ordersDeleteDiscountLines: $e\n'); } ``` @@ -130,9 +124,6 @@ Get an existing discount lines for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getDiscountsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -143,7 +134,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersGetDiscountLine(id, discountLinesId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DiscountsApi->ordersGetDiscountLine: $e\n'); } ``` @@ -182,9 +173,6 @@ Get discount lines for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getDiscountsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -198,7 +186,7 @@ final String previous = previous_example; // String | previous page try { final response = api.ordersGetDiscountLines(id, acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DiscountsApi->ordersGetDiscountLines: $e\n'); } ``` @@ -240,9 +228,6 @@ Update an existing discount lines for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getDiscountsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -254,7 +239,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersUpdateDiscountLines(id, discountLinesId, updateOrderDiscountLinesRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling DiscountsApi->ordersUpdateDiscountLines: $e\n'); } ``` diff --git a/doc/EventsApi.md b/doc/EventsApi.md index 772601a..2219c5a 100644 --- a/doc/EventsApi.md +++ b/doc/EventsApi.md @@ -24,9 +24,6 @@ Returns a single event ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getEventsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -36,7 +33,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getEvent(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling EventsApi->getEvent: $e\n'); } ``` @@ -72,9 +69,6 @@ Get list of Events ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getEventsApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -87,7 +81,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getEvents(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling EventsApi->getEvents: $e\n'); } ``` @@ -128,9 +122,6 @@ Try to send an event ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getEventsApi(); final String eventId = 6463d6e35a4c3e001819e760; // String | event identifier @@ -140,7 +131,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.resendEvent(eventId, webhookLogId, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling EventsApi->resendEvent: $e\n'); } ``` diff --git a/doc/FiscalEntityAddress.md b/doc/FiscalEntityAddress.md new file mode 100644 index 0000000..7f0ce7d --- /dev/null +++ b/doc/FiscalEntityAddress.md @@ -0,0 +1,21 @@ +# conekta.model.FiscalEntityAddress + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**street1** | **String** | Street name and number | +**street2** | **String** | Street name and number | [optional] +**postalCode** | **String** | Postal code | +**city** | **String** | City | +**state** | **String** | State | [optional] +**country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | +**externalNumber** | **String** | External number | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/LogsApi.md b/doc/LogsApi.md index e83fee1..4468f7b 100644 --- a/doc/LogsApi.md +++ b/doc/LogsApi.md @@ -23,9 +23,6 @@ Get the details of a specific log ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getLogsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -35,7 +32,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getLogById(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling LogsApi->getLogById: $e\n'); } ``` @@ -73,9 +70,6 @@ Get log details in the form of a list ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getLogsApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -88,7 +82,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getLogs(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling LogsApi->getLogs: $e\n'); } ``` diff --git a/doc/CustomerInfoResponse.md b/doc/OrderCustomerInfoResponse.md similarity index 83% rename from doc/CustomerInfoResponse.md rename to doc/OrderCustomerInfoResponse.md index 26dc02b..a4c062b 100644 --- a/doc/CustomerInfoResponse.md +++ b/doc/OrderCustomerInfoResponse.md @@ -1,4 +1,4 @@ -# conekta.model.CustomerInfoResponse +# conekta.model.OrderCustomerInfoResponse ## Load the model package ```dart @@ -8,6 +8,7 @@ import 'package:conekta/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**customerCustomReference** | **String** | Custom reference | [optional] **name** | **String** | | [optional] **email** | **String** | | [optional] **phone** | **String** | | [optional] diff --git a/doc/OrderResponseFiscalEntityAddress.md b/doc/OrderFiscalEntityAddressResponse.md similarity index 59% rename from doc/OrderResponseFiscalEntityAddress.md rename to doc/OrderFiscalEntityAddressResponse.md index 4e0593a..26176b9 100644 --- a/doc/OrderResponseFiscalEntityAddress.md +++ b/doc/OrderFiscalEntityAddressResponse.md @@ -1,4 +1,4 @@ -# conekta.model.OrderResponseFiscalEntityAddress +# conekta.model.OrderFiscalEntityAddressResponse ## Load the model package ```dart @@ -8,14 +8,13 @@ import 'package:conekta/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**street1** | **String** | | -**street2** | **String** | | [optional] -**postalCode** | **String** | | -**city** | **String** | | -**state** | **String** | | [optional] -**country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | [optional] -**residential** | **bool** | | [optional] -**externalNumber** | **String** | | [optional] +**street1** | **String** | Street name and number | +**street2** | **String** | Street name and number | [optional] +**postalCode** | **String** | Postal code | +**city** | **String** | City | +**state** | **String** | State | [optional] +**country** | **String** | this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) | +**externalNumber** | **String** | External number | **object** | **String** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/OrderResponseFiscalEntityAddressAllOf.md b/doc/OrderFiscalEntityAddressResponseAllOf.md similarity index 87% rename from doc/OrderResponseFiscalEntityAddressAllOf.md rename to doc/OrderFiscalEntityAddressResponseAllOf.md index de5b581..adcd16c 100644 --- a/doc/OrderResponseFiscalEntityAddressAllOf.md +++ b/doc/OrderFiscalEntityAddressResponseAllOf.md @@ -1,4 +1,4 @@ -# conekta.model.OrderResponseFiscalEntityAddressAllOf +# conekta.model.OrderFiscalEntityAddressResponseAllOf ## Load the model package ```dart diff --git a/doc/OrderFiscalEntityRequest.md b/doc/OrderFiscalEntityRequest.md new file mode 100644 index 0000000..7e8b9c4 --- /dev/null +++ b/doc/OrderFiscalEntityRequest.md @@ -0,0 +1,20 @@ +# conekta.model.OrderFiscalEntityRequest + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | +**email** | **String** | Email of the fiscal entity | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the fiscal entity | [optional] +**name** | **String** | Name of the fiscal entity | [optional] +**phone** | **String** | Phone of the fiscal entity | [optional] +**taxId** | **String** | Tax ID of the fiscal entity | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OrderFiscalEntityResponse.md b/doc/OrderFiscalEntityResponse.md new file mode 100644 index 0000000..8655614 --- /dev/null +++ b/doc/OrderFiscalEntityResponse.md @@ -0,0 +1,23 @@ +# conekta.model.OrderFiscalEntityResponse + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | [**OrderFiscalEntityAddressResponse**](OrderFiscalEntityAddressResponse.md) | | +**email** | **String** | Email of the fiscal entity | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the fiscal entity | [optional] +**name** | **String** | Name of the fiscal entity | [optional] +**taxId** | **String** | Tax ID of the fiscal entity | [optional] +**id** | **String** | ID of the fiscal entity | +**createdAt** | **int** | The time at which the object was created in seconds since the Unix epoch | +**object** | **String** | | +**phone** | **String** | Phone of the fiscal entity | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OrderNextActionResponse.md b/doc/OrderNextActionResponse.md new file mode 100644 index 0000000..ee5295f --- /dev/null +++ b/doc/OrderNextActionResponse.md @@ -0,0 +1,16 @@ +# conekta.model.OrderNextActionResponse + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**redirectToUrl** | [**OrderNextActionResponseRedirectToUrl**](OrderNextActionResponseRedirectToUrl.md) | | [optional] +**type** | **String** | Indicates the type of action to be taken | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OrderNextActionResponseRedirectToUrl.md b/doc/OrderNextActionResponseRedirectToUrl.md new file mode 100644 index 0000000..7f837a5 --- /dev/null +++ b/doc/OrderNextActionResponseRedirectToUrl.md @@ -0,0 +1,16 @@ +# conekta.model.OrderNextActionResponseRedirectToUrl + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**url** | **String** | pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. | [optional] +**returnUrl** | **String** | Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OrderRequest.md b/doc/OrderRequest.md index 219d7a8..aa51dfa 100644 --- a/doc/OrderRequest.md +++ b/doc/OrderRequest.md @@ -13,13 +13,17 @@ Name | Type | Description | Notes **currency** | **String** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | **customerInfo** | [**OrderRequestCustomerInfo**](OrderRequestCustomerInfo.md) | | **discountLines** | [**BuiltList<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] +**fiscalEntity** | [**OrderFiscalEntityRequest**](OrderFiscalEntityRequest.md) | | [optional] **lineItems** | [**BuiltList<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** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the order | [optional] **needsShippingContact** | **bool** | Allows you to fill out the shipping information at checkout | [optional] **preAuthorize** | **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to false] +**processingMode** | **String** | Indicates the processing mode for the order, either ecommerce, recurrent or validation. | [optional] +**returnUrl** | **String** | Indicates the redirection callback upon completion of the 3DS2 flow. | [optional] **shippingContact** | [**CustomerShippingContacts**](CustomerShippingContacts.md) | | [optional] **shippingLines** | [**BuiltList<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** | [**BuiltList<OrderTaxRequest>**](OrderTaxRequest.md) | List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. | [optional] +**threeDsMode** | **String** | Indicates the 3DS2 mode for the order, either smart or strict. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/OrderResponse.md b/doc/OrderResponse.md index e3f097d..0b2e52a 100644 --- a/doc/OrderResponse.md +++ b/doc/OrderResponse.md @@ -17,14 +17,16 @@ Name | Type | Description | Notes **currency** | **String** | The three-letter ISO 4217 currency code. The currency of the order. | [optional] **customerInfo** | [**OrderResponseCustomerInfo**](OrderResponseCustomerInfo.md) | | [optional] **discountLines** | [**OrderResponseDiscountLines**](OrderResponseDiscountLines.md) | | [optional] -**fiscalEntity** | [**OrderResponseFiscalEntity**](OrderResponseFiscalEntity.md) | | [optional] +**fiscalEntity** | [**OrderFiscalEntityResponse**](OrderFiscalEntityResponse.md) | | [optional] **id** | **String** | | [optional] **isRefundable** | **bool** | | [optional] **lineItems** | [**OrderResponseProducts**](OrderResponseProducts.md) | | [optional] **livemode** | **bool** | Whether the object exists in live mode or test mode | [optional] **metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. | [optional] +**nextAction** | [**OrderNextActionResponse**](OrderNextActionResponse.md) | | [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** | **int** | The time at which the object was last updated in seconds since the Unix epoch | [optional] diff --git a/doc/OrderResponseCustomerInfo.md b/doc/OrderResponseCustomerInfo.md index e101b9e..97c6ea7 100644 --- a/doc/OrderResponseCustomerInfo.md +++ b/doc/OrderResponseCustomerInfo.md @@ -9,6 +9,7 @@ import 'package:conekta/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **object** | **String** | | [optional] +**customerCustomReference** | **String** | Custom reference | [optional] **name** | **String** | | [optional] **email** | **String** | | [optional] **phone** | **String** | | [optional] diff --git a/doc/OrderResponseShippingContact.md b/doc/OrderResponseShippingContact.md index bba040a..020fe25 100644 --- a/doc/OrderResponseShippingContact.md +++ b/doc/OrderResponseShippingContact.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **address** | [**CustomerShippingContactsResponseAddress**](CustomerShippingContactsResponseAddress.md) | | [optional] **parentId** | **String** | | [optional] **default_** | **bool** | | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the shipping contact | [optional] **deleted** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/OrderUpdateFiscalEntityRequest.md b/doc/OrderUpdateFiscalEntityRequest.md new file mode 100644 index 0000000..a8d06f4 --- /dev/null +++ b/doc/OrderUpdateFiscalEntityRequest.md @@ -0,0 +1,20 @@ +# conekta.model.OrderUpdateFiscalEntityRequest + +## Load the model package +```dart +import 'package:conekta/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | [**FiscalEntityAddress**](FiscalEntityAddress.md) | | +**email** | **String** | Email of the fiscal entity | [optional] +**name** | **String** | Name of the fiscal entity | [optional] +**metadata** | [**BuiltMap<String, JsonObject>**](JsonObject.md) | Metadata associated with the fiscal entity | [optional] +**phone** | **String** | Phone of the fiscal entity | [optional] +**taxId** | **String** | Tax ID of the fiscal entity | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/doc/OrderUpdateRequest.md b/doc/OrderUpdateRequest.md index 84c1c2d..cd8f290 100644 --- a/doc/OrderUpdateRequest.md +++ b/doc/OrderUpdateRequest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **currency** | **String** | Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) | [optional] **customerInfo** | [**OrderUpdateRequestCustomerInfo**](OrderUpdateRequestCustomerInfo.md) | | [optional] **discountLines** | [**BuiltList<OrderDiscountLinesRequest>**](OrderDiscountLinesRequest.md) | List of [discounts](https://developers.conekta.com/v2.1.0/reference/orderscreatediscountline) that are applied to the order. You must have at least one discount. | [optional] +**fiscalEntity** | [**OrderUpdateFiscalEntityRequest**](OrderUpdateFiscalEntityRequest.md) | | [optional] **lineItems** | [**BuiltList<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** | **BuiltMap<String, String>** | | [optional] **preAuthorize** | **bool** | Indicates whether the order charges must be preauthorized | [optional] [default to false] diff --git a/doc/OrdersApi.md b/doc/OrdersApi.md index 0d6c7d7..b237c53 100644 --- a/doc/OrdersApi.md +++ b/doc/OrdersApi.md @@ -29,9 +29,6 @@ Cancel an order that has been previously created. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -41,7 +38,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.cancelOrder(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->cancelOrder: $e\n'); } ``` @@ -79,9 +76,6 @@ Create a new order. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final OrderRequest orderRequest = ; // OrderRequest | requested field for order @@ -91,7 +85,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createOrder(orderRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->createOrder: $e\n'); } ``` @@ -129,9 +123,6 @@ Info for a specific order ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -141,7 +132,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getOrderById(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->getOrderById: $e\n'); } ``` @@ -179,9 +170,6 @@ Get order details in the form of a list ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -194,7 +182,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getOrders(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->getOrders: $e\n'); } ``` @@ -235,9 +223,6 @@ A refunded order describes the items, amount, and reason an order is being refun ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -248,7 +233,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.orderCancelRefund(id, refundId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->orderCancelRefund: $e\n'); } ``` @@ -287,9 +272,6 @@ A refunded order describes the items, amount, and reason an order is being refun ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -300,7 +282,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.orderRefund(id, orderRefundRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->orderRefund: $e\n'); } ``` @@ -339,9 +321,6 @@ Processes an order that has been previously authorized. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -352,7 +331,7 @@ final OrderCaptureRequest orderCaptureRequest = ; // OrderCaptureRequest | reque try { final response = api.ordersCreateCapture(id, acceptLanguage, xChildCompanyId, orderCaptureRequest); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->ordersCreateCapture: $e\n'); } ``` @@ -391,9 +370,6 @@ Update an existing Order. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getOrdersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -403,7 +379,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.updateOrder(id, orderUpdateRequest, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling OrdersApi->updateOrder: $e\n'); } ``` diff --git a/doc/PaymentLinkApi.md b/doc/PaymentLinkApi.md index 0f03c1a..ce6b4d3 100644 --- a/doc/PaymentLinkApi.md +++ b/doc/PaymentLinkApi.md @@ -25,9 +25,6 @@ Cancel Payment Link ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentLinkApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -37,7 +34,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.cancelCheckout(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentLinkApi->cancelCheckout: $e\n'); } ``` @@ -73,9 +70,6 @@ Create Unique Payment Link ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentLinkApi(); final Checkout checkout = ; // Checkout | requested field for checkout @@ -85,7 +79,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createCheckout(checkout, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentLinkApi->createCheckout: $e\n'); } ``` @@ -121,9 +115,6 @@ Send an email ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentLinkApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -134,7 +125,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.emailCheckout(id, emailCheckoutRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentLinkApi->emailCheckout: $e\n'); } ``` @@ -171,9 +162,6 @@ Get a payment link by ID ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentLinkApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -183,7 +171,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getCheckout(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentLinkApi->getCheckout: $e\n'); } ``` @@ -221,9 +209,6 @@ Returns a list of links generated by the merchant ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentLinkApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -236,7 +221,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getCheckouts(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentLinkApi->getCheckouts: $e\n'); } ``` @@ -275,9 +260,6 @@ Send an sms ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentLinkApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -288,7 +270,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.smsCheckout(id, smsCheckoutRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentLinkApi->smsCheckout: $e\n'); } ``` diff --git a/doc/PaymentMethodCard.md b/doc/PaymentMethodCard.md index 2b58732..2865777 100644 --- a/doc/PaymentMethodCard.md +++ b/doc/PaymentMethodCard.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **accountType** | **String** | | [optional] **authCode** | **String** | | [optional] **brand** | **String** | | [optional] +**contractId** | **String** | Id sent for recurrent charges. | [optional] **country** | **String** | | [optional] **expMonth** | **String** | | [optional] **expYear** | **String** | | [optional] diff --git a/doc/PaymentMethodsApi.md b/doc/PaymentMethodsApi.md index 2dfdf1a..4930a3f 100644 --- a/doc/PaymentMethodsApi.md +++ b/doc/PaymentMethodsApi.md @@ -25,20 +25,17 @@ Create a payment method for a customer. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentMethodsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource -final CreateCustomerPaymentMethodsRequest createCustomerPaymentMethodsRequest = {type=card, token_id=tok_test_visa_4242}; // CreateCustomerPaymentMethodsRequest | requested field for customer payment methods +final CreateCustomerPaymentMethodsRequest createCustomerPaymentMethodsRequest = {"type":"card","token_id":"tok_test_visa_4242"}; // CreateCustomerPaymentMethodsRequest | requested field for customer payment methods final String acceptLanguage = es; // String | Use for knowing which language to use final 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 { final response = api.createCustomerPaymentMethods(id, createCustomerPaymentMethodsRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentMethodsApi->createCustomerPaymentMethods: $e\n'); } ``` @@ -77,9 +74,6 @@ Delete an existing payment method ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentMethodsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -90,7 +84,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.deleteCustomerPaymentMethods(id, paymentMethodId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentMethodsApi->deleteCustomerPaymentMethods: $e\n'); } ``` @@ -129,9 +123,6 @@ Get a list of Payment Methods ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentMethodsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -145,7 +136,7 @@ final String search = search_example; // String | General order search, e.g. by try { final response = api.getCustomerPaymentMethods(id, acceptLanguage, xChildCompanyId, limit, next, previous, search); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentMethodsApi->getCustomerPaymentMethods: $e\n'); } ``` @@ -187,9 +178,6 @@ Gets a payment Method that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPaymentMethodsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -201,7 +189,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updateCustomerPaymentMethods(id, paymentMethodId, updatePaymentMethods, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PaymentMethodsApi->updateCustomerPaymentMethods: $e\n'); } ``` diff --git a/doc/PlansApi.md b/doc/PlansApi.md index 2d74d0c..5834cf6 100644 --- a/doc/PlansApi.md +++ b/doc/PlansApi.md @@ -26,9 +26,6 @@ Create a new plan for an existing order ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPlansApi(); final PlanRequest planRequest = ; // PlanRequest | requested field for plan @@ -38,7 +35,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createPlan(planRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PlansApi->createPlan: $e\n'); } ``` @@ -74,9 +71,6 @@ Delete Plan ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPlansApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -85,7 +79,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.deletePlan(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PlansApi->deletePlan: $e\n'); } ``` @@ -120,9 +114,6 @@ Get Plan ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPlansApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -132,7 +123,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getPlan(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PlansApi->getPlan: $e\n'); } ``` @@ -168,9 +159,6 @@ Get A List of Plans ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPlansApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -183,7 +171,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getPlans(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PlansApi->getPlans: $e\n'); } ``` @@ -222,9 +210,6 @@ Update Plan ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getPlansApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -235,7 +220,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updatePlan(id, planUpdateRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling PlansApi->updatePlan: $e\n'); } ``` diff --git a/doc/ProductsApi.md b/doc/ProductsApi.md index ffe0fa5..aea336d 100644 --- a/doc/ProductsApi.md +++ b/doc/ProductsApi.md @@ -24,9 +24,6 @@ Create a new product for an existing order. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getProductsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -37,7 +34,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersCreateProduct(id, product, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ProductsApi->ordersCreateProduct: $e\n'); } ``` @@ -76,9 +73,6 @@ Delete product for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getProductsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -89,7 +83,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersDeleteProduct(id, lineItemId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ProductsApi->ordersDeleteProduct: $e\n'); } ``` @@ -128,9 +122,6 @@ Update an existing product for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getProductsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -142,7 +133,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersUpdateProduct(id, lineItemId, updateProduct, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ProductsApi->ordersUpdateProduct: $e\n'); } ``` diff --git a/doc/ShippingContactsApi.md b/doc/ShippingContactsApi.md index c01c37c..6cb1b71 100644 --- a/doc/ShippingContactsApi.md +++ b/doc/ShippingContactsApi.md @@ -24,9 +24,6 @@ Create a shipping contacts for a customer. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getShippingContactsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -37,7 +34,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createCustomerShippingContacts(id, customerShippingContacts, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ShippingContactsApi->createCustomerShippingContacts: $e\n'); } ``` @@ -76,9 +73,6 @@ Delete shipping contact that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getShippingContactsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -89,7 +83,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.deleteCustomerShippingContacts(id, shippingContactsId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ShippingContactsApi->deleteCustomerShippingContacts: $e\n'); } ``` @@ -128,9 +122,6 @@ Update shipping contact that corresponds to a customer ID. ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getShippingContactsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -142,7 +133,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updateCustomerShippingContacts(id, shippingContactsId, customerUpdateShippingContacts, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ShippingContactsApi->updateCustomerShippingContacts: $e\n'); } ``` diff --git a/doc/ShippingsApi.md b/doc/ShippingsApi.md index 174da0d..bd07946 100644 --- a/doc/ShippingsApi.md +++ b/doc/ShippingsApi.md @@ -24,9 +24,6 @@ Create new shipping for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getShippingsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -37,7 +34,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersCreateShipping(id, shippingRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ShippingsApi->ordersCreateShipping: $e\n'); } ``` @@ -76,9 +73,6 @@ Delete shipping ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getShippingsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -89,7 +83,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersDeleteShipping(id, shippingId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ShippingsApi->ordersDeleteShipping: $e\n'); } ``` @@ -128,9 +122,6 @@ Update existing shipping for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getShippingsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -142,7 +133,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersUpdateShipping(id, shippingId, shippingRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling ShippingsApi->ordersUpdateShipping: $e\n'); } ``` diff --git a/doc/SubscriptionsApi.md b/doc/SubscriptionsApi.md index 1724953..2d06cf8 100644 --- a/doc/SubscriptionsApi.md +++ b/doc/SubscriptionsApi.md @@ -28,9 +28,6 @@ You can cancel the subscription to stop the plans that your customers consume ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -40,7 +37,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.cancelSubscription(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->cancelSubscription: $e\n'); } ``` @@ -78,9 +75,6 @@ You can create the subscription to include the plans that your customers consume ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -91,7 +85,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.createSubscription(id, subscriptionRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->createSubscription: $e\n'); } ``` @@ -130,9 +124,6 @@ You can get the events of the subscription(s) of a client, with the customer id ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -142,7 +133,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getAllEventsFromSubscription(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->getAllEventsFromSubscription: $e\n'); } ``` @@ -178,9 +169,6 @@ Get Subscription ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -189,7 +177,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.getSubscription(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->getSubscription: $e\n'); } ``` @@ -226,9 +214,6 @@ You can pause the subscription to stop the plans that your customers consume ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -238,7 +223,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.pauseSubscription(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->pauseSubscription: $e\n'); } ``` @@ -276,9 +261,6 @@ You can resume the subscription to start the plans that your customers consume ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -288,7 +270,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.resumeSubscription(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->resumeSubscription: $e\n'); } ``` @@ -326,9 +308,6 @@ You can modify the subscription to change the plans that your customers consume ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getSubscriptionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -339,7 +318,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updateSubscription(id, subscriptionUpdateRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling SubscriptionsApi->updateSubscription: $e\n'); } ``` diff --git a/doc/TaxesApi.md b/doc/TaxesApi.md index d185644..49e1824 100644 --- a/doc/TaxesApi.md +++ b/doc/TaxesApi.md @@ -24,9 +24,6 @@ Create new taxes for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTaxesApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -37,7 +34,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersCreateTaxes(id, orderTaxRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TaxesApi->ordersCreateTaxes: $e\n'); } ``` @@ -76,9 +73,6 @@ Delete taxes for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTaxesApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -89,7 +83,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersDeleteTaxes(id, taxId, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TaxesApi->ordersDeleteTaxes: $e\n'); } ``` @@ -128,9 +122,6 @@ Update taxes for an existing orden ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTaxesApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -142,7 +133,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.ordersUpdateTaxes(id, taxId, updateOrderTaxRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TaxesApi->ordersUpdateTaxes: $e\n'); } ``` diff --git a/doc/TokensApi.md b/doc/TokensApi.md index c76dca7..1612084 100644 --- a/doc/TokensApi.md +++ b/doc/TokensApi.md @@ -22,9 +22,6 @@ Generate a payment token, to associate it with a card ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTokensApi(); final Token token = ; // Token | requested field for token @@ -33,7 +30,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.createToken(token, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TokensApi->createToken: $e\n'); } ``` diff --git a/doc/TransactionsApi.md b/doc/TransactionsApi.md index 078bfd5..3613155 100644 --- a/doc/TransactionsApi.md +++ b/doc/TransactionsApi.md @@ -23,9 +23,6 @@ Get the details of a transaction ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTransactionsApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -35,7 +32,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getTransaction(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TransactionsApi->getTransaction: $e\n'); } ``` @@ -64,7 +61,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getTransactions** -> GetTransactionsResponse getTransactions(acceptLanguage, xChildCompanyId, limit, search, next, previous) +> GetTransactionsResponse getTransactions(acceptLanguage, xChildCompanyId, limit, next, previous, id, chargeId, type, currency) Get List transactions @@ -73,22 +70,22 @@ Get transaction details in the form of a list ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTransactionsApi(); final String acceptLanguage = es; // String | Use for knowing which language to use final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case of a holding company, the company id of the child company to which will process the request. final int limit = 56; // int | The numbers of items to return, the maximum value is 250 -final String search = search_example; // String | General order search, e.g. by mail, reference etc. final String next = next_example; // String | next page final String previous = previous_example; // String | previous page +final String id = 65412a893cd69a0001c25892; // String | id of the object to be retrieved +final String chargeId = 65412a893cd69a0001c25892; // String | id of the charge used for filtering +final String type = capture; // String | type of the object to be retrieved +final String currency = MXN; // String | currency of the object to be retrieved try { - final response = api.getTransactions(acceptLanguage, xChildCompanyId, limit, search, next, previous); + final response = api.getTransactions(acceptLanguage, xChildCompanyId, limit, next, previous, id, chargeId, type, currency); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TransactionsApi->getTransactions: $e\n'); } ``` @@ -100,9 +97,12 @@ Name | Type | Description | Notes **acceptLanguage** | **String**| Use for knowing which language to use | [optional] [default to 'es'] **xChildCompanyId** | **String**| In the case of a holding company, the company id of the child company to which will process the request. | [optional] **limit** | **int**| The numbers of items to return, the maximum value is 250 | [optional] [default to 20] - **search** | **String**| General order search, e.g. by mail, reference etc. | [optional] **next** | **String**| next page | [optional] **previous** | **String**| previous page | [optional] + **id** | **String**| id of the object to be retrieved | [optional] + **chargeId** | **String**| id of the charge used for filtering | [optional] + **type** | **String**| type of the object to be retrieved | [optional] + **currency** | **String**| currency of the object to be retrieved | [optional] ### Return type diff --git a/doc/TransfersApi.md b/doc/TransfersApi.md index c8fcdcc..8240293 100644 --- a/doc/TransfersApi.md +++ b/doc/TransfersApi.md @@ -23,9 +23,6 @@ Get the details of a Transfer ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTransfersApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -35,7 +32,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getTransfer(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TransfersApi->getTransfer: $e\n'); } ``` @@ -73,9 +70,6 @@ Get transfers details in the form of a list ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getTransfersApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -88,7 +82,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getTransfers(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling TransfersApi->getTransfers: $e\n'); } ``` diff --git a/doc/WebhookKeysApi.md b/doc/WebhookKeysApi.md index ae59008..e2abb82 100644 --- a/doc/WebhookKeysApi.md +++ b/doc/WebhookKeysApi.md @@ -26,9 +26,6 @@ Create a webhook key ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhookKeysApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -37,7 +34,7 @@ final WebhookKeyRequest webhookKeyRequest = ; // WebhookKeyRequest | try { final response = api.createWebhookKey(acceptLanguage, webhookKeyRequest); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhookKeysApi->createWebhookKey: $e\n'); } ``` @@ -72,9 +69,6 @@ Delete Webhook key ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhookKeysApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -83,7 +77,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.deleteWebhookKey(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhookKeysApi->deleteWebhookKey: $e\n'); } ``` @@ -118,9 +112,6 @@ Get Webhook Key ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhookKeysApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -130,7 +121,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getWebhookKey(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhookKeysApi->getWebhookKey: $e\n'); } ``` @@ -168,9 +159,6 @@ Consume the list of webhook keys you have ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhookKeysApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -183,7 +171,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getWebhookKeys(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhookKeysApi->getWebhookKeys: $e\n'); } ``` @@ -224,9 +212,6 @@ updates an existing webhook key ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhookKeysApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -236,7 +221,7 @@ final WebhookKeyUpdateRequest webhookKeyUpdateRequest = ; // WebhookKeyUpdateReq try { final response = api.updateWebhookKey(id, acceptLanguage, webhookKeyUpdateRequest); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhookKeysApi->updateWebhookKey: $e\n'); } ``` diff --git a/doc/WebhookUpdateRequest.md b/doc/WebhookUpdateRequest.md index 6c4549d..abd9289 100644 --- a/doc/WebhookUpdateRequest.md +++ b/doc/WebhookUpdateRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **url** | **String** | Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. | **synchronous** | **bool** | It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false | [optional] [default to false] -**subscribedEvents** | **BuiltList<String>** | | [optional] +**events** | **BuiltList<String>** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/doc/WebhooksApi.md b/doc/WebhooksApi.md index 3711127..97655b8 100644 --- a/doc/WebhooksApi.md +++ b/doc/WebhooksApi.md @@ -27,9 +27,6 @@ What we do at Conekta translates into events. For example, an event of interest ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhooksApi(); final WebhookRequest webhookRequest = ; // WebhookRequest | requested field for webhook @@ -38,7 +35,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.createWebhook(webhookRequest, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhooksApi->createWebhook: $e\n'); } ``` @@ -73,9 +70,6 @@ Delete Webhook ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhooksApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -84,7 +78,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.deleteWebhook(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhooksApi->deleteWebhook: $e\n'); } ``` @@ -119,9 +113,6 @@ Get Webhook ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhooksApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -131,7 +122,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.getWebhook(id, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhooksApi->getWebhook: $e\n'); } ``` @@ -169,9 +160,6 @@ Consume the list of webhooks you have, each environment supports 10 webhooks (Fo ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhooksApi(); final String acceptLanguage = es; // String | Use for knowing which language to use @@ -184,7 +172,7 @@ final String previous = previous_example; // String | previous page try { final response = api.getWebhooks(acceptLanguage, xChildCompanyId, limit, search, next, previous); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhooksApi->getWebhooks: $e\n'); } ``` @@ -225,9 +213,6 @@ Send a webhook.ping event ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhooksApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -236,7 +221,7 @@ final String acceptLanguage = es; // String | Use for knowing which language to try { final response = api.testWebhook(id, acceptLanguage); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhooksApi->testWebhook: $e\n'); } ``` @@ -273,9 +258,6 @@ updates an existing webhook ### Example ```dart import 'package:conekta/api.dart'; -// TODO Configure HTTP basic authorization: bearerAuth -//defaultApiClient.getAuthentication('bearerAuth').username = 'YOUR_USERNAME' -//defaultApiClient.getAuthentication('bearerAuth').password = 'YOUR_PASSWORD'; final api = Conekta().getWebhooksApi(); final String id = 6307a60c41de27127515a575; // String | Identifier of the resource @@ -286,7 +268,7 @@ final String xChildCompanyId = 6441b6376b60c3a638da80af; // String | In the case try { final response = api.updateWebhook(id, webhookUpdateRequest, acceptLanguage, xChildCompanyId); print(response); -} catch on DioError (e) { +} catch on DioException (e) { print('Exception when calling WebhooksApi->updateWebhook: $e\n'); } ``` diff --git a/lib/conekta.dart b/lib/conekta.dart index 263ef4f..734113c 100644 --- a/lib/conekta.dart +++ b/lib/conekta.dart @@ -37,6 +37,7 @@ export 'package:conekta/src/model/api_key_create_response.dart'; export 'package:conekta/src/model/api_key_create_response_all_of.dart'; export 'package:conekta/src/model/api_key_request.dart'; export 'package:conekta/src/model/api_key_response.dart'; +export 'package:conekta/src/model/api_key_response_on_delete.dart'; export 'package:conekta/src/model/api_key_update_request.dart'; export 'package:conekta/src/model/balance_common_field.dart'; export 'package:conekta/src/model/balance_response.dart'; @@ -54,6 +55,7 @@ export 'package:conekta/src/model/charge_response_payment_method.dart'; export 'package:conekta/src/model/charge_response_refunds.dart'; export 'package:conekta/src/model/charge_response_refunds_all_of.dart'; export 'package:conekta/src/model/charge_response_refunds_data.dart'; +export 'package:conekta/src/model/charge_update_request.dart'; export 'package:conekta/src/model/charges_data_response.dart'; export 'package:conekta/src/model/checkout.dart'; export 'package:conekta/src/model/checkout_order_template.dart'; @@ -83,7 +85,6 @@ export 'package:conekta/src/model/customer_fiscal_entities_response_all_of.dart' export 'package:conekta/src/model/customer_info.dart'; export 'package:conekta/src/model/customer_info_just_customer_id.dart'; export 'package:conekta/src/model/customer_info_just_customer_id_response.dart'; -export 'package:conekta/src/model/customer_info_response.dart'; export 'package:conekta/src/model/customer_payment_method_request.dart'; export 'package:conekta/src/model/customer_payment_methods.dart'; export 'package:conekta/src/model/customer_payment_methods_data.dart'; @@ -116,6 +117,7 @@ export 'package:conekta/src/model/error.dart'; export 'package:conekta/src/model/error_all_of.dart'; export 'package:conekta/src/model/event_response.dart'; export 'package:conekta/src/model/events_resend_response.dart'; +export 'package:conekta/src/model/fiscal_entity_address.dart'; export 'package:conekta/src/model/get_api_keys_response.dart'; export 'package:conekta/src/model/get_api_keys_response_all_of.dart'; export 'package:conekta/src/model/get_charges_response.dart'; @@ -144,7 +146,14 @@ export 'package:conekta/src/model/log_response.dart'; export 'package:conekta/src/model/logs_response.dart'; export 'package:conekta/src/model/logs_response_data.dart'; export 'package:conekta/src/model/order_capture_request.dart'; +export 'package:conekta/src/model/order_customer_info_response.dart'; export 'package:conekta/src/model/order_discount_lines_request.dart'; +export 'package:conekta/src/model/order_fiscal_entity_address_response.dart'; +export 'package:conekta/src/model/order_fiscal_entity_address_response_all_of.dart'; +export 'package:conekta/src/model/order_fiscal_entity_request.dart'; +export 'package:conekta/src/model/order_fiscal_entity_response.dart'; +export 'package:conekta/src/model/order_next_action_response.dart'; +export 'package:conekta/src/model/order_next_action_response_redirect_to_url.dart'; export 'package:conekta/src/model/order_refund_request.dart'; export 'package:conekta/src/model/order_request.dart'; export 'package:conekta/src/model/order_request_customer_info.dart'; @@ -156,14 +165,12 @@ export 'package:conekta/src/model/order_response_customer_info.dart'; export 'package:conekta/src/model/order_response_customer_info_all_of.dart'; export 'package:conekta/src/model/order_response_discount_lines.dart'; export 'package:conekta/src/model/order_response_discount_lines_all_of.dart'; -export 'package:conekta/src/model/order_response_fiscal_entity.dart'; -export 'package:conekta/src/model/order_response_fiscal_entity_address.dart'; -export 'package:conekta/src/model/order_response_fiscal_entity_address_all_of.dart'; export 'package:conekta/src/model/order_response_products.dart'; export 'package:conekta/src/model/order_response_products_all_of.dart'; export 'package:conekta/src/model/order_response_shipping_contact.dart'; export 'package:conekta/src/model/order_response_shipping_contact_all_of.dart'; export 'package:conekta/src/model/order_tax_request.dart'; +export 'package:conekta/src/model/order_update_fiscal_entity_request.dart'; export 'package:conekta/src/model/order_update_request.dart'; export 'package:conekta/src/model/order_update_request_customer_info.dart'; export 'package:conekta/src/model/orders_response.dart'; diff --git a/lib/src/api/antifraud_api.dart b/lib/src/api/antifraud_api.dart index 3bcd02c..fd075aa 100644 --- a/lib/src/api/antifraud_api.dart +++ b/lib/src/api/antifraud_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/blacklist_rule_response.dart'; import 'package:conekta/src/model/create_risk_rules_data.dart'; import 'package:conekta/src/model/deleted_blacklist_rule_response.dart'; @@ -38,7 +39,7 @@ class AntifraudApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BlacklistRuleResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createRuleBlacklist({ required CreateRiskRulesData createRiskRulesData, String? acceptLanguage = 'es', @@ -49,7 +50,7 @@ class AntifraudApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/antifraud/blacklists'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -61,12 +62,10 @@ class AntifraudApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/antifraud/blacklists'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -94,12 +93,12 @@ class AntifraudApi { _bodyData = _serializers.serialize(createRiskRulesData, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -124,10 +123,10 @@ class AntifraudApi { ) as BlacklistRuleResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -159,7 +158,7 @@ class AntifraudApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WhitelistlistRuleResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createRuleWhitelist({ String? acceptLanguage = 'es', CreateRiskRulesData? createRiskRulesData, @@ -170,7 +169,7 @@ class AntifraudApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/antifraud/whitelists'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -182,12 +181,10 @@ class AntifraudApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/antifraud/whitelists'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -215,12 +212,12 @@ class AntifraudApi { _bodyData = createRiskRulesData == null ? null : _serializers.serialize(createRiskRulesData, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -245,10 +242,10 @@ class AntifraudApi { ) as WhitelistlistRuleResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -281,7 +278,7 @@ class AntifraudApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DeletedBlacklistRuleResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteRuleBlacklist({ required String id, String? acceptLanguage = 'es', @@ -293,7 +290,7 @@ class AntifraudApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/antifraud/blacklists/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -304,12 +301,10 @@ class AntifraudApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/antifraud/blacklists/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -348,10 +343,10 @@ class AntifraudApi { ) as DeletedBlacklistRuleResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -384,7 +379,7 @@ class AntifraudApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DeletedWhitelistRuleResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteRuleWhitelist({ required String id, String? acceptLanguage = 'es', @@ -396,7 +391,7 @@ class AntifraudApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/antifraud/whitelists/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -407,12 +402,10 @@ class AntifraudApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/antifraud/whitelists/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -451,10 +444,10 @@ class AntifraudApi { ) as DeletedWhitelistRuleResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -485,7 +478,7 @@ class AntifraudApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [RiskRulesList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getRuleBlacklist({ String? acceptLanguage = 'es', CancelToken? cancelToken, @@ -495,7 +488,7 @@ class AntifraudApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/antifraud/blacklists'; // to determine the Accept header List _contentTypes = [ ]; @@ -506,12 +499,10 @@ class AntifraudApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/antifraud/blacklists'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -549,10 +540,10 @@ class AntifraudApi { ) as RiskRulesList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -583,7 +574,7 @@ class AntifraudApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [RiskRulesList] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getRuleWhitelist({ String? acceptLanguage = 'es', CancelToken? cancelToken, @@ -593,7 +584,7 @@ class AntifraudApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/antifraud/whitelists'; // to determine the Accept header List _contentTypes = [ ]; @@ -604,12 +595,10 @@ class AntifraudApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/antifraud/whitelists'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -647,10 +636,10 @@ class AntifraudApi { ) as RiskRulesList; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/api_keys_api.dart b/lib/src/api/api_keys_api.dart index ad0f4c5..5c50813 100644 --- a/lib/src/api/api_keys_api.dart +++ b/lib/src/api/api_keys_api.dart @@ -40,7 +40,7 @@ class ApiKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiKeyCreateResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createApiKey({ required ApiKeyRequest apiKeyRequest, String? acceptLanguage = 'es', @@ -52,7 +52,7 @@ class ApiKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/api_keys'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -64,12 +64,10 @@ class ApiKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/api_keys'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -98,12 +96,12 @@ class ApiKeysApi { _bodyData = _serializers.serialize(apiKeyRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -128,10 +126,10 @@ class ApiKeysApi { ) as ApiKeyCreateResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -163,7 +161,7 @@ class ApiKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DeleteApiKeysResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteApiKey({ required String id, String? acceptLanguage = 'es', @@ -174,7 +172,7 @@ class ApiKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/api_keys/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -185,12 +183,10 @@ class ApiKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/api_keys/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -228,10 +224,10 @@ class ApiKeysApi { ) as DeleteApiKeysResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -264,7 +260,7 @@ class ApiKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiKeyResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getApiKey({ required String id, String? acceptLanguage = 'es', @@ -276,7 +272,7 @@ class ApiKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/api_keys/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -287,12 +283,10 @@ class ApiKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/api_keys/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -331,10 +325,10 @@ class ApiKeysApi { ) as ApiKeyResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -359,9 +353,9 @@ class ApiKeysApi { /// * [acceptLanguage] - Use for knowing which language to use /// * [xChildCompanyId] - In the case of a holding company, the company id of the child company to which will process the request. /// * [limit] - The numbers of items to return, the maximum value is 250 - /// * [search] - General order search, e.g. by mail, reference etc. /// * [next] - next page /// * [previous] - previous page + /// * [search] - General search, e.g. by id, description, prefix /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -370,14 +364,14 @@ class ApiKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetApiKeysResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getApiKeys({ String? acceptLanguage = 'es', String? xChildCompanyId, int? limit = 20, - String? search, String? next, String? previous, + String? search, CancelToken? cancelToken, Map? headers, Map? extra, @@ -385,7 +379,7 @@ class ApiKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/api_keys'; // to determine the Accept header List _contentTypes = [ ]; @@ -396,12 +390,10 @@ class ApiKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/api_keys'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -424,9 +416,9 @@ class ApiKeysApi { final _queryParameters = { if (limit != null) r'limit': encodeQueryParameter(_serializers, limit, const FullType(int)), - if (search != null) r'search': encodeQueryParameter(_serializers, search, const FullType(String)), if (next != null) r'next': encodeQueryParameter(_serializers, next, const FullType(String)), if (previous != null) r'previous': encodeQueryParameter(_serializers, previous, const FullType(String)), + if (search != null) r'search': encodeQueryParameter(_serializers, search, const FullType(String)), }; final _response = await _dio.request( @@ -448,10 +440,10 @@ class ApiKeysApi { ) as GetApiKeysResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -484,7 +476,7 @@ class ApiKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ApiKeyResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateApiKey({ required String id, String? acceptLanguage = 'es', @@ -496,7 +488,7 @@ class ApiKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/api_keys/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -508,12 +500,10 @@ class ApiKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/api_keys/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -541,12 +531,12 @@ class ApiKeysApi { _bodyData = apiKeyUpdateRequest == null ? null : _serializers.serialize(apiKeyUpdateRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -571,10 +561,10 @@ class ApiKeysApi { ) as ApiKeyResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/balances_api.dart b/lib/src/api/balances_api.dart index efb3efe..511237e 100644 --- a/lib/src/api/balances_api.dart +++ b/lib/src/api/balances_api.dart @@ -32,7 +32,7 @@ class BalancesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [BalanceResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getBalance({ String? acceptLanguage = 'es', CancelToken? cancelToken, @@ -42,7 +42,7 @@ class BalancesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/balance'; // to determine the Accept header List _contentTypes = [ ]; @@ -53,12 +53,10 @@ class BalancesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/balances'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -96,10 +94,10 @@ class BalancesApi { ) as BalanceResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/charges_api.dart b/lib/src/api/charges_api.dart index c331829..c4664c6 100644 --- a/lib/src/api/charges_api.dart +++ b/lib/src/api/charges_api.dart @@ -10,6 +10,8 @@ import 'package:dio/dio.dart'; import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/charge_order_response.dart'; import 'package:conekta/src/model/charge_request.dart'; +import 'package:conekta/src/model/charge_response.dart'; +import 'package:conekta/src/model/charge_update_request.dart'; import 'package:conekta/src/model/error.dart'; import 'package:conekta/src/model/get_charges_response.dart'; import 'package:conekta/src/utils/utils.dart'; @@ -40,7 +42,7 @@ class ChargesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetChargesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCharges({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -55,7 +57,7 @@ class ChargesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/charges'; // to determine the Accept header List _contentTypes = [ ]; @@ -66,12 +68,10 @@ class ChargesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/charges'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -118,10 +118,10 @@ class ChargesApi { ) as GetChargesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -155,7 +155,7 @@ class ChargesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ChargeOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersCreateCharge({ required String id, required ChargeRequest chargeRequest, @@ -168,7 +168,7 @@ class ChargesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/charges'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -180,12 +180,10 @@ class ChargesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/charges'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -214,12 +212,12 @@ class ChargesApi { _bodyData = _serializers.serialize(chargeRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -244,10 +242,10 @@ class ChargesApi { ) as ChargeOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -265,4 +263,128 @@ class ChargesApi { ); } + /// Update a charge + /// + /// + /// Parameters: + /// * [id] - Identifier of the resource + /// * [chargeUpdateRequest] - requested field for update a charge + /// * [acceptLanguage] - Use for knowing which language to use + /// * [xChildCompanyId] - In the case of a holding company, the company id of the child company to which will process the request. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ChargeResponse] as data + /// Throws [DioException] if API call or serialization fails + Future> updateCharge({ + required String id, + required ChargeUpdateRequest chargeUpdateRequest, + String? acceptLanguage = 'es', + String? xChildCompanyId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/charges/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + // to determine the Accept header + List _contentTypes = [ + "application/json" + ]; + var localVarContentType = selectHeaderContentType(_contentTypes); + + // to determine the Accept header + List _accepts = [ + "application/vnd.conekta-v2.1.0+json" + ]; + final localVarAccept = selectHeaderAccept(_accepts); + final _options = Options( + method: r'PUT', + headers: { + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', + if (acceptLanguage != null) r'Accept-Language': acceptLanguage, + if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, + if (localVarAccept != null) r'Accept': localVarAccept, + if (localVarContentType != null) r'Content-Type': localVarContentType, + r'X-Conekta-Client-User-Agent' : getConektaClientUserAgent(), + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'bearer', + 'name': 'bearerAuth', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ChargeUpdateRequest); + _bodyData = _serializers.serialize(chargeUpdateRequest, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ChargeResponse? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ChargeResponse), + ) as ChargeResponse; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + } diff --git a/lib/src/api/companies_api.dart b/lib/src/api/companies_api.dart index 1e800a4..78b717b 100644 --- a/lib/src/api/companies_api.dart +++ b/lib/src/api/companies_api.dart @@ -38,7 +38,7 @@ class CompaniesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetCompaniesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCompanies({ String? acceptLanguage = 'es', int? limit = 20, @@ -52,7 +52,7 @@ class CompaniesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/companies'; // to determine the Accept header List _contentTypes = [ ]; @@ -63,12 +63,10 @@ class CompaniesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/companies'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -114,10 +112,10 @@ class CompaniesApi { ) as GetCompaniesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -149,7 +147,7 @@ class CompaniesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CompanyResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCompany({ required String id, String? acceptLanguage = 'es', @@ -160,7 +158,7 @@ class CompaniesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/companies/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -171,12 +169,10 @@ class CompaniesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/companies/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -214,10 +210,10 @@ class CompaniesApi { ) as CompanyResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/customers_api.dart b/lib/src/api/customers_api.dart index 63bc24c..75da741 100644 --- a/lib/src/api/customers_api.dart +++ b/lib/src/api/customers_api.dart @@ -42,7 +42,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createCustomer({ required Customer customer, String? acceptLanguage = 'es', @@ -54,7 +54,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -66,12 +66,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -100,12 +98,12 @@ class CustomersApi { _bodyData = _serializers.serialize(customer, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -130,10 +128,10 @@ class CustomersApi { ) as CustomerResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -167,7 +165,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CreateCustomerFiscalEntitiesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createCustomerFiscalEntities({ required String id, required CustomerFiscalEntitiesRequest customerFiscalEntitiesRequest, @@ -180,7 +178,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/fiscal_entities'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -192,12 +190,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/fiscal_entities'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -226,12 +222,12 @@ class CustomersApi { _bodyData = _serializers.serialize(customerFiscalEntitiesRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -256,10 +252,10 @@ class CustomersApi { ) as CreateCustomerFiscalEntitiesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -292,7 +288,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteCustomerById({ required String id, String? acceptLanguage = 'es', @@ -304,7 +300,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -315,12 +311,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -359,10 +353,10 @@ class CustomersApi { ) as CustomerResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -395,7 +389,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCustomerById({ required String id, String? acceptLanguage = 'es', @@ -407,7 +401,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -418,12 +412,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -462,10 +454,10 @@ class CustomersApi { ) as CustomerResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -501,7 +493,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomersResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCustomers({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -516,7 +508,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers'; // to determine the Accept header List _contentTypes = [ ]; @@ -527,12 +519,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -579,10 +569,10 @@ class CustomersApi { ) as CustomersResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -616,7 +606,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateCustomer({ required String id, required UpdateCustomer updateCustomer, @@ -629,7 +619,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -641,12 +631,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -675,12 +663,12 @@ class CustomersApi { _bodyData = _serializers.serialize(updateCustomer, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -705,10 +693,10 @@ class CustomersApi { ) as CustomerResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -743,7 +731,7 @@ class CustomersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [UpdateCustomerFiscalEntitiesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateCustomerFiscalEntities({ required String id, required String fiscalEntitiesId, @@ -757,7 +745,7 @@ class CustomersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/fiscal_entities/{fiscal_entities_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'fiscal_entities_id' '}', encodeQueryParameter(_serializers, fiscalEntitiesId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -769,12 +757,10 @@ class CustomersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/fiscal_entities/{fiscal_entities_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'fiscal_entities_id' '}', fiscalEntitiesId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -803,12 +789,12 @@ class CustomersApi { _bodyData = _serializers.serialize(customerUpdateFiscalEntitiesRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -833,10 +819,10 @@ class CustomersApi { ) as UpdateCustomerFiscalEntitiesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/discounts_api.dart b/lib/src/api/discounts_api.dart index 2ff4fba..95d3dda 100644 --- a/lib/src/api/discounts_api.dart +++ b/lib/src/api/discounts_api.dart @@ -39,7 +39,7 @@ class DiscountsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DiscountLinesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersCreateDiscountLine({ required String id, required OrderDiscountLinesRequest orderDiscountLinesRequest, @@ -52,7 +52,7 @@ class DiscountsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/discount_lines'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -64,12 +64,10 @@ class DiscountsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/discount_lines'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -98,12 +96,12 @@ class DiscountsApi { _bodyData = _serializers.serialize(orderDiscountLinesRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -128,10 +126,10 @@ class DiscountsApi { ) as DiscountLinesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -165,7 +163,7 @@ class DiscountsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DiscountLinesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersDeleteDiscountLines({ required String id, required String discountLinesId, @@ -178,7 +176,7 @@ class DiscountsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/discount_lines/{discount_lines_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'discount_lines_id' '}', encodeQueryParameter(_serializers, discountLinesId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -189,12 +187,10 @@ class DiscountsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/discount_lines/{discount_lines_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'discount_lines_id' '}', discountLinesId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -233,10 +229,10 @@ class DiscountsApi { ) as DiscountLinesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -270,7 +266,7 @@ class DiscountsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DiscountLinesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersGetDiscountLine({ required String id, required String discountLinesId, @@ -283,7 +279,7 @@ class DiscountsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/discount_lines/{discount_lines_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'discount_lines_id' '}', encodeQueryParameter(_serializers, discountLinesId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -294,12 +290,10 @@ class DiscountsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/discount_lines/{discount_lines_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'discount_lines_id' '}', discountLinesId.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -338,10 +332,10 @@ class DiscountsApi { ) as DiscountLinesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -378,7 +372,7 @@ class DiscountsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetOrderDiscountLinesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersGetDiscountLines({ required String id, String? acceptLanguage = 'es', @@ -394,7 +388,7 @@ class DiscountsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/discount_lines'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -405,12 +399,10 @@ class DiscountsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/discount_lines'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -457,10 +449,10 @@ class DiscountsApi { ) as GetOrderDiscountLinesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -495,7 +487,7 @@ class DiscountsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [DiscountLinesResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersUpdateDiscountLines({ required String id, required String discountLinesId, @@ -509,7 +501,7 @@ class DiscountsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/discount_lines/{discount_lines_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'discount_lines_id' '}', encodeQueryParameter(_serializers, discountLinesId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -521,12 +513,10 @@ class DiscountsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/discount_lines/{discount_lines_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'discount_lines_id' '}', discountLinesId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -555,12 +545,12 @@ class DiscountsApi { _bodyData = _serializers.serialize(updateOrderDiscountLinesRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -585,10 +575,10 @@ class DiscountsApi { ) as DiscountLinesResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/events_api.dart b/lib/src/api/events_api.dart index 95a8dd7..521b95e 100644 --- a/lib/src/api/events_api.dart +++ b/lib/src/api/events_api.dart @@ -37,7 +37,7 @@ class EventsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [EventResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getEvent({ required String id, String? acceptLanguage = 'es', @@ -49,7 +49,7 @@ class EventsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/events/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -60,12 +60,10 @@ class EventsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/events/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -104,10 +102,10 @@ class EventsApi { ) as EventResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -143,7 +141,7 @@ class EventsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetEventsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getEvents({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -158,7 +156,7 @@ class EventsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/events'; // to determine the Accept header List _contentTypes = [ ]; @@ -169,12 +167,10 @@ class EventsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/events'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -221,10 +217,10 @@ class EventsApi { ) as GetEventsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -257,7 +253,7 @@ class EventsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [EventsResendResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> resendEvent({ required String eventId, required String webhookLogId, @@ -269,7 +265,7 @@ class EventsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/events/{event_id}/webhook_logs/{webhook_log_id}/resend'.replaceAll('{' r'event_id' '}', encodeQueryParameter(_serializers, eventId, const FullType(String)).toString()).replaceAll('{' r'webhook_log_id' '}', encodeQueryParameter(_serializers, webhookLogId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -280,12 +276,10 @@ class EventsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/events/{event_id}/webhook_logs/{webhook_log_id}/resend'.replaceAll('{' r'event_id' '}', eventId.toString()).replaceAll('{' r'webhook_log_id' '}', webhookLogId.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -323,10 +317,10 @@ class EventsApi { ) as EventsResendResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/logs_api.dart b/lib/src/api/logs_api.dart index abd0ff9..4b54bdc 100644 --- a/lib/src/api/logs_api.dart +++ b/lib/src/api/logs_api.dart @@ -36,7 +36,7 @@ class LogsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [LogResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getLogById({ required String id, String? acceptLanguage = 'es', @@ -48,7 +48,7 @@ class LogsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/logs/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -59,12 +59,10 @@ class LogsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/logs/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -103,10 +101,10 @@ class LogsApi { ) as LogResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -142,7 +140,7 @@ class LogsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [LogsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getLogs({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -157,7 +155,7 @@ class LogsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/logs'; // to determine the Accept header List _contentTypes = [ ]; @@ -168,12 +166,10 @@ class LogsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/logs'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -220,10 +216,10 @@ class LogsApi { ) as LogsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/orders_api.dart b/lib/src/api/orders_api.dart index be7fd74..f9cf529 100644 --- a/lib/src/api/orders_api.dart +++ b/lib/src/api/orders_api.dart @@ -40,7 +40,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> cancelOrder({ required String id, String? acceptLanguage = 'es', @@ -52,7 +52,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/cancel'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -63,12 +63,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/cancel'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -107,10 +105,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -143,7 +141,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createOrder({ required OrderRequest orderRequest, String? acceptLanguage = 'es', @@ -155,7 +153,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -167,12 +165,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -201,12 +197,12 @@ class OrdersApi { _bodyData = _serializers.serialize(orderRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -231,10 +227,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -267,7 +263,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOrderById({ required String id, String? acceptLanguage = 'es', @@ -279,7 +275,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -290,12 +286,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -334,10 +328,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -373,7 +367,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetOrdersResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getOrders({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -388,7 +382,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders'; // to determine the Accept header List _contentTypes = [ ]; @@ -399,12 +393,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -451,10 +443,10 @@ class OrdersApi { ) as GetOrdersResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -488,7 +480,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> orderCancelRefund({ required String id, required String refundId, @@ -501,7 +493,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/refunds/{refund_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'refund_id' '}', encodeQueryParameter(_serializers, refundId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -512,12 +504,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/refunds/{refund_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'refund_id' '}', refundId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -556,10 +546,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -593,7 +583,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> orderRefund({ required String id, required OrderRefundRequest orderRefundRequest, @@ -606,7 +596,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/refunds'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -618,12 +608,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/refunds'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -652,12 +640,12 @@ class OrdersApi { _bodyData = _serializers.serialize(orderRefundRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -682,10 +670,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -719,7 +707,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersCreateCapture({ required String id, String? acceptLanguage = 'es', @@ -732,7 +720,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/capture'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -744,12 +732,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/capture'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -778,12 +764,12 @@ class OrdersApi { _bodyData = orderCaptureRequest == null ? null : _serializers.serialize(orderCaptureRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -808,10 +794,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -844,7 +830,7 @@ class OrdersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [OrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateOrder({ required String id, required OrderUpdateRequest orderUpdateRequest, @@ -856,7 +842,7 @@ class OrdersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -868,12 +854,10 @@ class OrdersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -901,12 +885,12 @@ class OrdersApi { _bodyData = _serializers.serialize(orderUpdateRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -931,10 +915,10 @@ class OrdersApi { ) as OrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/payment_link_api.dart b/lib/src/api/payment_link_api.dart index 32577d0..b6988cb 100644 --- a/lib/src/api/payment_link_api.dart +++ b/lib/src/api/payment_link_api.dart @@ -39,7 +39,7 @@ class PaymentLinkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CheckoutResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> cancelCheckout({ required String id, String? acceptLanguage = 'es', @@ -51,7 +51,7 @@ class PaymentLinkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/checkouts/{id}/cancel'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -62,12 +62,10 @@ class PaymentLinkApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/checkouts/{id}/cancel'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -106,10 +104,10 @@ class PaymentLinkApi { ) as CheckoutResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -142,7 +140,7 @@ class PaymentLinkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CheckoutResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createCheckout({ required Checkout checkout, String? acceptLanguage = 'es', @@ -154,7 +152,7 @@ class PaymentLinkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/checkouts'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -166,12 +164,10 @@ class PaymentLinkApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/checkouts'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -200,12 +196,12 @@ class PaymentLinkApi { _bodyData = _serializers.serialize(checkout, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -230,10 +226,10 @@ class PaymentLinkApi { ) as CheckoutResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -267,7 +263,7 @@ class PaymentLinkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CheckoutResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> emailCheckout({ required String id, required EmailCheckoutRequest emailCheckoutRequest, @@ -280,7 +276,7 @@ class PaymentLinkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/checkouts/{id}/email'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -292,12 +288,10 @@ class PaymentLinkApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/checkouts/{id}/email'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -326,12 +320,12 @@ class PaymentLinkApi { _bodyData = _serializers.serialize(emailCheckoutRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -356,10 +350,10 @@ class PaymentLinkApi { ) as CheckoutResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -392,7 +386,7 @@ class PaymentLinkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CheckoutResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCheckout({ required String id, String? acceptLanguage = 'es', @@ -404,7 +398,7 @@ class PaymentLinkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/checkouts/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -415,12 +409,10 @@ class PaymentLinkApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/checkouts/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -459,10 +451,10 @@ class PaymentLinkApi { ) as CheckoutResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -498,7 +490,7 @@ class PaymentLinkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CheckoutsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCheckouts({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -513,7 +505,7 @@ class PaymentLinkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/checkouts'; // to determine the Accept header List _contentTypes = [ ]; @@ -524,12 +516,10 @@ class PaymentLinkApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/checkouts'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -576,10 +566,10 @@ class PaymentLinkApi { ) as CheckoutsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -613,7 +603,7 @@ class PaymentLinkApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CheckoutResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> smsCheckout({ required String id, required SmsCheckoutRequest smsCheckoutRequest, @@ -626,7 +616,7 @@ class PaymentLinkApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/checkouts/{id}/sms'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -638,12 +628,10 @@ class PaymentLinkApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/checkouts/{id}/sms'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -672,12 +660,12 @@ class PaymentLinkApi { _bodyData = _serializers.serialize(smsCheckoutRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -702,10 +690,10 @@ class PaymentLinkApi { ) as CheckoutResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/payment_methods_api.dart b/lib/src/api/payment_methods_api.dart index 40136a1..99222cc 100644 --- a/lib/src/api/payment_methods_api.dart +++ b/lib/src/api/payment_methods_api.dart @@ -40,7 +40,7 @@ class PaymentMethodsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CreateCustomerPaymentMethodsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createCustomerPaymentMethods({ required String id, required CreateCustomerPaymentMethodsRequest createCustomerPaymentMethodsRequest, @@ -53,7 +53,7 @@ class PaymentMethodsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/payment_sources'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -65,12 +65,10 @@ class PaymentMethodsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/payment_sources'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -99,12 +97,12 @@ class PaymentMethodsApi { _bodyData = _serializers.serialize(createCustomerPaymentMethodsRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -129,10 +127,10 @@ class PaymentMethodsApi { ) as CreateCustomerPaymentMethodsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -166,7 +164,7 @@ class PaymentMethodsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [UpdateCustomerPaymentMethodsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteCustomerPaymentMethods({ required String id, required String paymentMethodId, @@ -179,7 +177,7 @@ class PaymentMethodsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/payment_sources/{payment_method_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'payment_method_id' '}', encodeQueryParameter(_serializers, paymentMethodId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -190,12 +188,10 @@ class PaymentMethodsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/payment_sources/{payment_method_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'payment_method_id' '}', paymentMethodId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -234,10 +230,10 @@ class PaymentMethodsApi { ) as UpdateCustomerPaymentMethodsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -274,7 +270,7 @@ class PaymentMethodsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetPaymentMethodResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getCustomerPaymentMethods({ required String id, String? acceptLanguage = 'es', @@ -290,7 +286,7 @@ class PaymentMethodsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/payment_sources'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -301,12 +297,10 @@ class PaymentMethodsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/payment_sources'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -353,10 +347,10 @@ class PaymentMethodsApi { ) as GetPaymentMethodResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -391,7 +385,7 @@ class PaymentMethodsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [UpdateCustomerPaymentMethodsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateCustomerPaymentMethods({ required String id, required String paymentMethodId, @@ -405,7 +399,7 @@ class PaymentMethodsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/payment_sources/{payment_method_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'payment_method_id' '}', encodeQueryParameter(_serializers, paymentMethodId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -417,12 +411,10 @@ class PaymentMethodsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/payment_sources/{payment_method_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'payment_method_id' '}', paymentMethodId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -451,12 +443,12 @@ class PaymentMethodsApi { _bodyData = _serializers.serialize(updatePaymentMethods, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -481,10 +473,10 @@ class PaymentMethodsApi { ) as UpdateCustomerPaymentMethodsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/plans_api.dart b/lib/src/api/plans_api.dart index 1e428c3..6f1a6f8 100644 --- a/lib/src/api/plans_api.dart +++ b/lib/src/api/plans_api.dart @@ -38,7 +38,7 @@ class PlansApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [PlanResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createPlan({ required PlanRequest planRequest, String? acceptLanguage = 'es', @@ -50,7 +50,7 @@ class PlansApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/plans'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -62,12 +62,10 @@ class PlansApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/plans'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -96,12 +94,12 @@ class PlansApi { _bodyData = _serializers.serialize(planRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -126,10 +124,10 @@ class PlansApi { ) as PlanResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -161,7 +159,7 @@ class PlansApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [PlanResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deletePlan({ required String id, String? acceptLanguage = 'es', @@ -172,7 +170,7 @@ class PlansApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/plans/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -183,12 +181,10 @@ class PlansApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/plans/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -226,10 +222,10 @@ class PlansApi { ) as PlanResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -262,7 +258,7 @@ class PlansApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [PlanResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getPlan({ required String id, String? acceptLanguage = 'es', @@ -274,7 +270,7 @@ class PlansApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/plans/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -285,12 +281,10 @@ class PlansApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/plans/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -329,10 +323,10 @@ class PlansApi { ) as PlanResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -368,7 +362,7 @@ class PlansApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetPlansResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getPlans({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -383,7 +377,7 @@ class PlansApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/plans'; // to determine the Accept header List _contentTypes = [ ]; @@ -394,12 +388,10 @@ class PlansApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/plans'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -446,10 +438,10 @@ class PlansApi { ) as GetPlansResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -483,7 +475,7 @@ class PlansApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [PlanResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updatePlan({ required String id, required PlanUpdateRequest planUpdateRequest, @@ -496,7 +488,7 @@ class PlansApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/plans/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -508,12 +500,10 @@ class PlansApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/plans/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -542,12 +532,12 @@ class PlansApi { _bodyData = _serializers.serialize(planUpdateRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -572,10 +562,10 @@ class PlansApi { ) as PlanResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/products_api.dart b/lib/src/api/products_api.dart index c4161d9..f482fc6 100644 --- a/lib/src/api/products_api.dart +++ b/lib/src/api/products_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/error.dart'; import 'package:conekta/src/model/product.dart'; import 'package:conekta/src/model/product_order_response.dart'; @@ -37,7 +38,7 @@ class ProductsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ProductOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersCreateProduct({ required String id, required Product product, @@ -50,7 +51,7 @@ class ProductsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/line_items'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -62,12 +63,10 @@ class ProductsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/line_items'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -96,12 +95,12 @@ class ProductsApi { _bodyData = _serializers.serialize(product, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -126,10 +125,10 @@ class ProductsApi { ) as ProductOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -163,7 +162,7 @@ class ProductsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ProductOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersDeleteProduct({ required String id, required String lineItemId, @@ -176,7 +175,7 @@ class ProductsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/line_items/{line_item_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'line_item_id' '}', encodeQueryParameter(_serializers, lineItemId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -187,12 +186,10 @@ class ProductsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/line_items/{line_item_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'line_item_id' '}', lineItemId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -231,10 +228,10 @@ class ProductsApi { ) as ProductOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -269,7 +266,7 @@ class ProductsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ProductOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersUpdateProduct({ required String id, required String lineItemId, @@ -283,7 +280,7 @@ class ProductsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/line_items/{line_item_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'line_item_id' '}', encodeQueryParameter(_serializers, lineItemId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -295,12 +292,10 @@ class ProductsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/line_items/{line_item_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'line_item_id' '}', lineItemId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -329,12 +324,12 @@ class ProductsApi { _bodyData = _serializers.serialize(updateProduct, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -359,10 +354,10 @@ class ProductsApi { ) as ProductOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/shipping_contacts_api.dart b/lib/src/api/shipping_contacts_api.dart index 09b50a7..4480b6d 100644 --- a/lib/src/api/shipping_contacts_api.dart +++ b/lib/src/api/shipping_contacts_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/customer_shipping_contacts.dart'; import 'package:conekta/src/model/customer_shipping_contacts_response.dart'; import 'package:conekta/src/model/customer_update_shipping_contacts.dart'; @@ -37,7 +38,7 @@ class ShippingContactsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerShippingContactsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createCustomerShippingContacts({ required String id, required CustomerShippingContacts customerShippingContacts, @@ -50,7 +51,7 @@ class ShippingContactsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/shipping_contacts'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -62,12 +63,10 @@ class ShippingContactsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/shipping_contacts'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -96,12 +95,12 @@ class ShippingContactsApi { _bodyData = _serializers.serialize(customerShippingContacts, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -126,10 +125,10 @@ class ShippingContactsApi { ) as CustomerShippingContactsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -163,7 +162,7 @@ class ShippingContactsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerShippingContactsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteCustomerShippingContacts({ required String id, required String shippingContactsId, @@ -176,7 +175,7 @@ class ShippingContactsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/shipping_contacts/{shipping_contacts_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'shipping_contacts_id' '}', encodeQueryParameter(_serializers, shippingContactsId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -187,12 +186,10 @@ class ShippingContactsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/shipping_contacts/{shipping_contacts_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'shipping_contacts_id' '}', shippingContactsId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -231,10 +228,10 @@ class ShippingContactsApi { ) as CustomerShippingContactsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -269,7 +266,7 @@ class ShippingContactsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [CustomerShippingContactsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateCustomerShippingContacts({ required String id, required String shippingContactsId, @@ -283,7 +280,7 @@ class ShippingContactsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/shipping_contacts/{shipping_contacts_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'shipping_contacts_id' '}', encodeQueryParameter(_serializers, shippingContactsId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -295,12 +292,10 @@ class ShippingContactsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/shipping_contacts/{shipping_contacts_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'shipping_contacts_id' '}', shippingContactsId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -329,12 +324,12 @@ class ShippingContactsApi { _bodyData = _serializers.serialize(customerUpdateShippingContacts, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -359,10 +354,10 @@ class ShippingContactsApi { ) as CustomerShippingContactsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/shippings_api.dart b/lib/src/api/shippings_api.dart index 4272f6f..dce1b24 100644 --- a/lib/src/api/shippings_api.dart +++ b/lib/src/api/shippings_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/error.dart'; import 'package:conekta/src/model/shipping_order_response.dart'; import 'package:conekta/src/model/shipping_request.dart'; @@ -36,7 +37,7 @@ class ShippingsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ShippingOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersCreateShipping({ required String id, required ShippingRequest shippingRequest, @@ -49,7 +50,7 @@ class ShippingsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/shipping_lines'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -61,12 +62,10 @@ class ShippingsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/shipping_lines'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -95,12 +94,12 @@ class ShippingsApi { _bodyData = _serializers.serialize(shippingRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -125,10 +124,10 @@ class ShippingsApi { ) as ShippingOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -162,7 +161,7 @@ class ShippingsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ShippingOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersDeleteShipping({ required String id, required String shippingId, @@ -175,7 +174,7 @@ class ShippingsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/shipping_lines/{shipping_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'shipping_id' '}', encodeQueryParameter(_serializers, shippingId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -186,12 +185,10 @@ class ShippingsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/shipping_lines/{shipping_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'shipping_id' '}', shippingId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -230,10 +227,10 @@ class ShippingsApi { ) as ShippingOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -268,7 +265,7 @@ class ShippingsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [ShippingOrderResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersUpdateShipping({ required String id, required String shippingId, @@ -282,7 +279,7 @@ class ShippingsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/shipping_lines/{shipping_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'shipping_id' '}', encodeQueryParameter(_serializers, shippingId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -294,12 +291,10 @@ class ShippingsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/shipping_lines/{shipping_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'shipping_id' '}', shippingId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -328,12 +323,12 @@ class ShippingsApi { _bodyData = _serializers.serialize(shippingRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -358,10 +353,10 @@ class ShippingsApi { ) as ShippingOrderResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/subscriptions_api.dart b/lib/src/api/subscriptions_api.dart index ce7edb4..6b4d1c7 100644 --- a/lib/src/api/subscriptions_api.dart +++ b/lib/src/api/subscriptions_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/error.dart'; import 'package:conekta/src/model/subscription_events_response.dart'; import 'package:conekta/src/model/subscription_request.dart'; @@ -37,7 +38,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> cancelSubscription({ required String id, String? acceptLanguage = 'es', @@ -49,7 +50,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription/cancel'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -60,12 +61,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription/cancel'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -104,10 +103,10 @@ class SubscriptionsApi { ) as SubscriptionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -141,7 +140,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createSubscription({ required String id, required SubscriptionRequest subscriptionRequest, @@ -154,7 +153,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -166,12 +165,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -200,12 +197,12 @@ class SubscriptionsApi { _bodyData = _serializers.serialize(subscriptionRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -230,10 +227,10 @@ class SubscriptionsApi { ) as SubscriptionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -266,7 +263,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionEventsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getAllEventsFromSubscription({ required String id, String? acceptLanguage = 'es', @@ -278,7 +275,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription/events'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -289,12 +286,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription/events'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -333,10 +328,10 @@ class SubscriptionsApi { ) as SubscriptionEventsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -368,7 +363,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getSubscription({ required String id, String? acceptLanguage = 'es', @@ -379,7 +374,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -390,12 +385,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -433,10 +426,10 @@ class SubscriptionsApi { ) as SubscriptionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -469,7 +462,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> pauseSubscription({ required String id, String? acceptLanguage = 'es', @@ -481,7 +474,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription/pause'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -492,12 +485,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription/pause'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -536,10 +527,10 @@ class SubscriptionsApi { ) as SubscriptionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -572,7 +563,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> resumeSubscription({ required String id, String? acceptLanguage = 'es', @@ -584,7 +575,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription/resume'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -595,12 +586,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription/resume'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -639,10 +628,10 @@ class SubscriptionsApi { ) as SubscriptionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -676,7 +665,7 @@ class SubscriptionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [SubscriptionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateSubscription({ required String id, required SubscriptionUpdateRequest subscriptionUpdateRequest, @@ -689,7 +678,7 @@ class SubscriptionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/customers/{id}/subscription'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -701,12 +690,10 @@ class SubscriptionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/customers/{id}/subscription'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -735,12 +722,12 @@ class SubscriptionsApi { _bodyData = _serializers.serialize(subscriptionUpdateRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -765,10 +752,10 @@ class SubscriptionsApi { ) as SubscriptionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/taxes_api.dart b/lib/src/api/taxes_api.dart index 7b44739..45f2595 100644 --- a/lib/src/api/taxes_api.dart +++ b/lib/src/api/taxes_api.dart @@ -7,6 +7,7 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; +import 'package:conekta/src/api_util.dart'; import 'package:conekta/src/model/error.dart'; import 'package:conekta/src/model/order_tax_request.dart'; import 'package:conekta/src/model/update_order_tax_request.dart'; @@ -37,7 +38,7 @@ class TaxesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [UpdateOrderTaxResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersCreateTaxes({ required String id, required OrderTaxRequest orderTaxRequest, @@ -50,7 +51,7 @@ class TaxesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/tax_lines'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -62,12 +63,10 @@ class TaxesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/tax_lines'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -96,12 +95,12 @@ class TaxesApi { _bodyData = _serializers.serialize(orderTaxRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -126,10 +125,10 @@ class TaxesApi { ) as UpdateOrderTaxResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -163,7 +162,7 @@ class TaxesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [UpdateOrderTaxResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersDeleteTaxes({ required String id, required String taxId, @@ -176,7 +175,7 @@ class TaxesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/tax_lines/{tax_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'tax_id' '}', encodeQueryParameter(_serializers, taxId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -187,12 +186,10 @@ class TaxesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/tax_lines/{tax_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'tax_id' '}', taxId.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -231,10 +228,10 @@ class TaxesApi { ) as UpdateOrderTaxResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -269,7 +266,7 @@ class TaxesApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [UpdateOrderTaxResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> ordersUpdateTaxes({ required String id, required String taxId, @@ -283,7 +280,7 @@ class TaxesApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/orders/{id}/tax_lines/{tax_id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'tax_id' '}', encodeQueryParameter(_serializers, taxId, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -295,12 +292,10 @@ class TaxesApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/orders/{id}/tax_lines/{tax_id}'.replaceAll('{' r'id' '}', id.toString()).replaceAll('{' r'tax_id' '}', taxId.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -329,12 +324,12 @@ class TaxesApi { _bodyData = _serializers.serialize(updateOrderTaxRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -359,10 +354,10 @@ class TaxesApi { ) as UpdateOrderTaxResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/tokens_api.dart b/lib/src/api/tokens_api.dart index 6932999..4b73657 100644 --- a/lib/src/api/tokens_api.dart +++ b/lib/src/api/tokens_api.dart @@ -34,7 +34,7 @@ class TokensApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [TokenResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createToken({ required Token token, String? acceptLanguage = 'es', @@ -45,7 +45,7 @@ class TokensApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/tokens'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -57,12 +57,10 @@ class TokensApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/tokens'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -90,12 +88,12 @@ class TokensApi { _bodyData = _serializers.serialize(token, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -120,10 +118,10 @@ class TokensApi { ) as TokenResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/transactions_api.dart b/lib/src/api/transactions_api.dart index dcfbfa8..30d983a 100644 --- a/lib/src/api/transactions_api.dart +++ b/lib/src/api/transactions_api.dart @@ -36,7 +36,7 @@ class TransactionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [TransactionResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getTransaction({ required String id, String? acceptLanguage = 'es', @@ -48,7 +48,7 @@ class TransactionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/transactions/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -59,12 +59,10 @@ class TransactionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/transactions/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -103,10 +101,10 @@ class TransactionsApi { ) as TransactionResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -131,9 +129,12 @@ class TransactionsApi { /// * [acceptLanguage] - Use for knowing which language to use /// * [xChildCompanyId] - In the case of a holding company, the company id of the child company to which will process the request. /// * [limit] - The numbers of items to return, the maximum value is 250 - /// * [search] - General order search, e.g. by mail, reference etc. /// * [next] - next page /// * [previous] - previous page + /// * [id] - id of the object to be retrieved + /// * [chargeId] - id of the charge used for filtering + /// * [type] - type of the object to be retrieved + /// * [currency] - currency of the object to be retrieved /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -142,14 +143,17 @@ class TransactionsApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetTransactionsResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getTransactions({ String? acceptLanguage = 'es', String? xChildCompanyId, int? limit = 20, - String? search, String? next, String? previous, + String? id, + String? chargeId, + String? type, + String? currency, CancelToken? cancelToken, Map? headers, Map? extra, @@ -157,7 +161,7 @@ class TransactionsApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/transactions'; // to determine the Accept header List _contentTypes = [ ]; @@ -168,12 +172,10 @@ class TransactionsApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/transactions'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -196,9 +198,12 @@ class TransactionsApi { final _queryParameters = { if (limit != null) r'limit': encodeQueryParameter(_serializers, limit, const FullType(int)), - if (search != null) r'search': encodeQueryParameter(_serializers, search, const FullType(String)), if (next != null) r'next': encodeQueryParameter(_serializers, next, const FullType(String)), if (previous != null) r'previous': encodeQueryParameter(_serializers, previous, const FullType(String)), + if (id != null) r'id': encodeQueryParameter(_serializers, id, const FullType(String)), + if (chargeId != null) r'charge_id': encodeQueryParameter(_serializers, chargeId, const FullType(String)), + if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(String)), + if (currency != null) r'currency': encodeQueryParameter(_serializers, currency, const FullType(String)), }; final _response = await _dio.request( @@ -220,10 +225,10 @@ class TransactionsApi { ) as GetTransactionsResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/transfers_api.dart b/lib/src/api/transfers_api.dart index 4f900d1..06624f6 100644 --- a/lib/src/api/transfers_api.dart +++ b/lib/src/api/transfers_api.dart @@ -36,7 +36,7 @@ class TransfersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [TransferResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getTransfer({ required String id, String? acceptLanguage = 'es', @@ -48,7 +48,7 @@ class TransfersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/transfers/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -59,12 +59,10 @@ class TransfersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/transfers/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -103,10 +101,10 @@ class TransfersApi { ) as TransferResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -142,7 +140,7 @@ class TransfersApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetTransfersResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getTransfers({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -157,7 +155,7 @@ class TransfersApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/transfers'; // to determine the Accept header List _contentTypes = [ ]; @@ -168,12 +166,10 @@ class TransfersApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/transfers'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -220,10 +216,10 @@ class TransfersApi { ) as GetTransfersResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/webhook_keys_api.dart b/lib/src/api/webhook_keys_api.dart index af6b585..b9025ca 100644 --- a/lib/src/api/webhook_keys_api.dart +++ b/lib/src/api/webhook_keys_api.dart @@ -39,7 +39,7 @@ class WebhookKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookKeyCreateResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createWebhookKey({ String? acceptLanguage = 'es', WebhookKeyRequest? webhookKeyRequest, @@ -50,7 +50,7 @@ class WebhookKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhook_keys'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -62,12 +62,10 @@ class WebhookKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhook_keys'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -95,12 +93,12 @@ class WebhookKeysApi { _bodyData = webhookKeyRequest == null ? null : _serializers.serialize(webhookKeyRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -125,10 +123,10 @@ class WebhookKeysApi { ) as WebhookKeyCreateResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -160,7 +158,7 @@ class WebhookKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookKeyDeleteResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteWebhookKey({ required String id, String? acceptLanguage = 'es', @@ -171,7 +169,7 @@ class WebhookKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhook_keys/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -182,12 +180,10 @@ class WebhookKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhook_keys/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -225,10 +221,10 @@ class WebhookKeysApi { ) as WebhookKeyDeleteResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -261,7 +257,7 @@ class WebhookKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookKeyResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getWebhookKey({ required String id, String? acceptLanguage = 'es', @@ -273,7 +269,7 @@ class WebhookKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhook_keys/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -284,12 +280,10 @@ class WebhookKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhook_keys/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -328,10 +322,10 @@ class WebhookKeysApi { ) as WebhookKeyResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -367,7 +361,7 @@ class WebhookKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetWebhookKeysResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getWebhookKeys({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -382,7 +376,7 @@ class WebhookKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhook_keys'; // to determine the Accept header List _contentTypes = [ ]; @@ -393,12 +387,10 @@ class WebhookKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhook_keys'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -445,10 +437,10 @@ class WebhookKeysApi { ) as GetWebhookKeysResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -481,7 +473,7 @@ class WebhookKeysApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookKeyResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateWebhookKey({ required String id, String? acceptLanguage = 'es', @@ -493,7 +485,7 @@ class WebhookKeysApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhook_keys/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -505,12 +497,10 @@ class WebhookKeysApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhook_keys/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -538,12 +528,12 @@ class WebhookKeysApi { _bodyData = webhookKeyUpdateRequest == null ? null : _serializers.serialize(webhookKeyUpdateRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -568,10 +558,10 @@ class WebhookKeysApi { ) as WebhookKeyResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/api/webhooks_api.dart b/lib/src/api/webhooks_api.dart index 61e4680..2bd9230 100644 --- a/lib/src/api/webhooks_api.dart +++ b/lib/src/api/webhooks_api.dart @@ -37,7 +37,7 @@ class WebhooksApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> createWebhook({ required WebhookRequest webhookRequest, String? acceptLanguage = 'es', @@ -48,7 +48,7 @@ class WebhooksApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhooks'; // to determine the Accept header List _contentTypes = [ "application/json" @@ -60,12 +60,10 @@ class WebhooksApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhooks'; final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -93,12 +91,12 @@ class WebhooksApi { _bodyData = _serializers.serialize(webhookRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -123,10 +121,10 @@ class WebhooksApi { ) as WebhookResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -158,7 +156,7 @@ class WebhooksApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> deleteWebhook({ required String id, String? acceptLanguage = 'es', @@ -169,7 +167,7 @@ class WebhooksApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhooks/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -180,12 +178,10 @@ class WebhooksApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhooks/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'DELETE', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -223,10 +219,10 @@ class WebhooksApi { ) as WebhookResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -259,7 +255,7 @@ class WebhooksApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getWebhook({ required String id, String? acceptLanguage = 'es', @@ -271,7 +267,7 @@ class WebhooksApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhooks/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -282,12 +278,10 @@ class WebhooksApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhooks/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -326,10 +320,10 @@ class WebhooksApi { ) as WebhookResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -365,7 +359,7 @@ class WebhooksApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [GetWebhooksResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> getWebhooks({ String? acceptLanguage = 'es', String? xChildCompanyId, @@ -380,7 +374,7 @@ class WebhooksApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhooks'; // to determine the Accept header List _contentTypes = [ ]; @@ -391,12 +385,10 @@ class WebhooksApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhooks'; final _options = Options( method: r'GET', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -443,10 +435,10 @@ class WebhooksApi { ) as GetWebhooksResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -478,7 +470,7 @@ class WebhooksApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> testWebhook({ required String id, String? acceptLanguage = 'es', @@ -489,7 +481,7 @@ class WebhooksApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhooks/{id}/test'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ ]; @@ -500,12 +492,10 @@ class WebhooksApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhooks/{id}/test'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'POST', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (localVarAccept != null) r'Accept': localVarAccept, if (localVarContentType != null) r'Content-Type': localVarContentType, @@ -543,10 +533,10 @@ class WebhooksApi { ) as WebhookResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -580,7 +570,7 @@ class WebhooksApi { /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress /// /// Returns a [Future] containing a [Response] with a [WebhookResponse] as data - /// Throws [DioError] if API call or serialization fails + /// Throws [DioException] if API call or serialization fails Future> updateWebhook({ required String id, required WebhookUpdateRequest webhookUpdateRequest, @@ -593,7 +583,7 @@ class WebhooksApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - + final _path = r'/webhooks/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); // to determine the Accept header List _contentTypes = [ "application/json" @@ -605,12 +595,10 @@ class WebhooksApi { "application/vnd.conekta-v2.1.0+json" ]; final localVarAccept = selectHeaderAccept(_accepts); - - final _path = r'/webhooks/{id}'.replaceAll('{' r'id' '}', id.toString()); final _options = Options( method: r'PUT', headers: { - r'User-Agent': r'Conekta/v2 DartBindings/6.0.0-beta.2', + r'User-Agent': r'Conekta/v2 DartBindings/6.0.0', if (acceptLanguage != null) r'Accept-Language': acceptLanguage, if (xChildCompanyId != null) r'X-Child-Company-Id': xChildCompanyId, if (localVarAccept != null) r'Accept': localVarAccept, @@ -639,12 +627,12 @@ class WebhooksApi { _bodyData = _serializers.serialize(webhookUpdateRequest, specifiedType: _type); } catch(error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _options.compose( _dio.options, _path, ), - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); @@ -669,10 +657,10 @@ class WebhooksApi { ) as WebhookResponse; } catch (error, stackTrace) { - throw DioError( + throw DioException( requestOptions: _response.requestOptions, response: _response, - type: DioErrorType.unknown, + type: DioExceptionType.unknown, error: error, stackTrace: stackTrace, ); diff --git a/lib/src/model/api_key_create_response.dart b/lib/src/model/api_key_create_response.dart index fcf1fdd..8516a4d 100644 --- a/lib/src/model/api_key_create_response.dart +++ b/lib/src/model/api_key_create_response.dart @@ -13,15 +13,18 @@ part 'api_key_create_response.g.dart'; /// ApiKeyCreateResponse /// /// Properties: -/// * [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 +/// * [authenticationToken] - It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. /// * [active] - Indicates if the api key is active -/// * [createdAt] - Unix timestamp in seconds with the creation date of the api key -/// * [description] - Detail of the use that will be given to the api key +/// * [createdAt] - Unix timestamp in seconds of when the api key was created +/// * [updatedAt] - Unix timestamp in seconds of when the api key was last updated +/// * [deactivatedAt] - Unix timestamp in seconds of when the api key was deleted +/// * [description] - A name or brief explanation of what this api key is used for /// * [id] - Unique identifier of the api key -/// * [livemode] - Indicates if the api key is in live mode -/// * [object] - Object name, value is api_key +/// * [livemode] - Indicates if the api key is in production +/// * [deleted] - Indicates if the api key was deleted +/// * [object] - Object name, value is 'api_key' /// * [prefix] - The first few characters of the authentication_token -/// * [role] - Indicates the user account private=owner or public=public +/// * [role] - Indicates if the api key is private or public @BuiltValue() abstract class ApiKeyCreateResponse implements ApiKeyCreateResponseAllOf, ApiKeyResponse, Built { ApiKeyCreateResponse._(); @@ -47,13 +50,6 @@ class _$ApiKeyCreateResponseSerializer implements PrimitiveSerializer - (new ApiKeyCreateResponseBuilder()..update(updates))._build(); - - _$ApiKeyCreateResponse._( - {this.authenticationToken, - this.active, - this.createdAt, - this.description, - this.id, - this.livemode, - this.object, - this.prefix, - this.role}) - : super._(); - - @override - ApiKeyCreateResponse rebuild( - void Function(ApiKeyCreateResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ApiKeyCreateResponseBuilder toBuilder() => - new ApiKeyCreateResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ApiKeyCreateResponse && - authenticationToken == other.authenticationToken && - active == other.active && - createdAt == other.createdAt && - description == other.description && - id == other.id && - livemode == other.livemode && - object == other.object && - prefix == other.prefix && - role == other.role; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, authenticationToken.hashCode), - active.hashCode), - createdAt.hashCode), - description.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - prefix.hashCode), - role.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ApiKeyCreateResponse') - ..add('authenticationToken', authenticationToken) - ..add('active', active) - ..add('createdAt', createdAt) - ..add('description', description) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('prefix', prefix) - ..add('role', role)) - .toString(); - } -} - -class ApiKeyCreateResponseBuilder - implements - Builder, - ApiKeyCreateResponseAllOfBuilder, - ApiKeyResponseBuilder { - _$ApiKeyCreateResponse? _$v; - - String? _authenticationToken; - String? get authenticationToken => _$this._authenticationToken; - set authenticationToken(covariant String? authenticationToken) => - _$this._authenticationToken = authenticationToken; - - bool? _active; - bool? get active => _$this._active; - set active(covariant bool? active) => _$this._active = active; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(covariant bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _prefix; - String? get prefix => _$this._prefix; - set prefix(covariant String? prefix) => _$this._prefix = prefix; - - String? _role; - String? get role => _$this._role; - set role(covariant String? role) => _$this._role = role; - - ApiKeyCreateResponseBuilder() { - ApiKeyCreateResponse._defaults(this); - } - - ApiKeyCreateResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _authenticationToken = $v.authenticationToken; - _active = $v.active; - _createdAt = $v.createdAt; - _description = $v.description; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _prefix = $v.prefix; - _role = $v.role; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant ApiKeyCreateResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ApiKeyCreateResponse; - } - - @override - void update(void Function(ApiKeyCreateResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ApiKeyCreateResponse build() => _build(); - - _$ApiKeyCreateResponse _build() { - final _$result = _$v ?? - new _$ApiKeyCreateResponse._( - authenticationToken: authenticationToken, - active: active, - createdAt: createdAt, - description: description, - id: id, - livemode: livemode, - object: object, - prefix: prefix, - role: role); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/api_key_create_response_all_of.dart b/lib/src/model/api_key_create_response_all_of.dart index 43d9db0..e5f5c11 100644 --- a/lib/src/model/api_key_create_response_all_of.dart +++ b/lib/src/model/api_key_create_response_all_of.dart @@ -11,10 +11,10 @@ part 'api_key_create_response_all_of.g.dart'; /// ApiKeyCreateResponseAllOf /// /// Properties: -/// * [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 +/// * [authenticationToken] - It is occupied as a user when authenticated with basic authentication, with a blank password. This value will only appear once, in the request to create a new key. Copy and save it in a safe place. @BuiltValue(instantiable: false) abstract class ApiKeyCreateResponseAllOf { - /// 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. @BuiltValueField(wireName: r'authentication_token') String? get authenticationToken; diff --git a/lib/src/model/api_key_create_response_all_of.g.dart b/lib/src/model/api_key_create_response_all_of.g.dart deleted file mode 100644 index 23f89c2..0000000 --- a/lib/src/model/api_key_create_response_all_of.g.dart +++ /dev/null @@ -1,102 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'api_key_create_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ApiKeyCreateResponseAllOfBuilder { - void replace(ApiKeyCreateResponseAllOf other); - void update(void Function(ApiKeyCreateResponseAllOfBuilder) updates); - String? get authenticationToken; - set authenticationToken(String? authenticationToken); -} - -class _$$ApiKeyCreateResponseAllOf extends $ApiKeyCreateResponseAllOf { - @override - final String? authenticationToken; - - factory _$$ApiKeyCreateResponseAllOf( - [void Function($ApiKeyCreateResponseAllOfBuilder)? updates]) => - (new $ApiKeyCreateResponseAllOfBuilder()..update(updates))._build(); - - _$$ApiKeyCreateResponseAllOf._({this.authenticationToken}) : super._(); - - @override - $ApiKeyCreateResponseAllOf rebuild( - void Function($ApiKeyCreateResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ApiKeyCreateResponseAllOfBuilder toBuilder() => - new $ApiKeyCreateResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ApiKeyCreateResponseAllOf && - authenticationToken == other.authenticationToken; - } - - @override - int get hashCode { - return $jf($jc(0, authenticationToken.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ApiKeyCreateResponseAllOf') - ..add('authenticationToken', authenticationToken)) - .toString(); - } -} - -class $ApiKeyCreateResponseAllOfBuilder - implements - Builder<$ApiKeyCreateResponseAllOf, $ApiKeyCreateResponseAllOfBuilder>, - ApiKeyCreateResponseAllOfBuilder { - _$$ApiKeyCreateResponseAllOf? _$v; - - String? _authenticationToken; - String? get authenticationToken => _$this._authenticationToken; - set authenticationToken(covariant String? authenticationToken) => - _$this._authenticationToken = authenticationToken; - - $ApiKeyCreateResponseAllOfBuilder() { - $ApiKeyCreateResponseAllOf._defaults(this); - } - - $ApiKeyCreateResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _authenticationToken = $v.authenticationToken; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ApiKeyCreateResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ApiKeyCreateResponseAllOf; - } - - @override - void update(void Function($ApiKeyCreateResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ApiKeyCreateResponseAllOf build() => _build(); - - _$$ApiKeyCreateResponseAllOf _build() { - final _$result = _$v ?? - new _$$ApiKeyCreateResponseAllOf._( - authenticationToken: authenticationToken); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/api_key_request.dart b/lib/src/model/api_key_request.dart index bece1d3..d044b04 100644 --- a/lib/src/model/api_key_request.dart +++ b/lib/src/model/api_key_request.dart @@ -11,18 +11,13 @@ part 'api_key_request.g.dart'; /// ApiKeyRequest /// /// Properties: -/// * [active] - Indicates if the api key is active -/// * [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 /// * [role] @BuiltValue() abstract class ApiKeyRequest implements Built { - /// Indicates if the api key is active - @BuiltValueField(wireName: r'active') - bool get active; - - /// 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 @BuiltValueField(wireName: r'description') - String get description; + String? get description; @BuiltValueField(wireName: r'role') String get role; @@ -50,16 +45,13 @@ class _$ApiKeyRequestSerializer implements PrimitiveSerializer { ApiKeyRequest object, { FullType specifiedType = FullType.unspecified, }) sync* { - yield r'active'; - yield serializers.serialize( - object.active, - specifiedType: const FullType(bool), - ); - yield r'description'; - yield serializers.serialize( - object.description, - specifiedType: const FullType(String), - ); + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } yield r'role'; yield serializers.serialize( object.role, @@ -88,13 +80,6 @@ class _$ApiKeyRequestSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'active': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(bool), - ) as bool; - result.active = valueDes; - break; case r'description': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/api_key_request.g.dart b/lib/src/model/api_key_request.g.dart deleted file mode 100644 index 68f636e..0000000 --- a/lib/src/model/api_key_request.g.dart +++ /dev/null @@ -1,120 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'api_key_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ApiKeyRequest extends ApiKeyRequest { - @override - final bool active; - @override - final String description; - @override - final String role; - - factory _$ApiKeyRequest([void Function(ApiKeyRequestBuilder)? updates]) => - (new ApiKeyRequestBuilder()..update(updates))._build(); - - _$ApiKeyRequest._( - {required this.active, required this.description, required this.role}) - : super._() { - BuiltValueNullFieldError.checkNotNull(active, r'ApiKeyRequest', 'active'); - BuiltValueNullFieldError.checkNotNull( - description, r'ApiKeyRequest', 'description'); - BuiltValueNullFieldError.checkNotNull(role, r'ApiKeyRequest', 'role'); - } - - @override - ApiKeyRequest rebuild(void Function(ApiKeyRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ApiKeyRequestBuilder toBuilder() => new ApiKeyRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ApiKeyRequest && - active == other.active && - description == other.description && - role == other.role; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, active.hashCode), description.hashCode), role.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ApiKeyRequest') - ..add('active', active) - ..add('description', description) - ..add('role', role)) - .toString(); - } -} - -class ApiKeyRequestBuilder - implements Builder { - _$ApiKeyRequest? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - String? _role; - String? get role => _$this._role; - set role(String? role) => _$this._role = role; - - ApiKeyRequestBuilder() { - ApiKeyRequest._defaults(this); - } - - ApiKeyRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _description = $v.description; - _role = $v.role; - _$v = null; - } - return this; - } - - @override - void replace(ApiKeyRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ApiKeyRequest; - } - - @override - void update(void Function(ApiKeyRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ApiKeyRequest build() => _build(); - - _$ApiKeyRequest _build() { - final _$result = _$v ?? - new _$ApiKeyRequest._( - active: BuiltValueNullFieldError.checkNotNull( - active, r'ApiKeyRequest', 'active'), - description: BuiltValueNullFieldError.checkNotNull( - description, r'ApiKeyRequest', 'description'), - role: BuiltValueNullFieldError.checkNotNull( - role, r'ApiKeyRequest', 'role')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/api_key_response.dart b/lib/src/model/api_key_response.dart index aca36a7..195acf8 100644 --- a/lib/src/model/api_key_response.dart +++ b/lib/src/model/api_key_response.dart @@ -12,24 +12,35 @@ part 'api_key_response.g.dart'; /// /// Properties: /// * [active] - Indicates if the api key is active -/// * [createdAt] - Unix timestamp in seconds with the creation date of the api key -/// * [description] - Detail of the use that will be given to the api key +/// * [createdAt] - Unix timestamp in seconds of when the api key was created +/// * [updatedAt] - Unix timestamp in seconds of when the api key was last updated +/// * [deactivatedAt] - Unix timestamp in seconds of when the api key was deleted +/// * [description] - A name or brief explanation of what this api key is used for /// * [id] - Unique identifier of the api key -/// * [livemode] - Indicates if the api key is in live mode -/// * [object] - Object name, value is api_key +/// * [livemode] - Indicates if the api key is in production +/// * [deleted] - Indicates if the api key was deleted +/// * [object] - Object name, value is 'api_key' /// * [prefix] - The first few characters of the authentication_token -/// * [role] - Indicates the user account private=owner or public=public +/// * [role] - Indicates if the api key is private or public @BuiltValue(instantiable: false) abstract class ApiKeyResponse { /// Indicates if the api key is active @BuiltValueField(wireName: r'active') bool? get active; - /// Unix timestamp in seconds with the creation date of the api key + /// Unix timestamp in seconds of when the api key was created @BuiltValueField(wireName: r'created_at') int? get createdAt; - /// Detail of the use that will be given to the api key + /// Unix timestamp in seconds of when the api key was last updated + @BuiltValueField(wireName: r'updated_at') + int? get updatedAt; + + /// Unix timestamp in seconds of when the api key was deleted + @BuiltValueField(wireName: r'deactivated_at') + int? get deactivatedAt; + + /// A name or brief explanation of what this api key is used for @BuiltValueField(wireName: r'description') String? get description; @@ -37,11 +48,15 @@ abstract class ApiKeyResponse { @BuiltValueField(wireName: r'id') String? get id; - /// Indicates if the api key is in live mode + /// Indicates if the api key is in production @BuiltValueField(wireName: r'livemode') bool? get livemode; - /// Object name, value is api_key + /// Indicates if the api key was deleted + @BuiltValueField(wireName: r'deleted') + bool? get deleted; + + /// Object name, value is 'api_key' @BuiltValueField(wireName: r'object') String? get object; @@ -49,7 +64,7 @@ abstract class ApiKeyResponse { @BuiltValueField(wireName: r'prefix') String? get prefix; - /// Indicates the user account private=owner or public=public + /// Indicates if the api key is private or public @BuiltValueField(wireName: r'role') String? get role; @@ -83,6 +98,20 @@ class _$ApiKeyResponseSerializer implements PrimitiveSerializer specifiedType: const FullType(int), ); } + if (object.updatedAt != null) { + yield r'updated_at'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(int), + ); + } + if (object.deactivatedAt != null) { + yield r'deactivated_at'; + yield serializers.serialize( + object.deactivatedAt, + specifiedType: const FullType.nullable(int), + ); + } if (object.description != null) { yield r'description'; yield serializers.serialize( @@ -104,6 +133,13 @@ class _$ApiKeyResponseSerializer implements PrimitiveSerializer specifiedType: const FullType(bool), ); } + if (object.deleted != null) { + yield r'deleted'; + yield serializers.serialize( + object.deleted, + specifiedType: const FullType(bool), + ); + } if (object.object != null) { yield r'object'; yield serializers.serialize( @@ -202,6 +238,21 @@ class _$$ApiKeyResponseSerializer implements PrimitiveSerializer<$ApiKeyResponse ) as int; result.createdAt = valueDes; break; + case r'updated_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.updatedAt = valueDes; + break; + case r'deactivated_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.deactivatedAt = valueDes; + break; case r'description': final valueDes = serializers.deserialize( value, @@ -223,6 +274,13 @@ class _$$ApiKeyResponseSerializer implements PrimitiveSerializer<$ApiKeyResponse ) as bool; result.livemode = valueDes; break; + case r'deleted': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.deleted = valueDes; + break; case r'object': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/api_key_response.g.dart b/lib/src/model/api_key_response.g.dart deleted file mode 100644 index a0673c3..0000000 --- a/lib/src/model/api_key_response.g.dart +++ /dev/null @@ -1,211 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'api_key_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ApiKeyResponseBuilder { - void replace(ApiKeyResponse other); - void update(void Function(ApiKeyResponseBuilder) updates); - bool? get active; - set active(bool? active); - - int? get createdAt; - set createdAt(int? createdAt); - - String? get description; - set description(String? description); - - String? get id; - set id(String? id); - - bool? get livemode; - set livemode(bool? livemode); - - String? get object; - set object(String? object); - - String? get prefix; - set prefix(String? prefix); - - String? get role; - set role(String? role); -} - -class _$$ApiKeyResponse extends $ApiKeyResponse { - @override - final bool? active; - @override - final int? createdAt; - @override - final String? description; - @override - final String? id; - @override - final bool? livemode; - @override - final String? object; - @override - final String? prefix; - @override - final String? role; - - factory _$$ApiKeyResponse([void Function($ApiKeyResponseBuilder)? updates]) => - (new $ApiKeyResponseBuilder()..update(updates))._build(); - - _$$ApiKeyResponse._( - {this.active, - this.createdAt, - this.description, - this.id, - this.livemode, - this.object, - this.prefix, - this.role}) - : super._(); - - @override - $ApiKeyResponse rebuild(void Function($ApiKeyResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ApiKeyResponseBuilder toBuilder() => - new $ApiKeyResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ApiKeyResponse && - active == other.active && - createdAt == other.createdAt && - description == other.description && - id == other.id && - livemode == other.livemode && - object == other.object && - prefix == other.prefix && - role == other.role; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, active.hashCode), createdAt.hashCode), - description.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - prefix.hashCode), - role.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ApiKeyResponse') - ..add('active', active) - ..add('createdAt', createdAt) - ..add('description', description) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('prefix', prefix) - ..add('role', role)) - .toString(); - } -} - -class $ApiKeyResponseBuilder - implements - Builder<$ApiKeyResponse, $ApiKeyResponseBuilder>, - ApiKeyResponseBuilder { - _$$ApiKeyResponse? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(covariant bool? active) => _$this._active = active; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(covariant bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _prefix; - String? get prefix => _$this._prefix; - set prefix(covariant String? prefix) => _$this._prefix = prefix; - - String? _role; - String? get role => _$this._role; - set role(covariant String? role) => _$this._role = role; - - $ApiKeyResponseBuilder() { - $ApiKeyResponse._defaults(this); - } - - $ApiKeyResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _createdAt = $v.createdAt; - _description = $v.description; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _prefix = $v.prefix; - _role = $v.role; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ApiKeyResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ApiKeyResponse; - } - - @override - void update(void Function($ApiKeyResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ApiKeyResponse build() => _build(); - - _$$ApiKeyResponse _build() { - final _$result = _$v ?? - new _$$ApiKeyResponse._( - active: active, - createdAt: createdAt, - description: description, - id: id, - livemode: livemode, - object: object, - prefix: prefix, - role: role); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/api_key_response_on_delete.dart b/lib/src/model/api_key_response_on_delete.dart new file mode 100644 index 0000000..2a3c662 --- /dev/null +++ b/lib/src/model/api_key_response_on_delete.dart @@ -0,0 +1,294 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_key_response_on_delete.g.dart'; + +/// api keys model +/// +/// Properties: +/// * [active] - Indicates if the api key is active +/// * [createdAt] - Unix timestamp in seconds of when the api key was created +/// * [description] - A name or brief explanation of what this api key is used for +/// * [livemode] - Indicates if the api key is in production +/// * [prefix] - The first few characters of the authentication_token +/// * [id] - Unique identifier of the api key +/// * [object] - Object name, value is 'api_key' +/// * [deleted] - Indicates if the api key was deleted +/// * [role] - Indicates if the api key is private or public +@BuiltValue(instantiable: false) +abstract class ApiKeyResponseOnDelete { + /// Indicates if the api key is active + @BuiltValueField(wireName: r'active') + bool? get active; + + /// Unix timestamp in seconds of when the api key was created + @BuiltValueField(wireName: r'created_at') + int? get createdAt; + + /// A name or brief explanation of what this api key is used for + @BuiltValueField(wireName: r'description') + String? get description; + + /// Indicates if the api key is in production + @BuiltValueField(wireName: r'livemode') + bool? get livemode; + + /// The first few characters of the authentication_token + @BuiltValueField(wireName: r'prefix') + String? get prefix; + + /// Unique identifier of the api key + @BuiltValueField(wireName: r'id') + String? get id; + + /// Object name, value is 'api_key' + @BuiltValueField(wireName: r'object') + String? get object; + + /// Indicates if the api key was deleted + @BuiltValueField(wireName: r'deleted') + bool? get deleted; + + /// Indicates if the api key is private or public + @BuiltValueField(wireName: r'role') + String? get role; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ApiKeyResponseOnDeleteSerializer(); +} + +class _$ApiKeyResponseOnDeleteSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ApiKeyResponseOnDelete]; + + @override + final String wireName = r'ApiKeyResponseOnDelete'; + + Iterable _serializeProperties( + Serializers serializers, + ApiKeyResponseOnDelete object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.active != null) { + yield r'active'; + yield serializers.serialize( + object.active, + specifiedType: const FullType(bool), + ); + } + if (object.createdAt != null) { + yield r'created_at'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(int), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } + if (object.livemode != null) { + yield r'livemode'; + yield serializers.serialize( + object.livemode, + specifiedType: const FullType(bool), + ); + } + if (object.prefix != null) { + yield r'prefix'; + yield serializers.serialize( + object.prefix, + specifiedType: const FullType(String), + ); + } + if (object.id != null) { + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + if (object.object != null) { + yield r'object'; + yield serializers.serialize( + object.object, + specifiedType: const FullType(String), + ); + } + if (object.deleted != null) { + yield r'deleted'; + yield serializers.serialize( + object.deleted, + specifiedType: const FullType(bool), + ); + } + if (object.role != null) { + yield r'role'; + yield serializers.serialize( + object.role, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ApiKeyResponseOnDelete object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + @override + ApiKeyResponseOnDelete deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + return serializers.deserialize(serialized, specifiedType: FullType($ApiKeyResponseOnDelete)) as $ApiKeyResponseOnDelete; + } +} + +/// a concrete implementation of [ApiKeyResponseOnDelete], since [ApiKeyResponseOnDelete] is not instantiable +@BuiltValue(instantiable: true) +abstract class $ApiKeyResponseOnDelete implements ApiKeyResponseOnDelete, Built<$ApiKeyResponseOnDelete, $ApiKeyResponseOnDeleteBuilder> { + $ApiKeyResponseOnDelete._(); + + factory $ApiKeyResponseOnDelete([void Function($ApiKeyResponseOnDeleteBuilder)? updates]) = _$$ApiKeyResponseOnDelete; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults($ApiKeyResponseOnDeleteBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer<$ApiKeyResponseOnDelete> get serializer => _$$ApiKeyResponseOnDeleteSerializer(); +} + +class _$$ApiKeyResponseOnDeleteSerializer implements PrimitiveSerializer<$ApiKeyResponseOnDelete> { + @override + final Iterable types = const [$ApiKeyResponseOnDelete, _$$ApiKeyResponseOnDelete]; + + @override + final String wireName = r'$ApiKeyResponseOnDelete'; + + @override + Object serialize( + Serializers serializers, + $ApiKeyResponseOnDelete object, { + FullType specifiedType = FullType.unspecified, + }) { + return serializers.serialize(object, specifiedType: FullType(ApiKeyResponseOnDelete))!; + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ApiKeyResponseOnDeleteBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'active': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.active = valueDes; + break; + case r'created_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.createdAt = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'livemode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.livemode = valueDes; + break; + case r'prefix': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.prefix = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'object': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.object = valueDes; + break; + case r'deleted': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.deleted = valueDes; + break; + case r'role': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.role = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + $ApiKeyResponseOnDelete deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = $ApiKeyResponseOnDeleteBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/api_key_update_request.dart b/lib/src/model/api_key_update_request.dart index 4d2964b..34ab3e7 100644 --- a/lib/src/model/api_key_update_request.dart +++ b/lib/src/model/api_key_update_request.dart @@ -12,14 +12,14 @@ part 'api_key_update_request.g.dart'; /// /// Properties: /// * [active] - Indicates if the webhook key is active -/// * [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 @BuiltValue() abstract class ApiKeyUpdateRequest implements Built { /// Indicates if the webhook key is active @BuiltValueField(wireName: r'active') bool? get active; - /// 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 @BuiltValueField(wireName: r'description') String? get description; diff --git a/lib/src/model/api_key_update_request.g.dart b/lib/src/model/api_key_update_request.g.dart deleted file mode 100644 index 5927557..0000000 --- a/lib/src/model/api_key_update_request.g.dart +++ /dev/null @@ -1,100 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'api_key_update_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ApiKeyUpdateRequest extends ApiKeyUpdateRequest { - @override - final bool? active; - @override - final String? description; - - factory _$ApiKeyUpdateRequest( - [void Function(ApiKeyUpdateRequestBuilder)? updates]) => - (new ApiKeyUpdateRequestBuilder()..update(updates))._build(); - - _$ApiKeyUpdateRequest._({this.active, this.description}) : super._(); - - @override - ApiKeyUpdateRequest rebuild( - void Function(ApiKeyUpdateRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ApiKeyUpdateRequestBuilder toBuilder() => - new ApiKeyUpdateRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ApiKeyUpdateRequest && - active == other.active && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc($jc(0, active.hashCode), description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ApiKeyUpdateRequest') - ..add('active', active) - ..add('description', description)) - .toString(); - } -} - -class ApiKeyUpdateRequestBuilder - implements Builder { - _$ApiKeyUpdateRequest? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - ApiKeyUpdateRequestBuilder() { - ApiKeyUpdateRequest._defaults(this); - } - - ApiKeyUpdateRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(ApiKeyUpdateRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ApiKeyUpdateRequest; - } - - @override - void update(void Function(ApiKeyUpdateRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ApiKeyUpdateRequest build() => _build(); - - _$ApiKeyUpdateRequest _build() { - final _$result = _$v ?? - new _$ApiKeyUpdateRequest._(active: active, description: description); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/balance_common_field.g.dart b/lib/src/model/balance_common_field.g.dart deleted file mode 100644 index 392200b..0000000 --- a/lib/src/model/balance_common_field.g.dart +++ /dev/null @@ -1,100 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'balance_common_field.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$BalanceCommonField extends BalanceCommonField { - @override - final int? amount; - @override - final String? currency; - - factory _$BalanceCommonField( - [void Function(BalanceCommonFieldBuilder)? updates]) => - (new BalanceCommonFieldBuilder()..update(updates))._build(); - - _$BalanceCommonField._({this.amount, this.currency}) : super._(); - - @override - BalanceCommonField rebuild( - void Function(BalanceCommonFieldBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - BalanceCommonFieldBuilder toBuilder() => - new BalanceCommonFieldBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is BalanceCommonField && - amount == other.amount && - currency == other.currency; - } - - @override - int get hashCode { - return $jf($jc($jc(0, amount.hashCode), currency.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'BalanceCommonField') - ..add('amount', amount) - ..add('currency', currency)) - .toString(); - } -} - -class BalanceCommonFieldBuilder - implements Builder { - _$BalanceCommonField? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - BalanceCommonFieldBuilder() { - BalanceCommonField._defaults(this); - } - - BalanceCommonFieldBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _currency = $v.currency; - _$v = null; - } - return this; - } - - @override - void replace(BalanceCommonField other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$BalanceCommonField; - } - - @override - void update(void Function(BalanceCommonFieldBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - BalanceCommonField build() => _build(); - - _$BalanceCommonField _build() { - final _$result = - _$v ?? new _$BalanceCommonField._(amount: amount, currency: currency); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/balance_response.g.dart b/lib/src/model/balance_response.g.dart deleted file mode 100644 index 8b6e9f4..0000000 --- a/lib/src/model/balance_response.g.dart +++ /dev/null @@ -1,260 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'balance_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$BalanceResponse extends BalanceResponse { - @override - final BuiltList? available; - @override - final BuiltList? cashoutRetentionAmount; - @override - final BuiltList? conektaRetention; - @override - final BuiltList? gateway; - @override - final BuiltList? pending; - @override - final BuiltList? retained; - @override - final BuiltList? retentionAmount; - @override - final JsonObject? targetCollateralAmount; - @override - final BuiltList? targetRetentionAmount; - @override - final BuiltList? temporarilyRetained; - - factory _$BalanceResponse([void Function(BalanceResponseBuilder)? updates]) => - (new BalanceResponseBuilder()..update(updates))._build(); - - _$BalanceResponse._( - {this.available, - this.cashoutRetentionAmount, - this.conektaRetention, - this.gateway, - this.pending, - this.retained, - this.retentionAmount, - this.targetCollateralAmount, - this.targetRetentionAmount, - this.temporarilyRetained}) - : super._(); - - @override - BalanceResponse rebuild(void Function(BalanceResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - BalanceResponseBuilder toBuilder() => - new BalanceResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is BalanceResponse && - available == other.available && - cashoutRetentionAmount == other.cashoutRetentionAmount && - conektaRetention == other.conektaRetention && - gateway == other.gateway && - pending == other.pending && - retained == other.retained && - retentionAmount == other.retentionAmount && - targetCollateralAmount == other.targetCollateralAmount && - targetRetentionAmount == other.targetRetentionAmount && - temporarilyRetained == other.temporarilyRetained; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, available.hashCode), - cashoutRetentionAmount.hashCode), - conektaRetention.hashCode), - gateway.hashCode), - pending.hashCode), - retained.hashCode), - retentionAmount.hashCode), - targetCollateralAmount.hashCode), - targetRetentionAmount.hashCode), - temporarilyRetained.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'BalanceResponse') - ..add('available', available) - ..add('cashoutRetentionAmount', cashoutRetentionAmount) - ..add('conektaRetention', conektaRetention) - ..add('gateway', gateway) - ..add('pending', pending) - ..add('retained', retained) - ..add('retentionAmount', retentionAmount) - ..add('targetCollateralAmount', targetCollateralAmount) - ..add('targetRetentionAmount', targetRetentionAmount) - ..add('temporarilyRetained', temporarilyRetained)) - .toString(); - } -} - -class BalanceResponseBuilder - implements Builder { - _$BalanceResponse? _$v; - - ListBuilder? _available; - ListBuilder get available => - _$this._available ??= new ListBuilder(); - set available(ListBuilder? available) => - _$this._available = available; - - ListBuilder? _cashoutRetentionAmount; - ListBuilder get cashoutRetentionAmount => - _$this._cashoutRetentionAmount ??= new ListBuilder(); - set cashoutRetentionAmount( - ListBuilder? cashoutRetentionAmount) => - _$this._cashoutRetentionAmount = cashoutRetentionAmount; - - ListBuilder? _conektaRetention; - ListBuilder get conektaRetention => - _$this._conektaRetention ??= new ListBuilder(); - set conektaRetention(ListBuilder? conektaRetention) => - _$this._conektaRetention = conektaRetention; - - ListBuilder? _gateway; - ListBuilder get gateway => - _$this._gateway ??= new ListBuilder(); - set gateway(ListBuilder? gateway) => - _$this._gateway = gateway; - - ListBuilder? _pending; - ListBuilder get pending => - _$this._pending ??= new ListBuilder(); - set pending(ListBuilder? pending) => - _$this._pending = pending; - - ListBuilder? _retained; - ListBuilder get retained => - _$this._retained ??= new ListBuilder(); - set retained(ListBuilder? retained) => - _$this._retained = retained; - - ListBuilder? _retentionAmount; - ListBuilder get retentionAmount => - _$this._retentionAmount ??= new ListBuilder(); - set retentionAmount(ListBuilder? retentionAmount) => - _$this._retentionAmount = retentionAmount; - - JsonObject? _targetCollateralAmount; - JsonObject? get targetCollateralAmount => _$this._targetCollateralAmount; - set targetCollateralAmount(JsonObject? targetCollateralAmount) => - _$this._targetCollateralAmount = targetCollateralAmount; - - ListBuilder? _targetRetentionAmount; - ListBuilder get targetRetentionAmount => - _$this._targetRetentionAmount ??= new ListBuilder(); - set targetRetentionAmount( - ListBuilder? targetRetentionAmount) => - _$this._targetRetentionAmount = targetRetentionAmount; - - ListBuilder? _temporarilyRetained; - ListBuilder get temporarilyRetained => - _$this._temporarilyRetained ??= new ListBuilder(); - set temporarilyRetained( - ListBuilder? temporarilyRetained) => - _$this._temporarilyRetained = temporarilyRetained; - - BalanceResponseBuilder() { - BalanceResponse._defaults(this); - } - - BalanceResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _available = $v.available?.toBuilder(); - _cashoutRetentionAmount = $v.cashoutRetentionAmount?.toBuilder(); - _conektaRetention = $v.conektaRetention?.toBuilder(); - _gateway = $v.gateway?.toBuilder(); - _pending = $v.pending?.toBuilder(); - _retained = $v.retained?.toBuilder(); - _retentionAmount = $v.retentionAmount?.toBuilder(); - _targetCollateralAmount = $v.targetCollateralAmount; - _targetRetentionAmount = $v.targetRetentionAmount?.toBuilder(); - _temporarilyRetained = $v.temporarilyRetained?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(BalanceResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$BalanceResponse; - } - - @override - void update(void Function(BalanceResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - BalanceResponse build() => _build(); - - _$BalanceResponse _build() { - _$BalanceResponse _$result; - try { - _$result = _$v ?? - new _$BalanceResponse._( - available: _available?.build(), - cashoutRetentionAmount: _cashoutRetentionAmount?.build(), - conektaRetention: _conektaRetention?.build(), - gateway: _gateway?.build(), - pending: _pending?.build(), - retained: _retained?.build(), - retentionAmount: _retentionAmount?.build(), - targetCollateralAmount: targetCollateralAmount, - targetRetentionAmount: _targetRetentionAmount?.build(), - temporarilyRetained: _temporarilyRetained?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'available'; - _available?.build(); - _$failedField = 'cashoutRetentionAmount'; - _cashoutRetentionAmount?.build(); - _$failedField = 'conektaRetention'; - _conektaRetention?.build(); - _$failedField = 'gateway'; - _gateway?.build(); - _$failedField = 'pending'; - _pending?.build(); - _$failedField = 'retained'; - _retained?.build(); - _$failedField = 'retentionAmount'; - _retentionAmount?.build(); - - _$failedField = 'targetRetentionAmount'; - _targetRetentionAmount?.build(); - _$failedField = 'temporarilyRetained'; - _temporarilyRetained?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'BalanceResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/blacklist_rule_response.g.dart b/lib/src/model/blacklist_rule_response.g.dart deleted file mode 100644 index 0c48243..0000000 --- a/lib/src/model/blacklist_rule_response.g.dart +++ /dev/null @@ -1,122 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'blacklist_rule_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$BlacklistRuleResponse extends BlacklistRuleResponse { - @override - final String? id; - @override - final String? field; - @override - final String? value; - @override - final String? description; - - factory _$BlacklistRuleResponse( - [void Function(BlacklistRuleResponseBuilder)? updates]) => - (new BlacklistRuleResponseBuilder()..update(updates))._build(); - - _$BlacklistRuleResponse._({this.id, this.field, this.value, this.description}) - : super._(); - - @override - BlacklistRuleResponse rebuild( - void Function(BlacklistRuleResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - BlacklistRuleResponseBuilder toBuilder() => - new BlacklistRuleResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is BlacklistRuleResponse && - id == other.id && - field == other.field && - value == other.value && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, id.hashCode), field.hashCode), value.hashCode), - description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'BlacklistRuleResponse') - ..add('id', id) - ..add('field', field) - ..add('value', value) - ..add('description', description)) - .toString(); - } -} - -class BlacklistRuleResponseBuilder - implements Builder { - _$BlacklistRuleResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _field; - String? get field => _$this._field; - set field(String? field) => _$this._field = field; - - String? _value; - String? get value => _$this._value; - set value(String? value) => _$this._value = value; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - BlacklistRuleResponseBuilder() { - BlacklistRuleResponse._defaults(this); - } - - BlacklistRuleResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _field = $v.field; - _value = $v.value; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(BlacklistRuleResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$BlacklistRuleResponse; - } - - @override - void update(void Function(BlacklistRuleResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - BlacklistRuleResponse build() => _build(); - - _$BlacklistRuleResponse _build() { - final _$result = _$v ?? - new _$BlacklistRuleResponse._( - id: id, field: field, value: value, description: description); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_data_payment_method_bank_transfer_response.g.dart b/lib/src/model/charge_data_payment_method_bank_transfer_response.g.dart deleted file mode 100644 index a10330e..0000000 --- a/lib/src/model/charge_data_payment_method_bank_transfer_response.g.dart +++ /dev/null @@ -1,387 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_data_payment_method_bank_transfer_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ChargeDataPaymentMethodBankTransferResponseBuilder { - void replace(ChargeDataPaymentMethodBankTransferResponse other); - void update( - void Function(ChargeDataPaymentMethodBankTransferResponseBuilder) - updates); - String? get bank; - set bank(String? bank); - - String? get clabe; - set clabe(String? clabe); - - String? get description; - set description(String? description); - - int? get executedAt; - set executedAt(int? executedAt); - - int? get expiresAt; - set expiresAt(int? expiresAt); - - String? get issuingAccountBank; - set issuingAccountBank(String? issuingAccountBank); - - String? get issuingAccountNumber; - set issuingAccountNumber(String? issuingAccountNumber); - - String? get issuingAccountHolderName; - set issuingAccountHolderName(String? issuingAccountHolderName); - - String? get issuingAccountTaxId; - set issuingAccountTaxId(String? issuingAccountTaxId); - - ListBuilder get paymentAttempts; - set paymentAttempts(ListBuilder? paymentAttempts); - - String? get receivingAccountHolderName; - set receivingAccountHolderName(String? receivingAccountHolderName); - - String? get receivingAccountNumber; - set receivingAccountNumber(String? receivingAccountNumber); - - String? get receivingAccountBank; - set receivingAccountBank(String? receivingAccountBank); - - String? get receivingAccountTaxId; - set receivingAccountTaxId(String? receivingAccountTaxId); - - String? get referenceNumber; - set referenceNumber(String? referenceNumber); - - String? get trackingCode; - set trackingCode(String? trackingCode); -} - -class _$$ChargeDataPaymentMethodBankTransferResponse - extends $ChargeDataPaymentMethodBankTransferResponse { - @override - final String? bank; - @override - final String? clabe; - @override - final String? description; - @override - final int? executedAt; - @override - final int? expiresAt; - @override - final String? issuingAccountBank; - @override - final String? issuingAccountNumber; - @override - final String? issuingAccountHolderName; - @override - final String? issuingAccountTaxId; - @override - final BuiltList? paymentAttempts; - @override - final String? receivingAccountHolderName; - @override - final String? receivingAccountNumber; - @override - final String? receivingAccountBank; - @override - final String? receivingAccountTaxId; - @override - final String? referenceNumber; - @override - final String? trackingCode; - - factory _$$ChargeDataPaymentMethodBankTransferResponse( - [void Function($ChargeDataPaymentMethodBankTransferResponseBuilder)? - updates]) => - (new $ChargeDataPaymentMethodBankTransferResponseBuilder() - ..update(updates)) - ._build(); - - _$$ChargeDataPaymentMethodBankTransferResponse._( - {this.bank, - this.clabe, - this.description, - this.executedAt, - this.expiresAt, - this.issuingAccountBank, - this.issuingAccountNumber, - this.issuingAccountHolderName, - this.issuingAccountTaxId, - this.paymentAttempts, - this.receivingAccountHolderName, - this.receivingAccountNumber, - this.receivingAccountBank, - this.receivingAccountTaxId, - this.referenceNumber, - this.trackingCode}) - : super._(); - - @override - $ChargeDataPaymentMethodBankTransferResponse rebuild( - void Function($ChargeDataPaymentMethodBankTransferResponseBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - $ChargeDataPaymentMethodBankTransferResponseBuilder toBuilder() => - new $ChargeDataPaymentMethodBankTransferResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ChargeDataPaymentMethodBankTransferResponse && - bank == other.bank && - clabe == other.clabe && - description == other.description && - executedAt == other.executedAt && - expiresAt == other.expiresAt && - issuingAccountBank == other.issuingAccountBank && - issuingAccountNumber == other.issuingAccountNumber && - issuingAccountHolderName == other.issuingAccountHolderName && - issuingAccountTaxId == other.issuingAccountTaxId && - paymentAttempts == other.paymentAttempts && - receivingAccountHolderName == other.receivingAccountHolderName && - receivingAccountNumber == other.receivingAccountNumber && - receivingAccountBank == other.receivingAccountBank && - receivingAccountTaxId == other.receivingAccountTaxId && - referenceNumber == other.referenceNumber && - trackingCode == other.trackingCode; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - bank - .hashCode), - clabe.hashCode), - description - .hashCode), - executedAt.hashCode), - expiresAt.hashCode), - issuingAccountBank.hashCode), - issuingAccountNumber.hashCode), - issuingAccountHolderName.hashCode), - issuingAccountTaxId.hashCode), - paymentAttempts.hashCode), - receivingAccountHolderName.hashCode), - receivingAccountNumber.hashCode), - receivingAccountBank.hashCode), - receivingAccountTaxId.hashCode), - referenceNumber.hashCode), - trackingCode.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'$ChargeDataPaymentMethodBankTransferResponse') - ..add('bank', bank) - ..add('clabe', clabe) - ..add('description', description) - ..add('executedAt', executedAt) - ..add('expiresAt', expiresAt) - ..add('issuingAccountBank', issuingAccountBank) - ..add('issuingAccountNumber', issuingAccountNumber) - ..add('issuingAccountHolderName', issuingAccountHolderName) - ..add('issuingAccountTaxId', issuingAccountTaxId) - ..add('paymentAttempts', paymentAttempts) - ..add('receivingAccountHolderName', receivingAccountHolderName) - ..add('receivingAccountNumber', receivingAccountNumber) - ..add('receivingAccountBank', receivingAccountBank) - ..add('receivingAccountTaxId', receivingAccountTaxId) - ..add('referenceNumber', referenceNumber) - ..add('trackingCode', trackingCode)) - .toString(); - } -} - -class $ChargeDataPaymentMethodBankTransferResponseBuilder - implements - Builder<$ChargeDataPaymentMethodBankTransferResponse, - $ChargeDataPaymentMethodBankTransferResponseBuilder>, - ChargeDataPaymentMethodBankTransferResponseBuilder { - _$$ChargeDataPaymentMethodBankTransferResponse? _$v; - - String? _bank; - String? get bank => _$this._bank; - set bank(covariant String? bank) => _$this._bank = bank; - - String? _clabe; - String? get clabe => _$this._clabe; - set clabe(covariant String? clabe) => _$this._clabe = clabe; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - int? _executedAt; - int? get executedAt => _$this._executedAt; - set executedAt(covariant int? executedAt) => _$this._executedAt = executedAt; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _issuingAccountBank; - String? get issuingAccountBank => _$this._issuingAccountBank; - set issuingAccountBank(covariant String? issuingAccountBank) => - _$this._issuingAccountBank = issuingAccountBank; - - String? _issuingAccountNumber; - String? get issuingAccountNumber => _$this._issuingAccountNumber; - set issuingAccountNumber(covariant String? issuingAccountNumber) => - _$this._issuingAccountNumber = issuingAccountNumber; - - String? _issuingAccountHolderName; - String? get issuingAccountHolderName => _$this._issuingAccountHolderName; - set issuingAccountHolderName(covariant String? issuingAccountHolderName) => - _$this._issuingAccountHolderName = issuingAccountHolderName; - - String? _issuingAccountTaxId; - String? get issuingAccountTaxId => _$this._issuingAccountTaxId; - set issuingAccountTaxId(covariant String? issuingAccountTaxId) => - _$this._issuingAccountTaxId = issuingAccountTaxId; - - ListBuilder? _paymentAttempts; - ListBuilder get paymentAttempts => - _$this._paymentAttempts ??= new ListBuilder(); - set paymentAttempts(covariant ListBuilder? paymentAttempts) => - _$this._paymentAttempts = paymentAttempts; - - String? _receivingAccountHolderName; - String? get receivingAccountHolderName => _$this._receivingAccountHolderName; - set receivingAccountHolderName( - covariant String? receivingAccountHolderName) => - _$this._receivingAccountHolderName = receivingAccountHolderName; - - String? _receivingAccountNumber; - String? get receivingAccountNumber => _$this._receivingAccountNumber; - set receivingAccountNumber(covariant String? receivingAccountNumber) => - _$this._receivingAccountNumber = receivingAccountNumber; - - String? _receivingAccountBank; - String? get receivingAccountBank => _$this._receivingAccountBank; - set receivingAccountBank(covariant String? receivingAccountBank) => - _$this._receivingAccountBank = receivingAccountBank; - - String? _receivingAccountTaxId; - String? get receivingAccountTaxId => _$this._receivingAccountTaxId; - set receivingAccountTaxId(covariant String? receivingAccountTaxId) => - _$this._receivingAccountTaxId = receivingAccountTaxId; - - String? _referenceNumber; - String? get referenceNumber => _$this._referenceNumber; - set referenceNumber(covariant String? referenceNumber) => - _$this._referenceNumber = referenceNumber; - - String? _trackingCode; - String? get trackingCode => _$this._trackingCode; - set trackingCode(covariant String? trackingCode) => - _$this._trackingCode = trackingCode; - - $ChargeDataPaymentMethodBankTransferResponseBuilder() { - $ChargeDataPaymentMethodBankTransferResponse._defaults(this); - } - - $ChargeDataPaymentMethodBankTransferResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _bank = $v.bank; - _clabe = $v.clabe; - _description = $v.description; - _executedAt = $v.executedAt; - _expiresAt = $v.expiresAt; - _issuingAccountBank = $v.issuingAccountBank; - _issuingAccountNumber = $v.issuingAccountNumber; - _issuingAccountHolderName = $v.issuingAccountHolderName; - _issuingAccountTaxId = $v.issuingAccountTaxId; - _paymentAttempts = $v.paymentAttempts?.toBuilder(); - _receivingAccountHolderName = $v.receivingAccountHolderName; - _receivingAccountNumber = $v.receivingAccountNumber; - _receivingAccountBank = $v.receivingAccountBank; - _receivingAccountTaxId = $v.receivingAccountTaxId; - _referenceNumber = $v.referenceNumber; - _trackingCode = $v.trackingCode; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ChargeDataPaymentMethodBankTransferResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ChargeDataPaymentMethodBankTransferResponse; - } - - @override - void update( - void Function($ChargeDataPaymentMethodBankTransferResponseBuilder)? - updates) { - if (updates != null) updates(this); - } - - @override - $ChargeDataPaymentMethodBankTransferResponse build() => _build(); - - _$$ChargeDataPaymentMethodBankTransferResponse _build() { - _$$ChargeDataPaymentMethodBankTransferResponse _$result; - try { - _$result = _$v ?? - new _$$ChargeDataPaymentMethodBankTransferResponse._( - bank: bank, - clabe: clabe, - description: description, - executedAt: executedAt, - expiresAt: expiresAt, - issuingAccountBank: issuingAccountBank, - issuingAccountNumber: issuingAccountNumber, - issuingAccountHolderName: issuingAccountHolderName, - issuingAccountTaxId: issuingAccountTaxId, - paymentAttempts: _paymentAttempts?.build(), - receivingAccountHolderName: receivingAccountHolderName, - receivingAccountNumber: receivingAccountNumber, - receivingAccountBank: receivingAccountBank, - receivingAccountTaxId: receivingAccountTaxId, - referenceNumber: referenceNumber, - trackingCode: trackingCode); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'paymentAttempts'; - _paymentAttempts?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$ChargeDataPaymentMethodBankTransferResponse', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_data_payment_method_card_response.dart b/lib/src/model/charge_data_payment_method_card_response.dart index f12c44b..5867513 100644 --- a/lib/src/model/charge_data_payment_method_card_response.dart +++ b/lib/src/model/charge_data_payment_method_card_response.dart @@ -16,6 +16,7 @@ part 'charge_data_payment_method_card_response.g.dart'; /// * [accountType] /// * [authCode] /// * [brand] +/// * [contractId] - Id sent for recurrent charges. /// * [country] /// * [expMonth] /// * [expYear] @@ -34,6 +35,10 @@ abstract class ChargeDataPaymentMethodCardResponse { @BuiltValueField(wireName: r'brand') String? get brand; + /// Id sent for recurrent charges. + @BuiltValueField(wireName: r'contract_id') + String? get contractId; + @BuiltValueField(wireName: r'country') String? get country; @@ -92,6 +97,13 @@ class _$ChargeDataPaymentMethodCardResponseSerializer implements PrimitiveSerial specifiedType: const FullType(String), ); } + if (object.contractId != null) { + yield r'contract_id'; + yield serializers.serialize( + object.contractId, + specifiedType: const FullType(String), + ); + } if (object.country != null) { yield r'country'; yield serializers.serialize( @@ -225,6 +237,13 @@ class _$$ChargeDataPaymentMethodCardResponseSerializer implements PrimitiveSeria ) as String; result.brand = valueDes; break; + case r'contract_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.contractId = valueDes; + break; case r'country': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/charge_data_payment_method_card_response.g.dart b/lib/src/model/charge_data_payment_method_card_response.g.dart deleted file mode 100644 index b507ad1..0000000 --- a/lib/src/model/charge_data_payment_method_card_response.g.dart +++ /dev/null @@ -1,270 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_data_payment_method_card_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ChargeDataPaymentMethodCardResponseBuilder { - void replace(ChargeDataPaymentMethodCardResponse other); - void update( - void Function(ChargeDataPaymentMethodCardResponseBuilder) updates); - String? get accountType; - set accountType(String? accountType); - - String? get authCode; - set authCode(String? authCode); - - String? get brand; - set brand(String? brand); - - String? get country; - set country(String? country); - - String? get expMonth; - set expMonth(String? expMonth); - - String? get expYear; - set expYear(String? expYear); - - ListBuilder get fraudIndicators; - set fraudIndicators(ListBuilder? fraudIndicators); - - String? get issuer; - set issuer(String? issuer); - - String? get last4; - set last4(String? last4); - - String? get name; - set name(String? name); -} - -class _$$ChargeDataPaymentMethodCardResponse - extends $ChargeDataPaymentMethodCardResponse { - @override - final String? accountType; - @override - final String? authCode; - @override - final String? brand; - @override - final String? country; - @override - final String? expMonth; - @override - final String? expYear; - @override - final BuiltList? fraudIndicators; - @override - final String? issuer; - @override - final String? last4; - @override - final String? name; - - factory _$$ChargeDataPaymentMethodCardResponse( - [void Function($ChargeDataPaymentMethodCardResponseBuilder)? - updates]) => - (new $ChargeDataPaymentMethodCardResponseBuilder()..update(updates)) - ._build(); - - _$$ChargeDataPaymentMethodCardResponse._( - {this.accountType, - this.authCode, - this.brand, - this.country, - this.expMonth, - this.expYear, - this.fraudIndicators, - this.issuer, - this.last4, - this.name}) - : super._(); - - @override - $ChargeDataPaymentMethodCardResponse rebuild( - void Function($ChargeDataPaymentMethodCardResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ChargeDataPaymentMethodCardResponseBuilder toBuilder() => - new $ChargeDataPaymentMethodCardResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ChargeDataPaymentMethodCardResponse && - accountType == other.accountType && - authCode == other.authCode && - brand == other.brand && - country == other.country && - expMonth == other.expMonth && - expYear == other.expYear && - fraudIndicators == other.fraudIndicators && - issuer == other.issuer && - last4 == other.last4 && - name == other.name; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, accountType.hashCode), - authCode.hashCode), - brand.hashCode), - country.hashCode), - expMonth.hashCode), - expYear.hashCode), - fraudIndicators.hashCode), - issuer.hashCode), - last4.hashCode), - name.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ChargeDataPaymentMethodCardResponse') - ..add('accountType', accountType) - ..add('authCode', authCode) - ..add('brand', brand) - ..add('country', country) - ..add('expMonth', expMonth) - ..add('expYear', expYear) - ..add('fraudIndicators', fraudIndicators) - ..add('issuer', issuer) - ..add('last4', last4) - ..add('name', name)) - .toString(); - } -} - -class $ChargeDataPaymentMethodCardResponseBuilder - implements - Builder<$ChargeDataPaymentMethodCardResponse, - $ChargeDataPaymentMethodCardResponseBuilder>, - ChargeDataPaymentMethodCardResponseBuilder { - _$$ChargeDataPaymentMethodCardResponse? _$v; - - String? _accountType; - String? get accountType => _$this._accountType; - set accountType(covariant String? accountType) => - _$this._accountType = accountType; - - String? _authCode; - String? get authCode => _$this._authCode; - set authCode(covariant String? authCode) => _$this._authCode = authCode; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _country; - String? get country => _$this._country; - set country(covariant String? country) => _$this._country = country; - - String? _expMonth; - String? get expMonth => _$this._expMonth; - set expMonth(covariant String? expMonth) => _$this._expMonth = expMonth; - - String? _expYear; - String? get expYear => _$this._expYear; - set expYear(covariant String? expYear) => _$this._expYear = expYear; - - ListBuilder? _fraudIndicators; - ListBuilder get fraudIndicators => - _$this._fraudIndicators ??= new ListBuilder(); - set fraudIndicators(covariant ListBuilder? fraudIndicators) => - _$this._fraudIndicators = fraudIndicators; - - String? _issuer; - String? get issuer => _$this._issuer; - set issuer(covariant String? issuer) => _$this._issuer = issuer; - - String? _last4; - String? get last4 => _$this._last4; - set last4(covariant String? last4) => _$this._last4 = last4; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - $ChargeDataPaymentMethodCardResponseBuilder() { - $ChargeDataPaymentMethodCardResponse._defaults(this); - } - - $ChargeDataPaymentMethodCardResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _accountType = $v.accountType; - _authCode = $v.authCode; - _brand = $v.brand; - _country = $v.country; - _expMonth = $v.expMonth; - _expYear = $v.expYear; - _fraudIndicators = $v.fraudIndicators?.toBuilder(); - _issuer = $v.issuer; - _last4 = $v.last4; - _name = $v.name; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ChargeDataPaymentMethodCardResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ChargeDataPaymentMethodCardResponse; - } - - @override - void update( - void Function($ChargeDataPaymentMethodCardResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ChargeDataPaymentMethodCardResponse build() => _build(); - - _$$ChargeDataPaymentMethodCardResponse _build() { - _$$ChargeDataPaymentMethodCardResponse _$result; - try { - _$result = _$v ?? - new _$$ChargeDataPaymentMethodCardResponse._( - accountType: accountType, - authCode: authCode, - brand: brand, - country: country, - expMonth: expMonth, - expYear: expYear, - fraudIndicators: _fraudIndicators?.build(), - issuer: issuer, - last4: last4, - name: name); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'fraudIndicators'; - _fraudIndicators?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$ChargeDataPaymentMethodCardResponse', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_data_payment_method_cash_response.g.dart b/lib/src/model/charge_data_payment_method_cash_response.g.dart deleted file mode 100644 index cddecfb..0000000 --- a/lib/src/model/charge_data_payment_method_cash_response.g.dart +++ /dev/null @@ -1,220 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_data_payment_method_cash_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ChargeDataPaymentMethodCashResponseBuilder { - void replace(ChargeDataPaymentMethodCashResponse other); - void update( - void Function(ChargeDataPaymentMethodCashResponseBuilder) updates); - int? get authCode; - set authCode(int? authCode); - - String? get cashierId; - set cashierId(String? cashierId); - - String? get reference; - set reference(String? reference); - - String? get barcodeUrl; - set barcodeUrl(String? barcodeUrl); - - int? get expiresAt; - set expiresAt(int? expiresAt); - - String? get serviceName; - set serviceName(String? serviceName); - - String? get store; - set store(String? store); - - String? get storeName; - set storeName(String? storeName); -} - -class _$$ChargeDataPaymentMethodCashResponse - extends $ChargeDataPaymentMethodCashResponse { - @override - final int? authCode; - @override - final String? cashierId; - @override - final String? reference; - @override - final String? barcodeUrl; - @override - final int? expiresAt; - @override - final String? serviceName; - @override - final String? store; - @override - final String? storeName; - - factory _$$ChargeDataPaymentMethodCashResponse( - [void Function($ChargeDataPaymentMethodCashResponseBuilder)? - updates]) => - (new $ChargeDataPaymentMethodCashResponseBuilder()..update(updates)) - ._build(); - - _$$ChargeDataPaymentMethodCashResponse._( - {this.authCode, - this.cashierId, - this.reference, - this.barcodeUrl, - this.expiresAt, - this.serviceName, - this.store, - this.storeName}) - : super._(); - - @override - $ChargeDataPaymentMethodCashResponse rebuild( - void Function($ChargeDataPaymentMethodCashResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ChargeDataPaymentMethodCashResponseBuilder toBuilder() => - new $ChargeDataPaymentMethodCashResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ChargeDataPaymentMethodCashResponse && - authCode == other.authCode && - cashierId == other.cashierId && - reference == other.reference && - barcodeUrl == other.barcodeUrl && - expiresAt == other.expiresAt && - serviceName == other.serviceName && - store == other.store && - storeName == other.storeName; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, authCode.hashCode), cashierId.hashCode), - reference.hashCode), - barcodeUrl.hashCode), - expiresAt.hashCode), - serviceName.hashCode), - store.hashCode), - storeName.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ChargeDataPaymentMethodCashResponse') - ..add('authCode', authCode) - ..add('cashierId', cashierId) - ..add('reference', reference) - ..add('barcodeUrl', barcodeUrl) - ..add('expiresAt', expiresAt) - ..add('serviceName', serviceName) - ..add('store', store) - ..add('storeName', storeName)) - .toString(); - } -} - -class $ChargeDataPaymentMethodCashResponseBuilder - implements - Builder<$ChargeDataPaymentMethodCashResponse, - $ChargeDataPaymentMethodCashResponseBuilder>, - ChargeDataPaymentMethodCashResponseBuilder { - _$$ChargeDataPaymentMethodCashResponse? _$v; - - int? _authCode; - int? get authCode => _$this._authCode; - set authCode(covariant int? authCode) => _$this._authCode = authCode; - - String? _cashierId; - String? get cashierId => _$this._cashierId; - set cashierId(covariant String? cashierId) => _$this._cashierId = cashierId; - - String? _reference; - String? get reference => _$this._reference; - set reference(covariant String? reference) => _$this._reference = reference; - - String? _barcodeUrl; - String? get barcodeUrl => _$this._barcodeUrl; - set barcodeUrl(covariant String? barcodeUrl) => - _$this._barcodeUrl = barcodeUrl; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _serviceName; - String? get serviceName => _$this._serviceName; - set serviceName(covariant String? serviceName) => - _$this._serviceName = serviceName; - - String? _store; - String? get store => _$this._store; - set store(covariant String? store) => _$this._store = store; - - String? _storeName; - String? get storeName => _$this._storeName; - set storeName(covariant String? storeName) => _$this._storeName = storeName; - - $ChargeDataPaymentMethodCashResponseBuilder() { - $ChargeDataPaymentMethodCashResponse._defaults(this); - } - - $ChargeDataPaymentMethodCashResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _authCode = $v.authCode; - _cashierId = $v.cashierId; - _reference = $v.reference; - _barcodeUrl = $v.barcodeUrl; - _expiresAt = $v.expiresAt; - _serviceName = $v.serviceName; - _store = $v.store; - _storeName = $v.storeName; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ChargeDataPaymentMethodCashResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ChargeDataPaymentMethodCashResponse; - } - - @override - void update( - void Function($ChargeDataPaymentMethodCashResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ChargeDataPaymentMethodCashResponse build() => _build(); - - _$$ChargeDataPaymentMethodCashResponse _build() { - final _$result = _$v ?? - new _$$ChargeDataPaymentMethodCashResponse._( - authCode: authCode, - cashierId: cashierId, - reference: reference, - barcodeUrl: barcodeUrl, - expiresAt: expiresAt, - serviceName: serviceName, - store: store, - storeName: storeName); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_order_response.dart b/lib/src/model/charge_order_response.dart index db75297..bed6591 100644 --- a/lib/src/model/charge_order_response.dart +++ b/lib/src/model/charge_order_response.dart @@ -24,7 +24,6 @@ part 'charge_order_response.g.dart'; /// * [deviceFingerprint] /// * [failureCode] /// * [failureMessage] -/// * [fee] /// * [id] /// * [livemode] /// * [monthlyInstallments] @@ -64,9 +63,6 @@ abstract class ChargeOrderResponse implements Built? refunds; - @override - final String? status; - - factory _$ChargeOrderResponse( - [void Function(ChargeOrderResponseBuilder)? updates]) => - (new ChargeOrderResponseBuilder()..update(updates))._build(); - - _$ChargeOrderResponse._( - {this.amount, - this.channel, - this.createdAt, - this.currency, - this.customerId, - this.description, - this.deviceFingerprint, - this.failureCode, - this.failureMessage, - this.fee, - this.id, - this.livemode, - this.monthlyInstallments, - this.object, - this.orderId, - this.paidAt, - this.paymentMethod, - this.referenceId, - this.refunds, - this.status}) - : super._(); - - @override - ChargeOrderResponse rebuild( - void Function(ChargeOrderResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeOrderResponseBuilder toBuilder() => - new ChargeOrderResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeOrderResponse && - amount == other.amount && - channel == other.channel && - createdAt == other.createdAt && - currency == other.currency && - customerId == other.customerId && - description == other.description && - deviceFingerprint == other.deviceFingerprint && - failureCode == other.failureCode && - failureMessage == other.failureMessage && - fee == other.fee && - id == other.id && - livemode == other.livemode && - monthlyInstallments == other.monthlyInstallments && - object == other.object && - orderId == other.orderId && - paidAt == other.paidAt && - paymentMethod == other.paymentMethod && - referenceId == other.referenceId && - refunds == other.refunds && - status == other.status; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - amount - .hashCode), - channel - .hashCode), - createdAt - .hashCode), - currency - .hashCode), - customerId - .hashCode), - description - .hashCode), - deviceFingerprint - .hashCode), - failureCode.hashCode), - failureMessage.hashCode), - fee.hashCode), - id.hashCode), - livemode.hashCode), - monthlyInstallments.hashCode), - object.hashCode), - orderId.hashCode), - paidAt.hashCode), - paymentMethod.hashCode), - referenceId.hashCode), - refunds.hashCode), - status.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeOrderResponse') - ..add('amount', amount) - ..add('channel', channel) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('customerId', customerId) - ..add('description', description) - ..add('deviceFingerprint', deviceFingerprint) - ..add('failureCode', failureCode) - ..add('failureMessage', failureMessage) - ..add('fee', fee) - ..add('id', id) - ..add('livemode', livemode) - ..add('monthlyInstallments', monthlyInstallments) - ..add('object', object) - ..add('orderId', orderId) - ..add('paidAt', paidAt) - ..add('paymentMethod', paymentMethod) - ..add('referenceId', referenceId) - ..add('refunds', refunds) - ..add('status', status)) - .toString(); - } -} - -class ChargeOrderResponseBuilder - implements Builder { - _$ChargeOrderResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - ChargeResponseChannelBuilder? _channel; - ChargeResponseChannelBuilder get channel => - _$this._channel ??= new ChargeResponseChannelBuilder(); - set channel(ChargeResponseChannelBuilder? channel) => - _$this._channel = channel; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(String? customerId) => _$this._customerId = customerId; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - String? _deviceFingerprint; - String? get deviceFingerprint => _$this._deviceFingerprint; - set deviceFingerprint(String? deviceFingerprint) => - _$this._deviceFingerprint = deviceFingerprint; - - String? _failureCode; - String? get failureCode => _$this._failureCode; - set failureCode(String? failureCode) => _$this._failureCode = failureCode; - - String? _failureMessage; - String? get failureMessage => _$this._failureMessage; - set failureMessage(String? failureMessage) => - _$this._failureMessage = failureMessage; - - int? _fee; - int? get fee => _$this._fee; - set fee(int? fee) => _$this._fee = fee; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - int? _monthlyInstallments; - int? get monthlyInstallments => _$this._monthlyInstallments; - set monthlyInstallments(int? monthlyInstallments) => - _$this._monthlyInstallments = monthlyInstallments; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _orderId; - String? get orderId => _$this._orderId; - set orderId(String? orderId) => _$this._orderId = orderId; - - int? _paidAt; - int? get paidAt => _$this._paidAt; - set paidAt(int? paidAt) => _$this._paidAt = paidAt; - - ChargeOrderResponsePaymentMethodBuilder? _paymentMethod; - ChargeOrderResponsePaymentMethodBuilder get paymentMethod => - _$this._paymentMethod ??= new ChargeOrderResponsePaymentMethodBuilder(); - set paymentMethod(ChargeOrderResponsePaymentMethodBuilder? paymentMethod) => - _$this._paymentMethod = paymentMethod; - - String? _referenceId; - String? get referenceId => _$this._referenceId; - set referenceId(String? referenceId) => _$this._referenceId = referenceId; - - ListBuilder? _refunds; - ListBuilder get refunds => - _$this._refunds ??= new ListBuilder(); - set refunds(ListBuilder? refunds) => _$this._refunds = refunds; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - ChargeOrderResponseBuilder() { - ChargeOrderResponse._defaults(this); - } - - ChargeOrderResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _channel = $v.channel?.toBuilder(); - _createdAt = $v.createdAt; - _currency = $v.currency; - _customerId = $v.customerId; - _description = $v.description; - _deviceFingerprint = $v.deviceFingerprint; - _failureCode = $v.failureCode; - _failureMessage = $v.failureMessage; - _fee = $v.fee; - _id = $v.id; - _livemode = $v.livemode; - _monthlyInstallments = $v.monthlyInstallments; - _object = $v.object; - _orderId = $v.orderId; - _paidAt = $v.paidAt; - _paymentMethod = $v.paymentMethod?.toBuilder(); - _referenceId = $v.referenceId; - _refunds = $v.refunds?.toBuilder(); - _status = $v.status; - _$v = null; - } - return this; - } - - @override - void replace(ChargeOrderResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeOrderResponse; - } - - @override - void update(void Function(ChargeOrderResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeOrderResponse build() => _build(); - - _$ChargeOrderResponse _build() { - _$ChargeOrderResponse _$result; - try { - _$result = _$v ?? - new _$ChargeOrderResponse._( - amount: amount, - channel: _channel?.build(), - createdAt: createdAt, - currency: currency, - customerId: customerId, - description: description, - deviceFingerprint: deviceFingerprint, - failureCode: failureCode, - failureMessage: failureMessage, - fee: fee, - id: id, - livemode: livemode, - monthlyInstallments: monthlyInstallments, - object: object, - orderId: orderId, - paidAt: paidAt, - paymentMethod: _paymentMethod?.build(), - referenceId: referenceId, - refunds: _refunds?.build(), - status: status); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'channel'; - _channel?.build(); - - _$failedField = 'paymentMethod'; - _paymentMethod?.build(); - - _$failedField = 'refunds'; - _refunds?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ChargeOrderResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_order_response_payment_method.dart b/lib/src/model/charge_order_response_payment_method.dart index 8b2321e..5a55066 100644 --- a/lib/src/model/charge_order_response_payment_method.dart +++ b/lib/src/model/charge_order_response_payment_method.dart @@ -29,6 +29,7 @@ part 'charge_order_response_payment_method.g.dart'; /// * [storeName] /// * [accountType] /// * [brand] +/// * [contractId] - Id sent for recurrent charges. /// * [country] /// * [expMonth] /// * [expYear] diff --git a/lib/src/model/charge_order_response_payment_method.g.dart b/lib/src/model/charge_order_response_payment_method.g.dart deleted file mode 100644 index 9da3d19..0000000 --- a/lib/src/model/charge_order_response_payment_method.g.dart +++ /dev/null @@ -1,98 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_order_response_payment_method.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ChargeOrderResponsePaymentMethod - extends ChargeOrderResponsePaymentMethod { - @override - final OneOf oneOf; - - factory _$ChargeOrderResponsePaymentMethod( - [void Function(ChargeOrderResponsePaymentMethodBuilder)? updates]) => - (new ChargeOrderResponsePaymentMethodBuilder()..update(updates))._build(); - - _$ChargeOrderResponsePaymentMethod._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'ChargeOrderResponsePaymentMethod', 'oneOf'); - } - - @override - ChargeOrderResponsePaymentMethod rebuild( - void Function(ChargeOrderResponsePaymentMethodBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeOrderResponsePaymentMethodBuilder toBuilder() => - new ChargeOrderResponsePaymentMethodBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeOrderResponsePaymentMethod && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeOrderResponsePaymentMethod') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class ChargeOrderResponsePaymentMethodBuilder - implements - Builder { - _$ChargeOrderResponsePaymentMethod? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - ChargeOrderResponsePaymentMethodBuilder() { - ChargeOrderResponsePaymentMethod._defaults(this); - } - - ChargeOrderResponsePaymentMethodBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(ChargeOrderResponsePaymentMethod other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeOrderResponsePaymentMethod; - } - - @override - void update(void Function(ChargeOrderResponsePaymentMethodBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeOrderResponsePaymentMethod build() => _build(); - - _$ChargeOrderResponsePaymentMethod _build() { - final _$result = _$v ?? - new _$ChargeOrderResponsePaymentMethod._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'ChargeOrderResponsePaymentMethod', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_request.dart b/lib/src/model/charge_request.dart index 603b6e1..e48cd6a 100644 --- a/lib/src/model/charge_request.dart +++ b/lib/src/model/charge_request.dart @@ -13,7 +13,6 @@ part 'charge_request.g.dart'; /// /// Properties: /// * [amount] -/// * [monthlyInstallments] - How many months without interest to apply, it can be 3, 6, 9, 12 or 18 /// * [paymentMethod] /// * [referenceId] - Custom reference to add to the charge @BuiltValue() @@ -21,10 +20,6 @@ abstract class ChargeRequest implements Built { specifiedType: const FullType(int), ); } - if (object.monthlyInstallments != null) { - yield r'monthly_installments'; - yield serializers.serialize( - object.monthlyInstallments, - specifiedType: const FullType(int), - ); - } yield r'payment_method'; yield serializers.serialize( object.paymentMethod, @@ -111,13 +99,6 @@ class _$ChargeRequestSerializer implements PrimitiveSerializer { ) as int; result.amount = valueDes; break; - case r'monthly_installments': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(int), - ) as int; - result.monthlyInstallments = valueDes; - break; case r'payment_method': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/charge_request.g.dart b/lib/src/model/charge_request.g.dart deleted file mode 100644 index 320f305..0000000 --- a/lib/src/model/charge_request.g.dart +++ /dev/null @@ -1,146 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ChargeRequest extends ChargeRequest { - @override - final int? amount; - @override - final int? monthlyInstallments; - @override - final ChargeRequestPaymentMethod paymentMethod; - @override - final String? referenceId; - - factory _$ChargeRequest([void Function(ChargeRequestBuilder)? updates]) => - (new ChargeRequestBuilder()..update(updates))._build(); - - _$ChargeRequest._( - {this.amount, - this.monthlyInstallments, - required this.paymentMethod, - this.referenceId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - paymentMethod, r'ChargeRequest', 'paymentMethod'); - } - - @override - ChargeRequest rebuild(void Function(ChargeRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeRequestBuilder toBuilder() => new ChargeRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeRequest && - amount == other.amount && - monthlyInstallments == other.monthlyInstallments && - paymentMethod == other.paymentMethod && - referenceId == other.referenceId; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, amount.hashCode), monthlyInstallments.hashCode), - paymentMethod.hashCode), - referenceId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeRequest') - ..add('amount', amount) - ..add('monthlyInstallments', monthlyInstallments) - ..add('paymentMethod', paymentMethod) - ..add('referenceId', referenceId)) - .toString(); - } -} - -class ChargeRequestBuilder - implements Builder { - _$ChargeRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - int? _monthlyInstallments; - int? get monthlyInstallments => _$this._monthlyInstallments; - set monthlyInstallments(int? monthlyInstallments) => - _$this._monthlyInstallments = monthlyInstallments; - - ChargeRequestPaymentMethodBuilder? _paymentMethod; - ChargeRequestPaymentMethodBuilder get paymentMethod => - _$this._paymentMethod ??= new ChargeRequestPaymentMethodBuilder(); - set paymentMethod(ChargeRequestPaymentMethodBuilder? paymentMethod) => - _$this._paymentMethod = paymentMethod; - - String? _referenceId; - String? get referenceId => _$this._referenceId; - set referenceId(String? referenceId) => _$this._referenceId = referenceId; - - ChargeRequestBuilder() { - ChargeRequest._defaults(this); - } - - ChargeRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _monthlyInstallments = $v.monthlyInstallments; - _paymentMethod = $v.paymentMethod.toBuilder(); - _referenceId = $v.referenceId; - _$v = null; - } - return this; - } - - @override - void replace(ChargeRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeRequest; - } - - @override - void update(void Function(ChargeRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeRequest build() => _build(); - - _$ChargeRequest _build() { - _$ChargeRequest _$result; - try { - _$result = _$v ?? - new _$ChargeRequest._( - amount: amount, - monthlyInstallments: monthlyInstallments, - paymentMethod: paymentMethod.build(), - referenceId: referenceId); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'paymentMethod'; - paymentMethod.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ChargeRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_request_payment_method.dart b/lib/src/model/charge_request_payment_method.dart index e0225cc..ec31041 100644 --- a/lib/src/model/charge_request_payment_method.dart +++ b/lib/src/model/charge_request_payment_method.dart @@ -12,15 +12,21 @@ part 'charge_request_payment_method.g.dart'; /// /// Properties: /// * [expiresAt] - Method expiration date as unix timestamp +/// * [monthlyInstallments] - How many months without interest to apply, it can be 3, 6, 9, 12 or 18 /// * [type] /// * [tokenId] /// * [paymentSourceId] +/// * [contractId] - Optional id sent to indicate the bank contract for recurrent card charges. @BuiltValue() abstract class ChargeRequestPaymentMethod implements Built { /// Method expiration date as unix timestamp @BuiltValueField(wireName: r'expires_at') int? get expiresAt; + /// How many months without interest to apply, it can be 3, 6, 9, 12 or 18 + @BuiltValueField(wireName: r'monthly_installments') + int? get monthlyInstallments; + @BuiltValueField(wireName: r'type') String get type; @@ -30,6 +36,10 @@ abstract class ChargeRequestPaymentMethod implements Built - (new ChargeRequestPaymentMethodBuilder()..update(updates))._build(); - - _$ChargeRequestPaymentMethod._( - {this.expiresAt, required this.type, this.tokenId, this.paymentSourceId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'ChargeRequestPaymentMethod', 'type'); - } - - @override - ChargeRequestPaymentMethod rebuild( - void Function(ChargeRequestPaymentMethodBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeRequestPaymentMethodBuilder toBuilder() => - new ChargeRequestPaymentMethodBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeRequestPaymentMethod && - expiresAt == other.expiresAt && - type == other.type && - tokenId == other.tokenId && - paymentSourceId == other.paymentSourceId; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, expiresAt.hashCode), type.hashCode), tokenId.hashCode), - paymentSourceId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeRequestPaymentMethod') - ..add('expiresAt', expiresAt) - ..add('type', type) - ..add('tokenId', tokenId) - ..add('paymentSourceId', paymentSourceId)) - .toString(); - } -} - -class ChargeRequestPaymentMethodBuilder - implements - Builder { - _$ChargeRequestPaymentMethod? _$v; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - String? _tokenId; - String? get tokenId => _$this._tokenId; - set tokenId(String? tokenId) => _$this._tokenId = tokenId; - - String? _paymentSourceId; - String? get paymentSourceId => _$this._paymentSourceId; - set paymentSourceId(String? paymentSourceId) => - _$this._paymentSourceId = paymentSourceId; - - ChargeRequestPaymentMethodBuilder() { - ChargeRequestPaymentMethod._defaults(this); - } - - ChargeRequestPaymentMethodBuilder get _$this { - final $v = _$v; - if ($v != null) { - _expiresAt = $v.expiresAt; - _type = $v.type; - _tokenId = $v.tokenId; - _paymentSourceId = $v.paymentSourceId; - _$v = null; - } - return this; - } - - @override - void replace(ChargeRequestPaymentMethod other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeRequestPaymentMethod; - } - - @override - void update(void Function(ChargeRequestPaymentMethodBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeRequestPaymentMethod build() => _build(); - - _$ChargeRequestPaymentMethod _build() { - final _$result = _$v ?? - new _$ChargeRequestPaymentMethod._( - expiresAt: expiresAt, - type: BuiltValueNullFieldError.checkNotNull( - type, r'ChargeRequestPaymentMethod', 'type'), - tokenId: tokenId, - paymentSourceId: paymentSourceId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_response.dart b/lib/src/model/charge_response.dart index 9ef51ac..fe205db 100644 --- a/lib/src/model/charge_response.dart +++ b/lib/src/model/charge_response.dart @@ -23,7 +23,6 @@ part 'charge_response.g.dart'; /// * [deviceFingerprint] /// * [failureCode] /// * [failureMessage] -/// * [fee] /// * [id] /// * [livemode] /// * [object] @@ -62,9 +61,6 @@ abstract class ChargeResponse { @BuiltValueField(wireName: r'failure_message') String? get failureMessage; - @BuiltValueField(wireName: r'fee') - int? get fee; - @BuiltValueField(wireName: r'id') String? get id; @@ -172,13 +168,6 @@ class _$ChargeResponseSerializer implements PrimitiveSerializer specifiedType: const FullType(String), ); } - if (object.fee != null) { - yield r'fee'; - yield serializers.serialize( - object.fee, - specifiedType: const FullType(int), - ); - } if (object.id != null) { yield r'id'; yield serializers.serialize( @@ -368,13 +357,6 @@ class _$$ChargeResponseSerializer implements PrimitiveSerializer<$ChargeResponse ) as String; result.failureMessage = valueDes; break; - case r'fee': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(int), - ) as int; - result.fee = valueDes; - break; case r'id': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/charge_response.g.dart b/lib/src/model/charge_response.g.dart deleted file mode 100644 index af6fe56..0000000 --- a/lib/src/model/charge_response.g.dart +++ /dev/null @@ -1,430 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ChargeResponseBuilder { - void replace(ChargeResponse other); - void update(void Function(ChargeResponseBuilder) updates); - int? get amount; - set amount(int? amount); - - ChargeResponseChannelBuilder get channel; - set channel(ChargeResponseChannelBuilder? channel); - - int? get createdAt; - set createdAt(int? createdAt); - - String? get currency; - set currency(String? currency); - - String? get customerId; - set customerId(String? customerId); - - String? get description; - set description(String? description); - - String? get deviceFingerprint; - set deviceFingerprint(String? deviceFingerprint); - - String? get failureCode; - set failureCode(String? failureCode); - - String? get failureMessage; - set failureMessage(String? failureMessage); - - int? get fee; - set fee(int? fee); - - String? get id; - set id(String? id); - - bool? get livemode; - set livemode(bool? livemode); - - String? get object; - set object(String? object); - - String? get orderId; - set orderId(String? orderId); - - int? get paidAt; - set paidAt(int? paidAt); - - ChargeResponsePaymentMethodBuilder get paymentMethod; - set paymentMethod(ChargeResponsePaymentMethodBuilder? paymentMethod); - - String? get referenceId; - set referenceId(String? referenceId); - - ChargeResponseRefundsBuilder get refunds; - set refunds(ChargeResponseRefundsBuilder? refunds); - - String? get status; - set status(String? status); -} - -class _$$ChargeResponse extends $ChargeResponse { - @override - final int? amount; - @override - final ChargeResponseChannel? channel; - @override - final int? createdAt; - @override - final String? currency; - @override - final String? customerId; - @override - final String? description; - @override - final String? deviceFingerprint; - @override - final String? failureCode; - @override - final String? failureMessage; - @override - final int? fee; - @override - final String? id; - @override - final bool? livemode; - @override - final String? object; - @override - final String? orderId; - @override - final int? paidAt; - @override - final ChargeResponsePaymentMethod? paymentMethod; - @override - final String? referenceId; - @override - final ChargeResponseRefunds? refunds; - @override - final String? status; - - factory _$$ChargeResponse([void Function($ChargeResponseBuilder)? updates]) => - (new $ChargeResponseBuilder()..update(updates))._build(); - - _$$ChargeResponse._( - {this.amount, - this.channel, - this.createdAt, - this.currency, - this.customerId, - this.description, - this.deviceFingerprint, - this.failureCode, - this.failureMessage, - this.fee, - this.id, - this.livemode, - this.object, - this.orderId, - this.paidAt, - this.paymentMethod, - this.referenceId, - this.refunds, - this.status}) - : super._(); - - @override - $ChargeResponse rebuild(void Function($ChargeResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ChargeResponseBuilder toBuilder() => - new $ChargeResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ChargeResponse && - amount == other.amount && - channel == other.channel && - createdAt == other.createdAt && - currency == other.currency && - customerId == other.customerId && - description == other.description && - deviceFingerprint == other.deviceFingerprint && - failureCode == other.failureCode && - failureMessage == other.failureMessage && - fee == other.fee && - id == other.id && - livemode == other.livemode && - object == other.object && - orderId == other.orderId && - paidAt == other.paidAt && - paymentMethod == other.paymentMethod && - referenceId == other.referenceId && - refunds == other.refunds && - status == other.status; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - amount - .hashCode), - channel - .hashCode), - createdAt - .hashCode), - currency - .hashCode), - customerId - .hashCode), - description - .hashCode), - deviceFingerprint - .hashCode), - failureCode.hashCode), - failureMessage.hashCode), - fee.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - orderId.hashCode), - paidAt.hashCode), - paymentMethod.hashCode), - referenceId.hashCode), - refunds.hashCode), - status.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ChargeResponse') - ..add('amount', amount) - ..add('channel', channel) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('customerId', customerId) - ..add('description', description) - ..add('deviceFingerprint', deviceFingerprint) - ..add('failureCode', failureCode) - ..add('failureMessage', failureMessage) - ..add('fee', fee) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('orderId', orderId) - ..add('paidAt', paidAt) - ..add('paymentMethod', paymentMethod) - ..add('referenceId', referenceId) - ..add('refunds', refunds) - ..add('status', status)) - .toString(); - } -} - -class $ChargeResponseBuilder - implements - Builder<$ChargeResponse, $ChargeResponseBuilder>, - ChargeResponseBuilder { - _$$ChargeResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - ChargeResponseChannelBuilder? _channel; - ChargeResponseChannelBuilder get channel => - _$this._channel ??= new ChargeResponseChannelBuilder(); - set channel(covariant ChargeResponseChannelBuilder? channel) => - _$this._channel = channel; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(covariant String? currency) => _$this._currency = currency; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(covariant String? customerId) => - _$this._customerId = customerId; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - String? _deviceFingerprint; - String? get deviceFingerprint => _$this._deviceFingerprint; - set deviceFingerprint(covariant String? deviceFingerprint) => - _$this._deviceFingerprint = deviceFingerprint; - - String? _failureCode; - String? get failureCode => _$this._failureCode; - set failureCode(covariant String? failureCode) => - _$this._failureCode = failureCode; - - String? _failureMessage; - String? get failureMessage => _$this._failureMessage; - set failureMessage(covariant String? failureMessage) => - _$this._failureMessage = failureMessage; - - int? _fee; - int? get fee => _$this._fee; - set fee(covariant int? fee) => _$this._fee = fee; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(covariant bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _orderId; - String? get orderId => _$this._orderId; - set orderId(covariant String? orderId) => _$this._orderId = orderId; - - int? _paidAt; - int? get paidAt => _$this._paidAt; - set paidAt(covariant int? paidAt) => _$this._paidAt = paidAt; - - ChargeResponsePaymentMethodBuilder? _paymentMethod; - ChargeResponsePaymentMethodBuilder get paymentMethod => - _$this._paymentMethod ??= new ChargeResponsePaymentMethodBuilder(); - set paymentMethod( - covariant ChargeResponsePaymentMethodBuilder? paymentMethod) => - _$this._paymentMethod = paymentMethod; - - String? _referenceId; - String? get referenceId => _$this._referenceId; - set referenceId(covariant String? referenceId) => - _$this._referenceId = referenceId; - - ChargeResponseRefundsBuilder? _refunds; - ChargeResponseRefundsBuilder get refunds => - _$this._refunds ??= new ChargeResponseRefundsBuilder(); - set refunds(covariant ChargeResponseRefundsBuilder? refunds) => - _$this._refunds = refunds; - - String? _status; - String? get status => _$this._status; - set status(covariant String? status) => _$this._status = status; - - $ChargeResponseBuilder() { - $ChargeResponse._defaults(this); - } - - $ChargeResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _channel = $v.channel?.toBuilder(); - _createdAt = $v.createdAt; - _currency = $v.currency; - _customerId = $v.customerId; - _description = $v.description; - _deviceFingerprint = $v.deviceFingerprint; - _failureCode = $v.failureCode; - _failureMessage = $v.failureMessage; - _fee = $v.fee; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _orderId = $v.orderId; - _paidAt = $v.paidAt; - _paymentMethod = $v.paymentMethod?.toBuilder(); - _referenceId = $v.referenceId; - _refunds = $v.refunds?.toBuilder(); - _status = $v.status; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ChargeResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ChargeResponse; - } - - @override - void update(void Function($ChargeResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ChargeResponse build() => _build(); - - _$$ChargeResponse _build() { - _$$ChargeResponse _$result; - try { - _$result = _$v ?? - new _$$ChargeResponse._( - amount: amount, - channel: _channel?.build(), - createdAt: createdAt, - currency: currency, - customerId: customerId, - description: description, - deviceFingerprint: deviceFingerprint, - failureCode: failureCode, - failureMessage: failureMessage, - fee: fee, - id: id, - livemode: livemode, - object: object, - orderId: orderId, - paidAt: paidAt, - paymentMethod: _paymentMethod?.build(), - referenceId: referenceId, - refunds: _refunds?.build(), - status: status); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'channel'; - _channel?.build(); - - _$failedField = 'paymentMethod'; - _paymentMethod?.build(); - - _$failedField = 'refunds'; - _refunds?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$ChargeResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_response_channel.g.dart b/lib/src/model/charge_response_channel.g.dart deleted file mode 100644 index 98b2356..0000000 --- a/lib/src/model/charge_response_channel.g.dart +++ /dev/null @@ -1,129 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_response_channel.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ChargeResponseChannel extends ChargeResponseChannel { - @override - final String? segment; - @override - final String? checkoutRequestId; - @override - final String? checkoutRequestType; - @override - final String? id; - - factory _$ChargeResponseChannel( - [void Function(ChargeResponseChannelBuilder)? updates]) => - (new ChargeResponseChannelBuilder()..update(updates))._build(); - - _$ChargeResponseChannel._( - {this.segment, this.checkoutRequestId, this.checkoutRequestType, this.id}) - : super._(); - - @override - ChargeResponseChannel rebuild( - void Function(ChargeResponseChannelBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeResponseChannelBuilder toBuilder() => - new ChargeResponseChannelBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeResponseChannel && - segment == other.segment && - checkoutRequestId == other.checkoutRequestId && - checkoutRequestType == other.checkoutRequestType && - id == other.id; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, segment.hashCode), checkoutRequestId.hashCode), - checkoutRequestType.hashCode), - id.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeResponseChannel') - ..add('segment', segment) - ..add('checkoutRequestId', checkoutRequestId) - ..add('checkoutRequestType', checkoutRequestType) - ..add('id', id)) - .toString(); - } -} - -class ChargeResponseChannelBuilder - implements Builder { - _$ChargeResponseChannel? _$v; - - String? _segment; - String? get segment => _$this._segment; - set segment(String? segment) => _$this._segment = segment; - - String? _checkoutRequestId; - String? get checkoutRequestId => _$this._checkoutRequestId; - set checkoutRequestId(String? checkoutRequestId) => - _$this._checkoutRequestId = checkoutRequestId; - - String? _checkoutRequestType; - String? get checkoutRequestType => _$this._checkoutRequestType; - set checkoutRequestType(String? checkoutRequestType) => - _$this._checkoutRequestType = checkoutRequestType; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - ChargeResponseChannelBuilder() { - ChargeResponseChannel._defaults(this); - } - - ChargeResponseChannelBuilder get _$this { - final $v = _$v; - if ($v != null) { - _segment = $v.segment; - _checkoutRequestId = $v.checkoutRequestId; - _checkoutRequestType = $v.checkoutRequestType; - _id = $v.id; - _$v = null; - } - return this; - } - - @override - void replace(ChargeResponseChannel other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeResponseChannel; - } - - @override - void update(void Function(ChargeResponseChannelBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeResponseChannel build() => _build(); - - _$ChargeResponseChannel _build() { - final _$result = _$v ?? - new _$ChargeResponseChannel._( - segment: segment, - checkoutRequestId: checkoutRequestId, - checkoutRequestType: checkoutRequestType, - id: id); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_response_payment_method.dart b/lib/src/model/charge_response_payment_method.dart index 783235b..43cbd42 100644 --- a/lib/src/model/charge_response_payment_method.dart +++ b/lib/src/model/charge_response_payment_method.dart @@ -29,6 +29,7 @@ part 'charge_response_payment_method.g.dart'; /// * [storeName] /// * [accountType] /// * [brand] +/// * [contractId] - Id sent for recurrent charges. /// * [country] /// * [expMonth] /// * [expYear] diff --git a/lib/src/model/charge_response_payment_method.g.dart b/lib/src/model/charge_response_payment_method.g.dart deleted file mode 100644 index 2a8a488..0000000 --- a/lib/src/model/charge_response_payment_method.g.dart +++ /dev/null @@ -1,97 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_response_payment_method.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ChargeResponsePaymentMethod extends ChargeResponsePaymentMethod { - @override - final OneOf oneOf; - - factory _$ChargeResponsePaymentMethod( - [void Function(ChargeResponsePaymentMethodBuilder)? updates]) => - (new ChargeResponsePaymentMethodBuilder()..update(updates))._build(); - - _$ChargeResponsePaymentMethod._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'ChargeResponsePaymentMethod', 'oneOf'); - } - - @override - ChargeResponsePaymentMethod rebuild( - void Function(ChargeResponsePaymentMethodBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeResponsePaymentMethodBuilder toBuilder() => - new ChargeResponsePaymentMethodBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeResponsePaymentMethod && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeResponsePaymentMethod') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class ChargeResponsePaymentMethodBuilder - implements - Builder { - _$ChargeResponsePaymentMethod? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - ChargeResponsePaymentMethodBuilder() { - ChargeResponsePaymentMethod._defaults(this); - } - - ChargeResponsePaymentMethodBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(ChargeResponsePaymentMethod other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeResponsePaymentMethod; - } - - @override - void update(void Function(ChargeResponsePaymentMethodBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeResponsePaymentMethod build() => _build(); - - _$ChargeResponsePaymentMethod _build() { - final _$result = _$v ?? - new _$ChargeResponsePaymentMethod._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'ChargeResponsePaymentMethod', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_response_refunds.g.dart b/lib/src/model/charge_response_refunds.g.dart deleted file mode 100644 index 88a121e..0000000 --- a/lib/src/model/charge_response_refunds.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_response_refunds.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ChargeResponseRefunds extends ChargeResponseRefunds { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$ChargeResponseRefunds( - [void Function(ChargeResponseRefundsBuilder)? updates]) => - (new ChargeResponseRefundsBuilder()..update(updates))._build(); - - _$ChargeResponseRefunds._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'ChargeResponseRefunds', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'ChargeResponseRefunds', 'object'); - } - - @override - ChargeResponseRefunds rebuild( - void Function(ChargeResponseRefundsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeResponseRefundsBuilder toBuilder() => - new ChargeResponseRefundsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeResponseRefunds && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeResponseRefunds') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class ChargeResponseRefundsBuilder - implements - Builder, - ChargeResponseRefundsAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$ChargeResponseRefunds? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - ChargeResponseRefundsBuilder() { - ChargeResponseRefunds._defaults(this); - } - - ChargeResponseRefundsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant ChargeResponseRefunds other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeResponseRefunds; - } - - @override - void update(void Function(ChargeResponseRefundsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeResponseRefunds build() => _build(); - - _$ChargeResponseRefunds _build() { - _$ChargeResponseRefunds _$result; - try { - _$result = _$v ?? - new _$ChargeResponseRefunds._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'ChargeResponseRefunds', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'ChargeResponseRefunds', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ChargeResponseRefunds', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_response_refunds_all_of.g.dart b/lib/src/model/charge_response_refunds_all_of.g.dart deleted file mode 100644 index 9258cba..0000000 --- a/lib/src/model/charge_response_refunds_all_of.g.dart +++ /dev/null @@ -1,115 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_response_refunds_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ChargeResponseRefundsAllOfBuilder { - void replace(ChargeResponseRefundsAllOf other); - void update(void Function(ChargeResponseRefundsAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$ChargeResponseRefundsAllOf extends $ChargeResponseRefundsAllOf { - @override - final BuiltList? data; - - factory _$$ChargeResponseRefundsAllOf( - [void Function($ChargeResponseRefundsAllOfBuilder)? updates]) => - (new $ChargeResponseRefundsAllOfBuilder()..update(updates))._build(); - - _$$ChargeResponseRefundsAllOf._({this.data}) : super._(); - - @override - $ChargeResponseRefundsAllOf rebuild( - void Function($ChargeResponseRefundsAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ChargeResponseRefundsAllOfBuilder toBuilder() => - new $ChargeResponseRefundsAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ChargeResponseRefundsAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ChargeResponseRefundsAllOf') - ..add('data', data)) - .toString(); - } -} - -class $ChargeResponseRefundsAllOfBuilder - implements - Builder<$ChargeResponseRefundsAllOf, - $ChargeResponseRefundsAllOfBuilder>, - ChargeResponseRefundsAllOfBuilder { - _$$ChargeResponseRefundsAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $ChargeResponseRefundsAllOfBuilder() { - $ChargeResponseRefundsAllOf._defaults(this); - } - - $ChargeResponseRefundsAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $ChargeResponseRefundsAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ChargeResponseRefundsAllOf; - } - - @override - void update(void Function($ChargeResponseRefundsAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ChargeResponseRefundsAllOf build() => _build(); - - _$$ChargeResponseRefundsAllOf _build() { - _$$ChargeResponseRefundsAllOf _$result; - try { - _$result = - _$v ?? new _$$ChargeResponseRefundsAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$ChargeResponseRefundsAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_response_refunds_data.g.dart b/lib/src/model/charge_response_refunds_data.g.dart deleted file mode 100644 index 14ac821..0000000 --- a/lib/src/model/charge_response_refunds_data.g.dart +++ /dev/null @@ -1,183 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'charge_response_refunds_data.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ChargeResponseRefundsData extends ChargeResponseRefundsData { - @override - final int amount; - @override - final String? authCode; - @override - final int createdAt; - @override - final int? expiresAt; - @override - final String id; - @override - final String object; - @override - final String? status; - - factory _$ChargeResponseRefundsData( - [void Function(ChargeResponseRefundsDataBuilder)? updates]) => - (new ChargeResponseRefundsDataBuilder()..update(updates))._build(); - - _$ChargeResponseRefundsData._( - {required this.amount, - this.authCode, - required this.createdAt, - this.expiresAt, - required this.id, - required this.object, - this.status}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'ChargeResponseRefundsData', 'amount'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'ChargeResponseRefundsData', 'createdAt'); - BuiltValueNullFieldError.checkNotNull( - id, r'ChargeResponseRefundsData', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'ChargeResponseRefundsData', 'object'); - } - - @override - ChargeResponseRefundsData rebuild( - void Function(ChargeResponseRefundsDataBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargeResponseRefundsDataBuilder toBuilder() => - new ChargeResponseRefundsDataBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargeResponseRefundsData && - amount == other.amount && - authCode == other.authCode && - createdAt == other.createdAt && - expiresAt == other.expiresAt && - id == other.id && - object == other.object && - status == other.status; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, amount.hashCode), authCode.hashCode), - createdAt.hashCode), - expiresAt.hashCode), - id.hashCode), - object.hashCode), - status.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargeResponseRefundsData') - ..add('amount', amount) - ..add('authCode', authCode) - ..add('createdAt', createdAt) - ..add('expiresAt', expiresAt) - ..add('id', id) - ..add('object', object) - ..add('status', status)) - .toString(); - } -} - -class ChargeResponseRefundsDataBuilder - implements - Builder { - _$ChargeResponseRefundsData? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _authCode; - String? get authCode => _$this._authCode; - set authCode(String? authCode) => _$this._authCode = authCode; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - ChargeResponseRefundsDataBuilder() { - ChargeResponseRefundsData._defaults(this); - } - - ChargeResponseRefundsDataBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _authCode = $v.authCode; - _createdAt = $v.createdAt; - _expiresAt = $v.expiresAt; - _id = $v.id; - _object = $v.object; - _status = $v.status; - _$v = null; - } - return this; - } - - @override - void replace(ChargeResponseRefundsData other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargeResponseRefundsData; - } - - @override - void update(void Function(ChargeResponseRefundsDataBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargeResponseRefundsData build() => _build(); - - _$ChargeResponseRefundsData _build() { - final _$result = _$v ?? - new _$ChargeResponseRefundsData._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'ChargeResponseRefundsData', 'amount'), - authCode: authCode, - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'ChargeResponseRefundsData', 'createdAt'), - expiresAt: expiresAt, - id: BuiltValueNullFieldError.checkNotNull( - id, r'ChargeResponseRefundsData', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'ChargeResponseRefundsData', 'object'), - status: status); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/charge_update_request.dart b/lib/src/model/charge_update_request.dart new file mode 100644 index 0000000..b068601 --- /dev/null +++ b/lib/src/model/charge_update_request.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'charge_update_request.g.dart'; + +/// requested field for update a charge +/// +/// Properties: +/// * [referenceId] - custom reference id +@BuiltValue() +abstract class ChargeUpdateRequest implements Built { + /// custom reference id + @BuiltValueField(wireName: r'reference_id') + String? get referenceId; + + ChargeUpdateRequest._(); + + factory ChargeUpdateRequest([void updates(ChargeUpdateRequestBuilder b)]) = _$ChargeUpdateRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ChargeUpdateRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ChargeUpdateRequestSerializer(); +} + +class _$ChargeUpdateRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChargeUpdateRequest, _$ChargeUpdateRequest]; + + @override + final String wireName = r'ChargeUpdateRequest'; + + Iterable _serializeProperties( + Serializers serializers, + ChargeUpdateRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.referenceId != null) { + yield r'reference_id'; + yield serializers.serialize( + object.referenceId, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ChargeUpdateRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ChargeUpdateRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'reference_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.referenceId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ChargeUpdateRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ChargeUpdateRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/charges_data_response.dart b/lib/src/model/charges_data_response.dart index c9bb00e..30cab8f 100644 --- a/lib/src/model/charges_data_response.dart +++ b/lib/src/model/charges_data_response.dart @@ -24,7 +24,6 @@ part 'charges_data_response.g.dart'; /// * [deviceFingerprint] /// * [failureCode] /// * [failureMessage] -/// * [fee] /// * [id] /// * [livemode] /// * [object] @@ -94,13 +93,6 @@ class _$ChargesDataResponseSerializer implements PrimitiveSerializer - (new ChargesDataResponseBuilder()..update(updates))._build(); - - _$ChargesDataResponse._( - {this.amount, - this.channel, - this.createdAt, - this.currency, - this.customerId, - this.description, - this.deviceFingerprint, - this.failureCode, - this.failureMessage, - this.fee, - this.id, - this.livemode, - this.object, - this.orderId, - this.paidAt, - this.paymentMethod, - this.referenceId, - this.refunds, - this.status}) - : super._(); - - @override - ChargesDataResponse rebuild( - void Function(ChargesDataResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ChargesDataResponseBuilder toBuilder() => - new ChargesDataResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ChargesDataResponse && - amount == other.amount && - channel == other.channel && - createdAt == other.createdAt && - currency == other.currency && - customerId == other.customerId && - description == other.description && - deviceFingerprint == other.deviceFingerprint && - failureCode == other.failureCode && - failureMessage == other.failureMessage && - fee == other.fee && - id == other.id && - livemode == other.livemode && - object == other.object && - orderId == other.orderId && - paidAt == other.paidAt && - paymentMethod == other.paymentMethod && - referenceId == other.referenceId && - refunds == other.refunds && - status == other.status; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - amount - .hashCode), - channel - .hashCode), - createdAt - .hashCode), - currency - .hashCode), - customerId - .hashCode), - description - .hashCode), - deviceFingerprint - .hashCode), - failureCode.hashCode), - failureMessage.hashCode), - fee.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - orderId.hashCode), - paidAt.hashCode), - paymentMethod.hashCode), - referenceId.hashCode), - refunds.hashCode), - status.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ChargesDataResponse') - ..add('amount', amount) - ..add('channel', channel) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('customerId', customerId) - ..add('description', description) - ..add('deviceFingerprint', deviceFingerprint) - ..add('failureCode', failureCode) - ..add('failureMessage', failureMessage) - ..add('fee', fee) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('orderId', orderId) - ..add('paidAt', paidAt) - ..add('paymentMethod', paymentMethod) - ..add('referenceId', referenceId) - ..add('refunds', refunds) - ..add('status', status)) - .toString(); - } -} - -class ChargesDataResponseBuilder - implements - Builder, - ChargeResponseBuilder { - _$ChargesDataResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - ChargeResponseChannelBuilder? _channel; - ChargeResponseChannelBuilder get channel => - _$this._channel ??= new ChargeResponseChannelBuilder(); - set channel(covariant ChargeResponseChannelBuilder? channel) => - _$this._channel = channel; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(covariant String? currency) => _$this._currency = currency; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(covariant String? customerId) => - _$this._customerId = customerId; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - String? _deviceFingerprint; - String? get deviceFingerprint => _$this._deviceFingerprint; - set deviceFingerprint(covariant String? deviceFingerprint) => - _$this._deviceFingerprint = deviceFingerprint; - - String? _failureCode; - String? get failureCode => _$this._failureCode; - set failureCode(covariant String? failureCode) => - _$this._failureCode = failureCode; - - String? _failureMessage; - String? get failureMessage => _$this._failureMessage; - set failureMessage(covariant String? failureMessage) => - _$this._failureMessage = failureMessage; - - int? _fee; - int? get fee => _$this._fee; - set fee(covariant int? fee) => _$this._fee = fee; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(covariant bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _orderId; - String? get orderId => _$this._orderId; - set orderId(covariant String? orderId) => _$this._orderId = orderId; - - int? _paidAt; - int? get paidAt => _$this._paidAt; - set paidAt(covariant int? paidAt) => _$this._paidAt = paidAt; - - ChargeResponsePaymentMethodBuilder? _paymentMethod; - ChargeResponsePaymentMethodBuilder get paymentMethod => - _$this._paymentMethod ??= new ChargeResponsePaymentMethodBuilder(); - set paymentMethod( - covariant ChargeResponsePaymentMethodBuilder? paymentMethod) => - _$this._paymentMethod = paymentMethod; - - String? _referenceId; - String? get referenceId => _$this._referenceId; - set referenceId(covariant String? referenceId) => - _$this._referenceId = referenceId; - - ChargeResponseRefundsBuilder? _refunds; - ChargeResponseRefundsBuilder get refunds => - _$this._refunds ??= new ChargeResponseRefundsBuilder(); - set refunds(covariant ChargeResponseRefundsBuilder? refunds) => - _$this._refunds = refunds; - - String? _status; - String? get status => _$this._status; - set status(covariant String? status) => _$this._status = status; - - ChargesDataResponseBuilder() { - ChargesDataResponse._defaults(this); - } - - ChargesDataResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _channel = $v.channel?.toBuilder(); - _createdAt = $v.createdAt; - _currency = $v.currency; - _customerId = $v.customerId; - _description = $v.description; - _deviceFingerprint = $v.deviceFingerprint; - _failureCode = $v.failureCode; - _failureMessage = $v.failureMessage; - _fee = $v.fee; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _orderId = $v.orderId; - _paidAt = $v.paidAt; - _paymentMethod = $v.paymentMethod?.toBuilder(); - _referenceId = $v.referenceId; - _refunds = $v.refunds?.toBuilder(); - _status = $v.status; - _$v = null; - } - return this; - } - - @override - void replace(covariant ChargesDataResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ChargesDataResponse; - } - - @override - void update(void Function(ChargesDataResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ChargesDataResponse build() => _build(); - - _$ChargesDataResponse _build() { - _$ChargesDataResponse _$result; - try { - _$result = _$v ?? - new _$ChargesDataResponse._( - amount: amount, - channel: _channel?.build(), - createdAt: createdAt, - currency: currency, - customerId: customerId, - description: description, - deviceFingerprint: deviceFingerprint, - failureCode: failureCode, - failureMessage: failureMessage, - fee: fee, - id: id, - livemode: livemode, - object: object, - orderId: orderId, - paidAt: paidAt, - paymentMethod: _paymentMethod?.build(), - referenceId: referenceId, - refunds: _refunds?.build(), - status: status); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'channel'; - _channel?.build(); - - _$failedField = 'paymentMethod'; - _paymentMethod?.build(); - - _$failedField = 'refunds'; - _refunds?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ChargesDataResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkout.g.dart b/lib/src/model/checkout.g.dart deleted file mode 100644 index ad3d3e6..0000000 --- a/lib/src/model/checkout.g.dart +++ /dev/null @@ -1,264 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkout.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$Checkout extends Checkout { - @override - final BuiltList allowedPaymentMethods; - @override - final int expiresAt; - @override - final bool? monthlyInstallmentsEnabled; - @override - final BuiltList? monthlyInstallmentsOptions; - @override - final String name; - @override - final bool? needsShippingContact; - @override - final bool? onDemandEnabled; - @override - final CheckoutOrderTemplate orderTemplate; - @override - final int? paymentsLimitCount; - @override - final bool recurrent; - @override - final String type; - - factory _$Checkout([void Function(CheckoutBuilder)? updates]) => - (new CheckoutBuilder()..update(updates))._build(); - - _$Checkout._( - {required this.allowedPaymentMethods, - required this.expiresAt, - this.monthlyInstallmentsEnabled, - this.monthlyInstallmentsOptions, - required this.name, - this.needsShippingContact, - this.onDemandEnabled, - required this.orderTemplate, - this.paymentsLimitCount, - required this.recurrent, - required this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - allowedPaymentMethods, r'Checkout', 'allowedPaymentMethods'); - BuiltValueNullFieldError.checkNotNull(expiresAt, r'Checkout', 'expiresAt'); - BuiltValueNullFieldError.checkNotNull(name, r'Checkout', 'name'); - BuiltValueNullFieldError.checkNotNull( - orderTemplate, r'Checkout', 'orderTemplate'); - BuiltValueNullFieldError.checkNotNull(recurrent, r'Checkout', 'recurrent'); - BuiltValueNullFieldError.checkNotNull(type, r'Checkout', 'type'); - } - - @override - Checkout rebuild(void Function(CheckoutBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CheckoutBuilder toBuilder() => new CheckoutBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is Checkout && - allowedPaymentMethods == other.allowedPaymentMethods && - expiresAt == other.expiresAt && - monthlyInstallmentsEnabled == other.monthlyInstallmentsEnabled && - monthlyInstallmentsOptions == other.monthlyInstallmentsOptions && - name == other.name && - needsShippingContact == other.needsShippingContact && - onDemandEnabled == other.onDemandEnabled && - orderTemplate == other.orderTemplate && - paymentsLimitCount == other.paymentsLimitCount && - recurrent == other.recurrent && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc(0, - allowedPaymentMethods.hashCode), - expiresAt.hashCode), - monthlyInstallmentsEnabled.hashCode), - monthlyInstallmentsOptions.hashCode), - name.hashCode), - needsShippingContact.hashCode), - onDemandEnabled.hashCode), - orderTemplate.hashCode), - paymentsLimitCount.hashCode), - recurrent.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'Checkout') - ..add('allowedPaymentMethods', allowedPaymentMethods) - ..add('expiresAt', expiresAt) - ..add('monthlyInstallmentsEnabled', monthlyInstallmentsEnabled) - ..add('monthlyInstallmentsOptions', monthlyInstallmentsOptions) - ..add('name', name) - ..add('needsShippingContact', needsShippingContact) - ..add('onDemandEnabled', onDemandEnabled) - ..add('orderTemplate', orderTemplate) - ..add('paymentsLimitCount', paymentsLimitCount) - ..add('recurrent', recurrent) - ..add('type', type)) - .toString(); - } -} - -class CheckoutBuilder implements Builder { - _$Checkout? _$v; - - ListBuilder? _allowedPaymentMethods; - ListBuilder get allowedPaymentMethods => - _$this._allowedPaymentMethods ??= new ListBuilder(); - set allowedPaymentMethods(ListBuilder? allowedPaymentMethods) => - _$this._allowedPaymentMethods = allowedPaymentMethods; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - bool? _monthlyInstallmentsEnabled; - bool? get monthlyInstallmentsEnabled => _$this._monthlyInstallmentsEnabled; - set monthlyInstallmentsEnabled(bool? monthlyInstallmentsEnabled) => - _$this._monthlyInstallmentsEnabled = monthlyInstallmentsEnabled; - - ListBuilder? _monthlyInstallmentsOptions; - ListBuilder get monthlyInstallmentsOptions => - _$this._monthlyInstallmentsOptions ??= new ListBuilder(); - set monthlyInstallmentsOptions( - ListBuilder? monthlyInstallmentsOptions) => - _$this._monthlyInstallmentsOptions = monthlyInstallmentsOptions; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - bool? _needsShippingContact; - bool? get needsShippingContact => _$this._needsShippingContact; - set needsShippingContact(bool? needsShippingContact) => - _$this._needsShippingContact = needsShippingContact; - - bool? _onDemandEnabled; - bool? get onDemandEnabled => _$this._onDemandEnabled; - set onDemandEnabled(bool? onDemandEnabled) => - _$this._onDemandEnabled = onDemandEnabled; - - CheckoutOrderTemplateBuilder? _orderTemplate; - CheckoutOrderTemplateBuilder get orderTemplate => - _$this._orderTemplate ??= new CheckoutOrderTemplateBuilder(); - set orderTemplate(CheckoutOrderTemplateBuilder? orderTemplate) => - _$this._orderTemplate = orderTemplate; - - int? _paymentsLimitCount; - int? get paymentsLimitCount => _$this._paymentsLimitCount; - set paymentsLimitCount(int? paymentsLimitCount) => - _$this._paymentsLimitCount = paymentsLimitCount; - - bool? _recurrent; - bool? get recurrent => _$this._recurrent; - set recurrent(bool? recurrent) => _$this._recurrent = recurrent; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - CheckoutBuilder() { - Checkout._defaults(this); - } - - CheckoutBuilder get _$this { - final $v = _$v; - if ($v != null) { - _allowedPaymentMethods = $v.allowedPaymentMethods.toBuilder(); - _expiresAt = $v.expiresAt; - _monthlyInstallmentsEnabled = $v.monthlyInstallmentsEnabled; - _monthlyInstallmentsOptions = $v.monthlyInstallmentsOptions?.toBuilder(); - _name = $v.name; - _needsShippingContact = $v.needsShippingContact; - _onDemandEnabled = $v.onDemandEnabled; - _orderTemplate = $v.orderTemplate.toBuilder(); - _paymentsLimitCount = $v.paymentsLimitCount; - _recurrent = $v.recurrent; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(Checkout other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$Checkout; - } - - @override - void update(void Function(CheckoutBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - Checkout build() => _build(); - - _$Checkout _build() { - _$Checkout _$result; - try { - _$result = _$v ?? - new _$Checkout._( - allowedPaymentMethods: allowedPaymentMethods.build(), - expiresAt: BuiltValueNullFieldError.checkNotNull( - expiresAt, r'Checkout', 'expiresAt'), - monthlyInstallmentsEnabled: monthlyInstallmentsEnabled, - monthlyInstallmentsOptions: _monthlyInstallmentsOptions?.build(), - name: BuiltValueNullFieldError.checkNotNull( - name, r'Checkout', 'name'), - needsShippingContact: needsShippingContact, - onDemandEnabled: onDemandEnabled, - orderTemplate: orderTemplate.build(), - paymentsLimitCount: paymentsLimitCount, - recurrent: BuiltValueNullFieldError.checkNotNull( - recurrent, r'Checkout', 'recurrent'), - type: BuiltValueNullFieldError.checkNotNull( - type, r'Checkout', 'type')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'allowedPaymentMethods'; - allowedPaymentMethods.build(); - - _$failedField = 'monthlyInstallmentsOptions'; - _monthlyInstallmentsOptions?.build(); - - _$failedField = 'orderTemplate'; - orderTemplate.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'Checkout', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkout_order_template.g.dart b/lib/src/model/checkout_order_template.g.dart deleted file mode 100644 index f45dcbb..0000000 --- a/lib/src/model/checkout_order_template.g.dart +++ /dev/null @@ -1,159 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkout_order_template.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CheckoutOrderTemplate extends CheckoutOrderTemplate { - @override - final String currency; - @override - final CheckoutOrderTemplateCustomerInfo? customerInfo; - @override - final BuiltList lineItems; - @override - final BuiltMap? metadata; - - factory _$CheckoutOrderTemplate( - [void Function(CheckoutOrderTemplateBuilder)? updates]) => - (new CheckoutOrderTemplateBuilder()..update(updates))._build(); - - _$CheckoutOrderTemplate._( - {required this.currency, - this.customerInfo, - required this.lineItems, - this.metadata}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - currency, r'CheckoutOrderTemplate', 'currency'); - BuiltValueNullFieldError.checkNotNull( - lineItems, r'CheckoutOrderTemplate', 'lineItems'); - } - - @override - CheckoutOrderTemplate rebuild( - void Function(CheckoutOrderTemplateBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CheckoutOrderTemplateBuilder toBuilder() => - new CheckoutOrderTemplateBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CheckoutOrderTemplate && - currency == other.currency && - customerInfo == other.customerInfo && - lineItems == other.lineItems && - metadata == other.metadata; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, currency.hashCode), customerInfo.hashCode), - lineItems.hashCode), - metadata.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CheckoutOrderTemplate') - ..add('currency', currency) - ..add('customerInfo', customerInfo) - ..add('lineItems', lineItems) - ..add('metadata', metadata)) - .toString(); - } -} - -class CheckoutOrderTemplateBuilder - implements Builder { - _$CheckoutOrderTemplate? _$v; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - CheckoutOrderTemplateCustomerInfoBuilder? _customerInfo; - CheckoutOrderTemplateCustomerInfoBuilder get customerInfo => - _$this._customerInfo ??= new CheckoutOrderTemplateCustomerInfoBuilder(); - set customerInfo(CheckoutOrderTemplateCustomerInfoBuilder? customerInfo) => - _$this._customerInfo = customerInfo; - - ListBuilder? _lineItems; - ListBuilder get lineItems => - _$this._lineItems ??= new ListBuilder(); - set lineItems(ListBuilder? lineItems) => - _$this._lineItems = lineItems; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - CheckoutOrderTemplateBuilder() { - CheckoutOrderTemplate._defaults(this); - } - - CheckoutOrderTemplateBuilder get _$this { - final $v = _$v; - if ($v != null) { - _currency = $v.currency; - _customerInfo = $v.customerInfo?.toBuilder(); - _lineItems = $v.lineItems.toBuilder(); - _metadata = $v.metadata?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(CheckoutOrderTemplate other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CheckoutOrderTemplate; - } - - @override - void update(void Function(CheckoutOrderTemplateBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CheckoutOrderTemplate build() => _build(); - - _$CheckoutOrderTemplate _build() { - _$CheckoutOrderTemplate _$result; - try { - _$result = _$v ?? - new _$CheckoutOrderTemplate._( - currency: BuiltValueNullFieldError.checkNotNull( - currency, r'CheckoutOrderTemplate', 'currency'), - customerInfo: _customerInfo?.build(), - lineItems: lineItems.build(), - metadata: _metadata?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'customerInfo'; - _customerInfo?.build(); - _$failedField = 'lineItems'; - lineItems.build(); - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CheckoutOrderTemplate', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkout_order_template_customer_info.g.dart b/lib/src/model/checkout_order_template_customer_info.g.dart deleted file mode 100644 index 43e1b80..0000000 --- a/lib/src/model/checkout_order_template_customer_info.g.dart +++ /dev/null @@ -1,100 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkout_order_template_customer_info.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CheckoutOrderTemplateCustomerInfo - extends CheckoutOrderTemplateCustomerInfo { - @override - final OneOf oneOf; - - factory _$CheckoutOrderTemplateCustomerInfo( - [void Function(CheckoutOrderTemplateCustomerInfoBuilder)? updates]) => - (new CheckoutOrderTemplateCustomerInfoBuilder()..update(updates)) - ._build(); - - _$CheckoutOrderTemplateCustomerInfo._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'CheckoutOrderTemplateCustomerInfo', 'oneOf'); - } - - @override - CheckoutOrderTemplateCustomerInfo rebuild( - void Function(CheckoutOrderTemplateCustomerInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CheckoutOrderTemplateCustomerInfoBuilder toBuilder() => - new CheckoutOrderTemplateCustomerInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CheckoutOrderTemplateCustomerInfo && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CheckoutOrderTemplateCustomerInfo') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class CheckoutOrderTemplateCustomerInfoBuilder - implements - Builder { - _$CheckoutOrderTemplateCustomerInfo? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - CheckoutOrderTemplateCustomerInfoBuilder() { - CheckoutOrderTemplateCustomerInfo._defaults(this); - } - - CheckoutOrderTemplateCustomerInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(CheckoutOrderTemplateCustomerInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CheckoutOrderTemplateCustomerInfo; - } - - @override - void update( - void Function(CheckoutOrderTemplateCustomerInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CheckoutOrderTemplateCustomerInfo build() => _build(); - - _$CheckoutOrderTemplateCustomerInfo _build() { - final _$result = _$v ?? - new _$CheckoutOrderTemplateCustomerInfo._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'CheckoutOrderTemplateCustomerInfo', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkout_request.g.dart b/lib/src/model/checkout_request.g.dart deleted file mode 100644 index 0cb4481..0000000 --- a/lib/src/model/checkout_request.g.dart +++ /dev/null @@ -1,221 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkout_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CheckoutRequest extends CheckoutRequest { - @override - final BuiltList allowedPaymentMethods; - @override - final int? expiresAt; - @override - final String? failureUrl; - @override - final bool? monthlyInstallmentsEnabled; - @override - final BuiltList? monthlyInstallmentsOptions; - @override - final String? name; - @override - final bool? onDemandEnabled; - @override - final String? successUrl; - @override - final String? type; - - factory _$CheckoutRequest([void Function(CheckoutRequestBuilder)? updates]) => - (new CheckoutRequestBuilder()..update(updates))._build(); - - _$CheckoutRequest._( - {required this.allowedPaymentMethods, - this.expiresAt, - this.failureUrl, - this.monthlyInstallmentsEnabled, - this.monthlyInstallmentsOptions, - this.name, - this.onDemandEnabled, - this.successUrl, - this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - allowedPaymentMethods, r'CheckoutRequest', 'allowedPaymentMethods'); - } - - @override - CheckoutRequest rebuild(void Function(CheckoutRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CheckoutRequestBuilder toBuilder() => - new CheckoutRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CheckoutRequest && - allowedPaymentMethods == other.allowedPaymentMethods && - expiresAt == other.expiresAt && - failureUrl == other.failureUrl && - monthlyInstallmentsEnabled == other.monthlyInstallmentsEnabled && - monthlyInstallmentsOptions == other.monthlyInstallmentsOptions && - name == other.name && - onDemandEnabled == other.onDemandEnabled && - successUrl == other.successUrl && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, allowedPaymentMethods.hashCode), - expiresAt.hashCode), - failureUrl.hashCode), - monthlyInstallmentsEnabled.hashCode), - monthlyInstallmentsOptions.hashCode), - name.hashCode), - onDemandEnabled.hashCode), - successUrl.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CheckoutRequest') - ..add('allowedPaymentMethods', allowedPaymentMethods) - ..add('expiresAt', expiresAt) - ..add('failureUrl', failureUrl) - ..add('monthlyInstallmentsEnabled', monthlyInstallmentsEnabled) - ..add('monthlyInstallmentsOptions', monthlyInstallmentsOptions) - ..add('name', name) - ..add('onDemandEnabled', onDemandEnabled) - ..add('successUrl', successUrl) - ..add('type', type)) - .toString(); - } -} - -class CheckoutRequestBuilder - implements Builder { - _$CheckoutRequest? _$v; - - ListBuilder? _allowedPaymentMethods; - ListBuilder get allowedPaymentMethods => - _$this._allowedPaymentMethods ??= new ListBuilder(); - set allowedPaymentMethods(ListBuilder? allowedPaymentMethods) => - _$this._allowedPaymentMethods = allowedPaymentMethods; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _failureUrl; - String? get failureUrl => _$this._failureUrl; - set failureUrl(String? failureUrl) => _$this._failureUrl = failureUrl; - - bool? _monthlyInstallmentsEnabled; - bool? get monthlyInstallmentsEnabled => _$this._monthlyInstallmentsEnabled; - set monthlyInstallmentsEnabled(bool? monthlyInstallmentsEnabled) => - _$this._monthlyInstallmentsEnabled = monthlyInstallmentsEnabled; - - ListBuilder? _monthlyInstallmentsOptions; - ListBuilder get monthlyInstallmentsOptions => - _$this._monthlyInstallmentsOptions ??= new ListBuilder(); - set monthlyInstallmentsOptions( - ListBuilder? monthlyInstallmentsOptions) => - _$this._monthlyInstallmentsOptions = monthlyInstallmentsOptions; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - bool? _onDemandEnabled; - bool? get onDemandEnabled => _$this._onDemandEnabled; - set onDemandEnabled(bool? onDemandEnabled) => - _$this._onDemandEnabled = onDemandEnabled; - - String? _successUrl; - String? get successUrl => _$this._successUrl; - set successUrl(String? successUrl) => _$this._successUrl = successUrl; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - CheckoutRequestBuilder() { - CheckoutRequest._defaults(this); - } - - CheckoutRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _allowedPaymentMethods = $v.allowedPaymentMethods.toBuilder(); - _expiresAt = $v.expiresAt; - _failureUrl = $v.failureUrl; - _monthlyInstallmentsEnabled = $v.monthlyInstallmentsEnabled; - _monthlyInstallmentsOptions = $v.monthlyInstallmentsOptions?.toBuilder(); - _name = $v.name; - _onDemandEnabled = $v.onDemandEnabled; - _successUrl = $v.successUrl; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(CheckoutRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CheckoutRequest; - } - - @override - void update(void Function(CheckoutRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CheckoutRequest build() => _build(); - - _$CheckoutRequest _build() { - _$CheckoutRequest _$result; - try { - _$result = _$v ?? - new _$CheckoutRequest._( - allowedPaymentMethods: allowedPaymentMethods.build(), - expiresAt: expiresAt, - failureUrl: failureUrl, - monthlyInstallmentsEnabled: monthlyInstallmentsEnabled, - monthlyInstallmentsOptions: _monthlyInstallmentsOptions?.build(), - name: name, - onDemandEnabled: onDemandEnabled, - successUrl: successUrl, - type: type); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'allowedPaymentMethods'; - allowedPaymentMethods.build(); - - _$failedField = 'monthlyInstallmentsOptions'; - _monthlyInstallmentsOptions?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CheckoutRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkout_response.g.dart b/lib/src/model/checkout_response.g.dart deleted file mode 100644 index 3d52d57..0000000 --- a/lib/src/model/checkout_response.g.dart +++ /dev/null @@ -1,440 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkout_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CheckoutResponse extends CheckoutResponse { - @override - final BuiltList? allowedPaymentMethods; - @override - final bool? canNotExpire; - @override - final int? emailsSent; - @override - final BuiltList? excludeCardNetworks; - @override - final int? expiresAt; - @override - final String? failureUrl; - @override - final bool? force3dsFlow; - @override - final String id; - @override - final bool livemode; - @override - final BuiltMap? metadata; - @override - final bool? monthlyInstallmentsEnabled; - @override - final BuiltList? monthlyInstallmentsOptions; - @override - final String name; - @override - final bool? needsShippingContact; - @override - final String object; - @override - final int? paidPaymentsCount; - @override - final int? paymentsLimitCount; - @override - final bool? recurrent; - @override - final String? slug; - @override - final int? smsSent; - @override - final int? startsAt; - @override - final String? status; - @override - final String? successUrl; - @override - final String? type; - @override - final String? url; - - factory _$CheckoutResponse( - [void Function(CheckoutResponseBuilder)? updates]) => - (new CheckoutResponseBuilder()..update(updates))._build(); - - _$CheckoutResponse._( - {this.allowedPaymentMethods, - this.canNotExpire, - this.emailsSent, - this.excludeCardNetworks, - this.expiresAt, - this.failureUrl, - this.force3dsFlow, - required this.id, - required this.livemode, - this.metadata, - this.monthlyInstallmentsEnabled, - this.monthlyInstallmentsOptions, - required this.name, - this.needsShippingContact, - required this.object, - this.paidPaymentsCount, - this.paymentsLimitCount, - this.recurrent, - this.slug, - this.smsSent, - this.startsAt, - this.status, - this.successUrl, - this.type, - this.url}) - : super._() { - BuiltValueNullFieldError.checkNotNull(id, r'CheckoutResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - livemode, r'CheckoutResponse', 'livemode'); - BuiltValueNullFieldError.checkNotNull(name, r'CheckoutResponse', 'name'); - BuiltValueNullFieldError.checkNotNull( - object, r'CheckoutResponse', 'object'); - } - - @override - CheckoutResponse rebuild(void Function(CheckoutResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CheckoutResponseBuilder toBuilder() => - new CheckoutResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CheckoutResponse && - allowedPaymentMethods == other.allowedPaymentMethods && - canNotExpire == other.canNotExpire && - emailsSent == other.emailsSent && - excludeCardNetworks == other.excludeCardNetworks && - expiresAt == other.expiresAt && - failureUrl == other.failureUrl && - force3dsFlow == other.force3dsFlow && - id == other.id && - livemode == other.livemode && - metadata == other.metadata && - monthlyInstallmentsEnabled == other.monthlyInstallmentsEnabled && - monthlyInstallmentsOptions == other.monthlyInstallmentsOptions && - name == other.name && - needsShippingContact == other.needsShippingContact && - object == other.object && - paidPaymentsCount == other.paidPaymentsCount && - paymentsLimitCount == other.paymentsLimitCount && - recurrent == other.recurrent && - slug == other.slug && - smsSent == other.smsSent && - startsAt == other.startsAt && - status == other.status && - successUrl == other.successUrl && - type == other.type && - url == other.url; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc($jc($jc($jc($jc(0, allowedPaymentMethods.hashCode), canNotExpire.hashCode), emailsSent.hashCode), excludeCardNetworks.hashCode), expiresAt.hashCode), failureUrl.hashCode), - force3dsFlow.hashCode), - id.hashCode), - livemode.hashCode), - metadata.hashCode), - monthlyInstallmentsEnabled.hashCode), - monthlyInstallmentsOptions.hashCode), - name.hashCode), - needsShippingContact.hashCode), - object.hashCode), - paidPaymentsCount.hashCode), - paymentsLimitCount.hashCode), - recurrent.hashCode), - slug.hashCode), - smsSent.hashCode), - startsAt.hashCode), - status.hashCode), - successUrl.hashCode), - type.hashCode), - url.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CheckoutResponse') - ..add('allowedPaymentMethods', allowedPaymentMethods) - ..add('canNotExpire', canNotExpire) - ..add('emailsSent', emailsSent) - ..add('excludeCardNetworks', excludeCardNetworks) - ..add('expiresAt', expiresAt) - ..add('failureUrl', failureUrl) - ..add('force3dsFlow', force3dsFlow) - ..add('id', id) - ..add('livemode', livemode) - ..add('metadata', metadata) - ..add('monthlyInstallmentsEnabled', monthlyInstallmentsEnabled) - ..add('monthlyInstallmentsOptions', monthlyInstallmentsOptions) - ..add('name', name) - ..add('needsShippingContact', needsShippingContact) - ..add('object', object) - ..add('paidPaymentsCount', paidPaymentsCount) - ..add('paymentsLimitCount', paymentsLimitCount) - ..add('recurrent', recurrent) - ..add('slug', slug) - ..add('smsSent', smsSent) - ..add('startsAt', startsAt) - ..add('status', status) - ..add('successUrl', successUrl) - ..add('type', type) - ..add('url', url)) - .toString(); - } -} - -class CheckoutResponseBuilder - implements Builder { - _$CheckoutResponse? _$v; - - ListBuilder? _allowedPaymentMethods; - ListBuilder get allowedPaymentMethods => - _$this._allowedPaymentMethods ??= new ListBuilder(); - set allowedPaymentMethods(ListBuilder? allowedPaymentMethods) => - _$this._allowedPaymentMethods = allowedPaymentMethods; - - bool? _canNotExpire; - bool? get canNotExpire => _$this._canNotExpire; - set canNotExpire(bool? canNotExpire) => _$this._canNotExpire = canNotExpire; - - int? _emailsSent; - int? get emailsSent => _$this._emailsSent; - set emailsSent(int? emailsSent) => _$this._emailsSent = emailsSent; - - ListBuilder? _excludeCardNetworks; - ListBuilder get excludeCardNetworks => - _$this._excludeCardNetworks ??= new ListBuilder(); - set excludeCardNetworks(ListBuilder? excludeCardNetworks) => - _$this._excludeCardNetworks = excludeCardNetworks; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _failureUrl; - String? get failureUrl => _$this._failureUrl; - set failureUrl(String? failureUrl) => _$this._failureUrl = failureUrl; - - bool? _force3dsFlow; - bool? get force3dsFlow => _$this._force3dsFlow; - set force3dsFlow(bool? force3dsFlow) => _$this._force3dsFlow = force3dsFlow; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - bool? _monthlyInstallmentsEnabled; - bool? get monthlyInstallmentsEnabled => _$this._monthlyInstallmentsEnabled; - set monthlyInstallmentsEnabled(bool? monthlyInstallmentsEnabled) => - _$this._monthlyInstallmentsEnabled = monthlyInstallmentsEnabled; - - ListBuilder? _monthlyInstallmentsOptions; - ListBuilder get monthlyInstallmentsOptions => - _$this._monthlyInstallmentsOptions ??= new ListBuilder(); - set monthlyInstallmentsOptions( - ListBuilder? monthlyInstallmentsOptions) => - _$this._monthlyInstallmentsOptions = monthlyInstallmentsOptions; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - bool? _needsShippingContact; - bool? get needsShippingContact => _$this._needsShippingContact; - set needsShippingContact(bool? needsShippingContact) => - _$this._needsShippingContact = needsShippingContact; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - int? _paidPaymentsCount; - int? get paidPaymentsCount => _$this._paidPaymentsCount; - set paidPaymentsCount(int? paidPaymentsCount) => - _$this._paidPaymentsCount = paidPaymentsCount; - - int? _paymentsLimitCount; - int? get paymentsLimitCount => _$this._paymentsLimitCount; - set paymentsLimitCount(int? paymentsLimitCount) => - _$this._paymentsLimitCount = paymentsLimitCount; - - bool? _recurrent; - bool? get recurrent => _$this._recurrent; - set recurrent(bool? recurrent) => _$this._recurrent = recurrent; - - String? _slug; - String? get slug => _$this._slug; - set slug(String? slug) => _$this._slug = slug; - - int? _smsSent; - int? get smsSent => _$this._smsSent; - set smsSent(int? smsSent) => _$this._smsSent = smsSent; - - int? _startsAt; - int? get startsAt => _$this._startsAt; - set startsAt(int? startsAt) => _$this._startsAt = startsAt; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _successUrl; - String? get successUrl => _$this._successUrl; - set successUrl(String? successUrl) => _$this._successUrl = successUrl; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - CheckoutResponseBuilder() { - CheckoutResponse._defaults(this); - } - - CheckoutResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _allowedPaymentMethods = $v.allowedPaymentMethods?.toBuilder(); - _canNotExpire = $v.canNotExpire; - _emailsSent = $v.emailsSent; - _excludeCardNetworks = $v.excludeCardNetworks?.toBuilder(); - _expiresAt = $v.expiresAt; - _failureUrl = $v.failureUrl; - _force3dsFlow = $v.force3dsFlow; - _id = $v.id; - _livemode = $v.livemode; - _metadata = $v.metadata?.toBuilder(); - _monthlyInstallmentsEnabled = $v.monthlyInstallmentsEnabled; - _monthlyInstallmentsOptions = $v.monthlyInstallmentsOptions?.toBuilder(); - _name = $v.name; - _needsShippingContact = $v.needsShippingContact; - _object = $v.object; - _paidPaymentsCount = $v.paidPaymentsCount; - _paymentsLimitCount = $v.paymentsLimitCount; - _recurrent = $v.recurrent; - _slug = $v.slug; - _smsSent = $v.smsSent; - _startsAt = $v.startsAt; - _status = $v.status; - _successUrl = $v.successUrl; - _type = $v.type; - _url = $v.url; - _$v = null; - } - return this; - } - - @override - void replace(CheckoutResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CheckoutResponse; - } - - @override - void update(void Function(CheckoutResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CheckoutResponse build() => _build(); - - _$CheckoutResponse _build() { - _$CheckoutResponse _$result; - try { - _$result = _$v ?? - new _$CheckoutResponse._( - allowedPaymentMethods: _allowedPaymentMethods?.build(), - canNotExpire: canNotExpire, - emailsSent: emailsSent, - excludeCardNetworks: _excludeCardNetworks?.build(), - expiresAt: expiresAt, - failureUrl: failureUrl, - force3dsFlow: force3dsFlow, - id: BuiltValueNullFieldError.checkNotNull( - id, r'CheckoutResponse', 'id'), - livemode: BuiltValueNullFieldError.checkNotNull( - livemode, r'CheckoutResponse', 'livemode'), - metadata: _metadata?.build(), - monthlyInstallmentsEnabled: monthlyInstallmentsEnabled, - monthlyInstallmentsOptions: _monthlyInstallmentsOptions?.build(), - name: BuiltValueNullFieldError.checkNotNull( - name, r'CheckoutResponse', 'name'), - needsShippingContact: needsShippingContact, - object: BuiltValueNullFieldError.checkNotNull( - object, r'CheckoutResponse', 'object'), - paidPaymentsCount: paidPaymentsCount, - paymentsLimitCount: paymentsLimitCount, - recurrent: recurrent, - slug: slug, - smsSent: smsSent, - startsAt: startsAt, - status: status, - successUrl: successUrl, - type: type, - url: url); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'allowedPaymentMethods'; - _allowedPaymentMethods?.build(); - - _$failedField = 'excludeCardNetworks'; - _excludeCardNetworks?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'monthlyInstallmentsOptions'; - _monthlyInstallmentsOptions?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CheckoutResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkouts_response.g.dart b/lib/src/model/checkouts_response.g.dart deleted file mode 100644 index 54d2067..0000000 --- a/lib/src/model/checkouts_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkouts_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CheckoutsResponse extends CheckoutsResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$CheckoutsResponse( - [void Function(CheckoutsResponseBuilder)? updates]) => - (new CheckoutsResponseBuilder()..update(updates))._build(); - - _$CheckoutsResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'CheckoutsResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'CheckoutsResponse', 'object'); - } - - @override - CheckoutsResponse rebuild(void Function(CheckoutsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CheckoutsResponseBuilder toBuilder() => - new CheckoutsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CheckoutsResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CheckoutsResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class CheckoutsResponseBuilder - implements - Builder, - CheckoutsResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$CheckoutsResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - CheckoutsResponseBuilder() { - CheckoutsResponse._defaults(this); - } - - CheckoutsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CheckoutsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CheckoutsResponse; - } - - @override - void update(void Function(CheckoutsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CheckoutsResponse build() => _build(); - - _$CheckoutsResponse _build() { - _$CheckoutsResponse _$result; - try { - _$result = _$v ?? - new _$CheckoutsResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'CheckoutsResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CheckoutsResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CheckoutsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/checkouts_response_all_of.g.dart b/lib/src/model/checkouts_response_all_of.g.dart deleted file mode 100644 index b5c4918..0000000 --- a/lib/src/model/checkouts_response_all_of.g.dart +++ /dev/null @@ -1,113 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'checkouts_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CheckoutsResponseAllOfBuilder { - void replace(CheckoutsResponseAllOf other); - void update(void Function(CheckoutsResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$CheckoutsResponseAllOf extends $CheckoutsResponseAllOf { - @override - final BuiltList? data; - - factory _$$CheckoutsResponseAllOf( - [void Function($CheckoutsResponseAllOfBuilder)? updates]) => - (new $CheckoutsResponseAllOfBuilder()..update(updates))._build(); - - _$$CheckoutsResponseAllOf._({this.data}) : super._(); - - @override - $CheckoutsResponseAllOf rebuild( - void Function($CheckoutsResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CheckoutsResponseAllOfBuilder toBuilder() => - new $CheckoutsResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CheckoutsResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CheckoutsResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $CheckoutsResponseAllOfBuilder - implements - Builder<$CheckoutsResponseAllOf, $CheckoutsResponseAllOfBuilder>, - CheckoutsResponseAllOfBuilder { - _$$CheckoutsResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $CheckoutsResponseAllOfBuilder() { - $CheckoutsResponseAllOf._defaults(this); - } - - $CheckoutsResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $CheckoutsResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CheckoutsResponseAllOf; - } - - @override - void update(void Function($CheckoutsResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CheckoutsResponseAllOf build() => _build(); - - _$$CheckoutsResponseAllOf _build() { - _$$CheckoutsResponseAllOf _$result; - try { - _$result = _$v ?? new _$$CheckoutsResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CheckoutsResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/company_fiscal_info_address_response.g.dart b/lib/src/model/company_fiscal_info_address_response.g.dart deleted file mode 100644 index 050ee00..0000000 --- a/lib/src/model/company_fiscal_info_address_response.g.dart +++ /dev/null @@ -1,256 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'company_fiscal_info_address_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -const CompanyFiscalInfoAddressResponseObjectEnum - _$companyFiscalInfoAddressResponseObjectEnum_address = - const CompanyFiscalInfoAddressResponseObjectEnum._('address'); - -CompanyFiscalInfoAddressResponseObjectEnum - _$companyFiscalInfoAddressResponseObjectEnumValueOf(String name) { - switch (name) { - case 'address': - return _$companyFiscalInfoAddressResponseObjectEnum_address; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet - _$companyFiscalInfoAddressResponseObjectEnumValues = - new BuiltSet(const < - CompanyFiscalInfoAddressResponseObjectEnum>[ - _$companyFiscalInfoAddressResponseObjectEnum_address, -]); - -Serializer - _$companyFiscalInfoAddressResponseObjectEnumSerializer = - new _$CompanyFiscalInfoAddressResponseObjectEnumSerializer(); - -class _$CompanyFiscalInfoAddressResponseObjectEnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'address': 'address', - }; - static const Map _fromWire = const { - 'address': 'address', - }; - - @override - final Iterable types = const [ - CompanyFiscalInfoAddressResponseObjectEnum - ]; - @override - final String wireName = 'CompanyFiscalInfoAddressResponseObjectEnum'; - - @override - Object serialize(Serializers serializers, - CompanyFiscalInfoAddressResponseObjectEnum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - CompanyFiscalInfoAddressResponseObjectEnum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - CompanyFiscalInfoAddressResponseObjectEnum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$CompanyFiscalInfoAddressResponse - extends CompanyFiscalInfoAddressResponse { - @override - final CompanyFiscalInfoAddressResponseObjectEnum? object; - @override - final String? street1; - @override - final String? street2; - @override - final String? city; - @override - final String? state; - @override - final String? country; - @override - final String? postalCode; - @override - final String? externalNumber; - @override - final String? internalNumber; - - factory _$CompanyFiscalInfoAddressResponse( - [void Function(CompanyFiscalInfoAddressResponseBuilder)? updates]) => - (new CompanyFiscalInfoAddressResponseBuilder()..update(updates))._build(); - - _$CompanyFiscalInfoAddressResponse._( - {this.object, - this.street1, - this.street2, - this.city, - this.state, - this.country, - this.postalCode, - this.externalNumber, - this.internalNumber}) - : super._(); - - @override - CompanyFiscalInfoAddressResponse rebuild( - void Function(CompanyFiscalInfoAddressResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CompanyFiscalInfoAddressResponseBuilder toBuilder() => - new CompanyFiscalInfoAddressResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CompanyFiscalInfoAddressResponse && - object == other.object && - street1 == other.street1 && - street2 == other.street2 && - city == other.city && - state == other.state && - country == other.country && - postalCode == other.postalCode && - externalNumber == other.externalNumber && - internalNumber == other.internalNumber; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, object.hashCode), street1.hashCode), - street2.hashCode), - city.hashCode), - state.hashCode), - country.hashCode), - postalCode.hashCode), - externalNumber.hashCode), - internalNumber.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CompanyFiscalInfoAddressResponse') - ..add('object', object) - ..add('street1', street1) - ..add('street2', street2) - ..add('city', city) - ..add('state', state) - ..add('country', country) - ..add('postalCode', postalCode) - ..add('externalNumber', externalNumber) - ..add('internalNumber', internalNumber)) - .toString(); - } -} - -class CompanyFiscalInfoAddressResponseBuilder - implements - Builder { - _$CompanyFiscalInfoAddressResponse? _$v; - - CompanyFiscalInfoAddressResponseObjectEnum? _object; - CompanyFiscalInfoAddressResponseObjectEnum? get object => _$this._object; - set object(CompanyFiscalInfoAddressResponseObjectEnum? object) => - _$this._object = object; - - String? _street1; - String? get street1 => _$this._street1; - set street1(String? street1) => _$this._street1 = street1; - - String? _street2; - String? get street2 => _$this._street2; - set street2(String? street2) => _$this._street2 = street2; - - String? _city; - String? get city => _$this._city; - set city(String? city) => _$this._city = city; - - String? _state; - String? get state => _$this._state; - set state(String? state) => _$this._state = state; - - String? _country; - String? get country => _$this._country; - set country(String? country) => _$this._country = country; - - String? _postalCode; - String? get postalCode => _$this._postalCode; - set postalCode(String? postalCode) => _$this._postalCode = postalCode; - - String? _externalNumber; - String? get externalNumber => _$this._externalNumber; - set externalNumber(String? externalNumber) => - _$this._externalNumber = externalNumber; - - String? _internalNumber; - String? get internalNumber => _$this._internalNumber; - set internalNumber(String? internalNumber) => - _$this._internalNumber = internalNumber; - - CompanyFiscalInfoAddressResponseBuilder() { - CompanyFiscalInfoAddressResponse._defaults(this); - } - - CompanyFiscalInfoAddressResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _object = $v.object; - _street1 = $v.street1; - _street2 = $v.street2; - _city = $v.city; - _state = $v.state; - _country = $v.country; - _postalCode = $v.postalCode; - _externalNumber = $v.externalNumber; - _internalNumber = $v.internalNumber; - _$v = null; - } - return this; - } - - @override - void replace(CompanyFiscalInfoAddressResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CompanyFiscalInfoAddressResponse; - } - - @override - void update(void Function(CompanyFiscalInfoAddressResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CompanyFiscalInfoAddressResponse build() => _build(); - - _$CompanyFiscalInfoAddressResponse _build() { - final _$result = _$v ?? - new _$CompanyFiscalInfoAddressResponse._( - object: object, - street1: street1, - street2: street2, - city: city, - state: state, - country: country, - postalCode: postalCode, - externalNumber: externalNumber, - internalNumber: internalNumber); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/company_fiscal_info_response.g.dart b/lib/src/model/company_fiscal_info_response.g.dart deleted file mode 100644 index 3c64e24..0000000 --- a/lib/src/model/company_fiscal_info_response.g.dart +++ /dev/null @@ -1,243 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'company_fiscal_info_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -const CompanyFiscalInfoResponseObjectEnum - _$companyFiscalInfoResponseObjectEnum_fiscalInfo = - const CompanyFiscalInfoResponseObjectEnum._('fiscalInfo'); - -CompanyFiscalInfoResponseObjectEnum - _$companyFiscalInfoResponseObjectEnumValueOf(String name) { - switch (name) { - case 'fiscalInfo': - return _$companyFiscalInfoResponseObjectEnum_fiscalInfo; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet - _$companyFiscalInfoResponseObjectEnumValues = - new BuiltSet(const < - CompanyFiscalInfoResponseObjectEnum>[ - _$companyFiscalInfoResponseObjectEnum_fiscalInfo, -]); - -Serializer - _$companyFiscalInfoResponseObjectEnumSerializer = - new _$CompanyFiscalInfoResponseObjectEnumSerializer(); - -class _$CompanyFiscalInfoResponseObjectEnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'fiscalInfo': 'fiscal_info', - }; - static const Map _fromWire = const { - 'fiscal_info': 'fiscalInfo', - }; - - @override - final Iterable types = const [ - CompanyFiscalInfoResponseObjectEnum - ]; - @override - final String wireName = 'CompanyFiscalInfoResponseObjectEnum'; - - @override - Object serialize( - Serializers serializers, CompanyFiscalInfoResponseObjectEnum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - CompanyFiscalInfoResponseObjectEnum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - CompanyFiscalInfoResponseObjectEnum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$CompanyFiscalInfoResponse extends CompanyFiscalInfoResponse { - @override - final CompanyFiscalInfoResponseObjectEnum? object; - @override - final String? taxId; - @override - final String? legalEntityName; - @override - final String? businessType; - @override - final String? phone; - @override - final String? physicalPersonBusinessType; - @override - final CompanyFiscalInfoAddressResponse? address; - - factory _$CompanyFiscalInfoResponse( - [void Function(CompanyFiscalInfoResponseBuilder)? updates]) => - (new CompanyFiscalInfoResponseBuilder()..update(updates))._build(); - - _$CompanyFiscalInfoResponse._( - {this.object, - this.taxId, - this.legalEntityName, - this.businessType, - this.phone, - this.physicalPersonBusinessType, - this.address}) - : super._(); - - @override - CompanyFiscalInfoResponse rebuild( - void Function(CompanyFiscalInfoResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CompanyFiscalInfoResponseBuilder toBuilder() => - new CompanyFiscalInfoResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CompanyFiscalInfoResponse && - object == other.object && - taxId == other.taxId && - legalEntityName == other.legalEntityName && - businessType == other.businessType && - phone == other.phone && - physicalPersonBusinessType == other.physicalPersonBusinessType && - address == other.address; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, object.hashCode), taxId.hashCode), - legalEntityName.hashCode), - businessType.hashCode), - phone.hashCode), - physicalPersonBusinessType.hashCode), - address.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CompanyFiscalInfoResponse') - ..add('object', object) - ..add('taxId', taxId) - ..add('legalEntityName', legalEntityName) - ..add('businessType', businessType) - ..add('phone', phone) - ..add('physicalPersonBusinessType', physicalPersonBusinessType) - ..add('address', address)) - .toString(); - } -} - -class CompanyFiscalInfoResponseBuilder - implements - Builder { - _$CompanyFiscalInfoResponse? _$v; - - CompanyFiscalInfoResponseObjectEnum? _object; - CompanyFiscalInfoResponseObjectEnum? get object => _$this._object; - set object(CompanyFiscalInfoResponseObjectEnum? object) => - _$this._object = object; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(String? taxId) => _$this._taxId = taxId; - - String? _legalEntityName; - String? get legalEntityName => _$this._legalEntityName; - set legalEntityName(String? legalEntityName) => - _$this._legalEntityName = legalEntityName; - - String? _businessType; - String? get businessType => _$this._businessType; - set businessType(String? businessType) => _$this._businessType = businessType; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - String? _physicalPersonBusinessType; - String? get physicalPersonBusinessType => _$this._physicalPersonBusinessType; - set physicalPersonBusinessType(String? physicalPersonBusinessType) => - _$this._physicalPersonBusinessType = physicalPersonBusinessType; - - CompanyFiscalInfoAddressResponseBuilder? _address; - CompanyFiscalInfoAddressResponseBuilder get address => - _$this._address ??= new CompanyFiscalInfoAddressResponseBuilder(); - set address(CompanyFiscalInfoAddressResponseBuilder? address) => - _$this._address = address; - - CompanyFiscalInfoResponseBuilder() { - CompanyFiscalInfoResponse._defaults(this); - } - - CompanyFiscalInfoResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _object = $v.object; - _taxId = $v.taxId; - _legalEntityName = $v.legalEntityName; - _businessType = $v.businessType; - _phone = $v.phone; - _physicalPersonBusinessType = $v.physicalPersonBusinessType; - _address = $v.address?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(CompanyFiscalInfoResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CompanyFiscalInfoResponse; - } - - @override - void update(void Function(CompanyFiscalInfoResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CompanyFiscalInfoResponse build() => _build(); - - _$CompanyFiscalInfoResponse _build() { - _$CompanyFiscalInfoResponse _$result; - try { - _$result = _$v ?? - new _$CompanyFiscalInfoResponse._( - object: object, - taxId: taxId, - legalEntityName: legalEntityName, - businessType: businessType, - phone: phone, - physicalPersonBusinessType: physicalPersonBusinessType, - address: _address?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - _address?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CompanyFiscalInfoResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/company_payout_destination_response.g.dart b/lib/src/model/company_payout_destination_response.g.dart deleted file mode 100644 index f16381e..0000000 --- a/lib/src/model/company_payout_destination_response.g.dart +++ /dev/null @@ -1,272 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'company_payout_destination_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -const CompanyPayoutDestinationResponseObjectEnum - _$companyPayoutDestinationResponseObjectEnum_payoutDestination = - const CompanyPayoutDestinationResponseObjectEnum._('payoutDestination'); - -CompanyPayoutDestinationResponseObjectEnum - _$companyPayoutDestinationResponseObjectEnumValueOf(String name) { - switch (name) { - case 'payoutDestination': - return _$companyPayoutDestinationResponseObjectEnum_payoutDestination; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet - _$companyPayoutDestinationResponseObjectEnumValues = - new BuiltSet(const < - CompanyPayoutDestinationResponseObjectEnum>[ - _$companyPayoutDestinationResponseObjectEnum_payoutDestination, -]); - -const CompanyPayoutDestinationResponseTypeEnum - _$companyPayoutDestinationResponseTypeEnum_bankAccount = - const CompanyPayoutDestinationResponseTypeEnum._('bankAccount'); - -CompanyPayoutDestinationResponseTypeEnum - _$companyPayoutDestinationResponseTypeEnumValueOf(String name) { - switch (name) { - case 'bankAccount': - return _$companyPayoutDestinationResponseTypeEnum_bankAccount; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet - _$companyPayoutDestinationResponseTypeEnumValues = - new BuiltSet(const < - CompanyPayoutDestinationResponseTypeEnum>[ - _$companyPayoutDestinationResponseTypeEnum_bankAccount, -]); - -Serializer - _$companyPayoutDestinationResponseObjectEnumSerializer = - new _$CompanyPayoutDestinationResponseObjectEnumSerializer(); -Serializer - _$companyPayoutDestinationResponseTypeEnumSerializer = - new _$CompanyPayoutDestinationResponseTypeEnumSerializer(); - -class _$CompanyPayoutDestinationResponseObjectEnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'payoutDestination': 'payout_destination', - }; - static const Map _fromWire = const { - 'payout_destination': 'payoutDestination', - }; - - @override - final Iterable types = const [ - CompanyPayoutDestinationResponseObjectEnum - ]; - @override - final String wireName = 'CompanyPayoutDestinationResponseObjectEnum'; - - @override - Object serialize(Serializers serializers, - CompanyPayoutDestinationResponseObjectEnum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - CompanyPayoutDestinationResponseObjectEnum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - CompanyPayoutDestinationResponseObjectEnum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$CompanyPayoutDestinationResponseTypeEnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'bankAccount': 'bank_account', - }; - static const Map _fromWire = const { - 'bank_account': 'bankAccount', - }; - - @override - final Iterable types = const [ - CompanyPayoutDestinationResponseTypeEnum - ]; - @override - final String wireName = 'CompanyPayoutDestinationResponseTypeEnum'; - - @override - Object serialize(Serializers serializers, - CompanyPayoutDestinationResponseTypeEnum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - CompanyPayoutDestinationResponseTypeEnum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - CompanyPayoutDestinationResponseTypeEnum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$CompanyPayoutDestinationResponse - extends CompanyPayoutDestinationResponse { - @override - final CompanyPayoutDestinationResponseObjectEnum? object; - @override - final String? currency; - @override - final String? accountHolderName; - @override - final String? bank; - @override - final CompanyPayoutDestinationResponseTypeEnum? type; - @override - final String? accountNumber; - - factory _$CompanyPayoutDestinationResponse( - [void Function(CompanyPayoutDestinationResponseBuilder)? updates]) => - (new CompanyPayoutDestinationResponseBuilder()..update(updates))._build(); - - _$CompanyPayoutDestinationResponse._( - {this.object, - this.currency, - this.accountHolderName, - this.bank, - this.type, - this.accountNumber}) - : super._(); - - @override - CompanyPayoutDestinationResponse rebuild( - void Function(CompanyPayoutDestinationResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CompanyPayoutDestinationResponseBuilder toBuilder() => - new CompanyPayoutDestinationResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CompanyPayoutDestinationResponse && - object == other.object && - currency == other.currency && - accountHolderName == other.accountHolderName && - bank == other.bank && - type == other.type && - accountNumber == other.accountNumber; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, object.hashCode), currency.hashCode), - accountHolderName.hashCode), - bank.hashCode), - type.hashCode), - accountNumber.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CompanyPayoutDestinationResponse') - ..add('object', object) - ..add('currency', currency) - ..add('accountHolderName', accountHolderName) - ..add('bank', bank) - ..add('type', type) - ..add('accountNumber', accountNumber)) - .toString(); - } -} - -class CompanyPayoutDestinationResponseBuilder - implements - Builder { - _$CompanyPayoutDestinationResponse? _$v; - - CompanyPayoutDestinationResponseObjectEnum? _object; - CompanyPayoutDestinationResponseObjectEnum? get object => _$this._object; - set object(CompanyPayoutDestinationResponseObjectEnum? object) => - _$this._object = object; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - String? _accountHolderName; - String? get accountHolderName => _$this._accountHolderName; - set accountHolderName(String? accountHolderName) => - _$this._accountHolderName = accountHolderName; - - String? _bank; - String? get bank => _$this._bank; - set bank(String? bank) => _$this._bank = bank; - - CompanyPayoutDestinationResponseTypeEnum? _type; - CompanyPayoutDestinationResponseTypeEnum? get type => _$this._type; - set type(CompanyPayoutDestinationResponseTypeEnum? type) => - _$this._type = type; - - String? _accountNumber; - String? get accountNumber => _$this._accountNumber; - set accountNumber(String? accountNumber) => - _$this._accountNumber = accountNumber; - - CompanyPayoutDestinationResponseBuilder() { - CompanyPayoutDestinationResponse._defaults(this); - } - - CompanyPayoutDestinationResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _object = $v.object; - _currency = $v.currency; - _accountHolderName = $v.accountHolderName; - _bank = $v.bank; - _type = $v.type; - _accountNumber = $v.accountNumber; - _$v = null; - } - return this; - } - - @override - void replace(CompanyPayoutDestinationResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CompanyPayoutDestinationResponse; - } - - @override - void update(void Function(CompanyPayoutDestinationResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CompanyPayoutDestinationResponse build() => _build(); - - _$CompanyPayoutDestinationResponse _build() { - final _$result = _$v ?? - new _$CompanyPayoutDestinationResponse._( - object: object, - currency: currency, - accountHolderName: accountHolderName, - bank: bank, - type: type, - accountNumber: accountNumber); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/company_response.g.dart b/lib/src/model/company_response.g.dart deleted file mode 100644 index 9be52d6..0000000 --- a/lib/src/model/company_response.g.dart +++ /dev/null @@ -1,250 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'company_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -const CompanyResponseObjectEnum _$companyResponseObjectEnum_company = - const CompanyResponseObjectEnum._('company'); - -CompanyResponseObjectEnum _$companyResponseObjectEnumValueOf(String name) { - switch (name) { - case 'company': - return _$companyResponseObjectEnum_company; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet _$companyResponseObjectEnumValues = - new BuiltSet(const [ - _$companyResponseObjectEnum_company, -]); - -Serializer _$companyResponseObjectEnumSerializer = - new _$CompanyResponseObjectEnumSerializer(); - -class _$CompanyResponseObjectEnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'company': 'company', - }; - static const Map _fromWire = const { - 'company': 'company', - }; - - @override - final Iterable types = const [CompanyResponseObjectEnum]; - @override - final String wireName = 'CompanyResponseObjectEnum'; - - @override - Object serialize(Serializers serializers, CompanyResponseObjectEnum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - CompanyResponseObjectEnum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - CompanyResponseObjectEnum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$CompanyResponse extends CompanyResponse { - @override - final String? id; - @override - final int? createdAt; - @override - final String? name; - @override - final CompanyResponseObjectEnum? object; - @override - final String? parentCompanyId; - @override - final bool? useParentFiscalData; - @override - final CompanyPayoutDestinationResponse? payoutDestination; - @override - final CompanyFiscalInfoResponse? fiscalInfo; - - factory _$CompanyResponse([void Function(CompanyResponseBuilder)? updates]) => - (new CompanyResponseBuilder()..update(updates))._build(); - - _$CompanyResponse._( - {this.id, - this.createdAt, - this.name, - this.object, - this.parentCompanyId, - this.useParentFiscalData, - this.payoutDestination, - this.fiscalInfo}) - : super._(); - - @override - CompanyResponse rebuild(void Function(CompanyResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CompanyResponseBuilder toBuilder() => - new CompanyResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CompanyResponse && - id == other.id && - createdAt == other.createdAt && - name == other.name && - object == other.object && - parentCompanyId == other.parentCompanyId && - useParentFiscalData == other.useParentFiscalData && - payoutDestination == other.payoutDestination && - fiscalInfo == other.fiscalInfo; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, id.hashCode), createdAt.hashCode), - name.hashCode), - object.hashCode), - parentCompanyId.hashCode), - useParentFiscalData.hashCode), - payoutDestination.hashCode), - fiscalInfo.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CompanyResponse') - ..add('id', id) - ..add('createdAt', createdAt) - ..add('name', name) - ..add('object', object) - ..add('parentCompanyId', parentCompanyId) - ..add('useParentFiscalData', useParentFiscalData) - ..add('payoutDestination', payoutDestination) - ..add('fiscalInfo', fiscalInfo)) - .toString(); - } -} - -class CompanyResponseBuilder - implements Builder { - _$CompanyResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - CompanyResponseObjectEnum? _object; - CompanyResponseObjectEnum? get object => _$this._object; - set object(CompanyResponseObjectEnum? object) => _$this._object = object; - - String? _parentCompanyId; - String? get parentCompanyId => _$this._parentCompanyId; - set parentCompanyId(String? parentCompanyId) => - _$this._parentCompanyId = parentCompanyId; - - bool? _useParentFiscalData; - bool? get useParentFiscalData => _$this._useParentFiscalData; - set useParentFiscalData(bool? useParentFiscalData) => - _$this._useParentFiscalData = useParentFiscalData; - - CompanyPayoutDestinationResponseBuilder? _payoutDestination; - CompanyPayoutDestinationResponseBuilder get payoutDestination => - _$this._payoutDestination ??= - new CompanyPayoutDestinationResponseBuilder(); - set payoutDestination( - CompanyPayoutDestinationResponseBuilder? payoutDestination) => - _$this._payoutDestination = payoutDestination; - - CompanyFiscalInfoResponseBuilder? _fiscalInfo; - CompanyFiscalInfoResponseBuilder get fiscalInfo => - _$this._fiscalInfo ??= new CompanyFiscalInfoResponseBuilder(); - set fiscalInfo(CompanyFiscalInfoResponseBuilder? fiscalInfo) => - _$this._fiscalInfo = fiscalInfo; - - CompanyResponseBuilder() { - CompanyResponse._defaults(this); - } - - CompanyResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _createdAt = $v.createdAt; - _name = $v.name; - _object = $v.object; - _parentCompanyId = $v.parentCompanyId; - _useParentFiscalData = $v.useParentFiscalData; - _payoutDestination = $v.payoutDestination?.toBuilder(); - _fiscalInfo = $v.fiscalInfo?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(CompanyResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CompanyResponse; - } - - @override - void update(void Function(CompanyResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CompanyResponse build() => _build(); - - _$CompanyResponse _build() { - _$CompanyResponse _$result; - try { - _$result = _$v ?? - new _$CompanyResponse._( - id: id, - createdAt: createdAt, - name: name, - object: object, - parentCompanyId: parentCompanyId, - useParentFiscalData: useParentFiscalData, - payoutDestination: _payoutDestination?.build(), - fiscalInfo: _fiscalInfo?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'payoutDestination'; - _payoutDestination?.build(); - _$failedField = 'fiscalInfo'; - _fiscalInfo?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CompanyResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/create_customer_fiscal_entities_response.g.dart b/lib/src/model/create_customer_fiscal_entities_response.g.dart deleted file mode 100644 index 1166a21..0000000 --- a/lib/src/model/create_customer_fiscal_entities_response.g.dart +++ /dev/null @@ -1,267 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_customer_fiscal_entities_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CreateCustomerFiscalEntitiesResponse - extends CreateCustomerFiscalEntitiesResponse { - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - @override - final bool? default_; - @override - final CustomerFiscalEntitiesRequestAddress address; - @override - final String? taxId; - @override - final String? email; - @override - final String? phone; - @override - final BuiltMap? metadata; - @override - final String? companyName; - - factory _$CreateCustomerFiscalEntitiesResponse( - [void Function(CreateCustomerFiscalEntitiesResponseBuilder)? - updates]) => - (new CreateCustomerFiscalEntitiesResponseBuilder()..update(updates)) - ._build(); - - _$CreateCustomerFiscalEntitiesResponse._( - {required this.id, - required this.object, - required this.createdAt, - this.parentId, - this.default_, - required this.address, - this.taxId, - this.email, - this.phone, - this.metadata, - this.companyName}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'CreateCustomerFiscalEntitiesResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'CreateCustomerFiscalEntitiesResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'CreateCustomerFiscalEntitiesResponse', 'createdAt'); - BuiltValueNullFieldError.checkNotNull( - address, r'CreateCustomerFiscalEntitiesResponse', 'address'); - } - - @override - CreateCustomerFiscalEntitiesResponse rebuild( - void Function(CreateCustomerFiscalEntitiesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CreateCustomerFiscalEntitiesResponseBuilder toBuilder() => - new CreateCustomerFiscalEntitiesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CreateCustomerFiscalEntitiesResponse && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId && - default_ == other.default_ && - address == other.address && - taxId == other.taxId && - email == other.email && - phone == other.phone && - metadata == other.metadata && - companyName == other.companyName; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, id.hashCode), - object.hashCode), - createdAt.hashCode), - parentId.hashCode), - default_.hashCode), - address.hashCode), - taxId.hashCode), - email.hashCode), - phone.hashCode), - metadata.hashCode), - companyName.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CreateCustomerFiscalEntitiesResponse') - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('address', address) - ..add('taxId', taxId) - ..add('email', email) - ..add('phone', phone) - ..add('metadata', metadata) - ..add('companyName', companyName)) - .toString(); - } -} - -class CreateCustomerFiscalEntitiesResponseBuilder - implements - Builder, - CreateCustomerFiscalEntitiesResponseAllOfBuilder, - CustomerFiscalEntitiesRequestBuilder { - _$CreateCustomerFiscalEntitiesResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - CustomerFiscalEntitiesRequestAddressBuilder? _address; - CustomerFiscalEntitiesRequestAddressBuilder get address => - _$this._address ??= new CustomerFiscalEntitiesRequestAddressBuilder(); - set address(covariant CustomerFiscalEntitiesRequestAddressBuilder? address) => - _$this._address = address; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(covariant String? taxId) => _$this._taxId = taxId; - - String? _email; - String? get email => _$this._email; - set email(covariant String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _companyName; - String? get companyName => _$this._companyName; - set companyName(covariant String? companyName) => - _$this._companyName = companyName; - - CreateCustomerFiscalEntitiesResponseBuilder() { - CreateCustomerFiscalEntitiesResponse._defaults(this); - } - - CreateCustomerFiscalEntitiesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _default_ = $v.default_; - _address = $v.address.toBuilder(); - _taxId = $v.taxId; - _email = $v.email; - _phone = $v.phone; - _metadata = $v.metadata?.toBuilder(); - _companyName = $v.companyName; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CreateCustomerFiscalEntitiesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CreateCustomerFiscalEntitiesResponse; - } - - @override - void update( - void Function(CreateCustomerFiscalEntitiesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CreateCustomerFiscalEntitiesResponse build() => _build(); - - _$CreateCustomerFiscalEntitiesResponse _build() { - _$CreateCustomerFiscalEntitiesResponse _$result; - try { - _$result = _$v ?? - new _$CreateCustomerFiscalEntitiesResponse._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'CreateCustomerFiscalEntitiesResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CreateCustomerFiscalEntitiesResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'CreateCustomerFiscalEntitiesResponse', 'createdAt'), - parentId: parentId, - default_: default_, - address: address.build(), - taxId: taxId, - email: email, - phone: phone, - metadata: _metadata?.build(), - companyName: companyName); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - address.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CreateCustomerFiscalEntitiesResponse', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/create_customer_fiscal_entities_response_all_of.g.dart b/lib/src/model/create_customer_fiscal_entities_response_all_of.g.dart deleted file mode 100644 index 68933d7..0000000 --- a/lib/src/model/create_customer_fiscal_entities_response_all_of.g.dart +++ /dev/null @@ -1,181 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_customer_fiscal_entities_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CreateCustomerFiscalEntitiesResponseAllOfBuilder { - void replace(CreateCustomerFiscalEntitiesResponseAllOf other); - void update( - void Function(CreateCustomerFiscalEntitiesResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - int? get createdAt; - set createdAt(int? createdAt); - - String? get parentId; - set parentId(String? parentId); - - bool? get default_; - set default_(bool? default_); -} - -class _$$CreateCustomerFiscalEntitiesResponseAllOf - extends $CreateCustomerFiscalEntitiesResponseAllOf { - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - @override - final bool? default_; - - factory _$$CreateCustomerFiscalEntitiesResponseAllOf( - [void Function($CreateCustomerFiscalEntitiesResponseAllOfBuilder)? - updates]) => - (new $CreateCustomerFiscalEntitiesResponseAllOfBuilder()..update(updates)) - ._build(); - - _$$CreateCustomerFiscalEntitiesResponseAllOf._( - {required this.id, - required this.object, - required this.createdAt, - this.parentId, - this.default_}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'$CreateCustomerFiscalEntitiesResponseAllOf', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'$CreateCustomerFiscalEntitiesResponseAllOf', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'$CreateCustomerFiscalEntitiesResponseAllOf', 'createdAt'); - } - - @override - $CreateCustomerFiscalEntitiesResponseAllOf rebuild( - void Function($CreateCustomerFiscalEntitiesResponseAllOfBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - $CreateCustomerFiscalEntitiesResponseAllOfBuilder toBuilder() => - new $CreateCustomerFiscalEntitiesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CreateCustomerFiscalEntitiesResponseAllOf && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId && - default_ == other.default_; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc($jc(0, id.hashCode), object.hashCode), createdAt.hashCode), - parentId.hashCode), - default_.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'$CreateCustomerFiscalEntitiesResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId) - ..add('default_', default_)) - .toString(); - } -} - -class $CreateCustomerFiscalEntitiesResponseAllOfBuilder - implements - Builder<$CreateCustomerFiscalEntitiesResponseAllOf, - $CreateCustomerFiscalEntitiesResponseAllOfBuilder>, - CreateCustomerFiscalEntitiesResponseAllOfBuilder { - _$$CreateCustomerFiscalEntitiesResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - $CreateCustomerFiscalEntitiesResponseAllOfBuilder() { - $CreateCustomerFiscalEntitiesResponseAllOf._defaults(this); - } - - $CreateCustomerFiscalEntitiesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _default_ = $v.default_; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CreateCustomerFiscalEntitiesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CreateCustomerFiscalEntitiesResponseAllOf; - } - - @override - void update( - void Function($CreateCustomerFiscalEntitiesResponseAllOfBuilder)? - updates) { - if (updates != null) updates(this); - } - - @override - $CreateCustomerFiscalEntitiesResponseAllOf build() => _build(); - - _$$CreateCustomerFiscalEntitiesResponseAllOf _build() { - final _$result = _$v ?? - new _$$CreateCustomerFiscalEntitiesResponseAllOf._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'$CreateCustomerFiscalEntitiesResponseAllOf', 'id'), - object: BuiltValueNullFieldError.checkNotNull(object, - r'$CreateCustomerFiscalEntitiesResponseAllOf', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'$CreateCustomerFiscalEntitiesResponseAllOf', 'createdAt'), - parentId: parentId, - default_: default_); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/create_customer_payment_methods_request.g.dart b/lib/src/model/create_customer_payment_methods_request.g.dart deleted file mode 100644 index e130a3a..0000000 --- a/lib/src/model/create_customer_payment_methods_request.g.dart +++ /dev/null @@ -1,101 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_customer_payment_methods_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CreateCustomerPaymentMethodsRequest - extends CreateCustomerPaymentMethodsRequest { - @override - final OneOf oneOf; - - factory _$CreateCustomerPaymentMethodsRequest( - [void Function(CreateCustomerPaymentMethodsRequestBuilder)? - updates]) => - (new CreateCustomerPaymentMethodsRequestBuilder()..update(updates)) - ._build(); - - _$CreateCustomerPaymentMethodsRequest._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'CreateCustomerPaymentMethodsRequest', 'oneOf'); - } - - @override - CreateCustomerPaymentMethodsRequest rebuild( - void Function(CreateCustomerPaymentMethodsRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CreateCustomerPaymentMethodsRequestBuilder toBuilder() => - new CreateCustomerPaymentMethodsRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CreateCustomerPaymentMethodsRequest && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CreateCustomerPaymentMethodsRequest') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class CreateCustomerPaymentMethodsRequestBuilder - implements - Builder { - _$CreateCustomerPaymentMethodsRequest? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - CreateCustomerPaymentMethodsRequestBuilder() { - CreateCustomerPaymentMethodsRequest._defaults(this); - } - - CreateCustomerPaymentMethodsRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(CreateCustomerPaymentMethodsRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CreateCustomerPaymentMethodsRequest; - } - - @override - void update( - void Function(CreateCustomerPaymentMethodsRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CreateCustomerPaymentMethodsRequest build() => _build(); - - _$CreateCustomerPaymentMethodsRequest _build() { - final _$result = _$v ?? - new _$CreateCustomerPaymentMethodsRequest._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'CreateCustomerPaymentMethodsRequest', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/create_customer_payment_methods_response.g.dart b/lib/src/model/create_customer_payment_methods_response.g.dart deleted file mode 100644 index 4ec8aee..0000000 --- a/lib/src/model/create_customer_payment_methods_response.g.dart +++ /dev/null @@ -1,102 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_customer_payment_methods_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CreateCustomerPaymentMethodsResponse - extends CreateCustomerPaymentMethodsResponse { - @override - final OneOf oneOf; - - factory _$CreateCustomerPaymentMethodsResponse( - [void Function(CreateCustomerPaymentMethodsResponseBuilder)? - updates]) => - (new CreateCustomerPaymentMethodsResponseBuilder()..update(updates)) - ._build(); - - _$CreateCustomerPaymentMethodsResponse._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'CreateCustomerPaymentMethodsResponse', 'oneOf'); - } - - @override - CreateCustomerPaymentMethodsResponse rebuild( - void Function(CreateCustomerPaymentMethodsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CreateCustomerPaymentMethodsResponseBuilder toBuilder() => - new CreateCustomerPaymentMethodsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CreateCustomerPaymentMethodsResponse && - oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CreateCustomerPaymentMethodsResponse') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class CreateCustomerPaymentMethodsResponseBuilder - implements - Builder { - _$CreateCustomerPaymentMethodsResponse? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - CreateCustomerPaymentMethodsResponseBuilder() { - CreateCustomerPaymentMethodsResponse._defaults(this); - } - - CreateCustomerPaymentMethodsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(CreateCustomerPaymentMethodsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CreateCustomerPaymentMethodsResponse; - } - - @override - void update( - void Function(CreateCustomerPaymentMethodsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CreateCustomerPaymentMethodsResponse build() => _build(); - - _$CreateCustomerPaymentMethodsResponse _build() { - final _$result = _$v ?? - new _$CreateCustomerPaymentMethodsResponse._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'CreateCustomerPaymentMethodsResponse', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/create_risk_rules_data.g.dart b/lib/src/model/create_risk_rules_data.g.dart deleted file mode 100644 index b01b0d3..0000000 --- a/lib/src/model/create_risk_rules_data.g.dart +++ /dev/null @@ -1,125 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_risk_rules_data.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CreateRiskRulesData extends CreateRiskRulesData { - @override - final String description; - @override - final String field; - @override - final String value; - - factory _$CreateRiskRulesData( - [void Function(CreateRiskRulesDataBuilder)? updates]) => - (new CreateRiskRulesDataBuilder()..update(updates))._build(); - - _$CreateRiskRulesData._( - {required this.description, required this.field, required this.value}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - description, r'CreateRiskRulesData', 'description'); - BuiltValueNullFieldError.checkNotNull( - field, r'CreateRiskRulesData', 'field'); - BuiltValueNullFieldError.checkNotNull( - value, r'CreateRiskRulesData', 'value'); - } - - @override - CreateRiskRulesData rebuild( - void Function(CreateRiskRulesDataBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CreateRiskRulesDataBuilder toBuilder() => - new CreateRiskRulesDataBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CreateRiskRulesData && - description == other.description && - field == other.field && - value == other.value; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, description.hashCode), field.hashCode), value.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CreateRiskRulesData') - ..add('description', description) - ..add('field', field) - ..add('value', value)) - .toString(); - } -} - -class CreateRiskRulesDataBuilder - implements Builder { - _$CreateRiskRulesData? _$v; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - String? _field; - String? get field => _$this._field; - set field(String? field) => _$this._field = field; - - String? _value; - String? get value => _$this._value; - set value(String? value) => _$this._value = value; - - CreateRiskRulesDataBuilder() { - CreateRiskRulesData._defaults(this); - } - - CreateRiskRulesDataBuilder get _$this { - final $v = _$v; - if ($v != null) { - _description = $v.description; - _field = $v.field; - _value = $v.value; - _$v = null; - } - return this; - } - - @override - void replace(CreateRiskRulesData other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CreateRiskRulesData; - } - - @override - void update(void Function(CreateRiskRulesDataBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CreateRiskRulesData build() => _build(); - - _$CreateRiskRulesData _build() { - final _$result = _$v ?? - new _$CreateRiskRulesData._( - description: BuiltValueNullFieldError.checkNotNull( - description, r'CreateRiskRulesData', 'description'), - field: BuiltValueNullFieldError.checkNotNull( - field, r'CreateRiskRulesData', 'field'), - value: BuiltValueNullFieldError.checkNotNull( - value, r'CreateRiskRulesData', 'value')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer.g.dart b/lib/src/model/customer.g.dart deleted file mode 100644 index 452d948..0000000 --- a/lib/src/model/customer.g.dart +++ /dev/null @@ -1,315 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$Customer extends Customer { - @override - final CustomerAntifraudInfo? antifraudInfo; - @override - final bool? corporate; - @override - final String? customReference; - @override - final String email; - @override - final String? defaultPaymentSourceId; - @override - final String? defaultShippingContactId; - @override - final BuiltList? fiscalEntities; - @override - final BuiltMap? metadata; - @override - final String name; - @override - final BuiltList? paymentSources; - @override - final String phone; - @override - final String? planId; - @override - final BuiltList? shippingContacts; - @override - final SubscriptionRequest? subscription; - - factory _$Customer([void Function(CustomerBuilder)? updates]) => - (new CustomerBuilder()..update(updates))._build(); - - _$Customer._( - {this.antifraudInfo, - this.corporate, - this.customReference, - required this.email, - this.defaultPaymentSourceId, - this.defaultShippingContactId, - this.fiscalEntities, - this.metadata, - required this.name, - this.paymentSources, - required this.phone, - this.planId, - this.shippingContacts, - this.subscription}) - : super._() { - BuiltValueNullFieldError.checkNotNull(email, r'Customer', 'email'); - BuiltValueNullFieldError.checkNotNull(name, r'Customer', 'name'); - BuiltValueNullFieldError.checkNotNull(phone, r'Customer', 'phone'); - } - - @override - Customer rebuild(void Function(CustomerBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerBuilder toBuilder() => new CustomerBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is Customer && - antifraudInfo == other.antifraudInfo && - corporate == other.corporate && - customReference == other.customReference && - email == other.email && - defaultPaymentSourceId == other.defaultPaymentSourceId && - defaultShippingContactId == other.defaultShippingContactId && - fiscalEntities == other.fiscalEntities && - metadata == other.metadata && - name == other.name && - paymentSources == other.paymentSources && - phone == other.phone && - planId == other.planId && - shippingContacts == other.shippingContacts && - subscription == other.subscription; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - antifraudInfo - .hashCode), - corporate.hashCode), - customReference.hashCode), - email.hashCode), - defaultPaymentSourceId.hashCode), - defaultShippingContactId.hashCode), - fiscalEntities.hashCode), - metadata.hashCode), - name.hashCode), - paymentSources.hashCode), - phone.hashCode), - planId.hashCode), - shippingContacts.hashCode), - subscription.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'Customer') - ..add('antifraudInfo', antifraudInfo) - ..add('corporate', corporate) - ..add('customReference', customReference) - ..add('email', email) - ..add('defaultPaymentSourceId', defaultPaymentSourceId) - ..add('defaultShippingContactId', defaultShippingContactId) - ..add('fiscalEntities', fiscalEntities) - ..add('metadata', metadata) - ..add('name', name) - ..add('paymentSources', paymentSources) - ..add('phone', phone) - ..add('planId', planId) - ..add('shippingContacts', shippingContacts) - ..add('subscription', subscription)) - .toString(); - } -} - -class CustomerBuilder implements Builder { - _$Customer? _$v; - - CustomerAntifraudInfoBuilder? _antifraudInfo; - CustomerAntifraudInfoBuilder get antifraudInfo => - _$this._antifraudInfo ??= new CustomerAntifraudInfoBuilder(); - set antifraudInfo(CustomerAntifraudInfoBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - bool? _corporate; - bool? get corporate => _$this._corporate; - set corporate(bool? corporate) => _$this._corporate = corporate; - - String? _customReference; - String? get customReference => _$this._customReference; - set customReference(String? customReference) => - _$this._customReference = customReference; - - String? _email; - String? get email => _$this._email; - set email(String? email) => _$this._email = email; - - String? _defaultPaymentSourceId; - String? get defaultPaymentSourceId => _$this._defaultPaymentSourceId; - set defaultPaymentSourceId(String? defaultPaymentSourceId) => - _$this._defaultPaymentSourceId = defaultPaymentSourceId; - - String? _defaultShippingContactId; - String? get defaultShippingContactId => _$this._defaultShippingContactId; - set defaultShippingContactId(String? defaultShippingContactId) => - _$this._defaultShippingContactId = defaultShippingContactId; - - ListBuilder? _fiscalEntities; - ListBuilder get fiscalEntities => - _$this._fiscalEntities ??= - new ListBuilder(); - set fiscalEntities( - ListBuilder? fiscalEntities) => - _$this._fiscalEntities = fiscalEntities; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - ListBuilder? _paymentSources; - ListBuilder get paymentSources => - _$this._paymentSources ??= - new ListBuilder(); - set paymentSources( - ListBuilder? paymentSources) => - _$this._paymentSources = paymentSources; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - String? _planId; - String? get planId => _$this._planId; - set planId(String? planId) => _$this._planId = planId; - - ListBuilder? _shippingContacts; - ListBuilder get shippingContacts => - _$this._shippingContacts ??= new ListBuilder(); - set shippingContacts( - ListBuilder? shippingContacts) => - _$this._shippingContacts = shippingContacts; - - SubscriptionRequestBuilder? _subscription; - SubscriptionRequestBuilder get subscription => - _$this._subscription ??= new SubscriptionRequestBuilder(); - set subscription(SubscriptionRequestBuilder? subscription) => - _$this._subscription = subscription; - - CustomerBuilder() { - Customer._defaults(this); - } - - CustomerBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _corporate = $v.corporate; - _customReference = $v.customReference; - _email = $v.email; - _defaultPaymentSourceId = $v.defaultPaymentSourceId; - _defaultShippingContactId = $v.defaultShippingContactId; - _fiscalEntities = $v.fiscalEntities?.toBuilder(); - _metadata = $v.metadata?.toBuilder(); - _name = $v.name; - _paymentSources = $v.paymentSources?.toBuilder(); - _phone = $v.phone; - _planId = $v.planId; - _shippingContacts = $v.shippingContacts?.toBuilder(); - _subscription = $v.subscription?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(Customer other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$Customer; - } - - @override - void update(void Function(CustomerBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - Customer build() => _build(); - - _$Customer _build() { - _$Customer _$result; - try { - _$result = _$v ?? - new _$Customer._( - antifraudInfo: _antifraudInfo?.build(), - corporate: corporate, - customReference: customReference, - email: BuiltValueNullFieldError.checkNotNull( - email, r'Customer', 'email'), - defaultPaymentSourceId: defaultPaymentSourceId, - defaultShippingContactId: defaultShippingContactId, - fiscalEntities: _fiscalEntities?.build(), - metadata: _metadata?.build(), - name: BuiltValueNullFieldError.checkNotNull( - name, r'Customer', 'name'), - paymentSources: _paymentSources?.build(), - phone: BuiltValueNullFieldError.checkNotNull( - phone, r'Customer', 'phone'), - planId: planId, - shippingContacts: _shippingContacts?.build(), - subscription: _subscription?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'fiscalEntities'; - _fiscalEntities?.build(); - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'paymentSources'; - _paymentSources?.build(); - - _$failedField = 'shippingContacts'; - _shippingContacts?.build(); - _$failedField = 'subscription'; - _subscription?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'Customer', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_address.g.dart b/lib/src/model/customer_address.g.dart deleted file mode 100644 index 6fdf51f..0000000 --- a/lib/src/model/customer_address.g.dart +++ /dev/null @@ -1,223 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_address.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerAddressBuilder { - void replace(CustomerAddress other); - void update(void Function(CustomerAddressBuilder) updates); - String? get street1; - set street1(String? street1); - - String? get street2; - set street2(String? street2); - - String? get postalCode; - set postalCode(String? postalCode); - - String? get city; - set city(String? city); - - String? get state; - set state(String? state); - - String? get country; - set country(String? country); - - bool? get residential; - set residential(bool? residential); - - String? get externalNumber; - set externalNumber(String? externalNumber); -} - -class _$$CustomerAddress extends $CustomerAddress { - @override - final String street1; - @override - final String? street2; - @override - final String postalCode; - @override - final String city; - @override - final String? state; - @override - final String? country; - @override - final bool? residential; - @override - final String? externalNumber; - - factory _$$CustomerAddress( - [void Function($CustomerAddressBuilder)? updates]) => - (new $CustomerAddressBuilder()..update(updates))._build(); - - _$$CustomerAddress._( - {required this.street1, - this.street2, - required this.postalCode, - required this.city, - this.state, - this.country, - this.residential, - this.externalNumber}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - street1, r'$CustomerAddress', 'street1'); - BuiltValueNullFieldError.checkNotNull( - postalCode, r'$CustomerAddress', 'postalCode'); - BuiltValueNullFieldError.checkNotNull(city, r'$CustomerAddress', 'city'); - } - - @override - $CustomerAddress rebuild(void Function($CustomerAddressBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerAddressBuilder toBuilder() => - new $CustomerAddressBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerAddress && - street1 == other.street1 && - street2 == other.street2 && - postalCode == other.postalCode && - city == other.city && - state == other.state && - country == other.country && - residential == other.residential && - externalNumber == other.externalNumber; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, street1.hashCode), street2.hashCode), - postalCode.hashCode), - city.hashCode), - state.hashCode), - country.hashCode), - residential.hashCode), - externalNumber.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerAddress') - ..add('street1', street1) - ..add('street2', street2) - ..add('postalCode', postalCode) - ..add('city', city) - ..add('state', state) - ..add('country', country) - ..add('residential', residential) - ..add('externalNumber', externalNumber)) - .toString(); - } -} - -class $CustomerAddressBuilder - implements - Builder<$CustomerAddress, $CustomerAddressBuilder>, - CustomerAddressBuilder { - _$$CustomerAddress? _$v; - - String? _street1; - String? get street1 => _$this._street1; - set street1(covariant String? street1) => _$this._street1 = street1; - - String? _street2; - String? get street2 => _$this._street2; - set street2(covariant String? street2) => _$this._street2 = street2; - - String? _postalCode; - String? get postalCode => _$this._postalCode; - set postalCode(covariant String? postalCode) => - _$this._postalCode = postalCode; - - String? _city; - String? get city => _$this._city; - set city(covariant String? city) => _$this._city = city; - - String? _state; - String? get state => _$this._state; - set state(covariant String? state) => _$this._state = state; - - String? _country; - String? get country => _$this._country; - set country(covariant String? country) => _$this._country = country; - - bool? _residential; - bool? get residential => _$this._residential; - set residential(covariant bool? residential) => - _$this._residential = residential; - - String? _externalNumber; - String? get externalNumber => _$this._externalNumber; - set externalNumber(covariant String? externalNumber) => - _$this._externalNumber = externalNumber; - - $CustomerAddressBuilder() { - $CustomerAddress._defaults(this); - } - - $CustomerAddressBuilder get _$this { - final $v = _$v; - if ($v != null) { - _street1 = $v.street1; - _street2 = $v.street2; - _postalCode = $v.postalCode; - _city = $v.city; - _state = $v.state; - _country = $v.country; - _residential = $v.residential; - _externalNumber = $v.externalNumber; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerAddress other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerAddress; - } - - @override - void update(void Function($CustomerAddressBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerAddress build() => _build(); - - _$$CustomerAddress _build() { - final _$result = _$v ?? - new _$$CustomerAddress._( - street1: BuiltValueNullFieldError.checkNotNull( - street1, r'$CustomerAddress', 'street1'), - street2: street2, - postalCode: BuiltValueNullFieldError.checkNotNull( - postalCode, r'$CustomerAddress', 'postalCode'), - city: BuiltValueNullFieldError.checkNotNull( - city, r'$CustomerAddress', 'city'), - state: state, - country: country, - residential: residential, - externalNumber: externalNumber); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_antifraud_info.g.dart b/lib/src/model/customer_antifraud_info.g.dart deleted file mode 100644 index 089d7f7..0000000 --- a/lib/src/model/customer_antifraud_info.g.dart +++ /dev/null @@ -1,103 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_antifraud_info.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerAntifraudInfo extends CustomerAntifraudInfo { - @override - final int? accountCreatedAt; - @override - final int? firstPaidAt; - - factory _$CustomerAntifraudInfo( - [void Function(CustomerAntifraudInfoBuilder)? updates]) => - (new CustomerAntifraudInfoBuilder()..update(updates))._build(); - - _$CustomerAntifraudInfo._({this.accountCreatedAt, this.firstPaidAt}) - : super._(); - - @override - CustomerAntifraudInfo rebuild( - void Function(CustomerAntifraudInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerAntifraudInfoBuilder toBuilder() => - new CustomerAntifraudInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerAntifraudInfo && - accountCreatedAt == other.accountCreatedAt && - firstPaidAt == other.firstPaidAt; - } - - @override - int get hashCode { - return $jf($jc($jc(0, accountCreatedAt.hashCode), firstPaidAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerAntifraudInfo') - ..add('accountCreatedAt', accountCreatedAt) - ..add('firstPaidAt', firstPaidAt)) - .toString(); - } -} - -class CustomerAntifraudInfoBuilder - implements Builder { - _$CustomerAntifraudInfo? _$v; - - int? _accountCreatedAt; - int? get accountCreatedAt => _$this._accountCreatedAt; - set accountCreatedAt(int? accountCreatedAt) => - _$this._accountCreatedAt = accountCreatedAt; - - int? _firstPaidAt; - int? get firstPaidAt => _$this._firstPaidAt; - set firstPaidAt(int? firstPaidAt) => _$this._firstPaidAt = firstPaidAt; - - CustomerAntifraudInfoBuilder() { - CustomerAntifraudInfo._defaults(this); - } - - CustomerAntifraudInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _accountCreatedAt = $v.accountCreatedAt; - _firstPaidAt = $v.firstPaidAt; - _$v = null; - } - return this; - } - - @override - void replace(CustomerAntifraudInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerAntifraudInfo; - } - - @override - void update(void Function(CustomerAntifraudInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerAntifraudInfo build() => _build(); - - _$CustomerAntifraudInfo _build() { - final _$result = _$v ?? - new _$CustomerAntifraudInfo._( - accountCreatedAt: accountCreatedAt, firstPaidAt: firstPaidAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_antifraud_info_response.g.dart b/lib/src/model/customer_antifraud_info_response.g.dart deleted file mode 100644 index aee078c..0000000 --- a/lib/src/model/customer_antifraud_info_response.g.dart +++ /dev/null @@ -1,105 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_antifraud_info_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerAntifraudInfoResponse extends CustomerAntifraudInfoResponse { - @override - final int? firstPaidAt; - @override - final int? accountCreatedAt; - - factory _$CustomerAntifraudInfoResponse( - [void Function(CustomerAntifraudInfoResponseBuilder)? updates]) => - (new CustomerAntifraudInfoResponseBuilder()..update(updates))._build(); - - _$CustomerAntifraudInfoResponse._({this.firstPaidAt, this.accountCreatedAt}) - : super._(); - - @override - CustomerAntifraudInfoResponse rebuild( - void Function(CustomerAntifraudInfoResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerAntifraudInfoResponseBuilder toBuilder() => - new CustomerAntifraudInfoResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerAntifraudInfoResponse && - firstPaidAt == other.firstPaidAt && - accountCreatedAt == other.accountCreatedAt; - } - - @override - int get hashCode { - return $jf($jc($jc(0, firstPaidAt.hashCode), accountCreatedAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerAntifraudInfoResponse') - ..add('firstPaidAt', firstPaidAt) - ..add('accountCreatedAt', accountCreatedAt)) - .toString(); - } -} - -class CustomerAntifraudInfoResponseBuilder - implements - Builder { - _$CustomerAntifraudInfoResponse? _$v; - - int? _firstPaidAt; - int? get firstPaidAt => _$this._firstPaidAt; - set firstPaidAt(int? firstPaidAt) => _$this._firstPaidAt = firstPaidAt; - - int? _accountCreatedAt; - int? get accountCreatedAt => _$this._accountCreatedAt; - set accountCreatedAt(int? accountCreatedAt) => - _$this._accountCreatedAt = accountCreatedAt; - - CustomerAntifraudInfoResponseBuilder() { - CustomerAntifraudInfoResponse._defaults(this); - } - - CustomerAntifraudInfoResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _firstPaidAt = $v.firstPaidAt; - _accountCreatedAt = $v.accountCreatedAt; - _$v = null; - } - return this; - } - - @override - void replace(CustomerAntifraudInfoResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerAntifraudInfoResponse; - } - - @override - void update(void Function(CustomerAntifraudInfoResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerAntifraudInfoResponse build() => _build(); - - _$CustomerAntifraudInfoResponse _build() { - final _$result = _$v ?? - new _$CustomerAntifraudInfoResponse._( - firstPaidAt: firstPaidAt, accountCreatedAt: accountCreatedAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_fiscal_entities_data_response.g.dart b/lib/src/model/customer_fiscal_entities_data_response.g.dart deleted file mode 100644 index 0acf802..0000000 --- a/lib/src/model/customer_fiscal_entities_data_response.g.dart +++ /dev/null @@ -1,265 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_fiscal_entities_data_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerFiscalEntitiesDataResponse - extends CustomerFiscalEntitiesDataResponse { - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - @override - final bool? default_; - @override - final CustomerFiscalEntitiesRequestAddress address; - @override - final String? taxId; - @override - final String? email; - @override - final String? phone; - @override - final BuiltMap? metadata; - @override - final String? companyName; - - factory _$CustomerFiscalEntitiesDataResponse( - [void Function(CustomerFiscalEntitiesDataResponseBuilder)? - updates]) => - (new CustomerFiscalEntitiesDataResponseBuilder()..update(updates)) - ._build(); - - _$CustomerFiscalEntitiesDataResponse._( - {required this.id, - required this.object, - required this.createdAt, - this.parentId, - this.default_, - required this.address, - this.taxId, - this.email, - this.phone, - this.metadata, - this.companyName}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'CustomerFiscalEntitiesDataResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomerFiscalEntitiesDataResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'CustomerFiscalEntitiesDataResponse', 'createdAt'); - BuiltValueNullFieldError.checkNotNull( - address, r'CustomerFiscalEntitiesDataResponse', 'address'); - } - - @override - CustomerFiscalEntitiesDataResponse rebuild( - void Function(CustomerFiscalEntitiesDataResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerFiscalEntitiesDataResponseBuilder toBuilder() => - new CustomerFiscalEntitiesDataResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerFiscalEntitiesDataResponse && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId && - default_ == other.default_ && - address == other.address && - taxId == other.taxId && - email == other.email && - phone == other.phone && - metadata == other.metadata && - companyName == other.companyName; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, id.hashCode), - object.hashCode), - createdAt.hashCode), - parentId.hashCode), - default_.hashCode), - address.hashCode), - taxId.hashCode), - email.hashCode), - phone.hashCode), - metadata.hashCode), - companyName.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerFiscalEntitiesDataResponse') - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('address', address) - ..add('taxId', taxId) - ..add('email', email) - ..add('phone', phone) - ..add('metadata', metadata) - ..add('companyName', companyName)) - .toString(); - } -} - -class CustomerFiscalEntitiesDataResponseBuilder - implements - Builder, - CreateCustomerFiscalEntitiesResponseAllOfBuilder, - CustomerFiscalEntitiesRequestBuilder { - _$CustomerFiscalEntitiesDataResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - CustomerFiscalEntitiesRequestAddressBuilder? _address; - CustomerFiscalEntitiesRequestAddressBuilder get address => - _$this._address ??= new CustomerFiscalEntitiesRequestAddressBuilder(); - set address(covariant CustomerFiscalEntitiesRequestAddressBuilder? address) => - _$this._address = address; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(covariant String? taxId) => _$this._taxId = taxId; - - String? _email; - String? get email => _$this._email; - set email(covariant String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _companyName; - String? get companyName => _$this._companyName; - set companyName(covariant String? companyName) => - _$this._companyName = companyName; - - CustomerFiscalEntitiesDataResponseBuilder() { - CustomerFiscalEntitiesDataResponse._defaults(this); - } - - CustomerFiscalEntitiesDataResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _default_ = $v.default_; - _address = $v.address.toBuilder(); - _taxId = $v.taxId; - _email = $v.email; - _phone = $v.phone; - _metadata = $v.metadata?.toBuilder(); - _companyName = $v.companyName; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CustomerFiscalEntitiesDataResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerFiscalEntitiesDataResponse; - } - - @override - void update( - void Function(CustomerFiscalEntitiesDataResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerFiscalEntitiesDataResponse build() => _build(); - - _$CustomerFiscalEntitiesDataResponse _build() { - _$CustomerFiscalEntitiesDataResponse _$result; - try { - _$result = _$v ?? - new _$CustomerFiscalEntitiesDataResponse._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'CustomerFiscalEntitiesDataResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomerFiscalEntitiesDataResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'CustomerFiscalEntitiesDataResponse', 'createdAt'), - parentId: parentId, - default_: default_, - address: address.build(), - taxId: taxId, - email: email, - phone: phone, - metadata: _metadata?.build(), - companyName: companyName); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - address.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerFiscalEntitiesDataResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_fiscal_entities_request.g.dart b/lib/src/model/customer_fiscal_entities_request.g.dart deleted file mode 100644 index 24726a4..0000000 --- a/lib/src/model/customer_fiscal_entities_request.g.dart +++ /dev/null @@ -1,205 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_fiscal_entities_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerFiscalEntitiesRequestBuilder { - void replace(CustomerFiscalEntitiesRequest other); - void update(void Function(CustomerFiscalEntitiesRequestBuilder) updates); - CustomerFiscalEntitiesRequestAddressBuilder get address; - set address(CustomerFiscalEntitiesRequestAddressBuilder? address); - - String? get taxId; - set taxId(String? taxId); - - String? get email; - set email(String? email); - - String? get phone; - set phone(String? phone); - - MapBuilder get metadata; - set metadata(MapBuilder? metadata); - - String? get companyName; - set companyName(String? companyName); -} - -class _$$CustomerFiscalEntitiesRequest extends $CustomerFiscalEntitiesRequest { - @override - final CustomerFiscalEntitiesRequestAddress address; - @override - final String? taxId; - @override - final String? email; - @override - final String? phone; - @override - final BuiltMap? metadata; - @override - final String? companyName; - - factory _$$CustomerFiscalEntitiesRequest( - [void Function($CustomerFiscalEntitiesRequestBuilder)? updates]) => - (new $CustomerFiscalEntitiesRequestBuilder()..update(updates))._build(); - - _$$CustomerFiscalEntitiesRequest._( - {required this.address, - this.taxId, - this.email, - this.phone, - this.metadata, - this.companyName}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - address, r'$CustomerFiscalEntitiesRequest', 'address'); - } - - @override - $CustomerFiscalEntitiesRequest rebuild( - void Function($CustomerFiscalEntitiesRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerFiscalEntitiesRequestBuilder toBuilder() => - new $CustomerFiscalEntitiesRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerFiscalEntitiesRequest && - address == other.address && - taxId == other.taxId && - email == other.email && - phone == other.phone && - metadata == other.metadata && - companyName == other.companyName; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, address.hashCode), taxId.hashCode), - email.hashCode), - phone.hashCode), - metadata.hashCode), - companyName.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerFiscalEntitiesRequest') - ..add('address', address) - ..add('taxId', taxId) - ..add('email', email) - ..add('phone', phone) - ..add('metadata', metadata) - ..add('companyName', companyName)) - .toString(); - } -} - -class $CustomerFiscalEntitiesRequestBuilder - implements - Builder<$CustomerFiscalEntitiesRequest, - $CustomerFiscalEntitiesRequestBuilder>, - CustomerFiscalEntitiesRequestBuilder { - _$$CustomerFiscalEntitiesRequest? _$v; - - CustomerFiscalEntitiesRequestAddressBuilder? _address; - CustomerFiscalEntitiesRequestAddressBuilder get address => - _$this._address ??= new CustomerFiscalEntitiesRequestAddressBuilder(); - set address(covariant CustomerFiscalEntitiesRequestAddressBuilder? address) => - _$this._address = address; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(covariant String? taxId) => _$this._taxId = taxId; - - String? _email; - String? get email => _$this._email; - set email(covariant String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _companyName; - String? get companyName => _$this._companyName; - set companyName(covariant String? companyName) => - _$this._companyName = companyName; - - $CustomerFiscalEntitiesRequestBuilder() { - $CustomerFiscalEntitiesRequest._defaults(this); - } - - $CustomerFiscalEntitiesRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _address = $v.address.toBuilder(); - _taxId = $v.taxId; - _email = $v.email; - _phone = $v.phone; - _metadata = $v.metadata?.toBuilder(); - _companyName = $v.companyName; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerFiscalEntitiesRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerFiscalEntitiesRequest; - } - - @override - void update(void Function($CustomerFiscalEntitiesRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerFiscalEntitiesRequest build() => _build(); - - _$$CustomerFiscalEntitiesRequest _build() { - _$$CustomerFiscalEntitiesRequest _$result; - try { - _$result = _$v ?? - new _$$CustomerFiscalEntitiesRequest._( - address: address.build(), - taxId: taxId, - email: email, - phone: phone, - metadata: _metadata?.build(), - companyName: companyName); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - address.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomerFiscalEntitiesRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_fiscal_entities_request_address.dart b/lib/src/model/customer_fiscal_entities_request_address.dart index 122b606..d625f11 100644 --- a/lib/src/model/customer_fiscal_entities_request_address.dart +++ b/lib/src/model/customer_fiscal_entities_request_address.dart @@ -27,7 +27,8 @@ abstract class CustomerFiscalEntitiesRequestAddress implements CustomerAddress, factory CustomerFiscalEntitiesRequestAddress([void updates(CustomerFiscalEntitiesRequestAddressBuilder b)]) = _$CustomerFiscalEntitiesRequestAddress; @BuiltValueHook(initializeBuilder: true) - static void _defaults(CustomerFiscalEntitiesRequestAddressBuilder b) => b; + static void _defaults(CustomerFiscalEntitiesRequestAddressBuilder b) => b + ..residential = false; @BuiltValueSerializer(custom: true) static Serializer get serializer => _$CustomerFiscalEntitiesRequestAddressSerializer(); diff --git a/lib/src/model/customer_fiscal_entities_request_address.g.dart b/lib/src/model/customer_fiscal_entities_request_address.g.dart deleted file mode 100644 index c94a358..0000000 --- a/lib/src/model/customer_fiscal_entities_request_address.g.dart +++ /dev/null @@ -1,202 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_fiscal_entities_request_address.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerFiscalEntitiesRequestAddress - extends CustomerFiscalEntitiesRequestAddress { - @override - final String street1; - @override - final String? street2; - @override - final String postalCode; - @override - final String city; - @override - final String? state; - @override - final String? country; - @override - final bool? residential; - @override - final String? externalNumber; - - factory _$CustomerFiscalEntitiesRequestAddress( - [void Function(CustomerFiscalEntitiesRequestAddressBuilder)? - updates]) => - (new CustomerFiscalEntitiesRequestAddressBuilder()..update(updates)) - ._build(); - - _$CustomerFiscalEntitiesRequestAddress._( - {required this.street1, - this.street2, - required this.postalCode, - required this.city, - this.state, - this.country, - this.residential, - this.externalNumber}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - street1, r'CustomerFiscalEntitiesRequestAddress', 'street1'); - BuiltValueNullFieldError.checkNotNull( - postalCode, r'CustomerFiscalEntitiesRequestAddress', 'postalCode'); - BuiltValueNullFieldError.checkNotNull( - city, r'CustomerFiscalEntitiesRequestAddress', 'city'); - } - - @override - CustomerFiscalEntitiesRequestAddress rebuild( - void Function(CustomerFiscalEntitiesRequestAddressBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerFiscalEntitiesRequestAddressBuilder toBuilder() => - new CustomerFiscalEntitiesRequestAddressBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerFiscalEntitiesRequestAddress && - street1 == other.street1 && - street2 == other.street2 && - postalCode == other.postalCode && - city == other.city && - state == other.state && - country == other.country && - residential == other.residential && - externalNumber == other.externalNumber; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, street1.hashCode), street2.hashCode), - postalCode.hashCode), - city.hashCode), - state.hashCode), - country.hashCode), - residential.hashCode), - externalNumber.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerFiscalEntitiesRequestAddress') - ..add('street1', street1) - ..add('street2', street2) - ..add('postalCode', postalCode) - ..add('city', city) - ..add('state', state) - ..add('country', country) - ..add('residential', residential) - ..add('externalNumber', externalNumber)) - .toString(); - } -} - -class CustomerFiscalEntitiesRequestAddressBuilder - implements - Builder, - CustomerAddressBuilder { - _$CustomerFiscalEntitiesRequestAddress? _$v; - - String? _street1; - String? get street1 => _$this._street1; - set street1(covariant String? street1) => _$this._street1 = street1; - - String? _street2; - String? get street2 => _$this._street2; - set street2(covariant String? street2) => _$this._street2 = street2; - - String? _postalCode; - String? get postalCode => _$this._postalCode; - set postalCode(covariant String? postalCode) => - _$this._postalCode = postalCode; - - String? _city; - String? get city => _$this._city; - set city(covariant String? city) => _$this._city = city; - - String? _state; - String? get state => _$this._state; - set state(covariant String? state) => _$this._state = state; - - String? _country; - String? get country => _$this._country; - set country(covariant String? country) => _$this._country = country; - - bool? _residential; - bool? get residential => _$this._residential; - set residential(covariant bool? residential) => - _$this._residential = residential; - - String? _externalNumber; - String? get externalNumber => _$this._externalNumber; - set externalNumber(covariant String? externalNumber) => - _$this._externalNumber = externalNumber; - - CustomerFiscalEntitiesRequestAddressBuilder() { - CustomerFiscalEntitiesRequestAddress._defaults(this); - } - - CustomerFiscalEntitiesRequestAddressBuilder get _$this { - final $v = _$v; - if ($v != null) { - _street1 = $v.street1; - _street2 = $v.street2; - _postalCode = $v.postalCode; - _city = $v.city; - _state = $v.state; - _country = $v.country; - _residential = $v.residential; - _externalNumber = $v.externalNumber; - _$v = null; - } - return this; - } - - @override - void replace(covariant CustomerFiscalEntitiesRequestAddress other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerFiscalEntitiesRequestAddress; - } - - @override - void update( - void Function(CustomerFiscalEntitiesRequestAddressBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerFiscalEntitiesRequestAddress build() => _build(); - - _$CustomerFiscalEntitiesRequestAddress _build() { - final _$result = _$v ?? - new _$CustomerFiscalEntitiesRequestAddress._( - street1: BuiltValueNullFieldError.checkNotNull( - street1, r'CustomerFiscalEntitiesRequestAddress', 'street1'), - street2: street2, - postalCode: BuiltValueNullFieldError.checkNotNull(postalCode, - r'CustomerFiscalEntitiesRequestAddress', 'postalCode'), - city: BuiltValueNullFieldError.checkNotNull( - city, r'CustomerFiscalEntitiesRequestAddress', 'city'), - state: state, - country: country, - residential: residential, - externalNumber: externalNumber); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_fiscal_entities_response.g.dart b/lib/src/model/customer_fiscal_entities_response.g.dart deleted file mode 100644 index c827cd7..0000000 --- a/lib/src/model/customer_fiscal_entities_response.g.dart +++ /dev/null @@ -1,142 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_fiscal_entities_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerFiscalEntitiesResponse extends CustomerFiscalEntitiesResponse { - @override - final BuiltList? data; - @override - final bool hasMore; - @override - final String object; - - factory _$CustomerFiscalEntitiesResponse( - [void Function(CustomerFiscalEntitiesResponseBuilder)? updates]) => - (new CustomerFiscalEntitiesResponseBuilder()..update(updates))._build(); - - _$CustomerFiscalEntitiesResponse._( - {this.data, required this.hasMore, required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomerFiscalEntitiesResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomerFiscalEntitiesResponse', 'object'); - } - - @override - CustomerFiscalEntitiesResponse rebuild( - void Function(CustomerFiscalEntitiesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerFiscalEntitiesResponseBuilder toBuilder() => - new CustomerFiscalEntitiesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerFiscalEntitiesResponse && - data == other.data && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, data.hashCode), hasMore.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerFiscalEntitiesResponse') - ..add('data', data) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class CustomerFiscalEntitiesResponseBuilder - implements - Builder, - CustomerFiscalEntitiesResponseAllOfBuilder, - PaginationBuilder { - _$CustomerFiscalEntitiesResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - CustomerFiscalEntitiesResponseBuilder() { - CustomerFiscalEntitiesResponse._defaults(this); - } - - CustomerFiscalEntitiesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CustomerFiscalEntitiesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerFiscalEntitiesResponse; - } - - @override - void update(void Function(CustomerFiscalEntitiesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerFiscalEntitiesResponse build() => _build(); - - _$CustomerFiscalEntitiesResponse _build() { - _$CustomerFiscalEntitiesResponse _$result; - try { - _$result = _$v ?? - new _$CustomerFiscalEntitiesResponse._( - data: _data?.build(), - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomerFiscalEntitiesResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomerFiscalEntitiesResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerFiscalEntitiesResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_fiscal_entities_response_all_of.g.dart b/lib/src/model/customer_fiscal_entities_response_all_of.g.dart deleted file mode 100644 index b3a7cbd..0000000 --- a/lib/src/model/customer_fiscal_entities_response_all_of.g.dart +++ /dev/null @@ -1,122 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_fiscal_entities_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerFiscalEntitiesResponseAllOfBuilder { - void replace(CustomerFiscalEntitiesResponseAllOf other); - void update( - void Function(CustomerFiscalEntitiesResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$CustomerFiscalEntitiesResponseAllOf - extends $CustomerFiscalEntitiesResponseAllOf { - @override - final BuiltList? data; - - factory _$$CustomerFiscalEntitiesResponseAllOf( - [void Function($CustomerFiscalEntitiesResponseAllOfBuilder)? - updates]) => - (new $CustomerFiscalEntitiesResponseAllOfBuilder()..update(updates)) - ._build(); - - _$$CustomerFiscalEntitiesResponseAllOf._({this.data}) : super._(); - - @override - $CustomerFiscalEntitiesResponseAllOf rebuild( - void Function($CustomerFiscalEntitiesResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerFiscalEntitiesResponseAllOfBuilder toBuilder() => - new $CustomerFiscalEntitiesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerFiscalEntitiesResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerFiscalEntitiesResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $CustomerFiscalEntitiesResponseAllOfBuilder - implements - Builder<$CustomerFiscalEntitiesResponseAllOf, - $CustomerFiscalEntitiesResponseAllOfBuilder>, - CustomerFiscalEntitiesResponseAllOfBuilder { - _$$CustomerFiscalEntitiesResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $CustomerFiscalEntitiesResponseAllOfBuilder() { - $CustomerFiscalEntitiesResponseAllOf._defaults(this); - } - - $CustomerFiscalEntitiesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerFiscalEntitiesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerFiscalEntitiesResponseAllOf; - } - - @override - void update( - void Function($CustomerFiscalEntitiesResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerFiscalEntitiesResponseAllOf build() => _build(); - - _$$CustomerFiscalEntitiesResponseAllOf _build() { - _$$CustomerFiscalEntitiesResponseAllOf _$result; - try { - _$result = _$v ?? - new _$$CustomerFiscalEntitiesResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomerFiscalEntitiesResponseAllOf', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_info.g.dart b/lib/src/model/customer_info.g.dart deleted file mode 100644 index 3c7ccc2..0000000 --- a/lib/src/model/customer_info.g.dart +++ /dev/null @@ -1,145 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_info.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerInfo extends CustomerInfo { - @override - final String name; - @override - final String email; - @override - final String phone; - @override - final bool? corporate; - @override - final String? object; - - factory _$CustomerInfo([void Function(CustomerInfoBuilder)? updates]) => - (new CustomerInfoBuilder()..update(updates))._build(); - - _$CustomerInfo._( - {required this.name, - required this.email, - required this.phone, - this.corporate, - this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull(name, r'CustomerInfo', 'name'); - BuiltValueNullFieldError.checkNotNull(email, r'CustomerInfo', 'email'); - BuiltValueNullFieldError.checkNotNull(phone, r'CustomerInfo', 'phone'); - } - - @override - CustomerInfo rebuild(void Function(CustomerInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerInfoBuilder toBuilder() => new CustomerInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerInfo && - name == other.name && - email == other.email && - phone == other.phone && - corporate == other.corporate && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc($jc(0, name.hashCode), email.hashCode), phone.hashCode), - corporate.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerInfo') - ..add('name', name) - ..add('email', email) - ..add('phone', phone) - ..add('corporate', corporate) - ..add('object', object)) - .toString(); - } -} - -class CustomerInfoBuilder - implements Builder { - _$CustomerInfo? _$v; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - String? _email; - String? get email => _$this._email; - set email(String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - bool? _corporate; - bool? get corporate => _$this._corporate; - set corporate(bool? corporate) => _$this._corporate = corporate; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - CustomerInfoBuilder() { - CustomerInfo._defaults(this); - } - - CustomerInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _name = $v.name; - _email = $v.email; - _phone = $v.phone; - _corporate = $v.corporate; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(CustomerInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerInfo; - } - - @override - void update(void Function(CustomerInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerInfo build() => _build(); - - _$CustomerInfo _build() { - final _$result = _$v ?? - new _$CustomerInfo._( - name: BuiltValueNullFieldError.checkNotNull( - name, r'CustomerInfo', 'name'), - email: BuiltValueNullFieldError.checkNotNull( - email, r'CustomerInfo', 'email'), - phone: BuiltValueNullFieldError.checkNotNull( - phone, r'CustomerInfo', 'phone'), - corporate: corporate, - object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_info_just_customer_id.g.dart b/lib/src/model/customer_info_just_customer_id.g.dart deleted file mode 100644 index 00d9708..0000000 --- a/lib/src/model/customer_info_just_customer_id.g.dart +++ /dev/null @@ -1,97 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_info_just_customer_id.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerInfoJustCustomerId extends CustomerInfoJustCustomerId { - @override - final String customerId; - - factory _$CustomerInfoJustCustomerId( - [void Function(CustomerInfoJustCustomerIdBuilder)? updates]) => - (new CustomerInfoJustCustomerIdBuilder()..update(updates))._build(); - - _$CustomerInfoJustCustomerId._({required this.customerId}) : super._() { - BuiltValueNullFieldError.checkNotNull( - customerId, r'CustomerInfoJustCustomerId', 'customerId'); - } - - @override - CustomerInfoJustCustomerId rebuild( - void Function(CustomerInfoJustCustomerIdBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerInfoJustCustomerIdBuilder toBuilder() => - new CustomerInfoJustCustomerIdBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerInfoJustCustomerId && - customerId == other.customerId; - } - - @override - int get hashCode { - return $jf($jc(0, customerId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerInfoJustCustomerId') - ..add('customerId', customerId)) - .toString(); - } -} - -class CustomerInfoJustCustomerIdBuilder - implements - Builder { - _$CustomerInfoJustCustomerId? _$v; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(String? customerId) => _$this._customerId = customerId; - - CustomerInfoJustCustomerIdBuilder() { - CustomerInfoJustCustomerId._defaults(this); - } - - CustomerInfoJustCustomerIdBuilder get _$this { - final $v = _$v; - if ($v != null) { - _customerId = $v.customerId; - _$v = null; - } - return this; - } - - @override - void replace(CustomerInfoJustCustomerId other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerInfoJustCustomerId; - } - - @override - void update(void Function(CustomerInfoJustCustomerIdBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerInfoJustCustomerId build() => _build(); - - _$CustomerInfoJustCustomerId _build() { - final _$result = _$v ?? - new _$CustomerInfoJustCustomerId._( - customerId: BuiltValueNullFieldError.checkNotNull( - customerId, r'CustomerInfoJustCustomerId', 'customerId')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_info_just_customer_id_response.g.dart b/lib/src/model/customer_info_just_customer_id_response.g.dart deleted file mode 100644 index a9b6e2a..0000000 --- a/lib/src/model/customer_info_just_customer_id_response.g.dart +++ /dev/null @@ -1,106 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_info_just_customer_id_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerInfoJustCustomerIdResponseBuilder { - void replace(CustomerInfoJustCustomerIdResponse other); - void update(void Function(CustomerInfoJustCustomerIdResponseBuilder) updates); - String? get customerId; - set customerId(String? customerId); -} - -class _$$CustomerInfoJustCustomerIdResponse - extends $CustomerInfoJustCustomerIdResponse { - @override - final String? customerId; - - factory _$$CustomerInfoJustCustomerIdResponse( - [void Function($CustomerInfoJustCustomerIdResponseBuilder)? - updates]) => - (new $CustomerInfoJustCustomerIdResponseBuilder()..update(updates)) - ._build(); - - _$$CustomerInfoJustCustomerIdResponse._({this.customerId}) : super._(); - - @override - $CustomerInfoJustCustomerIdResponse rebuild( - void Function($CustomerInfoJustCustomerIdResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerInfoJustCustomerIdResponseBuilder toBuilder() => - new $CustomerInfoJustCustomerIdResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerInfoJustCustomerIdResponse && - customerId == other.customerId; - } - - @override - int get hashCode { - return $jf($jc(0, customerId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerInfoJustCustomerIdResponse') - ..add('customerId', customerId)) - .toString(); - } -} - -class $CustomerInfoJustCustomerIdResponseBuilder - implements - Builder<$CustomerInfoJustCustomerIdResponse, - $CustomerInfoJustCustomerIdResponseBuilder>, - CustomerInfoJustCustomerIdResponseBuilder { - _$$CustomerInfoJustCustomerIdResponse? _$v; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(covariant String? customerId) => - _$this._customerId = customerId; - - $CustomerInfoJustCustomerIdResponseBuilder() { - $CustomerInfoJustCustomerIdResponse._defaults(this); - } - - $CustomerInfoJustCustomerIdResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _customerId = $v.customerId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerInfoJustCustomerIdResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerInfoJustCustomerIdResponse; - } - - @override - void update( - void Function($CustomerInfoJustCustomerIdResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerInfoJustCustomerIdResponse build() => _build(); - - _$$CustomerInfoJustCustomerIdResponse _build() { - final _$result = _$v ?? - new _$$CustomerInfoJustCustomerIdResponse._(customerId: customerId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_info_response.g.dart b/lib/src/model/customer_info_response.g.dart deleted file mode 100644 index 90f6f71..0000000 --- a/lib/src/model/customer_info_response.g.dart +++ /dev/null @@ -1,158 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_info_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerInfoResponseBuilder { - void replace(CustomerInfoResponse other); - void update(void Function(CustomerInfoResponseBuilder) updates); - String? get name; - set name(String? name); - - String? get email; - set email(String? email); - - String? get phone; - set phone(String? phone); - - bool? get corporate; - set corporate(bool? corporate); - - String? get object; - set object(String? object); -} - -class _$$CustomerInfoResponse extends $CustomerInfoResponse { - @override - final String? name; - @override - final String? email; - @override - final String? phone; - @override - final bool? corporate; - @override - final String? object; - - factory _$$CustomerInfoResponse( - [void Function($CustomerInfoResponseBuilder)? updates]) => - (new $CustomerInfoResponseBuilder()..update(updates))._build(); - - _$$CustomerInfoResponse._( - {this.name, this.email, this.phone, this.corporate, this.object}) - : super._(); - - @override - $CustomerInfoResponse rebuild( - void Function($CustomerInfoResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerInfoResponseBuilder toBuilder() => - new $CustomerInfoResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerInfoResponse && - name == other.name && - email == other.email && - phone == other.phone && - corporate == other.corporate && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc($jc(0, name.hashCode), email.hashCode), phone.hashCode), - corporate.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerInfoResponse') - ..add('name', name) - ..add('email', email) - ..add('phone', phone) - ..add('corporate', corporate) - ..add('object', object)) - .toString(); - } -} - -class $CustomerInfoResponseBuilder - implements - Builder<$CustomerInfoResponse, $CustomerInfoResponseBuilder>, - CustomerInfoResponseBuilder { - _$$CustomerInfoResponse? _$v; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - String? _email; - String? get email => _$this._email; - set email(covariant String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - bool? _corporate; - bool? get corporate => _$this._corporate; - set corporate(covariant bool? corporate) => _$this._corporate = corporate; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $CustomerInfoResponseBuilder() { - $CustomerInfoResponse._defaults(this); - } - - $CustomerInfoResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _name = $v.name; - _email = $v.email; - _phone = $v.phone; - _corporate = $v.corporate; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerInfoResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerInfoResponse; - } - - @override - void update(void Function($CustomerInfoResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerInfoResponse build() => _build(); - - _$$CustomerInfoResponse _build() { - final _$result = _$v ?? - new _$$CustomerInfoResponse._( - name: name, - email: email, - phone: phone, - corporate: corporate, - object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_payment_method_request.g.dart b/lib/src/model/customer_payment_method_request.g.dart deleted file mode 100644 index 6b44b0e..0000000 --- a/lib/src/model/customer_payment_method_request.g.dart +++ /dev/null @@ -1,105 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_payment_method_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerPaymentMethodRequestBuilder { - void replace(CustomerPaymentMethodRequest other); - void update(void Function(CustomerPaymentMethodRequestBuilder) updates); - String? get type; - set type(String? type); -} - -class _$$CustomerPaymentMethodRequest extends $CustomerPaymentMethodRequest { - @override - final String type; - - factory _$$CustomerPaymentMethodRequest( - [void Function($CustomerPaymentMethodRequestBuilder)? updates]) => - (new $CustomerPaymentMethodRequestBuilder()..update(updates))._build(); - - _$$CustomerPaymentMethodRequest._({required this.type}) : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'$CustomerPaymentMethodRequest', 'type'); - } - - @override - $CustomerPaymentMethodRequest rebuild( - void Function($CustomerPaymentMethodRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerPaymentMethodRequestBuilder toBuilder() => - new $CustomerPaymentMethodRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerPaymentMethodRequest && type == other.type; - } - - @override - int get hashCode { - return $jf($jc(0, type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerPaymentMethodRequest') - ..add('type', type)) - .toString(); - } -} - -class $CustomerPaymentMethodRequestBuilder - implements - Builder<$CustomerPaymentMethodRequest, - $CustomerPaymentMethodRequestBuilder>, - CustomerPaymentMethodRequestBuilder { - _$$CustomerPaymentMethodRequest? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - $CustomerPaymentMethodRequestBuilder() { - $CustomerPaymentMethodRequest._defaults(this); - } - - $CustomerPaymentMethodRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerPaymentMethodRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerPaymentMethodRequest; - } - - @override - void update(void Function($CustomerPaymentMethodRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerPaymentMethodRequest build() => _build(); - - _$$CustomerPaymentMethodRequest _build() { - final _$result = _$v ?? - new _$$CustomerPaymentMethodRequest._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'$CustomerPaymentMethodRequest', 'type')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_payment_methods.g.dart b/lib/src/model/customer_payment_methods.g.dart deleted file mode 100644 index ce77ccd..0000000 --- a/lib/src/model/customer_payment_methods.g.dart +++ /dev/null @@ -1,113 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_payment_methods.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerPaymentMethodsBuilder { - void replace(CustomerPaymentMethods other); - void update(void Function(CustomerPaymentMethodsBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$CustomerPaymentMethods extends $CustomerPaymentMethods { - @override - final BuiltList? data; - - factory _$$CustomerPaymentMethods( - [void Function($CustomerPaymentMethodsBuilder)? updates]) => - (new $CustomerPaymentMethodsBuilder()..update(updates))._build(); - - _$$CustomerPaymentMethods._({this.data}) : super._(); - - @override - $CustomerPaymentMethods rebuild( - void Function($CustomerPaymentMethodsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerPaymentMethodsBuilder toBuilder() => - new $CustomerPaymentMethodsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerPaymentMethods && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerPaymentMethods') - ..add('data', data)) - .toString(); - } -} - -class $CustomerPaymentMethodsBuilder - implements - Builder<$CustomerPaymentMethods, $CustomerPaymentMethodsBuilder>, - CustomerPaymentMethodsBuilder { - _$$CustomerPaymentMethods? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $CustomerPaymentMethodsBuilder() { - $CustomerPaymentMethods._defaults(this); - } - - $CustomerPaymentMethodsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerPaymentMethods other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerPaymentMethods; - } - - @override - void update(void Function($CustomerPaymentMethodsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerPaymentMethods build() => _build(); - - _$$CustomerPaymentMethods _build() { - _$$CustomerPaymentMethods _$result; - try { - _$result = _$v ?? new _$$CustomerPaymentMethods._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomerPaymentMethods', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_payment_methods_data.g.dart b/lib/src/model/customer_payment_methods_data.g.dart deleted file mode 100644 index b2ca0d3..0000000 --- a/lib/src/model/customer_payment_methods_data.g.dart +++ /dev/null @@ -1,96 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_payment_methods_data.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerPaymentMethodsData extends CustomerPaymentMethodsData { - @override - final OneOf oneOf; - - factory _$CustomerPaymentMethodsData( - [void Function(CustomerPaymentMethodsDataBuilder)? updates]) => - (new CustomerPaymentMethodsDataBuilder()..update(updates))._build(); - - _$CustomerPaymentMethodsData._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'CustomerPaymentMethodsData', 'oneOf'); - } - - @override - CustomerPaymentMethodsData rebuild( - void Function(CustomerPaymentMethodsDataBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerPaymentMethodsDataBuilder toBuilder() => - new CustomerPaymentMethodsDataBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerPaymentMethodsData && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerPaymentMethodsData') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class CustomerPaymentMethodsDataBuilder - implements - Builder { - _$CustomerPaymentMethodsData? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - CustomerPaymentMethodsDataBuilder() { - CustomerPaymentMethodsData._defaults(this); - } - - CustomerPaymentMethodsDataBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(CustomerPaymentMethodsData other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerPaymentMethodsData; - } - - @override - void update(void Function(CustomerPaymentMethodsDataBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerPaymentMethodsData build() => _build(); - - _$CustomerPaymentMethodsData _build() { - final _$result = _$v ?? - new _$CustomerPaymentMethodsData._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'CustomerPaymentMethodsData', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_payment_methods_request.g.dart b/lib/src/model/customer_payment_methods_request.g.dart deleted file mode 100644 index 338d846..0000000 --- a/lib/src/model/customer_payment_methods_request.g.dart +++ /dev/null @@ -1,97 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_payment_methods_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerPaymentMethodsRequest extends CustomerPaymentMethodsRequest { - @override - final OneOf oneOf; - - factory _$CustomerPaymentMethodsRequest( - [void Function(CustomerPaymentMethodsRequestBuilder)? updates]) => - (new CustomerPaymentMethodsRequestBuilder()..update(updates))._build(); - - _$CustomerPaymentMethodsRequest._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'CustomerPaymentMethodsRequest', 'oneOf'); - } - - @override - CustomerPaymentMethodsRequest rebuild( - void Function(CustomerPaymentMethodsRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerPaymentMethodsRequestBuilder toBuilder() => - new CustomerPaymentMethodsRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerPaymentMethodsRequest && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerPaymentMethodsRequest') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class CustomerPaymentMethodsRequestBuilder - implements - Builder { - _$CustomerPaymentMethodsRequest? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - CustomerPaymentMethodsRequestBuilder() { - CustomerPaymentMethodsRequest._defaults(this); - } - - CustomerPaymentMethodsRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(CustomerPaymentMethodsRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerPaymentMethodsRequest; - } - - @override - void update(void Function(CustomerPaymentMethodsRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerPaymentMethodsRequest build() => _build(); - - _$CustomerPaymentMethodsRequest _build() { - final _$result = _$v ?? - new _$CustomerPaymentMethodsRequest._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'CustomerPaymentMethodsRequest', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_payment_methods_response.g.dart b/lib/src/model/customer_payment_methods_response.g.dart deleted file mode 100644 index dc724c8..0000000 --- a/lib/src/model/customer_payment_methods_response.g.dart +++ /dev/null @@ -1,173 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_payment_methods_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerPaymentMethodsResponse extends CustomerPaymentMethodsResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$CustomerPaymentMethodsResponse( - [void Function(CustomerPaymentMethodsResponseBuilder)? updates]) => - (new CustomerPaymentMethodsResponseBuilder()..update(updates))._build(); - - _$CustomerPaymentMethodsResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomerPaymentMethodsResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomerPaymentMethodsResponse', 'object'); - } - - @override - CustomerPaymentMethodsResponse rebuild( - void Function(CustomerPaymentMethodsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerPaymentMethodsResponseBuilder toBuilder() => - new CustomerPaymentMethodsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerPaymentMethodsResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerPaymentMethodsResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class CustomerPaymentMethodsResponseBuilder - implements - Builder, - CustomerPaymentMethodsBuilder, - PageBuilder, - PaginationBuilder { - _$CustomerPaymentMethodsResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - CustomerPaymentMethodsResponseBuilder() { - CustomerPaymentMethodsResponse._defaults(this); - } - - CustomerPaymentMethodsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CustomerPaymentMethodsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerPaymentMethodsResponse; - } - - @override - void update(void Function(CustomerPaymentMethodsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerPaymentMethodsResponse build() => _build(); - - _$CustomerPaymentMethodsResponse _build() { - _$CustomerPaymentMethodsResponse _$result; - try { - _$result = _$v ?? - new _$CustomerPaymentMethodsResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomerPaymentMethodsResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomerPaymentMethodsResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerPaymentMethodsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_response.dart b/lib/src/model/customer_response.dart index c8a3416..66dde0b 100644 --- a/lib/src/model/customer_response.dart +++ b/lib/src/model/customer_response.dart @@ -3,11 +3,13 @@ // // ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/customer_fiscal_entities_response.dart'; import 'package:conekta/src/model/customer_antifraud_info_response.dart'; import 'package:conekta/src/model/subscription_response.dart'; import 'package:conekta/src/model/customer_payment_methods_response.dart'; import 'package:conekta/src/model/customer_response_shipping_contacts.dart'; +import 'package:built_value/json_object.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -17,20 +19,21 @@ part 'customer_response.g.dart'; /// /// Properties: /// * [antifraudInfo] -/// * [corporate] -/// * [createdAt] -/// * [customReference] +/// * [corporate] - true if the customer is a company +/// * [createdAt] - Creation date of the object +/// * [customReference] - Custom reference /// * [defaultFiscalEntityId] /// * [defaultShippingContactId] /// * [defaultPaymentSourceId] /// * [email] /// * [fiscalEntities] -/// * [id] -/// * [livemode] -/// * [name] +/// * [id] - Customer's ID +/// * [livemode] - true if the object exists in live mode or the value false if the object exists in test mode +/// * [name] - Customer's name +/// * [metadata] /// * [object] /// * [paymentSources] -/// * [phone] +/// * [phone] - Customer's phone number /// * [shippingContacts] /// * [subscription] @BuiltValue() @@ -38,12 +41,15 @@ abstract class CustomerResponse implements Built? get metadata; @BuiltValueField(wireName: r'object') String get object; @@ -77,6 +89,7 @@ abstract class CustomerResponse implements Built; + result.metadata.replace(valueDes); + break; case r'object': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/customer_response.g.dart b/lib/src/model/customer_response.g.dart deleted file mode 100644 index 8d68d34..0000000 --- a/lib/src/model/customer_response.g.dart +++ /dev/null @@ -1,362 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerResponse extends CustomerResponse { - @override - final CustomerAntifraudInfoResponse? antifraudInfo; - @override - final bool? corporate; - @override - final int createdAt; - @override - final String? customReference; - @override - final String? defaultFiscalEntityId; - @override - final String? defaultShippingContactId; - @override - final String? defaultPaymentSourceId; - @override - final String? email; - @override - final CustomerFiscalEntitiesResponse? fiscalEntities; - @override - final String id; - @override - final bool livemode; - @override - final String? name; - @override - final String object; - @override - final CustomerPaymentMethodsResponse? paymentSources; - @override - final String? phone; - @override - final CustomerResponseShippingContacts? shippingContacts; - @override - final SubscriptionResponse? subscription; - - factory _$CustomerResponse( - [void Function(CustomerResponseBuilder)? updates]) => - (new CustomerResponseBuilder()..update(updates))._build(); - - _$CustomerResponse._( - {this.antifraudInfo, - this.corporate, - required this.createdAt, - this.customReference, - this.defaultFiscalEntityId, - this.defaultShippingContactId, - this.defaultPaymentSourceId, - this.email, - this.fiscalEntities, - required this.id, - required this.livemode, - this.name, - required this.object, - this.paymentSources, - this.phone, - this.shippingContacts, - this.subscription}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - createdAt, r'CustomerResponse', 'createdAt'); - BuiltValueNullFieldError.checkNotNull(id, r'CustomerResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - livemode, r'CustomerResponse', 'livemode'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomerResponse', 'object'); - } - - @override - CustomerResponse rebuild(void Function(CustomerResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerResponseBuilder toBuilder() => - new CustomerResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerResponse && - antifraudInfo == other.antifraudInfo && - corporate == other.corporate && - createdAt == other.createdAt && - customReference == other.customReference && - defaultFiscalEntityId == other.defaultFiscalEntityId && - defaultShippingContactId == other.defaultShippingContactId && - defaultPaymentSourceId == other.defaultPaymentSourceId && - email == other.email && - fiscalEntities == other.fiscalEntities && - id == other.id && - livemode == other.livemode && - name == other.name && - object == other.object && - paymentSources == other.paymentSources && - phone == other.phone && - shippingContacts == other.shippingContacts && - subscription == other.subscription; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - antifraudInfo - .hashCode), - corporate - .hashCode), - createdAt - .hashCode), - customReference - .hashCode), - defaultFiscalEntityId - .hashCode), - defaultShippingContactId - .hashCode), - defaultPaymentSourceId - .hashCode), - email.hashCode), - fiscalEntities.hashCode), - id.hashCode), - livemode.hashCode), - name.hashCode), - object.hashCode), - paymentSources.hashCode), - phone.hashCode), - shippingContacts.hashCode), - subscription.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerResponse') - ..add('antifraudInfo', antifraudInfo) - ..add('corporate', corporate) - ..add('createdAt', createdAt) - ..add('customReference', customReference) - ..add('defaultFiscalEntityId', defaultFiscalEntityId) - ..add('defaultShippingContactId', defaultShippingContactId) - ..add('defaultPaymentSourceId', defaultPaymentSourceId) - ..add('email', email) - ..add('fiscalEntities', fiscalEntities) - ..add('id', id) - ..add('livemode', livemode) - ..add('name', name) - ..add('object', object) - ..add('paymentSources', paymentSources) - ..add('phone', phone) - ..add('shippingContacts', shippingContacts) - ..add('subscription', subscription)) - .toString(); - } -} - -class CustomerResponseBuilder - implements Builder { - _$CustomerResponse? _$v; - - CustomerAntifraudInfoResponseBuilder? _antifraudInfo; - CustomerAntifraudInfoResponseBuilder get antifraudInfo => - _$this._antifraudInfo ??= new CustomerAntifraudInfoResponseBuilder(); - set antifraudInfo(CustomerAntifraudInfoResponseBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - bool? _corporate; - bool? get corporate => _$this._corporate; - set corporate(bool? corporate) => _$this._corporate = corporate; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _customReference; - String? get customReference => _$this._customReference; - set customReference(String? customReference) => - _$this._customReference = customReference; - - String? _defaultFiscalEntityId; - String? get defaultFiscalEntityId => _$this._defaultFiscalEntityId; - set defaultFiscalEntityId(String? defaultFiscalEntityId) => - _$this._defaultFiscalEntityId = defaultFiscalEntityId; - - String? _defaultShippingContactId; - String? get defaultShippingContactId => _$this._defaultShippingContactId; - set defaultShippingContactId(String? defaultShippingContactId) => - _$this._defaultShippingContactId = defaultShippingContactId; - - String? _defaultPaymentSourceId; - String? get defaultPaymentSourceId => _$this._defaultPaymentSourceId; - set defaultPaymentSourceId(String? defaultPaymentSourceId) => - _$this._defaultPaymentSourceId = defaultPaymentSourceId; - - String? _email; - String? get email => _$this._email; - set email(String? email) => _$this._email = email; - - CustomerFiscalEntitiesResponseBuilder? _fiscalEntities; - CustomerFiscalEntitiesResponseBuilder get fiscalEntities => - _$this._fiscalEntities ??= new CustomerFiscalEntitiesResponseBuilder(); - set fiscalEntities(CustomerFiscalEntitiesResponseBuilder? fiscalEntities) => - _$this._fiscalEntities = fiscalEntities; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - CustomerPaymentMethodsResponseBuilder? _paymentSources; - CustomerPaymentMethodsResponseBuilder get paymentSources => - _$this._paymentSources ??= new CustomerPaymentMethodsResponseBuilder(); - set paymentSources(CustomerPaymentMethodsResponseBuilder? paymentSources) => - _$this._paymentSources = paymentSources; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - CustomerResponseShippingContactsBuilder? _shippingContacts; - CustomerResponseShippingContactsBuilder get shippingContacts => - _$this._shippingContacts ??= - new CustomerResponseShippingContactsBuilder(); - set shippingContacts( - CustomerResponseShippingContactsBuilder? shippingContacts) => - _$this._shippingContacts = shippingContacts; - - SubscriptionResponseBuilder? _subscription; - SubscriptionResponseBuilder get subscription => - _$this._subscription ??= new SubscriptionResponseBuilder(); - set subscription(SubscriptionResponseBuilder? subscription) => - _$this._subscription = subscription; - - CustomerResponseBuilder() { - CustomerResponse._defaults(this); - } - - CustomerResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _corporate = $v.corporate; - _createdAt = $v.createdAt; - _customReference = $v.customReference; - _defaultFiscalEntityId = $v.defaultFiscalEntityId; - _defaultShippingContactId = $v.defaultShippingContactId; - _defaultPaymentSourceId = $v.defaultPaymentSourceId; - _email = $v.email; - _fiscalEntities = $v.fiscalEntities?.toBuilder(); - _id = $v.id; - _livemode = $v.livemode; - _name = $v.name; - _object = $v.object; - _paymentSources = $v.paymentSources?.toBuilder(); - _phone = $v.phone; - _shippingContacts = $v.shippingContacts?.toBuilder(); - _subscription = $v.subscription?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(CustomerResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerResponse; - } - - @override - void update(void Function(CustomerResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerResponse build() => _build(); - - _$CustomerResponse _build() { - _$CustomerResponse _$result; - try { - _$result = _$v ?? - new _$CustomerResponse._( - antifraudInfo: _antifraudInfo?.build(), - corporate: corporate, - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'CustomerResponse', 'createdAt'), - customReference: customReference, - defaultFiscalEntityId: defaultFiscalEntityId, - defaultShippingContactId: defaultShippingContactId, - defaultPaymentSourceId: defaultPaymentSourceId, - email: email, - fiscalEntities: _fiscalEntities?.build(), - id: BuiltValueNullFieldError.checkNotNull( - id, r'CustomerResponse', 'id'), - livemode: BuiltValueNullFieldError.checkNotNull( - livemode, r'CustomerResponse', 'livemode'), - name: name, - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomerResponse', 'object'), - paymentSources: _paymentSources?.build(), - phone: phone, - shippingContacts: _shippingContacts?.build(), - subscription: _subscription?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'fiscalEntities'; - _fiscalEntities?.build(); - - _$failedField = 'paymentSources'; - _paymentSources?.build(); - - _$failedField = 'shippingContacts'; - _shippingContacts?.build(); - _$failedField = 'subscription'; - _subscription?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_response_shipping_contacts.g.dart b/lib/src/model/customer_response_shipping_contacts.g.dart deleted file mode 100644 index f379d4f..0000000 --- a/lib/src/model/customer_response_shipping_contacts.g.dart +++ /dev/null @@ -1,143 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_response_shipping_contacts.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerResponseShippingContacts - extends CustomerResponseShippingContacts { - @override - final BuiltList? data; - @override - final bool hasMore; - @override - final String object; - - factory _$CustomerResponseShippingContacts( - [void Function(CustomerResponseShippingContactsBuilder)? updates]) => - (new CustomerResponseShippingContactsBuilder()..update(updates))._build(); - - _$CustomerResponseShippingContacts._( - {this.data, required this.hasMore, required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomerResponseShippingContacts', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomerResponseShippingContacts', 'object'); - } - - @override - CustomerResponseShippingContacts rebuild( - void Function(CustomerResponseShippingContactsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerResponseShippingContactsBuilder toBuilder() => - new CustomerResponseShippingContactsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerResponseShippingContacts && - data == other.data && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, data.hashCode), hasMore.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerResponseShippingContacts') - ..add('data', data) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class CustomerResponseShippingContactsBuilder - implements - Builder, - CustomerResponseShippingContactsAllOfBuilder, - PaginationBuilder { - _$CustomerResponseShippingContacts? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - CustomerResponseShippingContactsBuilder() { - CustomerResponseShippingContacts._defaults(this); - } - - CustomerResponseShippingContactsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CustomerResponseShippingContacts other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerResponseShippingContacts; - } - - @override - void update(void Function(CustomerResponseShippingContactsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerResponseShippingContacts build() => _build(); - - _$CustomerResponseShippingContacts _build() { - _$CustomerResponseShippingContacts _$result; - try { - _$result = _$v ?? - new _$CustomerResponseShippingContacts._( - data: _data?.build(), - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomerResponseShippingContacts', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomerResponseShippingContacts', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerResponseShippingContacts', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_response_shipping_contacts_all_of.g.dart b/lib/src/model/customer_response_shipping_contacts_all_of.g.dart deleted file mode 100644 index 9fe4b7b..0000000 --- a/lib/src/model/customer_response_shipping_contacts_all_of.g.dart +++ /dev/null @@ -1,125 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_response_shipping_contacts_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerResponseShippingContactsAllOfBuilder { - void replace(CustomerResponseShippingContactsAllOf other); - void update( - void Function(CustomerResponseShippingContactsAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$CustomerResponseShippingContactsAllOf - extends $CustomerResponseShippingContactsAllOf { - @override - final BuiltList? data; - - factory _$$CustomerResponseShippingContactsAllOf( - [void Function($CustomerResponseShippingContactsAllOfBuilder)? - updates]) => - (new $CustomerResponseShippingContactsAllOfBuilder()..update(updates)) - ._build(); - - _$$CustomerResponseShippingContactsAllOf._({this.data}) : super._(); - - @override - $CustomerResponseShippingContactsAllOf rebuild( - void Function($CustomerResponseShippingContactsAllOfBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerResponseShippingContactsAllOfBuilder toBuilder() => - new $CustomerResponseShippingContactsAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerResponseShippingContactsAllOf && - data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'$CustomerResponseShippingContactsAllOf') - ..add('data', data)) - .toString(); - } -} - -class $CustomerResponseShippingContactsAllOfBuilder - implements - Builder<$CustomerResponseShippingContactsAllOf, - $CustomerResponseShippingContactsAllOfBuilder>, - CustomerResponseShippingContactsAllOfBuilder { - _$$CustomerResponseShippingContactsAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $CustomerResponseShippingContactsAllOfBuilder() { - $CustomerResponseShippingContactsAllOf._defaults(this); - } - - $CustomerResponseShippingContactsAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerResponseShippingContactsAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerResponseShippingContactsAllOf; - } - - @override - void update( - void Function($CustomerResponseShippingContactsAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerResponseShippingContactsAllOf build() => _build(); - - _$$CustomerResponseShippingContactsAllOf _build() { - _$$CustomerResponseShippingContactsAllOf _$result; - try { - _$result = _$v ?? - new _$$CustomerResponseShippingContactsAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomerResponseShippingContactsAllOf', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_shipping_contacts.dart b/lib/src/model/customer_shipping_contacts.dart index 823a7b3..b0923b9 100644 --- a/lib/src/model/customer_shipping_contacts.dart +++ b/lib/src/model/customer_shipping_contacts.dart @@ -3,7 +3,9 @@ // // ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/customer_shipping_contacts_address.dart'; +import 'package:built_value/json_object.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -19,6 +21,7 @@ part 'customer_shipping_contacts.g.dart'; /// * [parentId] /// * [default_] /// * [deleted] +/// * [metadata] - Metadata associated with the shipping contact @BuiltValue(instantiable: false) abstract class CustomerShippingContacts { /// Phone contact @@ -45,6 +48,10 @@ abstract class CustomerShippingContacts { @BuiltValueField(wireName: r'deleted') bool? get deleted; + /// Metadata associated with the shipping contact + @BuiltValueField(wireName: r'metadata') + BuiltMap? get metadata; + @BuiltValueSerializer(custom: true) static Serializer get serializer => _$CustomerShippingContactsSerializer(); } @@ -108,6 +115,13 @@ class _$CustomerShippingContactsSerializer implements PrimitiveSerializer; + result.metadata.replace(valueDes); + break; default: unhandled.add(key); unhandled.add(value); diff --git a/lib/src/model/customer_shipping_contacts.g.dart b/lib/src/model/customer_shipping_contacts.g.dart deleted file mode 100644 index 6c14549..0000000 --- a/lib/src/model/customer_shipping_contacts.g.dart +++ /dev/null @@ -1,215 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_shipping_contacts.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerShippingContactsBuilder { - void replace(CustomerShippingContacts other); - void update(void Function(CustomerShippingContactsBuilder) updates); - String? get phone; - set phone(String? phone); - - String? get receiver; - set receiver(String? receiver); - - String? get betweenStreets; - set betweenStreets(String? betweenStreets); - - CustomerShippingContactsAddressBuilder get address; - set address(CustomerShippingContactsAddressBuilder? address); - - String? get parentId; - set parentId(String? parentId); - - bool? get default_; - set default_(bool? default_); - - bool? get deleted; - set deleted(bool? deleted); -} - -class _$$CustomerShippingContacts extends $CustomerShippingContacts { - @override - final String? phone; - @override - final String? receiver; - @override - final String? betweenStreets; - @override - final CustomerShippingContactsAddress address; - @override - final String? parentId; - @override - final bool? default_; - @override - final bool? deleted; - - factory _$$CustomerShippingContacts( - [void Function($CustomerShippingContactsBuilder)? updates]) => - (new $CustomerShippingContactsBuilder()..update(updates))._build(); - - _$$CustomerShippingContacts._( - {this.phone, - this.receiver, - this.betweenStreets, - required this.address, - this.parentId, - this.default_, - this.deleted}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - address, r'$CustomerShippingContacts', 'address'); - } - - @override - $CustomerShippingContacts rebuild( - void Function($CustomerShippingContactsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerShippingContactsBuilder toBuilder() => - new $CustomerShippingContactsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerShippingContacts && - phone == other.phone && - receiver == other.receiver && - betweenStreets == other.betweenStreets && - address == other.address && - parentId == other.parentId && - default_ == other.default_ && - deleted == other.deleted; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, phone.hashCode), receiver.hashCode), - betweenStreets.hashCode), - address.hashCode), - parentId.hashCode), - default_.hashCode), - deleted.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerShippingContacts') - ..add('phone', phone) - ..add('receiver', receiver) - ..add('betweenStreets', betweenStreets) - ..add('address', address) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('deleted', deleted)) - .toString(); - } -} - -class $CustomerShippingContactsBuilder - implements - Builder<$CustomerShippingContacts, $CustomerShippingContactsBuilder>, - CustomerShippingContactsBuilder { - _$$CustomerShippingContacts? _$v; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - String? _receiver; - String? get receiver => _$this._receiver; - set receiver(covariant String? receiver) => _$this._receiver = receiver; - - String? _betweenStreets; - String? get betweenStreets => _$this._betweenStreets; - set betweenStreets(covariant String? betweenStreets) => - _$this._betweenStreets = betweenStreets; - - CustomerShippingContactsAddressBuilder? _address; - CustomerShippingContactsAddressBuilder get address => - _$this._address ??= new CustomerShippingContactsAddressBuilder(); - set address(covariant CustomerShippingContactsAddressBuilder? address) => - _$this._address = address; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(covariant bool? deleted) => _$this._deleted = deleted; - - $CustomerShippingContactsBuilder() { - $CustomerShippingContacts._defaults(this); - } - - $CustomerShippingContactsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _phone = $v.phone; - _receiver = $v.receiver; - _betweenStreets = $v.betweenStreets; - _address = $v.address.toBuilder(); - _parentId = $v.parentId; - _default_ = $v.default_; - _deleted = $v.deleted; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerShippingContacts other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerShippingContacts; - } - - @override - void update(void Function($CustomerShippingContactsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerShippingContacts build() => _build(); - - _$$CustomerShippingContacts _build() { - _$$CustomerShippingContacts _$result; - try { - _$result = _$v ?? - new _$$CustomerShippingContacts._( - phone: phone, - receiver: receiver, - betweenStreets: betweenStreets, - address: address.build(), - parentId: parentId, - default_: default_, - deleted: deleted); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - address.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomerShippingContacts', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_shipping_contacts_address.g.dart b/lib/src/model/customer_shipping_contacts_address.g.dart deleted file mode 100644 index cffd543..0000000 --- a/lib/src/model/customer_shipping_contacts_address.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_shipping_contacts_address.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerShippingContactsAddress - extends CustomerShippingContactsAddress { - @override - final String? street1; - @override - final String? street2; - @override - final String? postalCode; - @override - final String? city; - @override - final String? state; - @override - final String? country; - @override - final bool? residential; - - factory _$CustomerShippingContactsAddress( - [void Function(CustomerShippingContactsAddressBuilder)? updates]) => - (new CustomerShippingContactsAddressBuilder()..update(updates))._build(); - - _$CustomerShippingContactsAddress._( - {this.street1, - this.street2, - this.postalCode, - this.city, - this.state, - this.country, - this.residential}) - : super._(); - - @override - CustomerShippingContactsAddress rebuild( - void Function(CustomerShippingContactsAddressBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerShippingContactsAddressBuilder toBuilder() => - new CustomerShippingContactsAddressBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerShippingContactsAddress && - street1 == other.street1 && - street2 == other.street2 && - postalCode == other.postalCode && - city == other.city && - state == other.state && - country == other.country && - residential == other.residential; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, street1.hashCode), street2.hashCode), - postalCode.hashCode), - city.hashCode), - state.hashCode), - country.hashCode), - residential.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerShippingContactsAddress') - ..add('street1', street1) - ..add('street2', street2) - ..add('postalCode', postalCode) - ..add('city', city) - ..add('state', state) - ..add('country', country) - ..add('residential', residential)) - .toString(); - } -} - -class CustomerShippingContactsAddressBuilder - implements - Builder { - _$CustomerShippingContactsAddress? _$v; - - String? _street1; - String? get street1 => _$this._street1; - set street1(String? street1) => _$this._street1 = street1; - - String? _street2; - String? get street2 => _$this._street2; - set street2(String? street2) => _$this._street2 = street2; - - String? _postalCode; - String? get postalCode => _$this._postalCode; - set postalCode(String? postalCode) => _$this._postalCode = postalCode; - - String? _city; - String? get city => _$this._city; - set city(String? city) => _$this._city = city; - - String? _state; - String? get state => _$this._state; - set state(String? state) => _$this._state = state; - - String? _country; - String? get country => _$this._country; - set country(String? country) => _$this._country = country; - - bool? _residential; - bool? get residential => _$this._residential; - set residential(bool? residential) => _$this._residential = residential; - - CustomerShippingContactsAddressBuilder() { - CustomerShippingContactsAddress._defaults(this); - } - - CustomerShippingContactsAddressBuilder get _$this { - final $v = _$v; - if ($v != null) { - _street1 = $v.street1; - _street2 = $v.street2; - _postalCode = $v.postalCode; - _city = $v.city; - _state = $v.state; - _country = $v.country; - _residential = $v.residential; - _$v = null; - } - return this; - } - - @override - void replace(CustomerShippingContactsAddress other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerShippingContactsAddress; - } - - @override - void update(void Function(CustomerShippingContactsAddressBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerShippingContactsAddress build() => _build(); - - _$CustomerShippingContactsAddress _build() { - final _$result = _$v ?? - new _$CustomerShippingContactsAddress._( - street1: street1, - street2: street2, - postalCode: postalCode, - city: city, - state: state, - country: country, - residential: residential); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_shipping_contacts_data_response.dart b/lib/src/model/customer_shipping_contacts_data_response.dart index 041abd7..3705dfe 100644 --- a/lib/src/model/customer_shipping_contacts_data_response.dart +++ b/lib/src/model/customer_shipping_contacts_data_response.dart @@ -3,9 +3,11 @@ // // ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/customer_shipping_contacts_data_response_all_of.dart'; import 'package:conekta/src/model/customer_shipping_contacts.dart'; import 'package:conekta/src/model/customer_shipping_contacts_address.dart'; +import 'package:built_value/json_object.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -21,6 +23,7 @@ part 'customer_shipping_contacts_data_response.g.dart'; /// * [parentId] /// * [default_] /// * [deleted] +/// * [metadata] - Metadata associated with the shipping contact /// * [id] /// * [object] /// * [createdAt] @@ -54,6 +57,13 @@ class _$CustomerShippingContactsDataResponseSerializer implements PrimitiveSeria object.createdAt, specifiedType: const FullType(int), ); + if (object.metadata != null) { + yield r'metadata'; + yield serializers.serialize( + object.metadata, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } yield r'address'; yield serializers.serialize( object.address, @@ -141,6 +151,13 @@ class _$CustomerShippingContactsDataResponseSerializer implements PrimitiveSeria ) as int; result.createdAt = valueDes; break; + case r'metadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.metadata.replace(valueDes); + break; case r'address': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/customer_shipping_contacts_data_response.g.dart b/lib/src/model/customer_shipping_contacts_data_response.g.dart deleted file mode 100644 index edf8a1a..0000000 --- a/lib/src/model/customer_shipping_contacts_data_response.g.dart +++ /dev/null @@ -1,249 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_shipping_contacts_data_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerShippingContactsDataResponse - extends CustomerShippingContactsDataResponse { - @override - final String? phone; - @override - final String? receiver; - @override - final String? betweenStreets; - @override - final CustomerShippingContactsAddress address; - @override - final String? parentId; - @override - final bool? default_; - @override - final bool? deleted; - @override - final String id; - @override - final String object; - @override - final int createdAt; - - factory _$CustomerShippingContactsDataResponse( - [void Function(CustomerShippingContactsDataResponseBuilder)? - updates]) => - (new CustomerShippingContactsDataResponseBuilder()..update(updates)) - ._build(); - - _$CustomerShippingContactsDataResponse._( - {this.phone, - this.receiver, - this.betweenStreets, - required this.address, - this.parentId, - this.default_, - this.deleted, - required this.id, - required this.object, - required this.createdAt}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - address, r'CustomerShippingContactsDataResponse', 'address'); - BuiltValueNullFieldError.checkNotNull( - id, r'CustomerShippingContactsDataResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomerShippingContactsDataResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'CustomerShippingContactsDataResponse', 'createdAt'); - } - - @override - CustomerShippingContactsDataResponse rebuild( - void Function(CustomerShippingContactsDataResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerShippingContactsDataResponseBuilder toBuilder() => - new CustomerShippingContactsDataResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerShippingContactsDataResponse && - phone == other.phone && - receiver == other.receiver && - betweenStreets == other.betweenStreets && - address == other.address && - parentId == other.parentId && - default_ == other.default_ && - deleted == other.deleted && - id == other.id && - object == other.object && - createdAt == other.createdAt; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, phone.hashCode), - receiver.hashCode), - betweenStreets.hashCode), - address.hashCode), - parentId.hashCode), - default_.hashCode), - deleted.hashCode), - id.hashCode), - object.hashCode), - createdAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerShippingContactsDataResponse') - ..add('phone', phone) - ..add('receiver', receiver) - ..add('betweenStreets', betweenStreets) - ..add('address', address) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('deleted', deleted) - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt)) - .toString(); - } -} - -class CustomerShippingContactsDataResponseBuilder - implements - Builder, - CustomerShippingContactsBuilder, - CustomerShippingContactsDataResponseAllOfBuilder { - _$CustomerShippingContactsDataResponse? _$v; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - String? _receiver; - String? get receiver => _$this._receiver; - set receiver(covariant String? receiver) => _$this._receiver = receiver; - - String? _betweenStreets; - String? get betweenStreets => _$this._betweenStreets; - set betweenStreets(covariant String? betweenStreets) => - _$this._betweenStreets = betweenStreets; - - CustomerShippingContactsAddressBuilder? _address; - CustomerShippingContactsAddressBuilder get address => - _$this._address ??= new CustomerShippingContactsAddressBuilder(); - set address(covariant CustomerShippingContactsAddressBuilder? address) => - _$this._address = address; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(covariant bool? deleted) => _$this._deleted = deleted; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - CustomerShippingContactsDataResponseBuilder() { - CustomerShippingContactsDataResponse._defaults(this); - } - - CustomerShippingContactsDataResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _phone = $v.phone; - _receiver = $v.receiver; - _betweenStreets = $v.betweenStreets; - _address = $v.address.toBuilder(); - _parentId = $v.parentId; - _default_ = $v.default_; - _deleted = $v.deleted; - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CustomerShippingContactsDataResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerShippingContactsDataResponse; - } - - @override - void update( - void Function(CustomerShippingContactsDataResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerShippingContactsDataResponse build() => _build(); - - _$CustomerShippingContactsDataResponse _build() { - _$CustomerShippingContactsDataResponse _$result; - try { - _$result = _$v ?? - new _$CustomerShippingContactsDataResponse._( - phone: phone, - receiver: receiver, - betweenStreets: betweenStreets, - address: address.build(), - parentId: parentId, - default_: default_, - deleted: deleted, - id: BuiltValueNullFieldError.checkNotNull( - id, r'CustomerShippingContactsDataResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomerShippingContactsDataResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'CustomerShippingContactsDataResponse', 'createdAt')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - address.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerShippingContactsDataResponse', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_shipping_contacts_data_response_all_of.g.dart b/lib/src/model/customer_shipping_contacts_data_response_all_of.g.dart deleted file mode 100644 index beb1623..0000000 --- a/lib/src/model/customer_shipping_contacts_data_response_all_of.g.dart +++ /dev/null @@ -1,149 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_shipping_contacts_data_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerShippingContactsDataResponseAllOfBuilder { - void replace(CustomerShippingContactsDataResponseAllOf other); - void update( - void Function(CustomerShippingContactsDataResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - int? get createdAt; - set createdAt(int? createdAt); -} - -class _$$CustomerShippingContactsDataResponseAllOf - extends $CustomerShippingContactsDataResponseAllOf { - @override - final String id; - @override - final String object; - @override - final int createdAt; - - factory _$$CustomerShippingContactsDataResponseAllOf( - [void Function($CustomerShippingContactsDataResponseAllOfBuilder)? - updates]) => - (new $CustomerShippingContactsDataResponseAllOfBuilder()..update(updates)) - ._build(); - - _$$CustomerShippingContactsDataResponseAllOf._( - {required this.id, required this.object, required this.createdAt}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'$CustomerShippingContactsDataResponseAllOf', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'$CustomerShippingContactsDataResponseAllOf', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'$CustomerShippingContactsDataResponseAllOf', 'createdAt'); - } - - @override - $CustomerShippingContactsDataResponseAllOf rebuild( - void Function($CustomerShippingContactsDataResponseAllOfBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerShippingContactsDataResponseAllOfBuilder toBuilder() => - new $CustomerShippingContactsDataResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerShippingContactsDataResponseAllOf && - id == other.id && - object == other.object && - createdAt == other.createdAt; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, id.hashCode), object.hashCode), createdAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'$CustomerShippingContactsDataResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt)) - .toString(); - } -} - -class $CustomerShippingContactsDataResponseAllOfBuilder - implements - Builder<$CustomerShippingContactsDataResponseAllOf, - $CustomerShippingContactsDataResponseAllOfBuilder>, - CustomerShippingContactsDataResponseAllOfBuilder { - _$$CustomerShippingContactsDataResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - $CustomerShippingContactsDataResponseAllOfBuilder() { - $CustomerShippingContactsDataResponseAllOf._defaults(this); - } - - $CustomerShippingContactsDataResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerShippingContactsDataResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerShippingContactsDataResponseAllOf; - } - - @override - void update( - void Function($CustomerShippingContactsDataResponseAllOfBuilder)? - updates) { - if (updates != null) updates(this); - } - - @override - $CustomerShippingContactsDataResponseAllOf build() => _build(); - - _$$CustomerShippingContactsDataResponseAllOf _build() { - final _$result = _$v ?? - new _$$CustomerShippingContactsDataResponseAllOf._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'$CustomerShippingContactsDataResponseAllOf', 'id'), - object: BuiltValueNullFieldError.checkNotNull(object, - r'$CustomerShippingContactsDataResponseAllOf', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'$CustomerShippingContactsDataResponseAllOf', 'createdAt')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_shipping_contacts_response.dart b/lib/src/model/customer_shipping_contacts_response.dart index c5475e1..881be9b 100644 --- a/lib/src/model/customer_shipping_contacts_response.dart +++ b/lib/src/model/customer_shipping_contacts_response.dart @@ -3,7 +3,9 @@ // // ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/customer_shipping_contacts_response_address.dart'; +import 'package:built_value/json_object.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -20,6 +22,7 @@ part 'customer_shipping_contacts_response.g.dart'; /// * [default_] /// * [id] /// * [createdAt] +/// * [metadata] - Metadata associated with the shipping contact /// * [object] /// * [deleted] @BuiltValue(instantiable: false) @@ -48,6 +51,10 @@ abstract class CustomerShippingContactsResponse { @BuiltValueField(wireName: r'created_at') int? get createdAt; + /// Metadata associated with the shipping contact + @BuiltValueField(wireName: r'metadata') + BuiltMap? get metadata; + @BuiltValueField(wireName: r'object') String? get object; @@ -126,6 +133,13 @@ class _$CustomerShippingContactsResponseSerializer implements PrimitiveSerialize specifiedType: const FullType(int), ); } + if (object.metadata != null) { + yield r'metadata'; + yield serializers.serialize( + object.metadata, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } if (object.object != null) { yield r'object'; yield serializers.serialize( @@ -260,6 +274,13 @@ class _$$CustomerShippingContactsResponseSerializer implements PrimitiveSerializ ) as int; result.createdAt = valueDes; break; + case r'metadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.metadata.replace(valueDes); + break; case r'object': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/customer_shipping_contacts_response.g.dart b/lib/src/model/customer_shipping_contacts_response.g.dart deleted file mode 100644 index 429a615..0000000 --- a/lib/src/model/customer_shipping_contacts_response.g.dart +++ /dev/null @@ -1,267 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_shipping_contacts_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomerShippingContactsResponseBuilder { - void replace(CustomerShippingContactsResponse other); - void update(void Function(CustomerShippingContactsResponseBuilder) updates); - String? get phone; - set phone(String? phone); - - String? get receiver; - set receiver(String? receiver); - - String? get betweenStreets; - set betweenStreets(String? betweenStreets); - - CustomerShippingContactsResponseAddressBuilder get address; - set address(CustomerShippingContactsResponseAddressBuilder? address); - - String? get parentId; - set parentId(String? parentId); - - bool? get default_; - set default_(bool? default_); - - String? get id; - set id(String? id); - - int? get createdAt; - set createdAt(int? createdAt); - - String? get object; - set object(String? object); - - bool? get deleted; - set deleted(bool? deleted); -} - -class _$$CustomerShippingContactsResponse - extends $CustomerShippingContactsResponse { - @override - final String? phone; - @override - final String? receiver; - @override - final String? betweenStreets; - @override - final CustomerShippingContactsResponseAddress? address; - @override - final String? parentId; - @override - final bool? default_; - @override - final String? id; - @override - final int? createdAt; - @override - final String? object; - @override - final bool? deleted; - - factory _$$CustomerShippingContactsResponse( - [void Function($CustomerShippingContactsResponseBuilder)? updates]) => - (new $CustomerShippingContactsResponseBuilder()..update(updates)) - ._build(); - - _$$CustomerShippingContactsResponse._( - {this.phone, - this.receiver, - this.betweenStreets, - this.address, - this.parentId, - this.default_, - this.id, - this.createdAt, - this.object, - this.deleted}) - : super._(); - - @override - $CustomerShippingContactsResponse rebuild( - void Function($CustomerShippingContactsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomerShippingContactsResponseBuilder toBuilder() => - new $CustomerShippingContactsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomerShippingContactsResponse && - phone == other.phone && - receiver == other.receiver && - betweenStreets == other.betweenStreets && - address == other.address && - parentId == other.parentId && - default_ == other.default_ && - id == other.id && - createdAt == other.createdAt && - object == other.object && - deleted == other.deleted; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, phone.hashCode), - receiver.hashCode), - betweenStreets.hashCode), - address.hashCode), - parentId.hashCode), - default_.hashCode), - id.hashCode), - createdAt.hashCode), - object.hashCode), - deleted.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomerShippingContactsResponse') - ..add('phone', phone) - ..add('receiver', receiver) - ..add('betweenStreets', betweenStreets) - ..add('address', address) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('id', id) - ..add('createdAt', createdAt) - ..add('object', object) - ..add('deleted', deleted)) - .toString(); - } -} - -class $CustomerShippingContactsResponseBuilder - implements - Builder<$CustomerShippingContactsResponse, - $CustomerShippingContactsResponseBuilder>, - CustomerShippingContactsResponseBuilder { - _$$CustomerShippingContactsResponse? _$v; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - String? _receiver; - String? get receiver => _$this._receiver; - set receiver(covariant String? receiver) => _$this._receiver = receiver; - - String? _betweenStreets; - String? get betweenStreets => _$this._betweenStreets; - set betweenStreets(covariant String? betweenStreets) => - _$this._betweenStreets = betweenStreets; - - CustomerShippingContactsResponseAddressBuilder? _address; - CustomerShippingContactsResponseAddressBuilder get address => - _$this._address ??= new CustomerShippingContactsResponseAddressBuilder(); - set address( - covariant CustomerShippingContactsResponseAddressBuilder? address) => - _$this._address = address; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(covariant bool? deleted) => _$this._deleted = deleted; - - $CustomerShippingContactsResponseBuilder() { - $CustomerShippingContactsResponse._defaults(this); - } - - $CustomerShippingContactsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _phone = $v.phone; - _receiver = $v.receiver; - _betweenStreets = $v.betweenStreets; - _address = $v.address?.toBuilder(); - _parentId = $v.parentId; - _default_ = $v.default_; - _id = $v.id; - _createdAt = $v.createdAt; - _object = $v.object; - _deleted = $v.deleted; - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomerShippingContactsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomerShippingContactsResponse; - } - - @override - void update( - void Function($CustomerShippingContactsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomerShippingContactsResponse build() => _build(); - - _$$CustomerShippingContactsResponse _build() { - _$$CustomerShippingContactsResponse _$result; - try { - _$result = _$v ?? - new _$$CustomerShippingContactsResponse._( - phone: phone, - receiver: receiver, - betweenStreets: betweenStreets, - address: _address?.build(), - parentId: parentId, - default_: default_, - id: id, - createdAt: createdAt, - object: object, - deleted: deleted); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - _address?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomerShippingContactsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_shipping_contacts_response_address.dart b/lib/src/model/customer_shipping_contacts_response_address.dart index 2c58bdc..f4ccde4 100644 --- a/lib/src/model/customer_shipping_contacts_response_address.dart +++ b/lib/src/model/customer_shipping_contacts_response_address.dart @@ -121,7 +121,7 @@ class _$CustomerShippingContactsResponseAddressSerializer implements PrimitiveSe yield r'residential'; yield serializers.serialize( object.residential, - specifiedType: const FullType(bool), + specifiedType: const FullType.nullable(bool), ); } } @@ -199,8 +199,9 @@ class _$CustomerShippingContactsResponseAddressSerializer implements PrimitiveSe case r'residential': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(bool), - ) as bool; + specifiedType: const FullType.nullable(bool), + ) as bool?; + if (valueDes == null) continue; result.residential = valueDes; break; default: diff --git a/lib/src/model/customer_shipping_contacts_response_address.g.dart b/lib/src/model/customer_shipping_contacts_response_address.g.dart deleted file mode 100644 index e546a15..0000000 --- a/lib/src/model/customer_shipping_contacts_response_address.g.dart +++ /dev/null @@ -1,190 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_shipping_contacts_response_address.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerShippingContactsResponseAddress - extends CustomerShippingContactsResponseAddress { - @override - final String? object; - @override - final String? street1; - @override - final String? street2; - @override - final String? postalCode; - @override - final String? city; - @override - final String? state; - @override - final String? country; - @override - final bool? residential; - - factory _$CustomerShippingContactsResponseAddress( - [void Function(CustomerShippingContactsResponseAddressBuilder)? - updates]) => - (new CustomerShippingContactsResponseAddressBuilder()..update(updates)) - ._build(); - - _$CustomerShippingContactsResponseAddress._( - {this.object, - this.street1, - this.street2, - this.postalCode, - this.city, - this.state, - this.country, - this.residential}) - : super._(); - - @override - CustomerShippingContactsResponseAddress rebuild( - void Function(CustomerShippingContactsResponseAddressBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerShippingContactsResponseAddressBuilder toBuilder() => - new CustomerShippingContactsResponseAddressBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerShippingContactsResponseAddress && - object == other.object && - street1 == other.street1 && - street2 == other.street2 && - postalCode == other.postalCode && - city == other.city && - state == other.state && - country == other.country && - residential == other.residential; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, object.hashCode), street1.hashCode), - street2.hashCode), - postalCode.hashCode), - city.hashCode), - state.hashCode), - country.hashCode), - residential.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'CustomerShippingContactsResponseAddress') - ..add('object', object) - ..add('street1', street1) - ..add('street2', street2) - ..add('postalCode', postalCode) - ..add('city', city) - ..add('state', state) - ..add('country', country) - ..add('residential', residential)) - .toString(); - } -} - -class CustomerShippingContactsResponseAddressBuilder - implements - Builder { - _$CustomerShippingContactsResponseAddress? _$v; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _street1; - String? get street1 => _$this._street1; - set street1(String? street1) => _$this._street1 = street1; - - String? _street2; - String? get street2 => _$this._street2; - set street2(String? street2) => _$this._street2 = street2; - - String? _postalCode; - String? get postalCode => _$this._postalCode; - set postalCode(String? postalCode) => _$this._postalCode = postalCode; - - String? _city; - String? get city => _$this._city; - set city(String? city) => _$this._city = city; - - String? _state; - String? get state => _$this._state; - set state(String? state) => _$this._state = state; - - String? _country; - String? get country => _$this._country; - set country(String? country) => _$this._country = country; - - bool? _residential; - bool? get residential => _$this._residential; - set residential(bool? residential) => _$this._residential = residential; - - CustomerShippingContactsResponseAddressBuilder() { - CustomerShippingContactsResponseAddress._defaults(this); - } - - CustomerShippingContactsResponseAddressBuilder get _$this { - final $v = _$v; - if ($v != null) { - _object = $v.object; - _street1 = $v.street1; - _street2 = $v.street2; - _postalCode = $v.postalCode; - _city = $v.city; - _state = $v.state; - _country = $v.country; - _residential = $v.residential; - _$v = null; - } - return this; - } - - @override - void replace(CustomerShippingContactsResponseAddress other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerShippingContactsResponseAddress; - } - - @override - void update( - void Function(CustomerShippingContactsResponseAddressBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerShippingContactsResponseAddress build() => _build(); - - _$CustomerShippingContactsResponseAddress _build() { - final _$result = _$v ?? - new _$CustomerShippingContactsResponseAddress._( - object: object, - street1: street1, - street2: street2, - postalCode: postalCode, - city: city, - state: state, - country: country, - residential: residential); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_update_fiscal_entities_request.g.dart b/lib/src/model/customer_update_fiscal_entities_request.g.dart deleted file mode 100644 index 2ee0cb9..0000000 --- a/lib/src/model/customer_update_fiscal_entities_request.g.dart +++ /dev/null @@ -1,184 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_update_fiscal_entities_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerUpdateFiscalEntitiesRequest - extends CustomerUpdateFiscalEntitiesRequest { - @override - final CustomerFiscalEntitiesRequestAddress? address; - @override - final String? taxId; - @override - final String? email; - @override - final String? phone; - @override - final BuiltMap? metadata; - @override - final String? companyName; - - factory _$CustomerUpdateFiscalEntitiesRequest( - [void Function(CustomerUpdateFiscalEntitiesRequestBuilder)? - updates]) => - (new CustomerUpdateFiscalEntitiesRequestBuilder()..update(updates)) - ._build(); - - _$CustomerUpdateFiscalEntitiesRequest._( - {this.address, - this.taxId, - this.email, - this.phone, - this.metadata, - this.companyName}) - : super._(); - - @override - CustomerUpdateFiscalEntitiesRequest rebuild( - void Function(CustomerUpdateFiscalEntitiesRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerUpdateFiscalEntitiesRequestBuilder toBuilder() => - new CustomerUpdateFiscalEntitiesRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerUpdateFiscalEntitiesRequest && - address == other.address && - taxId == other.taxId && - email == other.email && - phone == other.phone && - metadata == other.metadata && - companyName == other.companyName; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, address.hashCode), taxId.hashCode), - email.hashCode), - phone.hashCode), - metadata.hashCode), - companyName.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerUpdateFiscalEntitiesRequest') - ..add('address', address) - ..add('taxId', taxId) - ..add('email', email) - ..add('phone', phone) - ..add('metadata', metadata) - ..add('companyName', companyName)) - .toString(); - } -} - -class CustomerUpdateFiscalEntitiesRequestBuilder - implements - Builder { - _$CustomerUpdateFiscalEntitiesRequest? _$v; - - CustomerFiscalEntitiesRequestAddressBuilder? _address; - CustomerFiscalEntitiesRequestAddressBuilder get address => - _$this._address ??= new CustomerFiscalEntitiesRequestAddressBuilder(); - set address(CustomerFiscalEntitiesRequestAddressBuilder? address) => - _$this._address = address; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(String? taxId) => _$this._taxId = taxId; - - String? _email; - String? get email => _$this._email; - set email(String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _companyName; - String? get companyName => _$this._companyName; - set companyName(String? companyName) => _$this._companyName = companyName; - - CustomerUpdateFiscalEntitiesRequestBuilder() { - CustomerUpdateFiscalEntitiesRequest._defaults(this); - } - - CustomerUpdateFiscalEntitiesRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _address = $v.address?.toBuilder(); - _taxId = $v.taxId; - _email = $v.email; - _phone = $v.phone; - _metadata = $v.metadata?.toBuilder(); - _companyName = $v.companyName; - _$v = null; - } - return this; - } - - @override - void replace(CustomerUpdateFiscalEntitiesRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerUpdateFiscalEntitiesRequest; - } - - @override - void update( - void Function(CustomerUpdateFiscalEntitiesRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerUpdateFiscalEntitiesRequest build() => _build(); - - _$CustomerUpdateFiscalEntitiesRequest _build() { - _$CustomerUpdateFiscalEntitiesRequest _$result; - try { - _$result = _$v ?? - new _$CustomerUpdateFiscalEntitiesRequest._( - address: _address?.build(), - taxId: taxId, - email: email, - phone: phone, - metadata: _metadata?.build(), - companyName: companyName); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - _address?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerUpdateFiscalEntitiesRequest', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_update_shipping_contacts.g.dart b/lib/src/model/customer_update_shipping_contacts.g.dart deleted file mode 100644 index 2e56f92..0000000 --- a/lib/src/model/customer_update_shipping_contacts.g.dart +++ /dev/null @@ -1,187 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customer_update_shipping_contacts.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomerUpdateShippingContacts extends CustomerUpdateShippingContacts { - @override - final String? phone; - @override - final String? receiver; - @override - final String? betweenStreets; - @override - final CustomerShippingContactsAddress? address; - @override - final String? parentId; - @override - final bool? default_; - @override - final bool? deleted; - - factory _$CustomerUpdateShippingContacts( - [void Function(CustomerUpdateShippingContactsBuilder)? updates]) => - (new CustomerUpdateShippingContactsBuilder()..update(updates))._build(); - - _$CustomerUpdateShippingContacts._( - {this.phone, - this.receiver, - this.betweenStreets, - this.address, - this.parentId, - this.default_, - this.deleted}) - : super._(); - - @override - CustomerUpdateShippingContacts rebuild( - void Function(CustomerUpdateShippingContactsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomerUpdateShippingContactsBuilder toBuilder() => - new CustomerUpdateShippingContactsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomerUpdateShippingContacts && - phone == other.phone && - receiver == other.receiver && - betweenStreets == other.betweenStreets && - address == other.address && - parentId == other.parentId && - default_ == other.default_ && - deleted == other.deleted; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, phone.hashCode), receiver.hashCode), - betweenStreets.hashCode), - address.hashCode), - parentId.hashCode), - default_.hashCode), - deleted.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomerUpdateShippingContacts') - ..add('phone', phone) - ..add('receiver', receiver) - ..add('betweenStreets', betweenStreets) - ..add('address', address) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('deleted', deleted)) - .toString(); - } -} - -class CustomerUpdateShippingContactsBuilder - implements - Builder { - _$CustomerUpdateShippingContacts? _$v; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - String? _receiver; - String? get receiver => _$this._receiver; - set receiver(String? receiver) => _$this._receiver = receiver; - - String? _betweenStreets; - String? get betweenStreets => _$this._betweenStreets; - set betweenStreets(String? betweenStreets) => - _$this._betweenStreets = betweenStreets; - - CustomerShippingContactsAddressBuilder? _address; - CustomerShippingContactsAddressBuilder get address => - _$this._address ??= new CustomerShippingContactsAddressBuilder(); - set address(CustomerShippingContactsAddressBuilder? address) => - _$this._address = address; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(bool? default_) => _$this._default_ = default_; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(bool? deleted) => _$this._deleted = deleted; - - CustomerUpdateShippingContactsBuilder() { - CustomerUpdateShippingContacts._defaults(this); - } - - CustomerUpdateShippingContactsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _phone = $v.phone; - _receiver = $v.receiver; - _betweenStreets = $v.betweenStreets; - _address = $v.address?.toBuilder(); - _parentId = $v.parentId; - _default_ = $v.default_; - _deleted = $v.deleted; - _$v = null; - } - return this; - } - - @override - void replace(CustomerUpdateShippingContacts other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomerUpdateShippingContacts; - } - - @override - void update(void Function(CustomerUpdateShippingContactsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomerUpdateShippingContacts build() => _build(); - - _$CustomerUpdateShippingContacts _build() { - _$CustomerUpdateShippingContacts _$result; - try { - _$result = _$v ?? - new _$CustomerUpdateShippingContacts._( - phone: phone, - receiver: receiver, - betweenStreets: betweenStreets, - address: _address?.build(), - parentId: parentId, - default_: default_, - deleted: deleted); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - _address?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomerUpdateShippingContacts', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customers_response.g.dart b/lib/src/model/customers_response.g.dart deleted file mode 100644 index cc906f8..0000000 --- a/lib/src/model/customers_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customers_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CustomersResponse extends CustomersResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$CustomersResponse( - [void Function(CustomersResponseBuilder)? updates]) => - (new CustomersResponseBuilder()..update(updates))._build(); - - _$CustomersResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomersResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'CustomersResponse', 'object'); - } - - @override - CustomersResponse rebuild(void Function(CustomersResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CustomersResponseBuilder toBuilder() => - new CustomersResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CustomersResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CustomersResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class CustomersResponseBuilder - implements - Builder, - CustomersResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$CustomersResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - CustomersResponseBuilder() { - CustomersResponse._defaults(this); - } - - CustomersResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant CustomersResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CustomersResponse; - } - - @override - void update(void Function(CustomersResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CustomersResponse build() => _build(); - - _$CustomersResponse _build() { - _$CustomersResponse _$result; - try { - _$result = _$v ?? - new _$CustomersResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'CustomersResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'CustomersResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'CustomersResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customers_response_all_of.g.dart b/lib/src/model/customers_response_all_of.g.dart deleted file mode 100644 index 4e79fc9..0000000 --- a/lib/src/model/customers_response_all_of.g.dart +++ /dev/null @@ -1,113 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'customers_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class CustomersResponseAllOfBuilder { - void replace(CustomersResponseAllOf other); - void update(void Function(CustomersResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$CustomersResponseAllOf extends $CustomersResponseAllOf { - @override - final BuiltList? data; - - factory _$$CustomersResponseAllOf( - [void Function($CustomersResponseAllOfBuilder)? updates]) => - (new $CustomersResponseAllOfBuilder()..update(updates))._build(); - - _$$CustomersResponseAllOf._({this.data}) : super._(); - - @override - $CustomersResponseAllOf rebuild( - void Function($CustomersResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $CustomersResponseAllOfBuilder toBuilder() => - new $CustomersResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $CustomersResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$CustomersResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $CustomersResponseAllOfBuilder - implements - Builder<$CustomersResponseAllOf, $CustomersResponseAllOfBuilder>, - CustomersResponseAllOfBuilder { - _$$CustomersResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $CustomersResponseAllOfBuilder() { - $CustomersResponseAllOf._defaults(this); - } - - $CustomersResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $CustomersResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$CustomersResponseAllOf; - } - - @override - void update(void Function($CustomersResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $CustomersResponseAllOf build() => _build(); - - _$$CustomersResponseAllOf _build() { - _$$CustomersResponseAllOf _$result; - try { - _$result = _$v ?? new _$$CustomersResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$CustomersResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/delete_api_keys_response.dart b/lib/src/model/delete_api_keys_response.dart index 1386c1f..1050b9e 100644 --- a/lib/src/model/delete_api_keys_response.dart +++ b/lib/src/model/delete_api_keys_response.dart @@ -3,8 +3,8 @@ // // ignore_for_file: unused_element -import 'package:conekta/src/model/api_key_response.dart'; import 'package:conekta/src/model/delete_api_keys_response_all_of.dart'; +import 'package:conekta/src/model/api_key_response_on_delete.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -14,16 +14,16 @@ part 'delete_api_keys_response.g.dart'; /// /// Properties: /// * [active] - Indicates if the api key is active -/// * [createdAt] - Unix timestamp in seconds with the creation date of the api key -/// * [description] - Detail of the use that will be given to the api key -/// * [id] - Unique identifier of the api key -/// * [livemode] - Indicates if the api key is in live mode -/// * [object] - Object name, value is api_key +/// * [createdAt] - Unix timestamp in seconds of when the api key was created +/// * [description] - A name or brief explanation of what this api key is used for +/// * [livemode] - Indicates if the api key is in production /// * [prefix] - The first few characters of the authentication_token -/// * [role] - Indicates the user account private=owner or public=public +/// * [id] - Unique identifier of the api key +/// * [object] - Object name, value is 'api_key' /// * [deleted] +/// * [role] - Indicates if the api key is private or public @BuiltValue() -abstract class DeleteApiKeysResponse implements ApiKeyResponse, DeleteApiKeysResponseAllOf, Built { +abstract class DeleteApiKeysResponse implements ApiKeyResponseOnDelete, DeleteApiKeysResponseAllOf, Built { DeleteApiKeysResponse._(); factory DeleteApiKeysResponse([void updates(DeleteApiKeysResponseBuilder b)]) = _$DeleteApiKeysResponse; @@ -54,13 +54,6 @@ class _$DeleteApiKeysResponseSerializer implements PrimitiveSerializer - (new DeleteApiKeysResponseBuilder()..update(updates))._build(); - - _$DeleteApiKeysResponse._( - {this.active, - this.createdAt, - this.description, - this.id, - this.livemode, - this.object, - this.prefix, - this.role, - this.deleted}) - : super._(); - - @override - DeleteApiKeysResponse rebuild( - void Function(DeleteApiKeysResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - DeleteApiKeysResponseBuilder toBuilder() => - new DeleteApiKeysResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is DeleteApiKeysResponse && - active == other.active && - createdAt == other.createdAt && - description == other.description && - id == other.id && - livemode == other.livemode && - object == other.object && - prefix == other.prefix && - role == other.role && - deleted == other.deleted; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, active.hashCode), - createdAt.hashCode), - description.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - prefix.hashCode), - role.hashCode), - deleted.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'DeleteApiKeysResponse') - ..add('active', active) - ..add('createdAt', createdAt) - ..add('description', description) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('prefix', prefix) - ..add('role', role) - ..add('deleted', deleted)) - .toString(); - } -} - -class DeleteApiKeysResponseBuilder - implements - Builder, - ApiKeyResponseBuilder, - DeleteApiKeysResponseAllOfBuilder { - _$DeleteApiKeysResponse? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(covariant bool? active) => _$this._active = active; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(covariant bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _prefix; - String? get prefix => _$this._prefix; - set prefix(covariant String? prefix) => _$this._prefix = prefix; - - String? _role; - String? get role => _$this._role; - set role(covariant String? role) => _$this._role = role; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(covariant bool? deleted) => _$this._deleted = deleted; - - DeleteApiKeysResponseBuilder() { - DeleteApiKeysResponse._defaults(this); - } - - DeleteApiKeysResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _createdAt = $v.createdAt; - _description = $v.description; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _prefix = $v.prefix; - _role = $v.role; - _deleted = $v.deleted; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant DeleteApiKeysResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$DeleteApiKeysResponse; - } - - @override - void update(void Function(DeleteApiKeysResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - DeleteApiKeysResponse build() => _build(); - - _$DeleteApiKeysResponse _build() { - final _$result = _$v ?? - new _$DeleteApiKeysResponse._( - active: active, - createdAt: createdAt, - description: description, - id: id, - livemode: livemode, - object: object, - prefix: prefix, - role: role, - deleted: deleted); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/delete_api_keys_response_all_of.g.dart b/lib/src/model/delete_api_keys_response_all_of.g.dart deleted file mode 100644 index f026a44..0000000 --- a/lib/src/model/delete_api_keys_response_all_of.g.dart +++ /dev/null @@ -1,100 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'delete_api_keys_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class DeleteApiKeysResponseAllOfBuilder { - void replace(DeleteApiKeysResponseAllOf other); - void update(void Function(DeleteApiKeysResponseAllOfBuilder) updates); - bool? get deleted; - set deleted(bool? deleted); -} - -class _$$DeleteApiKeysResponseAllOf extends $DeleteApiKeysResponseAllOf { - @override - final bool? deleted; - - factory _$$DeleteApiKeysResponseAllOf( - [void Function($DeleteApiKeysResponseAllOfBuilder)? updates]) => - (new $DeleteApiKeysResponseAllOfBuilder()..update(updates))._build(); - - _$$DeleteApiKeysResponseAllOf._({this.deleted}) : super._(); - - @override - $DeleteApiKeysResponseAllOf rebuild( - void Function($DeleteApiKeysResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $DeleteApiKeysResponseAllOfBuilder toBuilder() => - new $DeleteApiKeysResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $DeleteApiKeysResponseAllOf && deleted == other.deleted; - } - - @override - int get hashCode { - return $jf($jc(0, deleted.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$DeleteApiKeysResponseAllOf') - ..add('deleted', deleted)) - .toString(); - } -} - -class $DeleteApiKeysResponseAllOfBuilder - implements - Builder<$DeleteApiKeysResponseAllOf, - $DeleteApiKeysResponseAllOfBuilder>, - DeleteApiKeysResponseAllOfBuilder { - _$$DeleteApiKeysResponseAllOf? _$v; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(covariant bool? deleted) => _$this._deleted = deleted; - - $DeleteApiKeysResponseAllOfBuilder() { - $DeleteApiKeysResponseAllOf._defaults(this); - } - - $DeleteApiKeysResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _deleted = $v.deleted; - _$v = null; - } - return this; - } - - @override - void replace(covariant $DeleteApiKeysResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$DeleteApiKeysResponseAllOf; - } - - @override - void update(void Function($DeleteApiKeysResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $DeleteApiKeysResponseAllOf build() => _build(); - - _$$DeleteApiKeysResponseAllOf _build() { - final _$result = - _$v ?? new _$$DeleteApiKeysResponseAllOf._(deleted: deleted); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/deleted_blacklist_rule_response.g.dart b/lib/src/model/deleted_blacklist_rule_response.g.dart deleted file mode 100644 index b914a48..0000000 --- a/lib/src/model/deleted_blacklist_rule_response.g.dart +++ /dev/null @@ -1,125 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'deleted_blacklist_rule_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$DeletedBlacklistRuleResponse extends DeletedBlacklistRuleResponse { - @override - final String? id; - @override - final String? field; - @override - final String? value; - @override - final String? description; - - factory _$DeletedBlacklistRuleResponse( - [void Function(DeletedBlacklistRuleResponseBuilder)? updates]) => - (new DeletedBlacklistRuleResponseBuilder()..update(updates))._build(); - - _$DeletedBlacklistRuleResponse._( - {this.id, this.field, this.value, this.description}) - : super._(); - - @override - DeletedBlacklistRuleResponse rebuild( - void Function(DeletedBlacklistRuleResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - DeletedBlacklistRuleResponseBuilder toBuilder() => - new DeletedBlacklistRuleResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is DeletedBlacklistRuleResponse && - id == other.id && - field == other.field && - value == other.value && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, id.hashCode), field.hashCode), value.hashCode), - description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'DeletedBlacklistRuleResponse') - ..add('id', id) - ..add('field', field) - ..add('value', value) - ..add('description', description)) - .toString(); - } -} - -class DeletedBlacklistRuleResponseBuilder - implements - Builder { - _$DeletedBlacklistRuleResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _field; - String? get field => _$this._field; - set field(String? field) => _$this._field = field; - - String? _value; - String? get value => _$this._value; - set value(String? value) => _$this._value = value; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - DeletedBlacklistRuleResponseBuilder() { - DeletedBlacklistRuleResponse._defaults(this); - } - - DeletedBlacklistRuleResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _field = $v.field; - _value = $v.value; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(DeletedBlacklistRuleResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$DeletedBlacklistRuleResponse; - } - - @override - void update(void Function(DeletedBlacklistRuleResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - DeletedBlacklistRuleResponse build() => _build(); - - _$DeletedBlacklistRuleResponse _build() { - final _$result = _$v ?? - new _$DeletedBlacklistRuleResponse._( - id: id, field: field, value: value, description: description); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/deleted_whitelist_rule_response.g.dart b/lib/src/model/deleted_whitelist_rule_response.g.dart deleted file mode 100644 index 7a393b4..0000000 --- a/lib/src/model/deleted_whitelist_rule_response.g.dart +++ /dev/null @@ -1,125 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'deleted_whitelist_rule_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$DeletedWhitelistRuleResponse extends DeletedWhitelistRuleResponse { - @override - final String? id; - @override - final String? field; - @override - final String? value; - @override - final String? description; - - factory _$DeletedWhitelistRuleResponse( - [void Function(DeletedWhitelistRuleResponseBuilder)? updates]) => - (new DeletedWhitelistRuleResponseBuilder()..update(updates))._build(); - - _$DeletedWhitelistRuleResponse._( - {this.id, this.field, this.value, this.description}) - : super._(); - - @override - DeletedWhitelistRuleResponse rebuild( - void Function(DeletedWhitelistRuleResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - DeletedWhitelistRuleResponseBuilder toBuilder() => - new DeletedWhitelistRuleResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is DeletedWhitelistRuleResponse && - id == other.id && - field == other.field && - value == other.value && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, id.hashCode), field.hashCode), value.hashCode), - description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'DeletedWhitelistRuleResponse') - ..add('id', id) - ..add('field', field) - ..add('value', value) - ..add('description', description)) - .toString(); - } -} - -class DeletedWhitelistRuleResponseBuilder - implements - Builder { - _$DeletedWhitelistRuleResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _field; - String? get field => _$this._field; - set field(String? field) => _$this._field = field; - - String? _value; - String? get value => _$this._value; - set value(String? value) => _$this._value = value; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - DeletedWhitelistRuleResponseBuilder() { - DeletedWhitelistRuleResponse._defaults(this); - } - - DeletedWhitelistRuleResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _field = $v.field; - _value = $v.value; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(DeletedWhitelistRuleResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$DeletedWhitelistRuleResponse; - } - - @override - void update(void Function(DeletedWhitelistRuleResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - DeletedWhitelistRuleResponse build() => _build(); - - _$DeletedWhitelistRuleResponse _build() { - final _$result = _$v ?? - new _$DeletedWhitelistRuleResponse._( - id: id, field: field, value: value, description: description); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/details.g.dart b/lib/src/model/details.g.dart deleted file mode 100644 index 4b414ac..0000000 --- a/lib/src/model/details.g.dart +++ /dev/null @@ -1,107 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'details.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class DetailsBuilder { - void replace(Details other); - void update(void Function(DetailsBuilder) updates); - ListBuilder get details; - set details(ListBuilder? details); -} - -class _$$Details extends $Details { - @override - final BuiltList? details; - - factory _$$Details([void Function($DetailsBuilder)? updates]) => - (new $DetailsBuilder()..update(updates))._build(); - - _$$Details._({this.details}) : super._(); - - @override - $Details rebuild(void Function($DetailsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $DetailsBuilder toBuilder() => new $DetailsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $Details && details == other.details; - } - - @override - int get hashCode { - return $jf($jc(0, details.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$Details')..add('details', details)) - .toString(); - } -} - -class $DetailsBuilder - implements Builder<$Details, $DetailsBuilder>, DetailsBuilder { - _$$Details? _$v; - - ListBuilder? _details; - ListBuilder get details => - _$this._details ??= new ListBuilder(); - set details(covariant ListBuilder? details) => - _$this._details = details; - - $DetailsBuilder() { - $Details._defaults(this); - } - - $DetailsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _details = $v.details?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $Details other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$Details; - } - - @override - void update(void Function($DetailsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $Details build() => _build(); - - _$$Details _build() { - _$$Details _$result; - try { - _$result = _$v ?? new _$$Details._(details: _details?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'details'; - _details?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$Details', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/details_error.g.dart b/lib/src/model/details_error.g.dart deleted file mode 100644 index 1a488f4..0000000 --- a/lib/src/model/details_error.g.dart +++ /dev/null @@ -1,122 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'details_error.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$DetailsError extends DetailsError { - @override - final String? code; - @override - final String? param; - @override - final String? message; - @override - final String? debugMessage; - - factory _$DetailsError([void Function(DetailsErrorBuilder)? updates]) => - (new DetailsErrorBuilder()..update(updates))._build(); - - _$DetailsError._({this.code, this.param, this.message, this.debugMessage}) - : super._(); - - @override - DetailsError rebuild(void Function(DetailsErrorBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - DetailsErrorBuilder toBuilder() => new DetailsErrorBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is DetailsError && - code == other.code && - param == other.param && - message == other.message && - debugMessage == other.debugMessage; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, code.hashCode), param.hashCode), message.hashCode), - debugMessage.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'DetailsError') - ..add('code', code) - ..add('param', param) - ..add('message', message) - ..add('debugMessage', debugMessage)) - .toString(); - } -} - -class DetailsErrorBuilder - implements Builder { - _$DetailsError? _$v; - - String? _code; - String? get code => _$this._code; - set code(String? code) => _$this._code = code; - - String? _param; - String? get param => _$this._param; - set param(String? param) => _$this._param = param; - - String? _message; - String? get message => _$this._message; - set message(String? message) => _$this._message = message; - - String? _debugMessage; - String? get debugMessage => _$this._debugMessage; - set debugMessage(String? debugMessage) => _$this._debugMessage = debugMessage; - - DetailsErrorBuilder() { - DetailsError._defaults(this); - } - - DetailsErrorBuilder get _$this { - final $v = _$v; - if ($v != null) { - _code = $v.code; - _param = $v.param; - _message = $v.message; - _debugMessage = $v.debugMessage; - _$v = null; - } - return this; - } - - @override - void replace(DetailsError other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$DetailsError; - } - - @override - void update(void Function(DetailsErrorBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - DetailsError build() => _build(); - - _$DetailsError _build() { - final _$result = _$v ?? - new _$DetailsError._( - code: code, - param: param, - message: message, - debugMessage: debugMessage); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/discount_lines_data_response.g.dart b/lib/src/model/discount_lines_data_response.g.dart deleted file mode 100644 index 9044289..0000000 --- a/lib/src/model/discount_lines_data_response.g.dart +++ /dev/null @@ -1,177 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'discount_lines_data_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$DiscountLinesDataResponse extends DiscountLinesDataResponse { - @override - final String id; - @override - final String object; - @override - final String parentId; - @override - final int amount; - @override - final String code; - @override - final String type; - - factory _$DiscountLinesDataResponse( - [void Function(DiscountLinesDataResponseBuilder)? updates]) => - (new DiscountLinesDataResponseBuilder()..update(updates))._build(); - - _$DiscountLinesDataResponse._( - {required this.id, - required this.object, - required this.parentId, - required this.amount, - required this.code, - required this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'DiscountLinesDataResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'DiscountLinesDataResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - parentId, r'DiscountLinesDataResponse', 'parentId'); - BuiltValueNullFieldError.checkNotNull( - amount, r'DiscountLinesDataResponse', 'amount'); - BuiltValueNullFieldError.checkNotNull( - code, r'DiscountLinesDataResponse', 'code'); - BuiltValueNullFieldError.checkNotNull( - type, r'DiscountLinesDataResponse', 'type'); - } - - @override - DiscountLinesDataResponse rebuild( - void Function(DiscountLinesDataResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - DiscountLinesDataResponseBuilder toBuilder() => - new DiscountLinesDataResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is DiscountLinesDataResponse && - id == other.id && - object == other.object && - parentId == other.parentId && - amount == other.amount && - code == other.code && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, id.hashCode), object.hashCode), - parentId.hashCode), - amount.hashCode), - code.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'DiscountLinesDataResponse') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId) - ..add('amount', amount) - ..add('code', code) - ..add('type', type)) - .toString(); - } -} - -class DiscountLinesDataResponseBuilder - implements - Builder, - DiscountLinesResponseBuilder { - _$DiscountLinesDataResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _code; - String? get code => _$this._code; - set code(covariant String? code) => _$this._code = code; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - DiscountLinesDataResponseBuilder() { - DiscountLinesDataResponse._defaults(this); - } - - DiscountLinesDataResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _amount = $v.amount; - _code = $v.code; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(covariant DiscountLinesDataResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$DiscountLinesDataResponse; - } - - @override - void update(void Function(DiscountLinesDataResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - DiscountLinesDataResponse build() => _build(); - - _$DiscountLinesDataResponse _build() { - final _$result = _$v ?? - new _$DiscountLinesDataResponse._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'DiscountLinesDataResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'DiscountLinesDataResponse', 'object'), - parentId: BuiltValueNullFieldError.checkNotNull( - parentId, r'DiscountLinesDataResponse', 'parentId'), - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'DiscountLinesDataResponse', 'amount'), - code: BuiltValueNullFieldError.checkNotNull( - code, r'DiscountLinesDataResponse', 'code'), - type: BuiltValueNullFieldError.checkNotNull( - type, r'DiscountLinesDataResponse', 'type')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/discount_lines_response.g.dart b/lib/src/model/discount_lines_response.g.dart deleted file mode 100644 index a6acb13..0000000 --- a/lib/src/model/discount_lines_response.g.dart +++ /dev/null @@ -1,201 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'discount_lines_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class DiscountLinesResponseBuilder - implements - DiscountLinesResponseAllOfBuilder, - OrderDiscountLinesRequestBuilder { - void replace(covariant DiscountLinesResponse other); - void update(void Function(DiscountLinesResponseBuilder) updates); - String? get id; - set id(covariant String? id); - - String? get object; - set object(covariant String? object); - - String? get parentId; - set parentId(covariant String? parentId); - - int? get amount; - set amount(covariant int? amount); - - String? get code; - set code(covariant String? code); - - String? get type; - set type(covariant String? type); -} - -class _$$DiscountLinesResponse extends $DiscountLinesResponse { - @override - final String id; - @override - final String object; - @override - final String parentId; - @override - final int amount; - @override - final String code; - @override - final String type; - - factory _$$DiscountLinesResponse( - [void Function($DiscountLinesResponseBuilder)? updates]) => - (new $DiscountLinesResponseBuilder()..update(updates))._build(); - - _$$DiscountLinesResponse._( - {required this.id, - required this.object, - required this.parentId, - required this.amount, - required this.code, - required this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull(id, r'$DiscountLinesResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'$DiscountLinesResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - parentId, r'$DiscountLinesResponse', 'parentId'); - BuiltValueNullFieldError.checkNotNull( - amount, r'$DiscountLinesResponse', 'amount'); - BuiltValueNullFieldError.checkNotNull( - code, r'$DiscountLinesResponse', 'code'); - BuiltValueNullFieldError.checkNotNull( - type, r'$DiscountLinesResponse', 'type'); - } - - @override - $DiscountLinesResponse rebuild( - void Function($DiscountLinesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $DiscountLinesResponseBuilder toBuilder() => - new $DiscountLinesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $DiscountLinesResponse && - id == other.id && - object == other.object && - parentId == other.parentId && - amount == other.amount && - code == other.code && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, id.hashCode), object.hashCode), - parentId.hashCode), - amount.hashCode), - code.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$DiscountLinesResponse') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId) - ..add('amount', amount) - ..add('code', code) - ..add('type', type)) - .toString(); - } -} - -class $DiscountLinesResponseBuilder - implements - Builder<$DiscountLinesResponse, $DiscountLinesResponseBuilder>, - DiscountLinesResponseBuilder { - _$$DiscountLinesResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _code; - String? get code => _$this._code; - set code(covariant String? code) => _$this._code = code; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - $DiscountLinesResponseBuilder() { - $DiscountLinesResponse._defaults(this); - } - - $DiscountLinesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _amount = $v.amount; - _code = $v.code; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(covariant $DiscountLinesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$DiscountLinesResponse; - } - - @override - void update(void Function($DiscountLinesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $DiscountLinesResponse build() => _build(); - - _$$DiscountLinesResponse _build() { - final _$result = _$v ?? - new _$$DiscountLinesResponse._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'$DiscountLinesResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'$DiscountLinesResponse', 'object'), - parentId: BuiltValueNullFieldError.checkNotNull( - parentId, r'$DiscountLinesResponse', 'parentId'), - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'$DiscountLinesResponse', 'amount'), - code: BuiltValueNullFieldError.checkNotNull( - code, r'$DiscountLinesResponse', 'code'), - type: BuiltValueNullFieldError.checkNotNull( - type, r'$DiscountLinesResponse', 'type')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/discount_lines_response_all_of.g.dart b/lib/src/model/discount_lines_response_all_of.g.dart deleted file mode 100644 index 4ea5238..0000000 --- a/lib/src/model/discount_lines_response_all_of.g.dart +++ /dev/null @@ -1,141 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'discount_lines_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class DiscountLinesResponseAllOfBuilder { - void replace(DiscountLinesResponseAllOf other); - void update(void Function(DiscountLinesResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - String? get parentId; - set parentId(String? parentId); -} - -class _$$DiscountLinesResponseAllOf extends $DiscountLinesResponseAllOf { - @override - final String id; - @override - final String object; - @override - final String parentId; - - factory _$$DiscountLinesResponseAllOf( - [void Function($DiscountLinesResponseAllOfBuilder)? updates]) => - (new $DiscountLinesResponseAllOfBuilder()..update(updates))._build(); - - _$$DiscountLinesResponseAllOf._( - {required this.id, required this.object, required this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'$DiscountLinesResponseAllOf', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'$DiscountLinesResponseAllOf', 'object'); - BuiltValueNullFieldError.checkNotNull( - parentId, r'$DiscountLinesResponseAllOf', 'parentId'); - } - - @override - $DiscountLinesResponseAllOf rebuild( - void Function($DiscountLinesResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $DiscountLinesResponseAllOfBuilder toBuilder() => - new $DiscountLinesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $DiscountLinesResponseAllOf && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, id.hashCode), object.hashCode), parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$DiscountLinesResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class $DiscountLinesResponseAllOfBuilder - implements - Builder<$DiscountLinesResponseAllOf, - $DiscountLinesResponseAllOfBuilder>, - DiscountLinesResponseAllOfBuilder { - _$$DiscountLinesResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - $DiscountLinesResponseAllOfBuilder() { - $DiscountLinesResponseAllOf._defaults(this); - } - - $DiscountLinesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $DiscountLinesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$DiscountLinesResponseAllOf; - } - - @override - void update(void Function($DiscountLinesResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $DiscountLinesResponseAllOf build() => _build(); - - _$$DiscountLinesResponseAllOf _build() { - final _$result = _$v ?? - new _$$DiscountLinesResponseAllOf._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'$DiscountLinesResponseAllOf', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'$DiscountLinesResponseAllOf', 'object'), - parentId: BuiltValueNullFieldError.checkNotNull( - parentId, r'$DiscountLinesResponseAllOf', 'parentId')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/email_checkout_request.g.dart b/lib/src/model/email_checkout_request.g.dart deleted file mode 100644 index 8e2ed22..0000000 --- a/lib/src/model/email_checkout_request.g.dart +++ /dev/null @@ -1,95 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'email_checkout_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$EmailCheckoutRequest extends EmailCheckoutRequest { - @override - final String email; - - factory _$EmailCheckoutRequest( - [void Function(EmailCheckoutRequestBuilder)? updates]) => - (new EmailCheckoutRequestBuilder()..update(updates))._build(); - - _$EmailCheckoutRequest._({required this.email}) : super._() { - BuiltValueNullFieldError.checkNotNull( - email, r'EmailCheckoutRequest', 'email'); - } - - @override - EmailCheckoutRequest rebuild( - void Function(EmailCheckoutRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - EmailCheckoutRequestBuilder toBuilder() => - new EmailCheckoutRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is EmailCheckoutRequest && email == other.email; - } - - @override - int get hashCode { - return $jf($jc(0, email.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'EmailCheckoutRequest') - ..add('email', email)) - .toString(); - } -} - -class EmailCheckoutRequestBuilder - implements Builder { - _$EmailCheckoutRequest? _$v; - - String? _email; - String? get email => _$this._email; - set email(String? email) => _$this._email = email; - - EmailCheckoutRequestBuilder() { - EmailCheckoutRequest._defaults(this); - } - - EmailCheckoutRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _email = $v.email; - _$v = null; - } - return this; - } - - @override - void replace(EmailCheckoutRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$EmailCheckoutRequest; - } - - @override - void update(void Function(EmailCheckoutRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - EmailCheckoutRequest build() => _build(); - - _$EmailCheckoutRequest _build() { - final _$result = _$v ?? - new _$EmailCheckoutRequest._( - email: BuiltValueNullFieldError.checkNotNull( - email, r'EmailCheckoutRequest', 'email')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/error.g.dart b/lib/src/model/error.g.dart deleted file mode 100644 index 37082d7..0000000 --- a/lib/src/model/error.g.dart +++ /dev/null @@ -1,137 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'error.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$Error extends Error { - @override - final BuiltList? details; - @override - final String? logId; - @override - final String? type; - @override - final String? object; - - factory _$Error([void Function(ErrorBuilder)? updates]) => - (new ErrorBuilder()..update(updates))._build(); - - _$Error._({this.details, this.logId, this.type, this.object}) : super._(); - - @override - Error rebuild(void Function(ErrorBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ErrorBuilder toBuilder() => new ErrorBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is Error && - details == other.details && - logId == other.logId && - type == other.type && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, details.hashCode), logId.hashCode), type.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'Error') - ..add('details', details) - ..add('logId', logId) - ..add('type', type) - ..add('object', object)) - .toString(); - } -} - -class ErrorBuilder - implements Builder, DetailsBuilder, ErrorAllOfBuilder { - _$Error? _$v; - - ListBuilder? _details; - ListBuilder get details => - _$this._details ??= new ListBuilder(); - set details(covariant ListBuilder? details) => - _$this._details = details; - - String? _logId; - String? get logId => _$this._logId; - set logId(covariant String? logId) => _$this._logId = logId; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - ErrorBuilder() { - Error._defaults(this); - } - - ErrorBuilder get _$this { - final $v = _$v; - if ($v != null) { - _details = $v.details?.toBuilder(); - _logId = $v.logId; - _type = $v.type; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant Error other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$Error; - } - - @override - void update(void Function(ErrorBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - Error build() => _build(); - - _$Error _build() { - _$Error _$result; - try { - _$result = _$v ?? - new _$Error._( - details: _details?.build(), - logId: logId, - type: type, - object: object); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'details'; - _details?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'Error', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/error_all_of.g.dart b/lib/src/model/error_all_of.g.dart deleted file mode 100644 index 3d12cc5..0000000 --- a/lib/src/model/error_all_of.g.dart +++ /dev/null @@ -1,120 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'error_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ErrorAllOfBuilder { - void replace(ErrorAllOf other); - void update(void Function(ErrorAllOfBuilder) updates); - String? get logId; - set logId(String? logId); - - String? get type; - set type(String? type); - - String? get object; - set object(String? object); -} - -class _$$ErrorAllOf extends $ErrorAllOf { - @override - final String? logId; - @override - final String? type; - @override - final String? object; - - factory _$$ErrorAllOf([void Function($ErrorAllOfBuilder)? updates]) => - (new $ErrorAllOfBuilder()..update(updates))._build(); - - _$$ErrorAllOf._({this.logId, this.type, this.object}) : super._(); - - @override - $ErrorAllOf rebuild(void Function($ErrorAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ErrorAllOfBuilder toBuilder() => new $ErrorAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ErrorAllOf && - logId == other.logId && - type == other.type && - object == other.object; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, logId.hashCode), type.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ErrorAllOf') - ..add('logId', logId) - ..add('type', type) - ..add('object', object)) - .toString(); - } -} - -class $ErrorAllOfBuilder - implements Builder<$ErrorAllOf, $ErrorAllOfBuilder>, ErrorAllOfBuilder { - _$$ErrorAllOf? _$v; - - String? _logId; - String? get logId => _$this._logId; - set logId(covariant String? logId) => _$this._logId = logId; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $ErrorAllOfBuilder() { - $ErrorAllOf._defaults(this); - } - - $ErrorAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _logId = $v.logId; - _type = $v.type; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ErrorAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ErrorAllOf; - } - - @override - void update(void Function($ErrorAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ErrorAllOf build() => _build(); - - _$$ErrorAllOf _build() { - final _$result = - _$v ?? new _$$ErrorAllOf._(logId: logId, type: type, object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/event_response.g.dart b/lib/src/model/event_response.g.dart deleted file mode 100644 index 5eaeed5..0000000 --- a/lib/src/model/event_response.g.dart +++ /dev/null @@ -1,199 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'event_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$EventResponse extends EventResponse { - @override - final int? createdAt; - @override - final BuiltMap? data; - @override - final String? id; - @override - final bool? livemode; - @override - final String? object; - @override - final String? type; - @override - final BuiltList? webhookLogs; - @override - final String? webhookStatus; - - factory _$EventResponse([void Function(EventResponseBuilder)? updates]) => - (new EventResponseBuilder()..update(updates))._build(); - - _$EventResponse._( - {this.createdAt, - this.data, - this.id, - this.livemode, - this.object, - this.type, - this.webhookLogs, - this.webhookStatus}) - : super._(); - - @override - EventResponse rebuild(void Function(EventResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - EventResponseBuilder toBuilder() => new EventResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is EventResponse && - createdAt == other.createdAt && - data == other.data && - id == other.id && - livemode == other.livemode && - object == other.object && - type == other.type && - webhookLogs == other.webhookLogs && - webhookStatus == other.webhookStatus; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, createdAt.hashCode), data.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - type.hashCode), - webhookLogs.hashCode), - webhookStatus.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'EventResponse') - ..add('createdAt', createdAt) - ..add('data', data) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('type', type) - ..add('webhookLogs', webhookLogs) - ..add('webhookStatus', webhookStatus)) - .toString(); - } -} - -class EventResponseBuilder - implements Builder { - _$EventResponse? _$v; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - MapBuilder? _data; - MapBuilder get data => - _$this._data ??= new MapBuilder(); - set data(MapBuilder? data) => _$this._data = data; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - ListBuilder? _webhookLogs; - ListBuilder get webhookLogs => - _$this._webhookLogs ??= new ListBuilder(); - set webhookLogs(ListBuilder? webhookLogs) => - _$this._webhookLogs = webhookLogs; - - String? _webhookStatus; - String? get webhookStatus => _$this._webhookStatus; - set webhookStatus(String? webhookStatus) => - _$this._webhookStatus = webhookStatus; - - EventResponseBuilder() { - EventResponse._defaults(this); - } - - EventResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _createdAt = $v.createdAt; - _data = $v.data?.toBuilder(); - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _type = $v.type; - _webhookLogs = $v.webhookLogs?.toBuilder(); - _webhookStatus = $v.webhookStatus; - _$v = null; - } - return this; - } - - @override - void replace(EventResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$EventResponse; - } - - @override - void update(void Function(EventResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - EventResponse build() => _build(); - - _$EventResponse _build() { - _$EventResponse _$result; - try { - _$result = _$v ?? - new _$EventResponse._( - createdAt: createdAt, - data: _data?.build(), - id: id, - livemode: livemode, - object: object, - type: type, - webhookLogs: _webhookLogs?.build(), - webhookStatus: webhookStatus); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - - _$failedField = 'webhookLogs'; - _webhookLogs?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'EventResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/events_resend_response.g.dart b/lib/src/model/events_resend_response.g.dart deleted file mode 100644 index 62d19e7..0000000 --- a/lib/src/model/events_resend_response.g.dart +++ /dev/null @@ -1,174 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'events_resend_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$EventsResendResponse extends EventsResendResponse { - @override - final int? failedAttempts; - @override - final String? id; - @override - final int? lastAttemptedAt; - @override - final int? lastHttpResponseStatus; - @override - final BuiltMap? responseData; - @override - final String? url; - - factory _$EventsResendResponse( - [void Function(EventsResendResponseBuilder)? updates]) => - (new EventsResendResponseBuilder()..update(updates))._build(); - - _$EventsResendResponse._( - {this.failedAttempts, - this.id, - this.lastAttemptedAt, - this.lastHttpResponseStatus, - this.responseData, - this.url}) - : super._(); - - @override - EventsResendResponse rebuild( - void Function(EventsResendResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - EventsResendResponseBuilder toBuilder() => - new EventsResendResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is EventsResendResponse && - failedAttempts == other.failedAttempts && - id == other.id && - lastAttemptedAt == other.lastAttemptedAt && - lastHttpResponseStatus == other.lastHttpResponseStatus && - responseData == other.responseData && - url == other.url; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, failedAttempts.hashCode), id.hashCode), - lastAttemptedAt.hashCode), - lastHttpResponseStatus.hashCode), - responseData.hashCode), - url.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'EventsResendResponse') - ..add('failedAttempts', failedAttempts) - ..add('id', id) - ..add('lastAttemptedAt', lastAttemptedAt) - ..add('lastHttpResponseStatus', lastHttpResponseStatus) - ..add('responseData', responseData) - ..add('url', url)) - .toString(); - } -} - -class EventsResendResponseBuilder - implements Builder { - _$EventsResendResponse? _$v; - - int? _failedAttempts; - int? get failedAttempts => _$this._failedAttempts; - set failedAttempts(int? failedAttempts) => - _$this._failedAttempts = failedAttempts; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - int? _lastAttemptedAt; - int? get lastAttemptedAt => _$this._lastAttemptedAt; - set lastAttemptedAt(int? lastAttemptedAt) => - _$this._lastAttemptedAt = lastAttemptedAt; - - int? _lastHttpResponseStatus; - int? get lastHttpResponseStatus => _$this._lastHttpResponseStatus; - set lastHttpResponseStatus(int? lastHttpResponseStatus) => - _$this._lastHttpResponseStatus = lastHttpResponseStatus; - - MapBuilder? _responseData; - MapBuilder get responseData => - _$this._responseData ??= new MapBuilder(); - set responseData(MapBuilder? responseData) => - _$this._responseData = responseData; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - EventsResendResponseBuilder() { - EventsResendResponse._defaults(this); - } - - EventsResendResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _failedAttempts = $v.failedAttempts; - _id = $v.id; - _lastAttemptedAt = $v.lastAttemptedAt; - _lastHttpResponseStatus = $v.lastHttpResponseStatus; - _responseData = $v.responseData?.toBuilder(); - _url = $v.url; - _$v = null; - } - return this; - } - - @override - void replace(EventsResendResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$EventsResendResponse; - } - - @override - void update(void Function(EventsResendResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - EventsResendResponse build() => _build(); - - _$EventsResendResponse _build() { - _$EventsResendResponse _$result; - try { - _$result = _$v ?? - new _$EventsResendResponse._( - failedAttempts: failedAttempts, - id: id, - lastAttemptedAt: lastAttemptedAt, - lastHttpResponseStatus: lastHttpResponseStatus, - responseData: _responseData?.build(), - url: url); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'responseData'; - _responseData?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'EventsResendResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/fiscal_entity_address.dart b/lib/src/model/fiscal_entity_address.dart new file mode 100644 index 0000000..b0500c9 --- /dev/null +++ b/lib/src/model/fiscal_entity_address.dart @@ -0,0 +1,247 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'fiscal_entity_address.g.dart'; + +/// Address of the fiscal entity +/// +/// Properties: +/// * [street1] - Street name and number +/// * [street2] - Street name and number +/// * [postalCode] - Postal code +/// * [city] - City +/// * [state] - State +/// * [country] - this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) +/// * [externalNumber] - External number +@BuiltValue(instantiable: false) +abstract class FiscalEntityAddress { + /// Street name and number + @BuiltValueField(wireName: r'street1') + String get street1; + + /// Street name and number + @BuiltValueField(wireName: r'street2') + String? get street2; + + /// Postal code + @BuiltValueField(wireName: r'postal_code') + String get postalCode; + + /// City + @BuiltValueField(wireName: r'city') + String get city; + + /// State + @BuiltValueField(wireName: r'state') + String? get state; + + /// this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) + @BuiltValueField(wireName: r'country') + String get country; + + /// External number + @BuiltValueField(wireName: r'external_number') + String get externalNumber; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FiscalEntityAddressSerializer(); +} + +class _$FiscalEntityAddressSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FiscalEntityAddress]; + + @override + final String wireName = r'FiscalEntityAddress'; + + Iterable _serializeProperties( + Serializers serializers, + FiscalEntityAddress object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'street1'; + yield serializers.serialize( + object.street1, + specifiedType: const FullType(String), + ); + if (object.street2 != null) { + yield r'street2'; + yield serializers.serialize( + object.street2, + specifiedType: const FullType.nullable(String), + ); + } + yield r'postal_code'; + yield serializers.serialize( + object.postalCode, + specifiedType: const FullType(String), + ); + yield r'city'; + yield serializers.serialize( + object.city, + specifiedType: const FullType(String), + ); + if (object.state != null) { + yield r'state'; + yield serializers.serialize( + object.state, + specifiedType: const FullType(String), + ); + } + yield r'country'; + yield serializers.serialize( + object.country, + specifiedType: const FullType(String), + ); + yield r'external_number'; + yield serializers.serialize( + object.externalNumber, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + FiscalEntityAddress object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + @override + FiscalEntityAddress deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + return serializers.deserialize(serialized, specifiedType: FullType($FiscalEntityAddress)) as $FiscalEntityAddress; + } +} + +/// a concrete implementation of [FiscalEntityAddress], since [FiscalEntityAddress] is not instantiable +@BuiltValue(instantiable: true) +abstract class $FiscalEntityAddress implements FiscalEntityAddress, Built<$FiscalEntityAddress, $FiscalEntityAddressBuilder> { + $FiscalEntityAddress._(); + + factory $FiscalEntityAddress([void Function($FiscalEntityAddressBuilder)? updates]) = _$$FiscalEntityAddress; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults($FiscalEntityAddressBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer<$FiscalEntityAddress> get serializer => _$$FiscalEntityAddressSerializer(); +} + +class _$$FiscalEntityAddressSerializer implements PrimitiveSerializer<$FiscalEntityAddress> { + @override + final Iterable types = const [$FiscalEntityAddress, _$$FiscalEntityAddress]; + + @override + final String wireName = r'$FiscalEntityAddress'; + + @override + Object serialize( + Serializers serializers, + $FiscalEntityAddress object, { + FullType specifiedType = FullType.unspecified, + }) { + return serializers.serialize(object, specifiedType: FullType(FiscalEntityAddress))!; + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FiscalEntityAddressBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'street1': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.street1 = valueDes; + break; + case r'street2': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.street2 = valueDes; + break; + case r'postal_code': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.postalCode = valueDes; + break; + case r'city': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.city = valueDes; + break; + case r'state': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.state = valueDes; + break; + case r'country': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.country = valueDes; + break; + case r'external_number': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.externalNumber = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + $FiscalEntityAddress deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = $FiscalEntityAddressBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/get_api_keys_response.g.dart b/lib/src/model/get_api_keys_response.g.dart deleted file mode 100644 index d0f78c8..0000000 --- a/lib/src/model/get_api_keys_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_api_keys_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetApiKeysResponse extends GetApiKeysResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetApiKeysResponse( - [void Function(GetApiKeysResponseBuilder)? updates]) => - (new GetApiKeysResponseBuilder()..update(updates))._build(); - - _$GetApiKeysResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetApiKeysResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetApiKeysResponse', 'object'); - } - - @override - GetApiKeysResponse rebuild( - void Function(GetApiKeysResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetApiKeysResponseBuilder toBuilder() => - new GetApiKeysResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetApiKeysResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetApiKeysResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetApiKeysResponseBuilder - implements - Builder, - GetApiKeysResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetApiKeysResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetApiKeysResponseBuilder() { - GetApiKeysResponse._defaults(this); - } - - GetApiKeysResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetApiKeysResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetApiKeysResponse; - } - - @override - void update(void Function(GetApiKeysResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetApiKeysResponse build() => _build(); - - _$GetApiKeysResponse _build() { - _$GetApiKeysResponse _$result; - try { - _$result = _$v ?? - new _$GetApiKeysResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetApiKeysResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetApiKeysResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetApiKeysResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_api_keys_response_all_of.g.dart b/lib/src/model/get_api_keys_response_all_of.g.dart deleted file mode 100644 index 7adb49b..0000000 --- a/lib/src/model/get_api_keys_response_all_of.g.dart +++ /dev/null @@ -1,112 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_api_keys_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetApiKeysResponseAllOfBuilder { - void replace(GetApiKeysResponseAllOf other); - void update(void Function(GetApiKeysResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetApiKeysResponseAllOf extends $GetApiKeysResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetApiKeysResponseAllOf( - [void Function($GetApiKeysResponseAllOfBuilder)? updates]) => - (new $GetApiKeysResponseAllOfBuilder()..update(updates))._build(); - - _$$GetApiKeysResponseAllOf._({this.data}) : super._(); - - @override - $GetApiKeysResponseAllOf rebuild( - void Function($GetApiKeysResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetApiKeysResponseAllOfBuilder toBuilder() => - new $GetApiKeysResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetApiKeysResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetApiKeysResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetApiKeysResponseAllOfBuilder - implements - Builder<$GetApiKeysResponseAllOf, $GetApiKeysResponseAllOfBuilder>, - GetApiKeysResponseAllOfBuilder { - _$$GetApiKeysResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $GetApiKeysResponseAllOfBuilder() { - $GetApiKeysResponseAllOf._defaults(this); - } - - $GetApiKeysResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetApiKeysResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetApiKeysResponseAllOf; - } - - @override - void update(void Function($GetApiKeysResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetApiKeysResponseAllOf build() => _build(); - - _$$GetApiKeysResponseAllOf _build() { - _$$GetApiKeysResponseAllOf _$result; - try { - _$result = _$v ?? new _$$GetApiKeysResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetApiKeysResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_charges_response.g.dart b/lib/src/model/get_charges_response.g.dart deleted file mode 100644 index 5126cec..0000000 --- a/lib/src/model/get_charges_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_charges_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetChargesResponse extends GetChargesResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetChargesResponse( - [void Function(GetChargesResponseBuilder)? updates]) => - (new GetChargesResponseBuilder()..update(updates))._build(); - - _$GetChargesResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetChargesResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetChargesResponse', 'object'); - } - - @override - GetChargesResponse rebuild( - void Function(GetChargesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetChargesResponseBuilder toBuilder() => - new GetChargesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetChargesResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetChargesResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetChargesResponseBuilder - implements - Builder, - GetChargesResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetChargesResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetChargesResponseBuilder() { - GetChargesResponse._defaults(this); - } - - GetChargesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetChargesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetChargesResponse; - } - - @override - void update(void Function(GetChargesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetChargesResponse build() => _build(); - - _$GetChargesResponse _build() { - _$GetChargesResponse _$result; - try { - _$result = _$v ?? - new _$GetChargesResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetChargesResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetChargesResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetChargesResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_charges_response_all_of.g.dart b/lib/src/model/get_charges_response_all_of.g.dart deleted file mode 100644 index 586481b..0000000 --- a/lib/src/model/get_charges_response_all_of.g.dart +++ /dev/null @@ -1,112 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_charges_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetChargesResponseAllOfBuilder { - void replace(GetChargesResponseAllOf other); - void update(void Function(GetChargesResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetChargesResponseAllOf extends $GetChargesResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetChargesResponseAllOf( - [void Function($GetChargesResponseAllOfBuilder)? updates]) => - (new $GetChargesResponseAllOfBuilder()..update(updates))._build(); - - _$$GetChargesResponseAllOf._({this.data}) : super._(); - - @override - $GetChargesResponseAllOf rebuild( - void Function($GetChargesResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetChargesResponseAllOfBuilder toBuilder() => - new $GetChargesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetChargesResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetChargesResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetChargesResponseAllOfBuilder - implements - Builder<$GetChargesResponseAllOf, $GetChargesResponseAllOfBuilder>, - GetChargesResponseAllOfBuilder { - _$$GetChargesResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $GetChargesResponseAllOfBuilder() { - $GetChargesResponseAllOf._defaults(this); - } - - $GetChargesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetChargesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetChargesResponseAllOf; - } - - @override - void update(void Function($GetChargesResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetChargesResponseAllOf build() => _build(); - - _$$GetChargesResponseAllOf _build() { - _$$GetChargesResponseAllOf _$result; - try { - _$result = _$v ?? new _$$GetChargesResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetChargesResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_companies_response.g.dart b/lib/src/model/get_companies_response.g.dart deleted file mode 100644 index f4296c8..0000000 --- a/lib/src/model/get_companies_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_companies_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetCompaniesResponse extends GetCompaniesResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetCompaniesResponse( - [void Function(GetCompaniesResponseBuilder)? updates]) => - (new GetCompaniesResponseBuilder()..update(updates))._build(); - - _$GetCompaniesResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetCompaniesResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetCompaniesResponse', 'object'); - } - - @override - GetCompaniesResponse rebuild( - void Function(GetCompaniesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetCompaniesResponseBuilder toBuilder() => - new GetCompaniesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetCompaniesResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetCompaniesResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetCompaniesResponseBuilder - implements - Builder, - GetCompaniesResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetCompaniesResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetCompaniesResponseBuilder() { - GetCompaniesResponse._defaults(this); - } - - GetCompaniesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetCompaniesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetCompaniesResponse; - } - - @override - void update(void Function(GetCompaniesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetCompaniesResponse build() => _build(); - - _$GetCompaniesResponse _build() { - _$GetCompaniesResponse _$result; - try { - _$result = _$v ?? - new _$GetCompaniesResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetCompaniesResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetCompaniesResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetCompaniesResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_companies_response_all_of.g.dart b/lib/src/model/get_companies_response_all_of.g.dart deleted file mode 100644 index aa7d093..0000000 --- a/lib/src/model/get_companies_response_all_of.g.dart +++ /dev/null @@ -1,113 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_companies_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetCompaniesResponseAllOfBuilder { - void replace(GetCompaniesResponseAllOf other); - void update(void Function(GetCompaniesResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetCompaniesResponseAllOf extends $GetCompaniesResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetCompaniesResponseAllOf( - [void Function($GetCompaniesResponseAllOfBuilder)? updates]) => - (new $GetCompaniesResponseAllOfBuilder()..update(updates))._build(); - - _$$GetCompaniesResponseAllOf._({this.data}) : super._(); - - @override - $GetCompaniesResponseAllOf rebuild( - void Function($GetCompaniesResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetCompaniesResponseAllOfBuilder toBuilder() => - new $GetCompaniesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetCompaniesResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetCompaniesResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetCompaniesResponseAllOfBuilder - implements - Builder<$GetCompaniesResponseAllOf, $GetCompaniesResponseAllOfBuilder>, - GetCompaniesResponseAllOfBuilder { - _$$GetCompaniesResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $GetCompaniesResponseAllOfBuilder() { - $GetCompaniesResponseAllOf._defaults(this); - } - - $GetCompaniesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetCompaniesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetCompaniesResponseAllOf; - } - - @override - void update(void Function($GetCompaniesResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetCompaniesResponseAllOf build() => _build(); - - _$$GetCompaniesResponseAllOf _build() { - _$$GetCompaniesResponseAllOf _$result; - try { - _$result = - _$v ?? new _$$GetCompaniesResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetCompaniesResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_customer_payment_method_data_response.g.dart b/lib/src/model/get_customer_payment_method_data_response.g.dart deleted file mode 100644 index fa2353c..0000000 --- a/lib/src/model/get_customer_payment_method_data_response.g.dart +++ /dev/null @@ -1,102 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_customer_payment_method_data_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetCustomerPaymentMethodDataResponse - extends GetCustomerPaymentMethodDataResponse { - @override - final OneOf oneOf; - - factory _$GetCustomerPaymentMethodDataResponse( - [void Function(GetCustomerPaymentMethodDataResponseBuilder)? - updates]) => - (new GetCustomerPaymentMethodDataResponseBuilder()..update(updates)) - ._build(); - - _$GetCustomerPaymentMethodDataResponse._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'GetCustomerPaymentMethodDataResponse', 'oneOf'); - } - - @override - GetCustomerPaymentMethodDataResponse rebuild( - void Function(GetCustomerPaymentMethodDataResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetCustomerPaymentMethodDataResponseBuilder toBuilder() => - new GetCustomerPaymentMethodDataResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetCustomerPaymentMethodDataResponse && - oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetCustomerPaymentMethodDataResponse') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class GetCustomerPaymentMethodDataResponseBuilder - implements - Builder { - _$GetCustomerPaymentMethodDataResponse? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - GetCustomerPaymentMethodDataResponseBuilder() { - GetCustomerPaymentMethodDataResponse._defaults(this); - } - - GetCustomerPaymentMethodDataResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(GetCustomerPaymentMethodDataResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetCustomerPaymentMethodDataResponse; - } - - @override - void update( - void Function(GetCustomerPaymentMethodDataResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetCustomerPaymentMethodDataResponse build() => _build(); - - _$GetCustomerPaymentMethodDataResponse _build() { - final _$result = _$v ?? - new _$GetCustomerPaymentMethodDataResponse._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'GetCustomerPaymentMethodDataResponse', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_events_response.g.dart b/lib/src/model/get_events_response.g.dart deleted file mode 100644 index 9b28d4d..0000000 --- a/lib/src/model/get_events_response.g.dart +++ /dev/null @@ -1,170 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_events_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetEventsResponse extends GetEventsResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetEventsResponse( - [void Function(GetEventsResponseBuilder)? updates]) => - (new GetEventsResponseBuilder()..update(updates))._build(); - - _$GetEventsResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetEventsResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetEventsResponse', 'object'); - } - - @override - GetEventsResponse rebuild(void Function(GetEventsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetEventsResponseBuilder toBuilder() => - new GetEventsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetEventsResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetEventsResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetEventsResponseBuilder - implements - Builder, - GetEventsResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetEventsResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetEventsResponseBuilder() { - GetEventsResponse._defaults(this); - } - - GetEventsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetEventsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetEventsResponse; - } - - @override - void update(void Function(GetEventsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetEventsResponse build() => _build(); - - _$GetEventsResponse _build() { - _$GetEventsResponse _$result; - try { - _$result = _$v ?? - new _$GetEventsResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetEventsResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetEventsResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetEventsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_events_response_all_of.g.dart b/lib/src/model/get_events_response_all_of.g.dart deleted file mode 100644 index 6244749..0000000 --- a/lib/src/model/get_events_response_all_of.g.dart +++ /dev/null @@ -1,112 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_events_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetEventsResponseAllOfBuilder { - void replace(GetEventsResponseAllOf other); - void update(void Function(GetEventsResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetEventsResponseAllOf extends $GetEventsResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetEventsResponseAllOf( - [void Function($GetEventsResponseAllOfBuilder)? updates]) => - (new $GetEventsResponseAllOfBuilder()..update(updates))._build(); - - _$$GetEventsResponseAllOf._({this.data}) : super._(); - - @override - $GetEventsResponseAllOf rebuild( - void Function($GetEventsResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetEventsResponseAllOfBuilder toBuilder() => - new $GetEventsResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetEventsResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetEventsResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetEventsResponseAllOfBuilder - implements - Builder<$GetEventsResponseAllOf, $GetEventsResponseAllOfBuilder>, - GetEventsResponseAllOfBuilder { - _$$GetEventsResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $GetEventsResponseAllOfBuilder() { - $GetEventsResponseAllOf._defaults(this); - } - - $GetEventsResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetEventsResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetEventsResponseAllOf; - } - - @override - void update(void Function($GetEventsResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetEventsResponseAllOf build() => _build(); - - _$$GetEventsResponseAllOf _build() { - _$$GetEventsResponseAllOf _$result; - try { - _$result = _$v ?? new _$$GetEventsResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetEventsResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_order_discount_lines_response.g.dart b/lib/src/model/get_order_discount_lines_response.g.dart deleted file mode 100644 index 102c1cb..0000000 --- a/lib/src/model/get_order_discount_lines_response.g.dart +++ /dev/null @@ -1,173 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_order_discount_lines_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetOrderDiscountLinesResponse extends GetOrderDiscountLinesResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetOrderDiscountLinesResponse( - [void Function(GetOrderDiscountLinesResponseBuilder)? updates]) => - (new GetOrderDiscountLinesResponseBuilder()..update(updates))._build(); - - _$GetOrderDiscountLinesResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetOrderDiscountLinesResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetOrderDiscountLinesResponse', 'object'); - } - - @override - GetOrderDiscountLinesResponse rebuild( - void Function(GetOrderDiscountLinesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetOrderDiscountLinesResponseBuilder toBuilder() => - new GetOrderDiscountLinesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetOrderDiscountLinesResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetOrderDiscountLinesResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetOrderDiscountLinesResponseBuilder - implements - Builder, - GetOrderDiscountLinesResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetOrderDiscountLinesResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetOrderDiscountLinesResponseBuilder() { - GetOrderDiscountLinesResponse._defaults(this); - } - - GetOrderDiscountLinesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetOrderDiscountLinesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetOrderDiscountLinesResponse; - } - - @override - void update(void Function(GetOrderDiscountLinesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetOrderDiscountLinesResponse build() => _build(); - - _$GetOrderDiscountLinesResponse _build() { - _$GetOrderDiscountLinesResponse _$result; - try { - _$result = _$v ?? - new _$GetOrderDiscountLinesResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetOrderDiscountLinesResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetOrderDiscountLinesResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetOrderDiscountLinesResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_order_discount_lines_response_all_of.g.dart b/lib/src/model/get_order_discount_lines_response_all_of.g.dart deleted file mode 100644 index 117c001..0000000 --- a/lib/src/model/get_order_discount_lines_response_all_of.g.dart +++ /dev/null @@ -1,121 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_order_discount_lines_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetOrderDiscountLinesResponseAllOfBuilder { - void replace(GetOrderDiscountLinesResponseAllOf other); - void update(void Function(GetOrderDiscountLinesResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetOrderDiscountLinesResponseAllOf - extends $GetOrderDiscountLinesResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetOrderDiscountLinesResponseAllOf( - [void Function($GetOrderDiscountLinesResponseAllOfBuilder)? - updates]) => - (new $GetOrderDiscountLinesResponseAllOfBuilder()..update(updates)) - ._build(); - - _$$GetOrderDiscountLinesResponseAllOf._({this.data}) : super._(); - - @override - $GetOrderDiscountLinesResponseAllOf rebuild( - void Function($GetOrderDiscountLinesResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetOrderDiscountLinesResponseAllOfBuilder toBuilder() => - new $GetOrderDiscountLinesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetOrderDiscountLinesResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetOrderDiscountLinesResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetOrderDiscountLinesResponseAllOfBuilder - implements - Builder<$GetOrderDiscountLinesResponseAllOf, - $GetOrderDiscountLinesResponseAllOfBuilder>, - GetOrderDiscountLinesResponseAllOfBuilder { - _$$GetOrderDiscountLinesResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $GetOrderDiscountLinesResponseAllOfBuilder() { - $GetOrderDiscountLinesResponseAllOf._defaults(this); - } - - $GetOrderDiscountLinesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetOrderDiscountLinesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetOrderDiscountLinesResponseAllOf; - } - - @override - void update( - void Function($GetOrderDiscountLinesResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetOrderDiscountLinesResponseAllOf build() => _build(); - - _$$GetOrderDiscountLinesResponseAllOf _build() { - _$$GetOrderDiscountLinesResponseAllOf _$result; - try { - _$result = _$v ?? - new _$$GetOrderDiscountLinesResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetOrderDiscountLinesResponseAllOf', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_orders_response.g.dart b/lib/src/model/get_orders_response.g.dart deleted file mode 100644 index 82fc2ad..0000000 --- a/lib/src/model/get_orders_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_orders_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetOrdersResponse extends GetOrdersResponse { - @override - final BuiltList data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetOrdersResponse( - [void Function(GetOrdersResponseBuilder)? updates]) => - (new GetOrdersResponseBuilder()..update(updates))._build(); - - _$GetOrdersResponse._( - {required this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull(data, r'GetOrdersResponse', 'data'); - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetOrdersResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetOrdersResponse', 'object'); - } - - @override - GetOrdersResponse rebuild(void Function(GetOrdersResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetOrdersResponseBuilder toBuilder() => - new GetOrdersResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetOrdersResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetOrdersResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetOrdersResponseBuilder - implements - Builder, - OrdersResponseBuilder, - PageBuilder, - PaginationBuilder { - _$GetOrdersResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetOrdersResponseBuilder() { - GetOrdersResponse._defaults(this); - } - - GetOrdersResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetOrdersResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetOrdersResponse; - } - - @override - void update(void Function(GetOrdersResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetOrdersResponse build() => _build(); - - _$GetOrdersResponse _build() { - _$GetOrdersResponse _$result; - try { - _$result = _$v ?? - new _$GetOrdersResponse._( - data: data.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetOrdersResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetOrdersResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - data.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetOrdersResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_payment_method_response.g.dart b/lib/src/model/get_payment_method_response.g.dart deleted file mode 100644 index 0647a12..0000000 --- a/lib/src/model/get_payment_method_response.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_payment_method_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetPaymentMethodResponse extends GetPaymentMethodResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetPaymentMethodResponse( - [void Function(GetPaymentMethodResponseBuilder)? updates]) => - (new GetPaymentMethodResponseBuilder()..update(updates))._build(); - - _$GetPaymentMethodResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetPaymentMethodResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetPaymentMethodResponse', 'object'); - } - - @override - GetPaymentMethodResponse rebuild( - void Function(GetPaymentMethodResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetPaymentMethodResponseBuilder toBuilder() => - new GetPaymentMethodResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetPaymentMethodResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetPaymentMethodResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetPaymentMethodResponseBuilder - implements - Builder, - GetPaymentMethodResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetPaymentMethodResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetPaymentMethodResponseBuilder() { - GetPaymentMethodResponse._defaults(this); - } - - GetPaymentMethodResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetPaymentMethodResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetPaymentMethodResponse; - } - - @override - void update(void Function(GetPaymentMethodResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetPaymentMethodResponse build() => _build(); - - _$GetPaymentMethodResponse _build() { - _$GetPaymentMethodResponse _$result; - try { - _$result = _$v ?? - new _$GetPaymentMethodResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetPaymentMethodResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetPaymentMethodResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetPaymentMethodResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_payment_method_response_all_of.g.dart b/lib/src/model/get_payment_method_response_all_of.g.dart deleted file mode 100644 index 0769766..0000000 --- a/lib/src/model/get_payment_method_response_all_of.g.dart +++ /dev/null @@ -1,115 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_payment_method_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetPaymentMethodResponseAllOfBuilder { - void replace(GetPaymentMethodResponseAllOf other); - void update(void Function(GetPaymentMethodResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetPaymentMethodResponseAllOf extends $GetPaymentMethodResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetPaymentMethodResponseAllOf( - [void Function($GetPaymentMethodResponseAllOfBuilder)? updates]) => - (new $GetPaymentMethodResponseAllOfBuilder()..update(updates))._build(); - - _$$GetPaymentMethodResponseAllOf._({this.data}) : super._(); - - @override - $GetPaymentMethodResponseAllOf rebuild( - void Function($GetPaymentMethodResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetPaymentMethodResponseAllOfBuilder toBuilder() => - new $GetPaymentMethodResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetPaymentMethodResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetPaymentMethodResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetPaymentMethodResponseAllOfBuilder - implements - Builder<$GetPaymentMethodResponseAllOf, - $GetPaymentMethodResponseAllOfBuilder>, - GetPaymentMethodResponseAllOfBuilder { - _$$GetPaymentMethodResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $GetPaymentMethodResponseAllOfBuilder() { - $GetPaymentMethodResponseAllOf._defaults(this); - } - - $GetPaymentMethodResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetPaymentMethodResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetPaymentMethodResponseAllOf; - } - - @override - void update(void Function($GetPaymentMethodResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetPaymentMethodResponseAllOf build() => _build(); - - _$$GetPaymentMethodResponseAllOf _build() { - _$$GetPaymentMethodResponseAllOf _$result; - try { - _$result = - _$v ?? new _$$GetPaymentMethodResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetPaymentMethodResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_plans_response.g.dart b/lib/src/model/get_plans_response.g.dart deleted file mode 100644 index e02de2f..0000000 --- a/lib/src/model/get_plans_response.g.dart +++ /dev/null @@ -1,170 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_plans_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetPlansResponse extends GetPlansResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetPlansResponse( - [void Function(GetPlansResponseBuilder)? updates]) => - (new GetPlansResponseBuilder()..update(updates))._build(); - - _$GetPlansResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetPlansResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetPlansResponse', 'object'); - } - - @override - GetPlansResponse rebuild(void Function(GetPlansResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetPlansResponseBuilder toBuilder() => - new GetPlansResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetPlansResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetPlansResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetPlansResponseBuilder - implements - Builder, - GetPlansResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetPlansResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetPlansResponseBuilder() { - GetPlansResponse._defaults(this); - } - - GetPlansResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetPlansResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetPlansResponse; - } - - @override - void update(void Function(GetPlansResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetPlansResponse build() => _build(); - - _$GetPlansResponse _build() { - _$GetPlansResponse _$result; - try { - _$result = _$v ?? - new _$GetPlansResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetPlansResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetPlansResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetPlansResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_plans_response_all_of.g.dart b/lib/src/model/get_plans_response_all_of.g.dart deleted file mode 100644 index 20a8231..0000000 --- a/lib/src/model/get_plans_response_all_of.g.dart +++ /dev/null @@ -1,112 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_plans_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetPlansResponseAllOfBuilder { - void replace(GetPlansResponseAllOf other); - void update(void Function(GetPlansResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetPlansResponseAllOf extends $GetPlansResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetPlansResponseAllOf( - [void Function($GetPlansResponseAllOfBuilder)? updates]) => - (new $GetPlansResponseAllOfBuilder()..update(updates))._build(); - - _$$GetPlansResponseAllOf._({this.data}) : super._(); - - @override - $GetPlansResponseAllOf rebuild( - void Function($GetPlansResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetPlansResponseAllOfBuilder toBuilder() => - new $GetPlansResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetPlansResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetPlansResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetPlansResponseAllOfBuilder - implements - Builder<$GetPlansResponseAllOf, $GetPlansResponseAllOfBuilder>, - GetPlansResponseAllOfBuilder { - _$$GetPlansResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $GetPlansResponseAllOfBuilder() { - $GetPlansResponseAllOf._defaults(this); - } - - $GetPlansResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetPlansResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetPlansResponseAllOf; - } - - @override - void update(void Function($GetPlansResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetPlansResponseAllOf build() => _build(); - - _$$GetPlansResponseAllOf _build() { - _$$GetPlansResponseAllOf _$result; - try { - _$result = _$v ?? new _$$GetPlansResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetPlansResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_transactions_response.g.dart b/lib/src/model/get_transactions_response.g.dart deleted file mode 100644 index 85cfb8b..0000000 --- a/lib/src/model/get_transactions_response.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_transactions_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetTransactionsResponse extends GetTransactionsResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetTransactionsResponse( - [void Function(GetTransactionsResponseBuilder)? updates]) => - (new GetTransactionsResponseBuilder()..update(updates))._build(); - - _$GetTransactionsResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetTransactionsResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetTransactionsResponse', 'object'); - } - - @override - GetTransactionsResponse rebuild( - void Function(GetTransactionsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetTransactionsResponseBuilder toBuilder() => - new GetTransactionsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetTransactionsResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetTransactionsResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetTransactionsResponseBuilder - implements - Builder, - GetTransactionsResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetTransactionsResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetTransactionsResponseBuilder() { - GetTransactionsResponse._defaults(this); - } - - GetTransactionsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetTransactionsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetTransactionsResponse; - } - - @override - void update(void Function(GetTransactionsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetTransactionsResponse build() => _build(); - - _$GetTransactionsResponse _build() { - _$GetTransactionsResponse _$result; - try { - _$result = _$v ?? - new _$GetTransactionsResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetTransactionsResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetTransactionsResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetTransactionsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_transactions_response_all_of.g.dart b/lib/src/model/get_transactions_response_all_of.g.dart deleted file mode 100644 index 9ec8907..0000000 --- a/lib/src/model/get_transactions_response_all_of.g.dart +++ /dev/null @@ -1,115 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_transactions_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetTransactionsResponseAllOfBuilder { - void replace(GetTransactionsResponseAllOf other); - void update(void Function(GetTransactionsResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetTransactionsResponseAllOf extends $GetTransactionsResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetTransactionsResponseAllOf( - [void Function($GetTransactionsResponseAllOfBuilder)? updates]) => - (new $GetTransactionsResponseAllOfBuilder()..update(updates))._build(); - - _$$GetTransactionsResponseAllOf._({this.data}) : super._(); - - @override - $GetTransactionsResponseAllOf rebuild( - void Function($GetTransactionsResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetTransactionsResponseAllOfBuilder toBuilder() => - new $GetTransactionsResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetTransactionsResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetTransactionsResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetTransactionsResponseAllOfBuilder - implements - Builder<$GetTransactionsResponseAllOf, - $GetTransactionsResponseAllOfBuilder>, - GetTransactionsResponseAllOfBuilder { - _$$GetTransactionsResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $GetTransactionsResponseAllOfBuilder() { - $GetTransactionsResponseAllOf._defaults(this); - } - - $GetTransactionsResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetTransactionsResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetTransactionsResponseAllOf; - } - - @override - void update(void Function($GetTransactionsResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetTransactionsResponseAllOf build() => _build(); - - _$$GetTransactionsResponseAllOf _build() { - _$$GetTransactionsResponseAllOf _$result; - try { - _$result = - _$v ?? new _$$GetTransactionsResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetTransactionsResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_transfers_response.g.dart b/lib/src/model/get_transfers_response.g.dart deleted file mode 100644 index d8582c9..0000000 --- a/lib/src/model/get_transfers_response.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_transfers_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetTransfersResponse extends GetTransfersResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetTransfersResponse( - [void Function(GetTransfersResponseBuilder)? updates]) => - (new GetTransfersResponseBuilder()..update(updates))._build(); - - _$GetTransfersResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetTransfersResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetTransfersResponse', 'object'); - } - - @override - GetTransfersResponse rebuild( - void Function(GetTransfersResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetTransfersResponseBuilder toBuilder() => - new GetTransfersResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetTransfersResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetTransfersResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetTransfersResponseBuilder - implements - Builder, - GetTransfersResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetTransfersResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetTransfersResponseBuilder() { - GetTransfersResponse._defaults(this); - } - - GetTransfersResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetTransfersResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetTransfersResponse; - } - - @override - void update(void Function(GetTransfersResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetTransfersResponse build() => _build(); - - _$GetTransfersResponse _build() { - _$GetTransfersResponse _$result; - try { - _$result = _$v ?? - new _$GetTransfersResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetTransfersResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetTransfersResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetTransfersResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_transfers_response_all_of.g.dart b/lib/src/model/get_transfers_response_all_of.g.dart deleted file mode 100644 index a9dcadc..0000000 --- a/lib/src/model/get_transfers_response_all_of.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_transfers_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetTransfersResponseAllOfBuilder { - void replace(GetTransfersResponseAllOf other); - void update(void Function(GetTransfersResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetTransfersResponseAllOf extends $GetTransfersResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetTransfersResponseAllOf( - [void Function($GetTransfersResponseAllOfBuilder)? updates]) => - (new $GetTransfersResponseAllOfBuilder()..update(updates))._build(); - - _$$GetTransfersResponseAllOf._({this.data}) : super._(); - - @override - $GetTransfersResponseAllOf rebuild( - void Function($GetTransfersResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetTransfersResponseAllOfBuilder toBuilder() => - new $GetTransfersResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetTransfersResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetTransfersResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetTransfersResponseAllOfBuilder - implements - Builder<$GetTransfersResponseAllOf, $GetTransfersResponseAllOfBuilder>, - GetTransfersResponseAllOfBuilder { - _$$GetTransfersResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $GetTransfersResponseAllOfBuilder() { - $GetTransfersResponseAllOf._defaults(this); - } - - $GetTransfersResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetTransfersResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetTransfersResponseAllOf; - } - - @override - void update(void Function($GetTransfersResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetTransfersResponseAllOf build() => _build(); - - _$$GetTransfersResponseAllOf _build() { - _$$GetTransfersResponseAllOf _$result; - try { - _$result = - _$v ?? new _$$GetTransfersResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetTransfersResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_webhook_keys_response.g.dart b/lib/src/model/get_webhook_keys_response.g.dart deleted file mode 100644 index 88670fe..0000000 --- a/lib/src/model/get_webhook_keys_response.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_webhook_keys_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetWebhookKeysResponse extends GetWebhookKeysResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetWebhookKeysResponse( - [void Function(GetWebhookKeysResponseBuilder)? updates]) => - (new GetWebhookKeysResponseBuilder()..update(updates))._build(); - - _$GetWebhookKeysResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetWebhookKeysResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetWebhookKeysResponse', 'object'); - } - - @override - GetWebhookKeysResponse rebuild( - void Function(GetWebhookKeysResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetWebhookKeysResponseBuilder toBuilder() => - new GetWebhookKeysResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetWebhookKeysResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetWebhookKeysResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetWebhookKeysResponseBuilder - implements - Builder, - GetWebhookKeysResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetWebhookKeysResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetWebhookKeysResponseBuilder() { - GetWebhookKeysResponse._defaults(this); - } - - GetWebhookKeysResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetWebhookKeysResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetWebhookKeysResponse; - } - - @override - void update(void Function(GetWebhookKeysResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetWebhookKeysResponse build() => _build(); - - _$GetWebhookKeysResponse _build() { - _$GetWebhookKeysResponse _$result; - try { - _$result = _$v ?? - new _$GetWebhookKeysResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetWebhookKeysResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetWebhookKeysResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetWebhookKeysResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_webhook_keys_response_all_of.g.dart b/lib/src/model/get_webhook_keys_response_all_of.g.dart deleted file mode 100644 index 7829405..0000000 --- a/lib/src/model/get_webhook_keys_response_all_of.g.dart +++ /dev/null @@ -1,115 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_webhook_keys_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetWebhookKeysResponseAllOfBuilder { - void replace(GetWebhookKeysResponseAllOf other); - void update(void Function(GetWebhookKeysResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetWebhookKeysResponseAllOf extends $GetWebhookKeysResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetWebhookKeysResponseAllOf( - [void Function($GetWebhookKeysResponseAllOfBuilder)? updates]) => - (new $GetWebhookKeysResponseAllOfBuilder()..update(updates))._build(); - - _$$GetWebhookKeysResponseAllOf._({this.data}) : super._(); - - @override - $GetWebhookKeysResponseAllOf rebuild( - void Function($GetWebhookKeysResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetWebhookKeysResponseAllOfBuilder toBuilder() => - new $GetWebhookKeysResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetWebhookKeysResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetWebhookKeysResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetWebhookKeysResponseAllOfBuilder - implements - Builder<$GetWebhookKeysResponseAllOf, - $GetWebhookKeysResponseAllOfBuilder>, - GetWebhookKeysResponseAllOfBuilder { - _$$GetWebhookKeysResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $GetWebhookKeysResponseAllOfBuilder() { - $GetWebhookKeysResponseAllOf._defaults(this); - } - - $GetWebhookKeysResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetWebhookKeysResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetWebhookKeysResponseAllOf; - } - - @override - void update(void Function($GetWebhookKeysResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetWebhookKeysResponseAllOf build() => _build(); - - _$$GetWebhookKeysResponseAllOf _build() { - _$$GetWebhookKeysResponseAllOf _$result; - try { - _$result = - _$v ?? new _$$GetWebhookKeysResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetWebhookKeysResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_webhooks_response.g.dart b/lib/src/model/get_webhooks_response.g.dart deleted file mode 100644 index 53aa7ac..0000000 --- a/lib/src/model/get_webhooks_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_webhooks_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$GetWebhooksResponse extends GetWebhooksResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$GetWebhooksResponse( - [void Function(GetWebhooksResponseBuilder)? updates]) => - (new GetWebhooksResponseBuilder()..update(updates))._build(); - - _$GetWebhooksResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetWebhooksResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'GetWebhooksResponse', 'object'); - } - - @override - GetWebhooksResponse rebuild( - void Function(GetWebhooksResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - GetWebhooksResponseBuilder toBuilder() => - new GetWebhooksResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is GetWebhooksResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'GetWebhooksResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class GetWebhooksResponseBuilder - implements - Builder, - GetWebhooksResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$GetWebhooksResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - GetWebhooksResponseBuilder() { - GetWebhooksResponse._defaults(this); - } - - GetWebhooksResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant GetWebhooksResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$GetWebhooksResponse; - } - - @override - void update(void Function(GetWebhooksResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - GetWebhooksResponse build() => _build(); - - _$GetWebhooksResponse _build() { - _$GetWebhooksResponse _$result; - try { - _$result = _$v ?? - new _$GetWebhooksResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'GetWebhooksResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'GetWebhooksResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'GetWebhooksResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/get_webhooks_response_all_of.g.dart b/lib/src/model/get_webhooks_response_all_of.g.dart deleted file mode 100644 index b62da67..0000000 --- a/lib/src/model/get_webhooks_response_all_of.g.dart +++ /dev/null @@ -1,112 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'get_webhooks_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class GetWebhooksResponseAllOfBuilder { - void replace(GetWebhooksResponseAllOf other); - void update(void Function(GetWebhooksResponseAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$GetWebhooksResponseAllOf extends $GetWebhooksResponseAllOf { - @override - final BuiltList? data; - - factory _$$GetWebhooksResponseAllOf( - [void Function($GetWebhooksResponseAllOfBuilder)? updates]) => - (new $GetWebhooksResponseAllOfBuilder()..update(updates))._build(); - - _$$GetWebhooksResponseAllOf._({this.data}) : super._(); - - @override - $GetWebhooksResponseAllOf rebuild( - void Function($GetWebhooksResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $GetWebhooksResponseAllOfBuilder toBuilder() => - new $GetWebhooksResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $GetWebhooksResponseAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$GetWebhooksResponseAllOf') - ..add('data', data)) - .toString(); - } -} - -class $GetWebhooksResponseAllOfBuilder - implements - Builder<$GetWebhooksResponseAllOf, $GetWebhooksResponseAllOfBuilder>, - GetWebhooksResponseAllOfBuilder { - _$$GetWebhooksResponseAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $GetWebhooksResponseAllOfBuilder() { - $GetWebhooksResponseAllOf._defaults(this); - } - - $GetWebhooksResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $GetWebhooksResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$GetWebhooksResponseAllOf; - } - - @override - void update(void Function($GetWebhooksResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $GetWebhooksResponseAllOf build() => _build(); - - _$$GetWebhooksResponseAllOf _build() { - _$$GetWebhooksResponseAllOf _$result; - try { - _$result = _$v ?? new _$$GetWebhooksResponseAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$GetWebhooksResponseAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/log_response.g.dart b/lib/src/model/log_response.g.dart deleted file mode 100644 index e19ae8a..0000000 --- a/lib/src/model/log_response.g.dart +++ /dev/null @@ -1,375 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'log_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$LogResponse extends LogResponse { - @override - final int createdAt; - @override - final String id; - @override - final String? ipAddress; - @override - final bool livemode; - @override - final String? loggableId; - @override - final String? loggableType; - @override - final String? method; - @override - final String? oauthTokenId; - @override - final BuiltMap? queryString; - @override - final String? related; - @override - final JsonObject? requestBody; - @override - final BuiltMap? requestHeaders; - @override - final JsonObject? responseBody; - @override - final BuiltMap? responseHeaders; - @override - final BuiltList? searchableTags; - @override - final String? status; - @override - final String? updatedAt; - @override - final String? url; - @override - final String? userAccountId; - @override - final String? version; - - factory _$LogResponse([void Function(LogResponseBuilder)? updates]) => - (new LogResponseBuilder()..update(updates))._build(); - - _$LogResponse._( - {required this.createdAt, - required this.id, - this.ipAddress, - required this.livemode, - this.loggableId, - this.loggableType, - this.method, - this.oauthTokenId, - this.queryString, - this.related, - this.requestBody, - this.requestHeaders, - this.responseBody, - this.responseHeaders, - this.searchableTags, - this.status, - this.updatedAt, - this.url, - this.userAccountId, - this.version}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - createdAt, r'LogResponse', 'createdAt'); - BuiltValueNullFieldError.checkNotNull(id, r'LogResponse', 'id'); - BuiltValueNullFieldError.checkNotNull(livemode, r'LogResponse', 'livemode'); - } - - @override - LogResponse rebuild(void Function(LogResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - LogResponseBuilder toBuilder() => new LogResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is LogResponse && - createdAt == other.createdAt && - id == other.id && - ipAddress == other.ipAddress && - livemode == other.livemode && - loggableId == other.loggableId && - loggableType == other.loggableType && - method == other.method && - oauthTokenId == other.oauthTokenId && - queryString == other.queryString && - related == other.related && - requestBody == other.requestBody && - requestHeaders == other.requestHeaders && - responseBody == other.responseBody && - responseHeaders == other.responseHeaders && - searchableTags == other.searchableTags && - status == other.status && - updatedAt == other.updatedAt && - url == other.url && - userAccountId == other.userAccountId && - version == other.version; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, createdAt.hashCode), - id.hashCode), - ipAddress.hashCode), - livemode.hashCode), - loggableId.hashCode), - loggableType.hashCode), - method.hashCode), - oauthTokenId.hashCode), - queryString.hashCode), - related.hashCode), - requestBody.hashCode), - requestHeaders.hashCode), - responseBody.hashCode), - responseHeaders.hashCode), - searchableTags.hashCode), - status.hashCode), - updatedAt.hashCode), - url.hashCode), - userAccountId.hashCode), - version.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'LogResponse') - ..add('createdAt', createdAt) - ..add('id', id) - ..add('ipAddress', ipAddress) - ..add('livemode', livemode) - ..add('loggableId', loggableId) - ..add('loggableType', loggableType) - ..add('method', method) - ..add('oauthTokenId', oauthTokenId) - ..add('queryString', queryString) - ..add('related', related) - ..add('requestBody', requestBody) - ..add('requestHeaders', requestHeaders) - ..add('responseBody', responseBody) - ..add('responseHeaders', responseHeaders) - ..add('searchableTags', searchableTags) - ..add('status', status) - ..add('updatedAt', updatedAt) - ..add('url', url) - ..add('userAccountId', userAccountId) - ..add('version', version)) - .toString(); - } -} - -class LogResponseBuilder implements Builder { - _$LogResponse? _$v; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _ipAddress; - String? get ipAddress => _$this._ipAddress; - set ipAddress(String? ipAddress) => _$this._ipAddress = ipAddress; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _loggableId; - String? get loggableId => _$this._loggableId; - set loggableId(String? loggableId) => _$this._loggableId = loggableId; - - String? _loggableType; - String? get loggableType => _$this._loggableType; - set loggableType(String? loggableType) => _$this._loggableType = loggableType; - - String? _method; - String? get method => _$this._method; - set method(String? method) => _$this._method = method; - - String? _oauthTokenId; - String? get oauthTokenId => _$this._oauthTokenId; - set oauthTokenId(String? oauthTokenId) => _$this._oauthTokenId = oauthTokenId; - - MapBuilder? _queryString; - MapBuilder get queryString => - _$this._queryString ??= new MapBuilder(); - set queryString(MapBuilder? queryString) => - _$this._queryString = queryString; - - String? _related; - String? get related => _$this._related; - set related(String? related) => _$this._related = related; - - JsonObject? _requestBody; - JsonObject? get requestBody => _$this._requestBody; - set requestBody(JsonObject? requestBody) => _$this._requestBody = requestBody; - - MapBuilder? _requestHeaders; - MapBuilder get requestHeaders => - _$this._requestHeaders ??= new MapBuilder(); - set requestHeaders(MapBuilder? requestHeaders) => - _$this._requestHeaders = requestHeaders; - - JsonObject? _responseBody; - JsonObject? get responseBody => _$this._responseBody; - set responseBody(JsonObject? responseBody) => - _$this._responseBody = responseBody; - - MapBuilder? _responseHeaders; - MapBuilder get responseHeaders => - _$this._responseHeaders ??= new MapBuilder(); - set responseHeaders(MapBuilder? responseHeaders) => - _$this._responseHeaders = responseHeaders; - - ListBuilder? _searchableTags; - ListBuilder get searchableTags => - _$this._searchableTags ??= new ListBuilder(); - set searchableTags(ListBuilder? searchableTags) => - _$this._searchableTags = searchableTags; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _updatedAt; - String? get updatedAt => _$this._updatedAt; - set updatedAt(String? updatedAt) => _$this._updatedAt = updatedAt; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - String? _userAccountId; - String? get userAccountId => _$this._userAccountId; - set userAccountId(String? userAccountId) => - _$this._userAccountId = userAccountId; - - String? _version; - String? get version => _$this._version; - set version(String? version) => _$this._version = version; - - LogResponseBuilder() { - LogResponse._defaults(this); - } - - LogResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _createdAt = $v.createdAt; - _id = $v.id; - _ipAddress = $v.ipAddress; - _livemode = $v.livemode; - _loggableId = $v.loggableId; - _loggableType = $v.loggableType; - _method = $v.method; - _oauthTokenId = $v.oauthTokenId; - _queryString = $v.queryString?.toBuilder(); - _related = $v.related; - _requestBody = $v.requestBody; - _requestHeaders = $v.requestHeaders?.toBuilder(); - _responseBody = $v.responseBody; - _responseHeaders = $v.responseHeaders?.toBuilder(); - _searchableTags = $v.searchableTags?.toBuilder(); - _status = $v.status; - _updatedAt = $v.updatedAt; - _url = $v.url; - _userAccountId = $v.userAccountId; - _version = $v.version; - _$v = null; - } - return this; - } - - @override - void replace(LogResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$LogResponse; - } - - @override - void update(void Function(LogResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - LogResponse build() => _build(); - - _$LogResponse _build() { - _$LogResponse _$result; - try { - _$result = _$v ?? - new _$LogResponse._( - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'LogResponse', 'createdAt'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'LogResponse', 'id'), - ipAddress: ipAddress, - livemode: BuiltValueNullFieldError.checkNotNull( - livemode, r'LogResponse', 'livemode'), - loggableId: loggableId, - loggableType: loggableType, - method: method, - oauthTokenId: oauthTokenId, - queryString: _queryString?.build(), - related: related, - requestBody: requestBody, - requestHeaders: _requestHeaders?.build(), - responseBody: responseBody, - responseHeaders: _responseHeaders?.build(), - searchableTags: _searchableTags?.build(), - status: status, - updatedAt: updatedAt, - url: url, - userAccountId: userAccountId, - version: version); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'queryString'; - _queryString?.build(); - - _$failedField = 'requestHeaders'; - _requestHeaders?.build(); - - _$failedField = 'responseHeaders'; - _responseHeaders?.build(); - _$failedField = 'searchableTags'; - _searchableTags?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'LogResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/logs_response.g.dart b/lib/src/model/logs_response.g.dart deleted file mode 100644 index a9a566a..0000000 --- a/lib/src/model/logs_response.g.dart +++ /dev/null @@ -1,155 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'logs_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$LogsResponse extends LogsResponse { - @override - final bool? hasMore; - @override - final String? object; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final BuiltList? data; - - factory _$LogsResponse([void Function(LogsResponseBuilder)? updates]) => - (new LogsResponseBuilder()..update(updates))._build(); - - _$LogsResponse._( - {this.hasMore, - this.object, - this.nextPageUrl, - this.previousPageUrl, - this.data}) - : super._(); - - @override - LogsResponse rebuild(void Function(LogsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - LogsResponseBuilder toBuilder() => new LogsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is LogsResponse && - hasMore == other.hasMore && - object == other.object && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - data == other.data; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, hasMore.hashCode), object.hashCode), - nextPageUrl.hashCode), - previousPageUrl.hashCode), - data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'LogsResponse') - ..add('hasMore', hasMore) - ..add('object', object) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('data', data)) - .toString(); - } -} - -class LogsResponseBuilder - implements Builder { - _$LogsResponse? _$v; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(String? nextPageUrl) => _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(ListBuilder? data) => _$this._data = data; - - LogsResponseBuilder() { - LogsResponse._defaults(this); - } - - LogsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _hasMore = $v.hasMore; - _object = $v.object; - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(LogsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$LogsResponse; - } - - @override - void update(void Function(LogsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - LogsResponse build() => _build(); - - _$LogsResponse _build() { - _$LogsResponse _$result; - try { - _$result = _$v ?? - new _$LogsResponse._( - hasMore: hasMore, - object: object, - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'LogsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/logs_response_data.g.dart b/lib/src/model/logs_response_data.g.dart deleted file mode 100644 index 8311a8d..0000000 --- a/lib/src/model/logs_response_data.g.dart +++ /dev/null @@ -1,370 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'logs_response_data.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$LogsResponseData extends LogsResponseData { - @override - final int? createdAt; - @override - final String? id; - @override - final String? ipAddress; - @override - final bool? livemode; - @override - final String? loggableId; - @override - final String? loggableType; - @override - final String? method; - @override - final String? oauthTokenId; - @override - final BuiltMap? queryString; - @override - final String? related; - @override - final JsonObject? requestBody; - @override - final BuiltMap? requestHeaders; - @override - final JsonObject? responseBody; - @override - final BuiltMap? responseHeaders; - @override - final BuiltList? searchableTags; - @override - final String? status; - @override - final String? updatedAt; - @override - final String? url; - @override - final String? userAccountId; - @override - final String? version; - - factory _$LogsResponseData( - [void Function(LogsResponseDataBuilder)? updates]) => - (new LogsResponseDataBuilder()..update(updates))._build(); - - _$LogsResponseData._( - {this.createdAt, - this.id, - this.ipAddress, - this.livemode, - this.loggableId, - this.loggableType, - this.method, - this.oauthTokenId, - this.queryString, - this.related, - this.requestBody, - this.requestHeaders, - this.responseBody, - this.responseHeaders, - this.searchableTags, - this.status, - this.updatedAt, - this.url, - this.userAccountId, - this.version}) - : super._(); - - @override - LogsResponseData rebuild(void Function(LogsResponseDataBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - LogsResponseDataBuilder toBuilder() => - new LogsResponseDataBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is LogsResponseData && - createdAt == other.createdAt && - id == other.id && - ipAddress == other.ipAddress && - livemode == other.livemode && - loggableId == other.loggableId && - loggableType == other.loggableType && - method == other.method && - oauthTokenId == other.oauthTokenId && - queryString == other.queryString && - related == other.related && - requestBody == other.requestBody && - requestHeaders == other.requestHeaders && - responseBody == other.responseBody && - responseHeaders == other.responseHeaders && - searchableTags == other.searchableTags && - status == other.status && - updatedAt == other.updatedAt && - url == other.url && - userAccountId == other.userAccountId && - version == other.version; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, createdAt.hashCode), - id.hashCode), - ipAddress.hashCode), - livemode.hashCode), - loggableId.hashCode), - loggableType.hashCode), - method.hashCode), - oauthTokenId.hashCode), - queryString.hashCode), - related.hashCode), - requestBody.hashCode), - requestHeaders.hashCode), - responseBody.hashCode), - responseHeaders.hashCode), - searchableTags.hashCode), - status.hashCode), - updatedAt.hashCode), - url.hashCode), - userAccountId.hashCode), - version.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'LogsResponseData') - ..add('createdAt', createdAt) - ..add('id', id) - ..add('ipAddress', ipAddress) - ..add('livemode', livemode) - ..add('loggableId', loggableId) - ..add('loggableType', loggableType) - ..add('method', method) - ..add('oauthTokenId', oauthTokenId) - ..add('queryString', queryString) - ..add('related', related) - ..add('requestBody', requestBody) - ..add('requestHeaders', requestHeaders) - ..add('responseBody', responseBody) - ..add('responseHeaders', responseHeaders) - ..add('searchableTags', searchableTags) - ..add('status', status) - ..add('updatedAt', updatedAt) - ..add('url', url) - ..add('userAccountId', userAccountId) - ..add('version', version)) - .toString(); - } -} - -class LogsResponseDataBuilder - implements Builder { - _$LogsResponseData? _$v; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _ipAddress; - String? get ipAddress => _$this._ipAddress; - set ipAddress(String? ipAddress) => _$this._ipAddress = ipAddress; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _loggableId; - String? get loggableId => _$this._loggableId; - set loggableId(String? loggableId) => _$this._loggableId = loggableId; - - String? _loggableType; - String? get loggableType => _$this._loggableType; - set loggableType(String? loggableType) => _$this._loggableType = loggableType; - - String? _method; - String? get method => _$this._method; - set method(String? method) => _$this._method = method; - - String? _oauthTokenId; - String? get oauthTokenId => _$this._oauthTokenId; - set oauthTokenId(String? oauthTokenId) => _$this._oauthTokenId = oauthTokenId; - - MapBuilder? _queryString; - MapBuilder get queryString => - _$this._queryString ??= new MapBuilder(); - set queryString(MapBuilder? queryString) => - _$this._queryString = queryString; - - String? _related; - String? get related => _$this._related; - set related(String? related) => _$this._related = related; - - JsonObject? _requestBody; - JsonObject? get requestBody => _$this._requestBody; - set requestBody(JsonObject? requestBody) => _$this._requestBody = requestBody; - - MapBuilder? _requestHeaders; - MapBuilder get requestHeaders => - _$this._requestHeaders ??= new MapBuilder(); - set requestHeaders(MapBuilder? requestHeaders) => - _$this._requestHeaders = requestHeaders; - - JsonObject? _responseBody; - JsonObject? get responseBody => _$this._responseBody; - set responseBody(JsonObject? responseBody) => - _$this._responseBody = responseBody; - - MapBuilder? _responseHeaders; - MapBuilder get responseHeaders => - _$this._responseHeaders ??= new MapBuilder(); - set responseHeaders(MapBuilder? responseHeaders) => - _$this._responseHeaders = responseHeaders; - - ListBuilder? _searchableTags; - ListBuilder get searchableTags => - _$this._searchableTags ??= new ListBuilder(); - set searchableTags(ListBuilder? searchableTags) => - _$this._searchableTags = searchableTags; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _updatedAt; - String? get updatedAt => _$this._updatedAt; - set updatedAt(String? updatedAt) => _$this._updatedAt = updatedAt; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - String? _userAccountId; - String? get userAccountId => _$this._userAccountId; - set userAccountId(String? userAccountId) => - _$this._userAccountId = userAccountId; - - String? _version; - String? get version => _$this._version; - set version(String? version) => _$this._version = version; - - LogsResponseDataBuilder() { - LogsResponseData._defaults(this); - } - - LogsResponseDataBuilder get _$this { - final $v = _$v; - if ($v != null) { - _createdAt = $v.createdAt; - _id = $v.id; - _ipAddress = $v.ipAddress; - _livemode = $v.livemode; - _loggableId = $v.loggableId; - _loggableType = $v.loggableType; - _method = $v.method; - _oauthTokenId = $v.oauthTokenId; - _queryString = $v.queryString?.toBuilder(); - _related = $v.related; - _requestBody = $v.requestBody; - _requestHeaders = $v.requestHeaders?.toBuilder(); - _responseBody = $v.responseBody; - _responseHeaders = $v.responseHeaders?.toBuilder(); - _searchableTags = $v.searchableTags?.toBuilder(); - _status = $v.status; - _updatedAt = $v.updatedAt; - _url = $v.url; - _userAccountId = $v.userAccountId; - _version = $v.version; - _$v = null; - } - return this; - } - - @override - void replace(LogsResponseData other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$LogsResponseData; - } - - @override - void update(void Function(LogsResponseDataBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - LogsResponseData build() => _build(); - - _$LogsResponseData _build() { - _$LogsResponseData _$result; - try { - _$result = _$v ?? - new _$LogsResponseData._( - createdAt: createdAt, - id: id, - ipAddress: ipAddress, - livemode: livemode, - loggableId: loggableId, - loggableType: loggableType, - method: method, - oauthTokenId: oauthTokenId, - queryString: _queryString?.build(), - related: related, - requestBody: requestBody, - requestHeaders: _requestHeaders?.build(), - responseBody: responseBody, - responseHeaders: _responseHeaders?.build(), - searchableTags: _searchableTags?.build(), - status: status, - updatedAt: updatedAt, - url: url, - userAccountId: userAccountId, - version: version); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'queryString'; - _queryString?.build(); - - _$failedField = 'requestHeaders'; - _requestHeaders?.build(); - - _$failedField = 'responseHeaders'; - _responseHeaders?.build(); - _$failedField = 'searchableTags'; - _searchableTags?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'LogsResponseData', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_capture_request.g.dart b/lib/src/model/order_capture_request.g.dart deleted file mode 100644 index f475f39..0000000 --- a/lib/src/model/order_capture_request.g.dart +++ /dev/null @@ -1,95 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_capture_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderCaptureRequest extends OrderCaptureRequest { - @override - final int amount; - - factory _$OrderCaptureRequest( - [void Function(OrderCaptureRequestBuilder)? updates]) => - (new OrderCaptureRequestBuilder()..update(updates))._build(); - - _$OrderCaptureRequest._({required this.amount}) : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'OrderCaptureRequest', 'amount'); - } - - @override - OrderCaptureRequest rebuild( - void Function(OrderCaptureRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderCaptureRequestBuilder toBuilder() => - new OrderCaptureRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderCaptureRequest && amount == other.amount; - } - - @override - int get hashCode { - return $jf($jc(0, amount.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderCaptureRequest') - ..add('amount', amount)) - .toString(); - } -} - -class OrderCaptureRequestBuilder - implements Builder { - _$OrderCaptureRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - OrderCaptureRequestBuilder() { - OrderCaptureRequest._defaults(this); - } - - OrderCaptureRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _$v = null; - } - return this; - } - - @override - void replace(OrderCaptureRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderCaptureRequest; - } - - @override - void update(void Function(OrderCaptureRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderCaptureRequest build() => _build(); - - _$OrderCaptureRequest _build() { - final _$result = _$v ?? - new _$OrderCaptureRequest._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'OrderCaptureRequest', 'amount')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/customer_info_response.dart b/lib/src/model/order_customer_info_response.dart similarity index 64% rename from lib/src/model/customer_info_response.dart rename to lib/src/model/order_customer_info_response.dart index bc3b463..331f0b9 100644 --- a/lib/src/model/customer_info_response.dart +++ b/lib/src/model/order_customer_info_response.dart @@ -6,18 +6,23 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; -part 'customer_info_response.g.dart'; +part 'order_customer_info_response.g.dart'; -/// CustomerInfoResponse +/// OrderCustomerInfoResponse /// /// Properties: +/// * [customerCustomReference] - Custom reference /// * [name] /// * [email] /// * [phone] /// * [corporate] /// * [object] @BuiltValue(instantiable: false) -abstract class CustomerInfoResponse { +abstract class OrderCustomerInfoResponse { + /// Custom reference + @BuiltValueField(wireName: r'customer_custom_reference') + String? get customerCustomReference; + @BuiltValueField(wireName: r'name') String? get name; @@ -34,21 +39,28 @@ abstract class CustomerInfoResponse { String? get object; @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CustomerInfoResponseSerializer(); + static Serializer get serializer => _$OrderCustomerInfoResponseSerializer(); } -class _$CustomerInfoResponseSerializer implements PrimitiveSerializer { +class _$OrderCustomerInfoResponseSerializer implements PrimitiveSerializer { @override - final Iterable types = const [CustomerInfoResponse]; + final Iterable types = const [OrderCustomerInfoResponse]; @override - final String wireName = r'CustomerInfoResponse'; + final String wireName = r'OrderCustomerInfoResponse'; Iterable _serializeProperties( Serializers serializers, - CustomerInfoResponse object, { + OrderCustomerInfoResponse object, { FullType specifiedType = FullType.unspecified, }) sync* { + if (object.customerCustomReference != null) { + yield r'customer_custom_reference'; + yield serializers.serialize( + object.customerCustomReference, + specifiedType: const FullType.nullable(String), + ); + } if (object.name != null) { yield r'name'; yield serializers.serialize( @@ -89,50 +101,50 @@ class _$CustomerInfoResponseSerializer implements PrimitiveSerializer { - $CustomerInfoResponse._(); +abstract class $OrderCustomerInfoResponse implements OrderCustomerInfoResponse, Built<$OrderCustomerInfoResponse, $OrderCustomerInfoResponseBuilder> { + $OrderCustomerInfoResponse._(); - factory $CustomerInfoResponse([void Function($CustomerInfoResponseBuilder)? updates]) = _$$CustomerInfoResponse; + factory $OrderCustomerInfoResponse([void Function($OrderCustomerInfoResponseBuilder)? updates]) = _$$OrderCustomerInfoResponse; @BuiltValueHook(initializeBuilder: true) - static void _defaults($CustomerInfoResponseBuilder b) => b; + static void _defaults($OrderCustomerInfoResponseBuilder b) => b; @BuiltValueSerializer(custom: true) - static Serializer<$CustomerInfoResponse> get serializer => _$$CustomerInfoResponseSerializer(); + static Serializer<$OrderCustomerInfoResponse> get serializer => _$$OrderCustomerInfoResponseSerializer(); } -class _$$CustomerInfoResponseSerializer implements PrimitiveSerializer<$CustomerInfoResponse> { +class _$$OrderCustomerInfoResponseSerializer implements PrimitiveSerializer<$OrderCustomerInfoResponse> { @override - final Iterable types = const [$CustomerInfoResponse, _$$CustomerInfoResponse]; + final Iterable types = const [$OrderCustomerInfoResponse, _$$OrderCustomerInfoResponse]; @override - final String wireName = r'$CustomerInfoResponse'; + final String wireName = r'$OrderCustomerInfoResponse'; @override Object serialize( Serializers serializers, - $CustomerInfoResponse object, { + $OrderCustomerInfoResponse object, { FullType specifiedType = FullType.unspecified, }) { - return serializers.serialize(object, specifiedType: FullType(CustomerInfoResponse))!; + return serializers.serialize(object, specifiedType: FullType(OrderCustomerInfoResponse))!; } void _deserializeProperties( @@ -140,13 +152,21 @@ class _$$CustomerInfoResponseSerializer implements PrimitiveSerializer<$Customer Object serialized, { FullType specifiedType = FullType.unspecified, required List serializedList, - required CustomerInfoResponseBuilder result, + required OrderCustomerInfoResponseBuilder result, required List unhandled, }) { for (var i = 0; i < serializedList.length; i += 2) { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { + case r'customer_custom_reference': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.customerCustomReference = valueDes; + break; case r'name': final valueDes = serializers.deserialize( value, @@ -191,12 +211,12 @@ class _$$CustomerInfoResponseSerializer implements PrimitiveSerializer<$Customer } @override - $CustomerInfoResponse deserialize( + $OrderCustomerInfoResponse deserialize( Serializers serializers, Object serialized, { FullType specifiedType = FullType.unspecified, }) { - final result = $CustomerInfoResponseBuilder(); + final result = $OrderCustomerInfoResponseBuilder(); final serializedList = (serialized as Iterable).toList(); final unhandled = []; _deserializeProperties( diff --git a/lib/src/model/order_discount_lines_request.g.dart b/lib/src/model/order_discount_lines_request.g.dart deleted file mode 100644 index 85e9925..0000000 --- a/lib/src/model/order_discount_lines_request.g.dart +++ /dev/null @@ -1,139 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_discount_lines_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderDiscountLinesRequestBuilder { - void replace(OrderDiscountLinesRequest other); - void update(void Function(OrderDiscountLinesRequestBuilder) updates); - int? get amount; - set amount(int? amount); - - String? get code; - set code(String? code); - - String? get type; - set type(String? type); -} - -class _$$OrderDiscountLinesRequest extends $OrderDiscountLinesRequest { - @override - final int amount; - @override - final String code; - @override - final String type; - - factory _$$OrderDiscountLinesRequest( - [void Function($OrderDiscountLinesRequestBuilder)? updates]) => - (new $OrderDiscountLinesRequestBuilder()..update(updates))._build(); - - _$$OrderDiscountLinesRequest._( - {required this.amount, required this.code, required this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'$OrderDiscountLinesRequest', 'amount'); - BuiltValueNullFieldError.checkNotNull( - code, r'$OrderDiscountLinesRequest', 'code'); - BuiltValueNullFieldError.checkNotNull( - type, r'$OrderDiscountLinesRequest', 'type'); - } - - @override - $OrderDiscountLinesRequest rebuild( - void Function($OrderDiscountLinesRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderDiscountLinesRequestBuilder toBuilder() => - new $OrderDiscountLinesRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderDiscountLinesRequest && - amount == other.amount && - code == other.code && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc($jc($jc(0, amount.hashCode), code.hashCode), type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderDiscountLinesRequest') - ..add('amount', amount) - ..add('code', code) - ..add('type', type)) - .toString(); - } -} - -class $OrderDiscountLinesRequestBuilder - implements - Builder<$OrderDiscountLinesRequest, $OrderDiscountLinesRequestBuilder>, - OrderDiscountLinesRequestBuilder { - _$$OrderDiscountLinesRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _code; - String? get code => _$this._code; - set code(covariant String? code) => _$this._code = code; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - $OrderDiscountLinesRequestBuilder() { - $OrderDiscountLinesRequest._defaults(this); - } - - $OrderDiscountLinesRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _code = $v.code; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderDiscountLinesRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderDiscountLinesRequest; - } - - @override - void update(void Function($OrderDiscountLinesRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderDiscountLinesRequest build() => _build(); - - _$$OrderDiscountLinesRequest _build() { - final _$result = _$v ?? - new _$$OrderDiscountLinesRequest._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'$OrderDiscountLinesRequest', 'amount'), - code: BuiltValueNullFieldError.checkNotNull( - code, r'$OrderDiscountLinesRequest', 'code'), - type: BuiltValueNullFieldError.checkNotNull( - type, r'$OrderDiscountLinesRequest', 'type')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_fiscal_entity_address.dart b/lib/src/model/order_fiscal_entity_address_response.dart similarity index 64% rename from lib/src/model/order_response_fiscal_entity_address.dart rename to lib/src/model/order_fiscal_entity_address_response.dart index e380c60..643e8f1 100644 --- a/lib/src/model/order_response_fiscal_entity_address.dart +++ b/lib/src/model/order_fiscal_entity_address_response.dart @@ -3,76 +3,64 @@ // // ignore_for_file: unused_element -import 'package:conekta/src/model/customer_address.dart'; -import 'package:conekta/src/model/order_response_fiscal_entity_address_all_of.dart'; +import 'package:conekta/src/model/order_fiscal_entity_address_response_all_of.dart'; +import 'package:conekta/src/model/fiscal_entity_address.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; -part 'order_response_fiscal_entity_address.g.dart'; +part 'order_fiscal_entity_address_response.g.dart'; -/// OrderResponseFiscalEntityAddress +/// Address of the fiscal entity /// /// Properties: -/// * [street1] -/// * [street2] -/// * [postalCode] -/// * [city] -/// * [state] +/// * [street1] - Street name and number +/// * [street2] - Street name and number +/// * [postalCode] - Postal code +/// * [city] - City +/// * [state] - State /// * [country] - this field follows the [ISO 3166-1 alpha-2 standard](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) -/// * [residential] -/// * [externalNumber] +/// * [externalNumber] - External number /// * [object] @BuiltValue() -abstract class OrderResponseFiscalEntityAddress implements CustomerAddress, OrderResponseFiscalEntityAddressAllOf, Built { - OrderResponseFiscalEntityAddress._(); +abstract class OrderFiscalEntityAddressResponse implements FiscalEntityAddress, OrderFiscalEntityAddressResponseAllOf, Built { + OrderFiscalEntityAddressResponse._(); - factory OrderResponseFiscalEntityAddress([void updates(OrderResponseFiscalEntityAddressBuilder b)]) = _$OrderResponseFiscalEntityAddress; + factory OrderFiscalEntityAddressResponse([void updates(OrderFiscalEntityAddressResponseBuilder b)]) = _$OrderFiscalEntityAddressResponse; @BuiltValueHook(initializeBuilder: true) - static void _defaults(OrderResponseFiscalEntityAddressBuilder b) => b; + static void _defaults(OrderFiscalEntityAddressResponseBuilder b) => b; @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OrderResponseFiscalEntityAddressSerializer(); + static Serializer get serializer => _$OrderFiscalEntityAddressResponseSerializer(); } -class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerializer { +class _$OrderFiscalEntityAddressResponseSerializer implements PrimitiveSerializer { @override - final Iterable types = const [OrderResponseFiscalEntityAddress, _$OrderResponseFiscalEntityAddress]; + final Iterable types = const [OrderFiscalEntityAddressResponse, _$OrderFiscalEntityAddressResponse]; @override - final String wireName = r'OrderResponseFiscalEntityAddress'; + final String wireName = r'OrderFiscalEntityAddressResponse'; Iterable _serializeProperties( Serializers serializers, - OrderResponseFiscalEntityAddress object, { + OrderFiscalEntityAddressResponse object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.country != null) { - yield r'country'; - yield serializers.serialize( - object.country, - specifiedType: const FullType(String), - ); - } - if (object.residential != null) { - yield r'residential'; - yield serializers.serialize( - object.residential, - specifiedType: const FullType(bool), - ); - } + yield r'country'; + yield serializers.serialize( + object.country, + specifiedType: const FullType(String), + ); yield r'city'; yield serializers.serialize( object.city, specifiedType: const FullType(String), ); - if (object.externalNumber != null) { - yield r'external_number'; - yield serializers.serialize( - object.externalNumber, - specifiedType: const FullType(String), - ); - } + yield r'external_number'; + yield serializers.serialize( + object.externalNumber, + specifiedType: const FullType(String), + ); yield r'postal_code'; yield serializers.serialize( object.postalCode, @@ -87,7 +75,7 @@ class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerialize yield r'street2'; yield serializers.serialize( object.street2, - specifiedType: const FullType(String), + specifiedType: const FullType.nullable(String), ); } if (object.state != null) { @@ -109,7 +97,7 @@ class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerialize @override Object serialize( Serializers serializers, - OrderResponseFiscalEntityAddress object, { + OrderFiscalEntityAddressResponse object, { FullType specifiedType = FullType.unspecified, }) { return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); @@ -120,7 +108,7 @@ class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerialize Object serialized, { FullType specifiedType = FullType.unspecified, required List serializedList, - required OrderResponseFiscalEntityAddressBuilder result, + required OrderFiscalEntityAddressResponseBuilder result, required List unhandled, }) { for (var i = 0; i < serializedList.length; i += 2) { @@ -134,13 +122,6 @@ class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerialize ) as String; result.country = valueDes; break; - case r'residential': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(bool), - ) as bool; - result.residential = valueDes; - break; case r'city': final valueDes = serializers.deserialize( value, @@ -172,8 +153,9 @@ class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerialize case r'street2': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(String), - ) as String; + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; result.street2 = valueDes; break; case r'state': @@ -199,12 +181,12 @@ class _$OrderResponseFiscalEntityAddressSerializer implements PrimitiveSerialize } @override - OrderResponseFiscalEntityAddress deserialize( + OrderFiscalEntityAddressResponse deserialize( Serializers serializers, Object serialized, { FullType specifiedType = FullType.unspecified, }) { - final result = OrderResponseFiscalEntityAddressBuilder(); + final result = OrderFiscalEntityAddressResponseBuilder(); final serializedList = (serialized as Iterable).toList(); final unhandled = []; _deserializeProperties( diff --git a/lib/src/model/order_response_fiscal_entity_address_all_of.dart b/lib/src/model/order_fiscal_entity_address_response_all_of.dart similarity index 57% rename from lib/src/model/order_response_fiscal_entity_address_all_of.dart rename to lib/src/model/order_fiscal_entity_address_response_all_of.dart index c146004..58f7762 100644 --- a/lib/src/model/order_response_fiscal_entity_address_all_of.dart +++ b/lib/src/model/order_fiscal_entity_address_response_all_of.dart @@ -6,31 +6,31 @@ import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; -part 'order_response_fiscal_entity_address_all_of.g.dart'; +part 'order_fiscal_entity_address_response_all_of.g.dart'; -/// OrderResponseFiscalEntityAddressAllOf +/// OrderFiscalEntityAddressResponseAllOf /// /// Properties: /// * [object] @BuiltValue(instantiable: false) -abstract class OrderResponseFiscalEntityAddressAllOf { +abstract class OrderFiscalEntityAddressResponseAllOf { @BuiltValueField(wireName: r'object') String? get object; @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OrderResponseFiscalEntityAddressAllOfSerializer(); + static Serializer get serializer => _$OrderFiscalEntityAddressResponseAllOfSerializer(); } -class _$OrderResponseFiscalEntityAddressAllOfSerializer implements PrimitiveSerializer { +class _$OrderFiscalEntityAddressResponseAllOfSerializer implements PrimitiveSerializer { @override - final Iterable types = const [OrderResponseFiscalEntityAddressAllOf]; + final Iterable types = const [OrderFiscalEntityAddressResponseAllOf]; @override - final String wireName = r'OrderResponseFiscalEntityAddressAllOf'; + final String wireName = r'OrderFiscalEntityAddressResponseAllOf'; Iterable _serializeProperties( Serializers serializers, - OrderResponseFiscalEntityAddressAllOf object, { + OrderFiscalEntityAddressResponseAllOf object, { FullType specifiedType = FullType.unspecified, }) sync* { if (object.object != null) { @@ -45,50 +45,50 @@ class _$OrderResponseFiscalEntityAddressAllOfSerializer implements PrimitiveSeri @override Object serialize( Serializers serializers, - OrderResponseFiscalEntityAddressAllOf object, { + OrderFiscalEntityAddressResponseAllOf object, { FullType specifiedType = FullType.unspecified, }) { return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); } @override - OrderResponseFiscalEntityAddressAllOf deserialize( + OrderFiscalEntityAddressResponseAllOf deserialize( Serializers serializers, Object serialized, { FullType specifiedType = FullType.unspecified, }) { - return serializers.deserialize(serialized, specifiedType: FullType($OrderResponseFiscalEntityAddressAllOf)) as $OrderResponseFiscalEntityAddressAllOf; + return serializers.deserialize(serialized, specifiedType: FullType($OrderFiscalEntityAddressResponseAllOf)) as $OrderFiscalEntityAddressResponseAllOf; } } -/// a concrete implementation of [OrderResponseFiscalEntityAddressAllOf], since [OrderResponseFiscalEntityAddressAllOf] is not instantiable +/// a concrete implementation of [OrderFiscalEntityAddressResponseAllOf], since [OrderFiscalEntityAddressResponseAllOf] is not instantiable @BuiltValue(instantiable: true) -abstract class $OrderResponseFiscalEntityAddressAllOf implements OrderResponseFiscalEntityAddressAllOf, Built<$OrderResponseFiscalEntityAddressAllOf, $OrderResponseFiscalEntityAddressAllOfBuilder> { - $OrderResponseFiscalEntityAddressAllOf._(); +abstract class $OrderFiscalEntityAddressResponseAllOf implements OrderFiscalEntityAddressResponseAllOf, Built<$OrderFiscalEntityAddressResponseAllOf, $OrderFiscalEntityAddressResponseAllOfBuilder> { + $OrderFiscalEntityAddressResponseAllOf._(); - factory $OrderResponseFiscalEntityAddressAllOf([void Function($OrderResponseFiscalEntityAddressAllOfBuilder)? updates]) = _$$OrderResponseFiscalEntityAddressAllOf; + factory $OrderFiscalEntityAddressResponseAllOf([void Function($OrderFiscalEntityAddressResponseAllOfBuilder)? updates]) = _$$OrderFiscalEntityAddressResponseAllOf; @BuiltValueHook(initializeBuilder: true) - static void _defaults($OrderResponseFiscalEntityAddressAllOfBuilder b) => b; + static void _defaults($OrderFiscalEntityAddressResponseAllOfBuilder b) => b; @BuiltValueSerializer(custom: true) - static Serializer<$OrderResponseFiscalEntityAddressAllOf> get serializer => _$$OrderResponseFiscalEntityAddressAllOfSerializer(); + static Serializer<$OrderFiscalEntityAddressResponseAllOf> get serializer => _$$OrderFiscalEntityAddressResponseAllOfSerializer(); } -class _$$OrderResponseFiscalEntityAddressAllOfSerializer implements PrimitiveSerializer<$OrderResponseFiscalEntityAddressAllOf> { +class _$$OrderFiscalEntityAddressResponseAllOfSerializer implements PrimitiveSerializer<$OrderFiscalEntityAddressResponseAllOf> { @override - final Iterable types = const [$OrderResponseFiscalEntityAddressAllOf, _$$OrderResponseFiscalEntityAddressAllOf]; + final Iterable types = const [$OrderFiscalEntityAddressResponseAllOf, _$$OrderFiscalEntityAddressResponseAllOf]; @override - final String wireName = r'$OrderResponseFiscalEntityAddressAllOf'; + final String wireName = r'$OrderFiscalEntityAddressResponseAllOf'; @override Object serialize( Serializers serializers, - $OrderResponseFiscalEntityAddressAllOf object, { + $OrderFiscalEntityAddressResponseAllOf object, { FullType specifiedType = FullType.unspecified, }) { - return serializers.serialize(object, specifiedType: FullType(OrderResponseFiscalEntityAddressAllOf))!; + return serializers.serialize(object, specifiedType: FullType(OrderFiscalEntityAddressResponseAllOf))!; } void _deserializeProperties( @@ -96,7 +96,7 @@ class _$$OrderResponseFiscalEntityAddressAllOfSerializer implements PrimitiveSer Object serialized, { FullType specifiedType = FullType.unspecified, required List serializedList, - required OrderResponseFiscalEntityAddressAllOfBuilder result, + required OrderFiscalEntityAddressResponseAllOfBuilder result, required List unhandled, }) { for (var i = 0; i < serializedList.length; i += 2) { @@ -119,12 +119,12 @@ class _$$OrderResponseFiscalEntityAddressAllOfSerializer implements PrimitiveSer } @override - $OrderResponseFiscalEntityAddressAllOf deserialize( + $OrderFiscalEntityAddressResponseAllOf deserialize( Serializers serializers, Object serialized, { FullType specifiedType = FullType.unspecified, }) { - final result = $OrderResponseFiscalEntityAddressAllOfBuilder(); + final result = $OrderFiscalEntityAddressResponseAllOfBuilder(); final serializedList = (serialized as Iterable).toList(); final unhandled = []; _deserializeProperties( diff --git a/lib/src/model/order_fiscal_entity_request.dart b/lib/src/model/order_fiscal_entity_request.dart new file mode 100644 index 0000000..4610e5a --- /dev/null +++ b/lib/src/model/order_fiscal_entity_request.dart @@ -0,0 +1,206 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:conekta/src/model/fiscal_entity_address.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order_fiscal_entity_request.g.dart'; + +/// Fiscal entity of the order, Currently it is a purely informative field +/// +/// Properties: +/// * [address] +/// * [email] - Email of the fiscal entity +/// * [metadata] - Metadata associated with the fiscal entity +/// * [name] - Name of the fiscal entity +/// * [phone] - Phone of the fiscal entity +/// * [taxId] - Tax ID of the fiscal entity +@BuiltValue() +abstract class OrderFiscalEntityRequest implements Built { + @BuiltValueField(wireName: r'address') + FiscalEntityAddress get address; + + /// Email of the fiscal entity + @BuiltValueField(wireName: r'email') + String? get email; + + /// Metadata associated with the fiscal entity + @BuiltValueField(wireName: r'metadata') + BuiltMap? get metadata; + + /// Name of the fiscal entity + @BuiltValueField(wireName: r'name') + String? get name; + + /// Phone of the fiscal entity + @BuiltValueField(wireName: r'phone') + String? get phone; + + /// Tax ID of the fiscal entity + @BuiltValueField(wireName: r'tax_id') + String? get taxId; + + OrderFiscalEntityRequest._(); + + factory OrderFiscalEntityRequest([void updates(OrderFiscalEntityRequestBuilder b)]) = _$OrderFiscalEntityRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OrderFiscalEntityRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OrderFiscalEntityRequestSerializer(); +} + +class _$OrderFiscalEntityRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OrderFiscalEntityRequest, _$OrderFiscalEntityRequest]; + + @override + final String wireName = r'OrderFiscalEntityRequest'; + + Iterable _serializeProperties( + Serializers serializers, + OrderFiscalEntityRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'address'; + yield serializers.serialize( + object.address, + specifiedType: const FullType(FiscalEntityAddress), + ); + if (object.email != null) { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + } + if (object.metadata != null) { + yield r'metadata'; + yield serializers.serialize( + object.metadata, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType.nullable(String), + ); + } + if (object.phone != null) { + yield r'phone'; + yield serializers.serialize( + object.phone, + specifiedType: const FullType(String), + ); + } + if (object.taxId != null) { + yield r'tax_id'; + yield serializers.serialize( + object.taxId, + specifiedType: const FullType.nullable(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OrderFiscalEntityRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OrderFiscalEntityRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'address': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(FiscalEntityAddress), + ) as FiscalEntityAddress; + result.address = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'metadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.metadata.replace(valueDes); + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.name = valueDes; + break; + case r'phone': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.phone = valueDes; + break; + case r'tax_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.taxId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OrderFiscalEntityRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OrderFiscalEntityRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/order_fiscal_entity_response.dart b/lib/src/model/order_fiscal_entity_response.dart new file mode 100644 index 0000000..e9f342a --- /dev/null +++ b/lib/src/model/order_fiscal_entity_response.dart @@ -0,0 +1,258 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:conekta/src/model/order_fiscal_entity_address_response.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order_fiscal_entity_response.g.dart'; + +/// Fiscal entity of the order, Currently it is a purely informative field +/// +/// Properties: +/// * [address] +/// * [email] - Email of the fiscal entity +/// * [metadata] - Metadata associated with the fiscal entity +/// * [name] - Name of the fiscal entity +/// * [taxId] - Tax ID of the fiscal entity +/// * [id] - ID of the fiscal entity +/// * [createdAt] - The time at which the object was created in seconds since the Unix epoch +/// * [object] +/// * [phone] - Phone of the fiscal entity +@BuiltValue() +abstract class OrderFiscalEntityResponse implements Built { + @BuiltValueField(wireName: r'address') + OrderFiscalEntityAddressResponse get address; + + /// Email of the fiscal entity + @BuiltValueField(wireName: r'email') + String? get email; + + /// Metadata associated with the fiscal entity + @BuiltValueField(wireName: r'metadata') + BuiltMap? get metadata; + + /// Name of the fiscal entity + @BuiltValueField(wireName: r'name') + String? get name; + + /// Tax ID of the fiscal entity + @BuiltValueField(wireName: r'tax_id') + String? get taxId; + + /// ID of the fiscal entity + @BuiltValueField(wireName: r'id') + String get id; + + /// The time at which the object was created in seconds since the Unix epoch + @BuiltValueField(wireName: r'created_at') + int get createdAt; + + @BuiltValueField(wireName: r'object') + String get object; + + /// Phone of the fiscal entity + @BuiltValueField(wireName: r'phone') + String? get phone; + + OrderFiscalEntityResponse._(); + + factory OrderFiscalEntityResponse([void updates(OrderFiscalEntityResponseBuilder b)]) = _$OrderFiscalEntityResponse; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OrderFiscalEntityResponseBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OrderFiscalEntityResponseSerializer(); +} + +class _$OrderFiscalEntityResponseSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OrderFiscalEntityResponse, _$OrderFiscalEntityResponse]; + + @override + final String wireName = r'OrderFiscalEntityResponse'; + + Iterable _serializeProperties( + Serializers serializers, + OrderFiscalEntityResponse object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'address'; + yield serializers.serialize( + object.address, + specifiedType: const FullType(OrderFiscalEntityAddressResponse), + ); + if (object.email != null) { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType.nullable(String), + ); + } + if (object.metadata != null) { + yield r'metadata'; + yield serializers.serialize( + object.metadata, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType.nullable(String), + ); + } + if (object.taxId != null) { + yield r'tax_id'; + yield serializers.serialize( + object.taxId, + specifiedType: const FullType.nullable(String), + ); + } + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'created_at'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(int), + ); + yield r'object'; + yield serializers.serialize( + object.object, + specifiedType: const FullType(String), + ); + if (object.phone != null) { + yield r'phone'; + yield serializers.serialize( + object.phone, + specifiedType: const FullType.nullable(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OrderFiscalEntityResponse object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OrderFiscalEntityResponseBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'address': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OrderFiscalEntityAddressResponse), + ) as OrderFiscalEntityAddressResponse; + result.address.replace(valueDes); + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.email = valueDes; + break; + case r'metadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.metadata.replace(valueDes); + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.name = valueDes; + break; + case r'tax_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.taxId = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'created_at': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.createdAt = valueDes; + break; + case r'object': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.object = valueDes; + break; + case r'phone': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.phone = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OrderFiscalEntityResponse deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OrderFiscalEntityResponseBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/order_next_action_response.dart b/lib/src/model/order_next_action_response.dart new file mode 100644 index 0000000..620b8b0 --- /dev/null +++ b/lib/src/model/order_next_action_response.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:conekta/src/model/order_next_action_response_redirect_to_url.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order_next_action_response.g.dart'; + +/// contains the following attributes that will guide to continue the flow +/// +/// Properties: +/// * [redirectToUrl] +/// * [type] - Indicates the type of action to be taken +@BuiltValue() +abstract class OrderNextActionResponse implements Built { + @BuiltValueField(wireName: r'redirect_to_url') + OrderNextActionResponseRedirectToUrl? get redirectToUrl; + + /// Indicates the type of action to be taken + @BuiltValueField(wireName: r'type') + String? get type; + + OrderNextActionResponse._(); + + factory OrderNextActionResponse([void updates(OrderNextActionResponseBuilder b)]) = _$OrderNextActionResponse; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OrderNextActionResponseBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OrderNextActionResponseSerializer(); +} + +class _$OrderNextActionResponseSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OrderNextActionResponse, _$OrderNextActionResponse]; + + @override + final String wireName = r'OrderNextActionResponse'; + + Iterable _serializeProperties( + Serializers serializers, + OrderNextActionResponse object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.redirectToUrl != null) { + yield r'redirect_to_url'; + yield serializers.serialize( + object.redirectToUrl, + specifiedType: const FullType(OrderNextActionResponseRedirectToUrl), + ); + } + if (object.type != null) { + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OrderNextActionResponse object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OrderNextActionResponseBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'redirect_to_url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OrderNextActionResponseRedirectToUrl), + ) as OrderNextActionResponseRedirectToUrl; + result.redirectToUrl.replace(valueDes); + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.type = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OrderNextActionResponse deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OrderNextActionResponseBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/order_next_action_response_redirect_to_url.dart b/lib/src/model/order_next_action_response_redirect_to_url.dart new file mode 100644 index 0000000..3e410a9 --- /dev/null +++ b/lib/src/model/order_next_action_response_redirect_to_url.dart @@ -0,0 +1,128 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order_next_action_response_redirect_to_url.g.dart'; + +/// contains the following attributes that will guide to continue the flow +/// +/// Properties: +/// * [url] - pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. +/// * [returnUrl] - Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. +@BuiltValue() +abstract class OrderNextActionResponseRedirectToUrl implements Built { + /// pay.conekta.com/{id} Indicates the url of the Conekta component to authenticate the flow through 3DS2. + @BuiltValueField(wireName: r'url') + String? get url; + + /// Indicates the url to which the 3DS2 flow returns at the end, when the integration is redirected. + @BuiltValueField(wireName: r'return_url') + String? get returnUrl; + + OrderNextActionResponseRedirectToUrl._(); + + factory OrderNextActionResponseRedirectToUrl([void updates(OrderNextActionResponseRedirectToUrlBuilder b)]) = _$OrderNextActionResponseRedirectToUrl; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OrderNextActionResponseRedirectToUrlBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OrderNextActionResponseRedirectToUrlSerializer(); +} + +class _$OrderNextActionResponseRedirectToUrlSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OrderNextActionResponseRedirectToUrl, _$OrderNextActionResponseRedirectToUrl]; + + @override + final String wireName = r'OrderNextActionResponseRedirectToUrl'; + + Iterable _serializeProperties( + Serializers serializers, + OrderNextActionResponseRedirectToUrl object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.url != null) { + yield r'url'; + yield serializers.serialize( + object.url, + specifiedType: const FullType(String), + ); + } + if (object.returnUrl != null) { + yield r'return_url'; + yield serializers.serialize( + object.returnUrl, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OrderNextActionResponseRedirectToUrl object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OrderNextActionResponseRedirectToUrlBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.url = valueDes; + break; + case r'return_url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.returnUrl = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OrderNextActionResponseRedirectToUrl deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OrderNextActionResponseRedirectToUrlBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/order_refund_request.g.dart b/lib/src/model/order_refund_request.g.dart deleted file mode 100644 index 19a8ebb..0000000 --- a/lib/src/model/order_refund_request.g.dart +++ /dev/null @@ -1,122 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_refund_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderRefundRequest extends OrderRefundRequest { - @override - final int amount; - @override - final int? expiresAt; - @override - final String reason; - - factory _$OrderRefundRequest( - [void Function(OrderRefundRequestBuilder)? updates]) => - (new OrderRefundRequestBuilder()..update(updates))._build(); - - _$OrderRefundRequest._( - {required this.amount, this.expiresAt, required this.reason}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'OrderRefundRequest', 'amount'); - BuiltValueNullFieldError.checkNotNull( - reason, r'OrderRefundRequest', 'reason'); - } - - @override - OrderRefundRequest rebuild( - void Function(OrderRefundRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderRefundRequestBuilder toBuilder() => - new OrderRefundRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderRefundRequest && - amount == other.amount && - expiresAt == other.expiresAt && - reason == other.reason; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, amount.hashCode), expiresAt.hashCode), reason.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderRefundRequest') - ..add('amount', amount) - ..add('expiresAt', expiresAt) - ..add('reason', reason)) - .toString(); - } -} - -class OrderRefundRequestBuilder - implements Builder { - _$OrderRefundRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _reason; - String? get reason => _$this._reason; - set reason(String? reason) => _$this._reason = reason; - - OrderRefundRequestBuilder() { - OrderRefundRequest._defaults(this); - } - - OrderRefundRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _expiresAt = $v.expiresAt; - _reason = $v.reason; - _$v = null; - } - return this; - } - - @override - void replace(OrderRefundRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderRefundRequest; - } - - @override - void update(void Function(OrderRefundRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderRefundRequest build() => _build(); - - _$OrderRefundRequest _build() { - final _$result = _$v ?? - new _$OrderRefundRequest._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'OrderRefundRequest', 'amount'), - expiresAt: expiresAt, - reason: BuiltValueNullFieldError.checkNotNull( - reason, r'OrderRefundRequest', 'reason')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_request.dart b/lib/src/model/order_request.dart index bdf1599..bf6463d 100644 --- a/lib/src/model/order_request.dart +++ b/lib/src/model/order_request.dart @@ -9,6 +9,7 @@ import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/checkout_request.dart'; import 'package:conekta/src/model/order_discount_lines_request.dart'; import 'package:conekta/src/model/charge_request.dart'; +import 'package:conekta/src/model/order_fiscal_entity_request.dart'; import 'package:conekta/src/model/product.dart'; import 'package:conekta/src/model/customer_shipping_contacts.dart'; import 'package:conekta/src/model/order_tax_request.dart'; @@ -26,13 +27,17 @@ part 'order_request.g.dart'; /// * [currency] - Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) /// * [customerInfo] /// * [discountLines] - 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. +/// * [fiscalEntity] /// * [lineItems] - 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] - Metadata associated with the order /// * [needsShippingContact] - Allows you to fill out the shipping information at checkout /// * [preAuthorize] - Indicates whether the order charges must be preauthorized +/// * [processingMode] - Indicates the processing mode for the order, either ecommerce, recurrent or validation. +/// * [returnUrl] - Indicates the redirection callback upon completion of the 3DS2 flow. /// * [shippingContact] /// * [shippingLines] - List of [shipping costs](https://developers.conekta.com/v2.1.0/reference/orderscreateshipping). If the online store offers digital products. /// * [taxLines] - List of [taxes](https://developers.conekta.com/v2.1.0/reference/orderscreatetaxes) that are applied to the order. +/// * [threeDsMode] - Indicates the 3DS2 mode for the order, either smart or strict. @BuiltValue() abstract class OrderRequest implements Built { /// List of [charges](https://developers.conekta.com/v2.1.0/reference/orderscreatecharge) that are applied to the order @@ -53,6 +58,9 @@ abstract class OrderRequest implements Built @BuiltValueField(wireName: r'discount_lines') BuiltList? get discountLines; + @BuiltValueField(wireName: r'fiscal_entity') + OrderFiscalEntityRequest? get fiscalEntity; + /// 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. @BuiltValueField(wireName: r'line_items') BuiltList get lineItems; @@ -69,6 +77,14 @@ abstract class OrderRequest implements Built @BuiltValueField(wireName: r'pre_authorize') bool? get preAuthorize; + /// Indicates the processing mode for the order, either ecommerce, recurrent or validation. + @BuiltValueField(wireName: r'processing_mode') + String? get processingMode; + + /// Indicates the redirection callback upon completion of the 3DS2 flow. + @BuiltValueField(wireName: r'return_url') + String? get returnUrl; + @BuiltValueField(wireName: r'shipping_contact') CustomerShippingContacts? get shippingContact; @@ -80,6 +96,10 @@ abstract class OrderRequest implements Built @BuiltValueField(wireName: r'tax_lines') BuiltList? get taxLines; + /// Indicates the 3DS2 mode for the order, either smart or strict. + @BuiltValueField(wireName: r'three_ds_mode') + String? get threeDsMode; + OrderRequest._(); factory OrderRequest([void updates(OrderRequestBuilder b)]) = _$OrderRequest; @@ -135,6 +155,13 @@ class _$OrderRequestSerializer implements PrimitiveSerializer { specifiedType: const FullType(BuiltList, [FullType(OrderDiscountLinesRequest)]), ); } + if (object.fiscalEntity != null) { + yield r'fiscal_entity'; + yield serializers.serialize( + object.fiscalEntity, + specifiedType: const FullType(OrderFiscalEntityRequest), + ); + } yield r'line_items'; yield serializers.serialize( object.lineItems, @@ -161,6 +188,20 @@ class _$OrderRequestSerializer implements PrimitiveSerializer { specifiedType: const FullType(bool), ); } + if (object.processingMode != null) { + yield r'processing_mode'; + yield serializers.serialize( + object.processingMode, + specifiedType: const FullType(String), + ); + } + if (object.returnUrl != null) { + yield r'return_url'; + yield serializers.serialize( + object.returnUrl, + specifiedType: const FullType(String), + ); + } if (object.shippingContact != null) { yield r'shipping_contact'; yield serializers.serialize( @@ -182,6 +223,13 @@ class _$OrderRequestSerializer implements PrimitiveSerializer { specifiedType: const FullType(BuiltList, [FullType(OrderTaxRequest)]), ); } + if (object.threeDsMode != null) { + yield r'three_ds_mode'; + yield serializers.serialize( + object.threeDsMode, + specifiedType: const FullType(String), + ); + } } @override @@ -240,6 +288,13 @@ class _$OrderRequestSerializer implements PrimitiveSerializer { ) as BuiltList; result.discountLines.replace(valueDes); break; + case r'fiscal_entity': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OrderFiscalEntityRequest), + ) as OrderFiscalEntityRequest; + result.fiscalEntity.replace(valueDes); + break; case r'line_items': final valueDes = serializers.deserialize( value, @@ -268,6 +323,20 @@ class _$OrderRequestSerializer implements PrimitiveSerializer { ) as bool; result.preAuthorize = valueDes; break; + case r'processing_mode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.processingMode = valueDes; + break; + case r'return_url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.returnUrl = valueDes; + break; case r'shipping_contact': final valueDes = serializers.deserialize( value, @@ -289,6 +358,13 @@ class _$OrderRequestSerializer implements PrimitiveSerializer { ) as BuiltList; result.taxLines.replace(valueDes); break; + case r'three_ds_mode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.threeDsMode = valueDes; + break; default: unhandled.add(key); unhandled.add(value); diff --git a/lib/src/model/order_request.g.dart b/lib/src/model/order_request.g.dart deleted file mode 100644 index dfe4ab9..0000000 --- a/lib/src/model/order_request.g.dart +++ /dev/null @@ -1,286 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderRequest extends OrderRequest { - @override - final BuiltList? charges; - @override - final CheckoutRequest? checkout; - @override - final String currency; - @override - final OrderRequestCustomerInfo customerInfo; - @override - final BuiltList? discountLines; - @override - final BuiltList lineItems; - @override - final BuiltMap? metadata; - @override - final bool? needsShippingContact; - @override - final bool? preAuthorize; - @override - final CustomerShippingContacts? shippingContact; - @override - final BuiltList? shippingLines; - @override - final BuiltList? taxLines; - - factory _$OrderRequest([void Function(OrderRequestBuilder)? updates]) => - (new OrderRequestBuilder()..update(updates))._build(); - - _$OrderRequest._( - {this.charges, - this.checkout, - required this.currency, - required this.customerInfo, - this.discountLines, - required this.lineItems, - this.metadata, - this.needsShippingContact, - this.preAuthorize, - this.shippingContact, - this.shippingLines, - this.taxLines}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - currency, r'OrderRequest', 'currency'); - BuiltValueNullFieldError.checkNotNull( - customerInfo, r'OrderRequest', 'customerInfo'); - BuiltValueNullFieldError.checkNotNull( - lineItems, r'OrderRequest', 'lineItems'); - } - - @override - OrderRequest rebuild(void Function(OrderRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderRequestBuilder toBuilder() => new OrderRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderRequest && - charges == other.charges && - checkout == other.checkout && - currency == other.currency && - customerInfo == other.customerInfo && - discountLines == other.discountLines && - lineItems == other.lineItems && - metadata == other.metadata && - needsShippingContact == other.needsShippingContact && - preAuthorize == other.preAuthorize && - shippingContact == other.shippingContact && - shippingLines == other.shippingLines && - taxLines == other.taxLines; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, charges.hashCode), - checkout.hashCode), - currency.hashCode), - customerInfo.hashCode), - discountLines.hashCode), - lineItems.hashCode), - metadata.hashCode), - needsShippingContact.hashCode), - preAuthorize.hashCode), - shippingContact.hashCode), - shippingLines.hashCode), - taxLines.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderRequest') - ..add('charges', charges) - ..add('checkout', checkout) - ..add('currency', currency) - ..add('customerInfo', customerInfo) - ..add('discountLines', discountLines) - ..add('lineItems', lineItems) - ..add('metadata', metadata) - ..add('needsShippingContact', needsShippingContact) - ..add('preAuthorize', preAuthorize) - ..add('shippingContact', shippingContact) - ..add('shippingLines', shippingLines) - ..add('taxLines', taxLines)) - .toString(); - } -} - -class OrderRequestBuilder - implements Builder { - _$OrderRequest? _$v; - - ListBuilder? _charges; - ListBuilder get charges => - _$this._charges ??= new ListBuilder(); - set charges(ListBuilder? charges) => _$this._charges = charges; - - CheckoutRequestBuilder? _checkout; - CheckoutRequestBuilder get checkout => - _$this._checkout ??= new CheckoutRequestBuilder(); - set checkout(CheckoutRequestBuilder? checkout) => _$this._checkout = checkout; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - OrderRequestCustomerInfoBuilder? _customerInfo; - OrderRequestCustomerInfoBuilder get customerInfo => - _$this._customerInfo ??= new OrderRequestCustomerInfoBuilder(); - set customerInfo(OrderRequestCustomerInfoBuilder? customerInfo) => - _$this._customerInfo = customerInfo; - - ListBuilder? _discountLines; - ListBuilder get discountLines => - _$this._discountLines ??= new ListBuilder(); - set discountLines(ListBuilder? discountLines) => - _$this._discountLines = discountLines; - - ListBuilder? _lineItems; - ListBuilder get lineItems => - _$this._lineItems ??= new ListBuilder(); - set lineItems(ListBuilder? lineItems) => - _$this._lineItems = lineItems; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - bool? _needsShippingContact; - bool? get needsShippingContact => _$this._needsShippingContact; - set needsShippingContact(bool? needsShippingContact) => - _$this._needsShippingContact = needsShippingContact; - - bool? _preAuthorize; - bool? get preAuthorize => _$this._preAuthorize; - set preAuthorize(bool? preAuthorize) => _$this._preAuthorize = preAuthorize; - - CustomerShippingContacts? _shippingContact; - CustomerShippingContacts? get shippingContact => _$this._shippingContact; - set shippingContact(CustomerShippingContacts? shippingContact) => - _$this._shippingContact = shippingContact; - - ListBuilder? _shippingLines; - ListBuilder get shippingLines => - _$this._shippingLines ??= new ListBuilder(); - set shippingLines(ListBuilder? shippingLines) => - _$this._shippingLines = shippingLines; - - ListBuilder? _taxLines; - ListBuilder get taxLines => - _$this._taxLines ??= new ListBuilder(); - set taxLines(ListBuilder? taxLines) => - _$this._taxLines = taxLines; - - OrderRequestBuilder() { - OrderRequest._defaults(this); - } - - OrderRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _charges = $v.charges?.toBuilder(); - _checkout = $v.checkout?.toBuilder(); - _currency = $v.currency; - _customerInfo = $v.customerInfo.toBuilder(); - _discountLines = $v.discountLines?.toBuilder(); - _lineItems = $v.lineItems.toBuilder(); - _metadata = $v.metadata?.toBuilder(); - _needsShippingContact = $v.needsShippingContact; - _preAuthorize = $v.preAuthorize; - _shippingContact = $v.shippingContact; - _shippingLines = $v.shippingLines?.toBuilder(); - _taxLines = $v.taxLines?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(OrderRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderRequest; - } - - @override - void update(void Function(OrderRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderRequest build() => _build(); - - _$OrderRequest _build() { - _$OrderRequest _$result; - try { - _$result = _$v ?? - new _$OrderRequest._( - charges: _charges?.build(), - checkout: _checkout?.build(), - currency: BuiltValueNullFieldError.checkNotNull( - currency, r'OrderRequest', 'currency'), - customerInfo: customerInfo.build(), - discountLines: _discountLines?.build(), - lineItems: lineItems.build(), - metadata: _metadata?.build(), - needsShippingContact: needsShippingContact, - preAuthorize: preAuthorize, - shippingContact: shippingContact, - shippingLines: _shippingLines?.build(), - taxLines: _taxLines?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'charges'; - _charges?.build(); - _$failedField = 'checkout'; - _checkout?.build(); - - _$failedField = 'customerInfo'; - customerInfo.build(); - _$failedField = 'discountLines'; - _discountLines?.build(); - _$failedField = 'lineItems'; - lineItems.build(); - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'shippingLines'; - _shippingLines?.build(); - _$failedField = 'taxLines'; - _taxLines?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_request_customer_info.g.dart b/lib/src/model/order_request_customer_info.g.dart deleted file mode 100644 index 2ded60f..0000000 --- a/lib/src/model/order_request_customer_info.g.dart +++ /dev/null @@ -1,96 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_request_customer_info.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderRequestCustomerInfo extends OrderRequestCustomerInfo { - @override - final OneOf oneOf; - - factory _$OrderRequestCustomerInfo( - [void Function(OrderRequestCustomerInfoBuilder)? updates]) => - (new OrderRequestCustomerInfoBuilder()..update(updates))._build(); - - _$OrderRequestCustomerInfo._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'OrderRequestCustomerInfo', 'oneOf'); - } - - @override - OrderRequestCustomerInfo rebuild( - void Function(OrderRequestCustomerInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderRequestCustomerInfoBuilder toBuilder() => - new OrderRequestCustomerInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderRequestCustomerInfo && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderRequestCustomerInfo') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class OrderRequestCustomerInfoBuilder - implements - Builder { - _$OrderRequestCustomerInfo? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - OrderRequestCustomerInfoBuilder() { - OrderRequestCustomerInfo._defaults(this); - } - - OrderRequestCustomerInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(OrderRequestCustomerInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderRequestCustomerInfo; - } - - @override - void update(void Function(OrderRequestCustomerInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderRequestCustomerInfo build() => _build(); - - _$OrderRequestCustomerInfo _build() { - final _$result = _$v ?? - new _$OrderRequestCustomerInfo._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'OrderRequestCustomerInfo', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response.dart b/lib/src/model/order_response.dart index fe129c2..2da0708 100644 --- a/lib/src/model/order_response.dart +++ b/lib/src/model/order_response.dart @@ -4,13 +4,14 @@ // ignore_for_file: unused_element import 'package:conekta/src/model/order_response_discount_lines.dart'; +import 'package:conekta/src/model/order_next_action_response.dart'; import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/order_response_customer_info.dart'; import 'package:conekta/src/model/order_response_charges.dart'; import 'package:conekta/src/model/order_response_checkout.dart'; import 'package:conekta/src/model/order_response_products.dart'; import 'package:conekta/src/model/order_response_shipping_contact.dart'; -import 'package:conekta/src/model/order_response_fiscal_entity.dart'; +import 'package:conekta/src/model/order_fiscal_entity_response.dart'; import 'package:conekta/src/model/charge_response_channel.dart'; import 'package:built_value/json_object.dart'; import 'package:built_value/built_value.dart'; @@ -36,8 +37,10 @@ part 'order_response.g.dart'; /// * [lineItems] /// * [livemode] - Whether the object exists in live mode or test mode /// * [metadata] - 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. +/// * [nextAction] /// * [object] - String representing the object’s type. Objects of the same type share the same value. /// * [paymentStatus] - The payment status of the order. +/// * [processingMode] - Indicates the processing mode for the order, either ecommerce, recurrent or validation. /// * [shippingContact] /// * [updatedAt] - The time at which the object was last updated in seconds since the Unix epoch @BuiltValue() @@ -74,7 +77,7 @@ abstract class OrderResponse implements Built? get metadata; + @BuiltValueField(wireName: r'next_action') + OrderNextActionResponse? get nextAction; + /// String representing the object’s type. Objects of the same type share the same value. @BuiltValueField(wireName: r'object') String? get object; @@ -101,6 +107,10 @@ abstract class OrderResponse implements Built { yield r'fiscal_entity'; yield serializers.serialize( object.fiscalEntity, - specifiedType: const FullType(OrderResponseFiscalEntity), + specifiedType: const FullType.nullable(OrderFiscalEntityResponse), ); } if (object.id != null) { @@ -236,6 +246,13 @@ class _$OrderResponseSerializer implements PrimitiveSerializer { specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), ); } + if (object.nextAction != null) { + yield r'next_action'; + yield serializers.serialize( + object.nextAction, + specifiedType: const FullType(OrderNextActionResponse), + ); + } if (object.object != null) { yield r'object'; yield serializers.serialize( @@ -250,6 +267,13 @@ class _$OrderResponseSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.processingMode != null) { + yield r'processing_mode'; + yield serializers.serialize( + object.processingMode, + specifiedType: const FullType(String), + ); + } if (object.shippingContact != null) { yield r'shipping_contact'; yield serializers.serialize( @@ -353,8 +377,9 @@ class _$OrderResponseSerializer implements PrimitiveSerializer { case r'fiscal_entity': final valueDes = serializers.deserialize( value, - specifiedType: const FullType(OrderResponseFiscalEntity), - ) as OrderResponseFiscalEntity; + specifiedType: const FullType.nullable(OrderFiscalEntityResponse), + ) as OrderFiscalEntityResponse?; + if (valueDes == null) continue; result.fiscalEntity.replace(valueDes); break; case r'id': @@ -392,6 +417,13 @@ class _$OrderResponseSerializer implements PrimitiveSerializer { ) as BuiltMap; result.metadata.replace(valueDes); break; + case r'next_action': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OrderNextActionResponse), + ) as OrderNextActionResponse; + result.nextAction.replace(valueDes); + break; case r'object': final valueDes = serializers.deserialize( value, @@ -406,6 +438,13 @@ class _$OrderResponseSerializer implements PrimitiveSerializer { ) as String; result.paymentStatus = valueDes; break; + case r'processing_mode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.processingMode = valueDes; + break; case r'shipping_contact': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/order_response.g.dart b/lib/src/model/order_response.g.dart deleted file mode 100644 index dcbc20a..0000000 --- a/lib/src/model/order_response.g.dart +++ /dev/null @@ -1,385 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponse extends OrderResponse { - @override - final int? amount; - @override - final int? amountRefunded; - @override - final ChargeResponseChannel? channel; - @override - final OrderResponseCharges? charges; - @override - final OrderResponseCheckout? checkout; - @override - final int? createdAt; - @override - final String? currency; - @override - final OrderResponseCustomerInfo? customerInfo; - @override - final OrderResponseDiscountLines? discountLines; - @override - final OrderResponseFiscalEntity? fiscalEntity; - @override - final String? id; - @override - final bool? isRefundable; - @override - final OrderResponseProducts? lineItems; - @override - final bool? livemode; - @override - final BuiltMap? metadata; - @override - final String? object; - @override - final String? paymentStatus; - @override - final OrderResponseShippingContact? shippingContact; - @override - final int? updatedAt; - - factory _$OrderResponse([void Function(OrderResponseBuilder)? updates]) => - (new OrderResponseBuilder()..update(updates))._build(); - - _$OrderResponse._( - {this.amount, - this.amountRefunded, - this.channel, - this.charges, - this.checkout, - this.createdAt, - this.currency, - this.customerInfo, - this.discountLines, - this.fiscalEntity, - this.id, - this.isRefundable, - this.lineItems, - this.livemode, - this.metadata, - this.object, - this.paymentStatus, - this.shippingContact, - this.updatedAt}) - : super._(); - - @override - OrderResponse rebuild(void Function(OrderResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseBuilder toBuilder() => new OrderResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponse && - amount == other.amount && - amountRefunded == other.amountRefunded && - channel == other.channel && - charges == other.charges && - checkout == other.checkout && - createdAt == other.createdAt && - currency == other.currency && - customerInfo == other.customerInfo && - discountLines == other.discountLines && - fiscalEntity == other.fiscalEntity && - id == other.id && - isRefundable == other.isRefundable && - lineItems == other.lineItems && - livemode == other.livemode && - metadata == other.metadata && - object == other.object && - paymentStatus == other.paymentStatus && - shippingContact == other.shippingContact && - updatedAt == other.updatedAt; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - amount - .hashCode), - amountRefunded - .hashCode), - channel - .hashCode), - charges - .hashCode), - checkout - .hashCode), - createdAt.hashCode), - currency.hashCode), - customerInfo.hashCode), - discountLines.hashCode), - fiscalEntity.hashCode), - id.hashCode), - isRefundable.hashCode), - lineItems.hashCode), - livemode.hashCode), - metadata.hashCode), - object.hashCode), - paymentStatus.hashCode), - shippingContact.hashCode), - updatedAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponse') - ..add('amount', amount) - ..add('amountRefunded', amountRefunded) - ..add('channel', channel) - ..add('charges', charges) - ..add('checkout', checkout) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('customerInfo', customerInfo) - ..add('discountLines', discountLines) - ..add('fiscalEntity', fiscalEntity) - ..add('id', id) - ..add('isRefundable', isRefundable) - ..add('lineItems', lineItems) - ..add('livemode', livemode) - ..add('metadata', metadata) - ..add('object', object) - ..add('paymentStatus', paymentStatus) - ..add('shippingContact', shippingContact) - ..add('updatedAt', updatedAt)) - .toString(); - } -} - -class OrderResponseBuilder - implements Builder { - _$OrderResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - int? _amountRefunded; - int? get amountRefunded => _$this._amountRefunded; - set amountRefunded(int? amountRefunded) => - _$this._amountRefunded = amountRefunded; - - ChargeResponseChannelBuilder? _channel; - ChargeResponseChannelBuilder get channel => - _$this._channel ??= new ChargeResponseChannelBuilder(); - set channel(ChargeResponseChannelBuilder? channel) => - _$this._channel = channel; - - OrderResponseChargesBuilder? _charges; - OrderResponseChargesBuilder get charges => - _$this._charges ??= new OrderResponseChargesBuilder(); - set charges(OrderResponseChargesBuilder? charges) => - _$this._charges = charges; - - OrderResponseCheckoutBuilder? _checkout; - OrderResponseCheckoutBuilder get checkout => - _$this._checkout ??= new OrderResponseCheckoutBuilder(); - set checkout(OrderResponseCheckoutBuilder? checkout) => - _$this._checkout = checkout; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - OrderResponseCustomerInfoBuilder? _customerInfo; - OrderResponseCustomerInfoBuilder get customerInfo => - _$this._customerInfo ??= new OrderResponseCustomerInfoBuilder(); - set customerInfo(OrderResponseCustomerInfoBuilder? customerInfo) => - _$this._customerInfo = customerInfo; - - OrderResponseDiscountLinesBuilder? _discountLines; - OrderResponseDiscountLinesBuilder get discountLines => - _$this._discountLines ??= new OrderResponseDiscountLinesBuilder(); - set discountLines(OrderResponseDiscountLinesBuilder? discountLines) => - _$this._discountLines = discountLines; - - OrderResponseFiscalEntityBuilder? _fiscalEntity; - OrderResponseFiscalEntityBuilder get fiscalEntity => - _$this._fiscalEntity ??= new OrderResponseFiscalEntityBuilder(); - set fiscalEntity(OrderResponseFiscalEntityBuilder? fiscalEntity) => - _$this._fiscalEntity = fiscalEntity; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _isRefundable; - bool? get isRefundable => _$this._isRefundable; - set isRefundable(bool? isRefundable) => _$this._isRefundable = isRefundable; - - OrderResponseProductsBuilder? _lineItems; - OrderResponseProductsBuilder get lineItems => - _$this._lineItems ??= new OrderResponseProductsBuilder(); - set lineItems(OrderResponseProductsBuilder? lineItems) => - _$this._lineItems = lineItems; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _paymentStatus; - String? get paymentStatus => _$this._paymentStatus; - set paymentStatus(String? paymentStatus) => - _$this._paymentStatus = paymentStatus; - - OrderResponseShippingContactBuilder? _shippingContact; - OrderResponseShippingContactBuilder get shippingContact => - _$this._shippingContact ??= new OrderResponseShippingContactBuilder(); - set shippingContact(OrderResponseShippingContactBuilder? shippingContact) => - _$this._shippingContact = shippingContact; - - int? _updatedAt; - int? get updatedAt => _$this._updatedAt; - set updatedAt(int? updatedAt) => _$this._updatedAt = updatedAt; - - OrderResponseBuilder() { - OrderResponse._defaults(this); - } - - OrderResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _amountRefunded = $v.amountRefunded; - _channel = $v.channel?.toBuilder(); - _charges = $v.charges?.toBuilder(); - _checkout = $v.checkout?.toBuilder(); - _createdAt = $v.createdAt; - _currency = $v.currency; - _customerInfo = $v.customerInfo?.toBuilder(); - _discountLines = $v.discountLines?.toBuilder(); - _fiscalEntity = $v.fiscalEntity?.toBuilder(); - _id = $v.id; - _isRefundable = $v.isRefundable; - _lineItems = $v.lineItems?.toBuilder(); - _livemode = $v.livemode; - _metadata = $v.metadata?.toBuilder(); - _object = $v.object; - _paymentStatus = $v.paymentStatus; - _shippingContact = $v.shippingContact?.toBuilder(); - _updatedAt = $v.updatedAt; - _$v = null; - } - return this; - } - - @override - void replace(OrderResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponse; - } - - @override - void update(void Function(OrderResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponse build() => _build(); - - _$OrderResponse _build() { - _$OrderResponse _$result; - try { - _$result = _$v ?? - new _$OrderResponse._( - amount: amount, - amountRefunded: amountRefunded, - channel: _channel?.build(), - charges: _charges?.build(), - checkout: _checkout?.build(), - createdAt: createdAt, - currency: currency, - customerInfo: _customerInfo?.build(), - discountLines: _discountLines?.build(), - fiscalEntity: _fiscalEntity?.build(), - id: id, - isRefundable: isRefundable, - lineItems: _lineItems?.build(), - livemode: livemode, - metadata: _metadata?.build(), - object: object, - paymentStatus: paymentStatus, - shippingContact: _shippingContact?.build(), - updatedAt: updatedAt); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'channel'; - _channel?.build(); - _$failedField = 'charges'; - _charges?.build(); - _$failedField = 'checkout'; - _checkout?.build(); - - _$failedField = 'customerInfo'; - _customerInfo?.build(); - _$failedField = 'discountLines'; - _discountLines?.build(); - _$failedField = 'fiscalEntity'; - _fiscalEntity?.build(); - - _$failedField = 'lineItems'; - _lineItems?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'shippingContact'; - _shippingContact?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_charges.g.dart b/lib/src/model/order_response_charges.g.dart deleted file mode 100644 index f96dc5a..0000000 --- a/lib/src/model/order_response_charges.g.dart +++ /dev/null @@ -1,141 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_charges.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseCharges extends OrderResponseCharges { - @override - final BuiltList? data; - @override - final bool hasMore; - @override - final String object; - - factory _$OrderResponseCharges( - [void Function(OrderResponseChargesBuilder)? updates]) => - (new OrderResponseChargesBuilder()..update(updates))._build(); - - _$OrderResponseCharges._( - {this.data, required this.hasMore, required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'OrderResponseCharges', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'OrderResponseCharges', 'object'); - } - - @override - OrderResponseCharges rebuild( - void Function(OrderResponseChargesBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseChargesBuilder toBuilder() => - new OrderResponseChargesBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseCharges && - data == other.data && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, data.hashCode), hasMore.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseCharges') - ..add('data', data) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class OrderResponseChargesBuilder - implements - Builder, - OrderResponseChargesAllOfBuilder, - PaginationBuilder { - _$OrderResponseCharges? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - OrderResponseChargesBuilder() { - OrderResponseCharges._defaults(this); - } - - OrderResponseChargesBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant OrderResponseCharges other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseCharges; - } - - @override - void update(void Function(OrderResponseChargesBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseCharges build() => _build(); - - _$OrderResponseCharges _build() { - _$OrderResponseCharges _$result; - try { - _$result = _$v ?? - new _$OrderResponseCharges._( - data: _data?.build(), - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'OrderResponseCharges', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'OrderResponseCharges', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponseCharges', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_charges_all_of.g.dart b/lib/src/model/order_response_charges_all_of.g.dart deleted file mode 100644 index fa2dad3..0000000 --- a/lib/src/model/order_response_charges_all_of.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_charges_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderResponseChargesAllOfBuilder { - void replace(OrderResponseChargesAllOf other); - void update(void Function(OrderResponseChargesAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$OrderResponseChargesAllOf extends $OrderResponseChargesAllOf { - @override - final BuiltList? data; - - factory _$$OrderResponseChargesAllOf( - [void Function($OrderResponseChargesAllOfBuilder)? updates]) => - (new $OrderResponseChargesAllOfBuilder()..update(updates))._build(); - - _$$OrderResponseChargesAllOf._({this.data}) : super._(); - - @override - $OrderResponseChargesAllOf rebuild( - void Function($OrderResponseChargesAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderResponseChargesAllOfBuilder toBuilder() => - new $OrderResponseChargesAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderResponseChargesAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderResponseChargesAllOf') - ..add('data', data)) - .toString(); - } -} - -class $OrderResponseChargesAllOfBuilder - implements - Builder<$OrderResponseChargesAllOf, $OrderResponseChargesAllOfBuilder>, - OrderResponseChargesAllOfBuilder { - _$$OrderResponseChargesAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $OrderResponseChargesAllOfBuilder() { - $OrderResponseChargesAllOf._defaults(this); - } - - $OrderResponseChargesAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderResponseChargesAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderResponseChargesAllOf; - } - - @override - void update(void Function($OrderResponseChargesAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderResponseChargesAllOf build() => _build(); - - _$$OrderResponseChargesAllOf _build() { - _$$OrderResponseChargesAllOf _$result; - try { - _$result = - _$v ?? new _$$OrderResponseChargesAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$OrderResponseChargesAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_checkout.g.dart b/lib/src/model/order_response_checkout.g.dart deleted file mode 100644 index 0a3d772..0000000 --- a/lib/src/model/order_response_checkout.g.dart +++ /dev/null @@ -1,442 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_checkout.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseCheckout extends OrderResponseCheckout { - @override - final BuiltList? allowedPaymentMethods; - @override - final bool? canNotExpire; - @override - final int? emailsSent; - @override - final BuiltList? excludeCardNetworks; - @override - final int? expiresAt; - @override - final String? failureUrl; - @override - final bool? force3dsFlow; - @override - final String? id; - @override - final bool? isRedirectOnFailure; - @override - final bool? livemode; - @override - final BuiltMap? metadata; - @override - final bool? monthlyInstallmentsEnabled; - @override - final BuiltList? monthlyInstallmentsOptions; - @override - final String? name; - @override - final bool? needsShippingContact; - @override - final String? object; - @override - final bool? onDemandEnabled; - @override - final int? paidPaymentsCount; - @override - final bool? recurrent; - @override - final String? slug; - @override - final int? smsSent; - @override - final String? successUrl; - @override - final int? startsAt; - @override - final String? status; - @override - final String? type; - @override - final String? url; - - factory _$OrderResponseCheckout( - [void Function(OrderResponseCheckoutBuilder)? updates]) => - (new OrderResponseCheckoutBuilder()..update(updates))._build(); - - _$OrderResponseCheckout._( - {this.allowedPaymentMethods, - this.canNotExpire, - this.emailsSent, - this.excludeCardNetworks, - this.expiresAt, - this.failureUrl, - this.force3dsFlow, - this.id, - this.isRedirectOnFailure, - this.livemode, - this.metadata, - this.monthlyInstallmentsEnabled, - this.monthlyInstallmentsOptions, - this.name, - this.needsShippingContact, - this.object, - this.onDemandEnabled, - this.paidPaymentsCount, - this.recurrent, - this.slug, - this.smsSent, - this.successUrl, - this.startsAt, - this.status, - this.type, - this.url}) - : super._(); - - @override - OrderResponseCheckout rebuild( - void Function(OrderResponseCheckoutBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseCheckoutBuilder toBuilder() => - new OrderResponseCheckoutBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseCheckout && - allowedPaymentMethods == other.allowedPaymentMethods && - canNotExpire == other.canNotExpire && - emailsSent == other.emailsSent && - excludeCardNetworks == other.excludeCardNetworks && - expiresAt == other.expiresAt && - failureUrl == other.failureUrl && - force3dsFlow == other.force3dsFlow && - id == other.id && - isRedirectOnFailure == other.isRedirectOnFailure && - livemode == other.livemode && - metadata == other.metadata && - monthlyInstallmentsEnabled == other.monthlyInstallmentsEnabled && - monthlyInstallmentsOptions == other.monthlyInstallmentsOptions && - name == other.name && - needsShippingContact == other.needsShippingContact && - object == other.object && - onDemandEnabled == other.onDemandEnabled && - paidPaymentsCount == other.paidPaymentsCount && - recurrent == other.recurrent && - slug == other.slug && - smsSent == other.smsSent && - successUrl == other.successUrl && - startsAt == other.startsAt && - status == other.status && - type == other.type && - url == other.url; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc($jc($jc($jc($jc($jc(0, allowedPaymentMethods.hashCode), canNotExpire.hashCode), emailsSent.hashCode), excludeCardNetworks.hashCode), expiresAt.hashCode), failureUrl.hashCode), force3dsFlow.hashCode), - id.hashCode), - isRedirectOnFailure.hashCode), - livemode.hashCode), - metadata.hashCode), - monthlyInstallmentsEnabled.hashCode), - monthlyInstallmentsOptions.hashCode), - name.hashCode), - needsShippingContact.hashCode), - object.hashCode), - onDemandEnabled.hashCode), - paidPaymentsCount.hashCode), - recurrent.hashCode), - slug.hashCode), - smsSent.hashCode), - successUrl.hashCode), - startsAt.hashCode), - status.hashCode), - type.hashCode), - url.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseCheckout') - ..add('allowedPaymentMethods', allowedPaymentMethods) - ..add('canNotExpire', canNotExpire) - ..add('emailsSent', emailsSent) - ..add('excludeCardNetworks', excludeCardNetworks) - ..add('expiresAt', expiresAt) - ..add('failureUrl', failureUrl) - ..add('force3dsFlow', force3dsFlow) - ..add('id', id) - ..add('isRedirectOnFailure', isRedirectOnFailure) - ..add('livemode', livemode) - ..add('metadata', metadata) - ..add('monthlyInstallmentsEnabled', monthlyInstallmentsEnabled) - ..add('monthlyInstallmentsOptions', monthlyInstallmentsOptions) - ..add('name', name) - ..add('needsShippingContact', needsShippingContact) - ..add('object', object) - ..add('onDemandEnabled', onDemandEnabled) - ..add('paidPaymentsCount', paidPaymentsCount) - ..add('recurrent', recurrent) - ..add('slug', slug) - ..add('smsSent', smsSent) - ..add('successUrl', successUrl) - ..add('startsAt', startsAt) - ..add('status', status) - ..add('type', type) - ..add('url', url)) - .toString(); - } -} - -class OrderResponseCheckoutBuilder - implements Builder { - _$OrderResponseCheckout? _$v; - - ListBuilder? _allowedPaymentMethods; - ListBuilder get allowedPaymentMethods => - _$this._allowedPaymentMethods ??= new ListBuilder(); - set allowedPaymentMethods(ListBuilder? allowedPaymentMethods) => - _$this._allowedPaymentMethods = allowedPaymentMethods; - - bool? _canNotExpire; - bool? get canNotExpire => _$this._canNotExpire; - set canNotExpire(bool? canNotExpire) => _$this._canNotExpire = canNotExpire; - - int? _emailsSent; - int? get emailsSent => _$this._emailsSent; - set emailsSent(int? emailsSent) => _$this._emailsSent = emailsSent; - - ListBuilder? _excludeCardNetworks; - ListBuilder get excludeCardNetworks => - _$this._excludeCardNetworks ??= new ListBuilder(); - set excludeCardNetworks(ListBuilder? excludeCardNetworks) => - _$this._excludeCardNetworks = excludeCardNetworks; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _failureUrl; - String? get failureUrl => _$this._failureUrl; - set failureUrl(String? failureUrl) => _$this._failureUrl = failureUrl; - - bool? _force3dsFlow; - bool? get force3dsFlow => _$this._force3dsFlow; - set force3dsFlow(bool? force3dsFlow) => _$this._force3dsFlow = force3dsFlow; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _isRedirectOnFailure; - bool? get isRedirectOnFailure => _$this._isRedirectOnFailure; - set isRedirectOnFailure(bool? isRedirectOnFailure) => - _$this._isRedirectOnFailure = isRedirectOnFailure; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - bool? _monthlyInstallmentsEnabled; - bool? get monthlyInstallmentsEnabled => _$this._monthlyInstallmentsEnabled; - set monthlyInstallmentsEnabled(bool? monthlyInstallmentsEnabled) => - _$this._monthlyInstallmentsEnabled = monthlyInstallmentsEnabled; - - ListBuilder? _monthlyInstallmentsOptions; - ListBuilder get monthlyInstallmentsOptions => - _$this._monthlyInstallmentsOptions ??= new ListBuilder(); - set monthlyInstallmentsOptions( - ListBuilder? monthlyInstallmentsOptions) => - _$this._monthlyInstallmentsOptions = monthlyInstallmentsOptions; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - bool? _needsShippingContact; - bool? get needsShippingContact => _$this._needsShippingContact; - set needsShippingContact(bool? needsShippingContact) => - _$this._needsShippingContact = needsShippingContact; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - bool? _onDemandEnabled; - bool? get onDemandEnabled => _$this._onDemandEnabled; - set onDemandEnabled(bool? onDemandEnabled) => - _$this._onDemandEnabled = onDemandEnabled; - - int? _paidPaymentsCount; - int? get paidPaymentsCount => _$this._paidPaymentsCount; - set paidPaymentsCount(int? paidPaymentsCount) => - _$this._paidPaymentsCount = paidPaymentsCount; - - bool? _recurrent; - bool? get recurrent => _$this._recurrent; - set recurrent(bool? recurrent) => _$this._recurrent = recurrent; - - String? _slug; - String? get slug => _$this._slug; - set slug(String? slug) => _$this._slug = slug; - - int? _smsSent; - int? get smsSent => _$this._smsSent; - set smsSent(int? smsSent) => _$this._smsSent = smsSent; - - String? _successUrl; - String? get successUrl => _$this._successUrl; - set successUrl(String? successUrl) => _$this._successUrl = successUrl; - - int? _startsAt; - int? get startsAt => _$this._startsAt; - set startsAt(int? startsAt) => _$this._startsAt = startsAt; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - OrderResponseCheckoutBuilder() { - OrderResponseCheckout._defaults(this); - } - - OrderResponseCheckoutBuilder get _$this { - final $v = _$v; - if ($v != null) { - _allowedPaymentMethods = $v.allowedPaymentMethods?.toBuilder(); - _canNotExpire = $v.canNotExpire; - _emailsSent = $v.emailsSent; - _excludeCardNetworks = $v.excludeCardNetworks?.toBuilder(); - _expiresAt = $v.expiresAt; - _failureUrl = $v.failureUrl; - _force3dsFlow = $v.force3dsFlow; - _id = $v.id; - _isRedirectOnFailure = $v.isRedirectOnFailure; - _livemode = $v.livemode; - _metadata = $v.metadata?.toBuilder(); - _monthlyInstallmentsEnabled = $v.monthlyInstallmentsEnabled; - _monthlyInstallmentsOptions = $v.monthlyInstallmentsOptions?.toBuilder(); - _name = $v.name; - _needsShippingContact = $v.needsShippingContact; - _object = $v.object; - _onDemandEnabled = $v.onDemandEnabled; - _paidPaymentsCount = $v.paidPaymentsCount; - _recurrent = $v.recurrent; - _slug = $v.slug; - _smsSent = $v.smsSent; - _successUrl = $v.successUrl; - _startsAt = $v.startsAt; - _status = $v.status; - _type = $v.type; - _url = $v.url; - _$v = null; - } - return this; - } - - @override - void replace(OrderResponseCheckout other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseCheckout; - } - - @override - void update(void Function(OrderResponseCheckoutBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseCheckout build() => _build(); - - _$OrderResponseCheckout _build() { - _$OrderResponseCheckout _$result; - try { - _$result = _$v ?? - new _$OrderResponseCheckout._( - allowedPaymentMethods: _allowedPaymentMethods?.build(), - canNotExpire: canNotExpire, - emailsSent: emailsSent, - excludeCardNetworks: _excludeCardNetworks?.build(), - expiresAt: expiresAt, - failureUrl: failureUrl, - force3dsFlow: force3dsFlow, - id: id, - isRedirectOnFailure: isRedirectOnFailure, - livemode: livemode, - metadata: _metadata?.build(), - monthlyInstallmentsEnabled: monthlyInstallmentsEnabled, - monthlyInstallmentsOptions: _monthlyInstallmentsOptions?.build(), - name: name, - needsShippingContact: needsShippingContact, - object: object, - onDemandEnabled: onDemandEnabled, - paidPaymentsCount: paidPaymentsCount, - recurrent: recurrent, - slug: slug, - smsSent: smsSent, - successUrl: successUrl, - startsAt: startsAt, - status: status, - type: type, - url: url); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'allowedPaymentMethods'; - _allowedPaymentMethods?.build(); - - _$failedField = 'excludeCardNetworks'; - _excludeCardNetworks?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'monthlyInstallmentsOptions'; - _monthlyInstallmentsOptions?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponseCheckout', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_customer_info.dart b/lib/src/model/order_response_customer_info.dart index 6ca560c..b2d9c37 100644 --- a/lib/src/model/order_response_customer_info.dart +++ b/lib/src/model/order_response_customer_info.dart @@ -3,9 +3,9 @@ // // ignore_for_file: unused_element -import 'package:conekta/src/model/customer_info_response.dart'; import 'package:conekta/src/model/order_response_customer_info_all_of.dart'; import 'package:conekta/src/model/customer_info_just_customer_id_response.dart'; +import 'package:conekta/src/model/order_customer_info_response.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -15,13 +15,14 @@ part 'order_response_customer_info.g.dart'; /// /// Properties: /// * [object] +/// * [customerCustomReference] - Custom reference /// * [name] /// * [email] /// * [phone] /// * [corporate] /// * [customerId] @BuiltValue() -abstract class OrderResponseCustomerInfo implements CustomerInfoJustCustomerIdResponse, CustomerInfoResponse, OrderResponseCustomerInfoAllOf, Built { +abstract class OrderResponseCustomerInfo implements CustomerInfoJustCustomerIdResponse, OrderCustomerInfoResponse, OrderResponseCustomerInfoAllOf, Built { OrderResponseCustomerInfo._(); factory OrderResponseCustomerInfo([void updates(OrderResponseCustomerInfoBuilder b)]) = _$OrderResponseCustomerInfo; @@ -46,6 +47,13 @@ class _$OrderResponseCustomerInfoSerializer implements PrimitiveSerializer - (new OrderResponseCustomerInfoBuilder()..update(updates))._build(); - - _$OrderResponseCustomerInfo._( - {this.customerId, - this.name, - this.email, - this.phone, - this.corporate, - this.object}) - : super._(); - - @override - OrderResponseCustomerInfo rebuild( - void Function(OrderResponseCustomerInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseCustomerInfoBuilder toBuilder() => - new OrderResponseCustomerInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseCustomerInfo && - customerId == other.customerId && - name == other.name && - email == other.email && - phone == other.phone && - corporate == other.corporate && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, customerId.hashCode), name.hashCode), - email.hashCode), - phone.hashCode), - corporate.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseCustomerInfo') - ..add('customerId', customerId) - ..add('name', name) - ..add('email', email) - ..add('phone', phone) - ..add('corporate', corporate) - ..add('object', object)) - .toString(); - } -} - -class OrderResponseCustomerInfoBuilder - implements - Builder, - CustomerInfoJustCustomerIdResponseBuilder, - CustomerInfoResponseBuilder, - OrderResponseCustomerInfoAllOfBuilder { - _$OrderResponseCustomerInfo? _$v; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(covariant String? customerId) => - _$this._customerId = customerId; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - String? _email; - String? get email => _$this._email; - set email(covariant String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - bool? _corporate; - bool? get corporate => _$this._corporate; - set corporate(covariant bool? corporate) => _$this._corporate = corporate; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - OrderResponseCustomerInfoBuilder() { - OrderResponseCustomerInfo._defaults(this); - } - - OrderResponseCustomerInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _customerId = $v.customerId; - _name = $v.name; - _email = $v.email; - _phone = $v.phone; - _corporate = $v.corporate; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant OrderResponseCustomerInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseCustomerInfo; - } - - @override - void update(void Function(OrderResponseCustomerInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseCustomerInfo build() => _build(); - - _$OrderResponseCustomerInfo _build() { - final _$result = _$v ?? - new _$OrderResponseCustomerInfo._( - customerId: customerId, - name: name, - email: email, - phone: phone, - corporate: corporate, - object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_customer_info_all_of.g.dart b/lib/src/model/order_response_customer_info_all_of.g.dart deleted file mode 100644 index fa2b539..0000000 --- a/lib/src/model/order_response_customer_info_all_of.g.dart +++ /dev/null @@ -1,101 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_customer_info_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderResponseCustomerInfoAllOfBuilder { - void replace(OrderResponseCustomerInfoAllOf other); - void update(void Function(OrderResponseCustomerInfoAllOfBuilder) updates); - String? get object; - set object(String? object); -} - -class _$$OrderResponseCustomerInfoAllOf - extends $OrderResponseCustomerInfoAllOf { - @override - final String? object; - - factory _$$OrderResponseCustomerInfoAllOf( - [void Function($OrderResponseCustomerInfoAllOfBuilder)? updates]) => - (new $OrderResponseCustomerInfoAllOfBuilder()..update(updates))._build(); - - _$$OrderResponseCustomerInfoAllOf._({this.object}) : super._(); - - @override - $OrderResponseCustomerInfoAllOf rebuild( - void Function($OrderResponseCustomerInfoAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderResponseCustomerInfoAllOfBuilder toBuilder() => - new $OrderResponseCustomerInfoAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderResponseCustomerInfoAllOf && object == other.object; - } - - @override - int get hashCode { - return $jf($jc(0, object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderResponseCustomerInfoAllOf') - ..add('object', object)) - .toString(); - } -} - -class $OrderResponseCustomerInfoAllOfBuilder - implements - Builder<$OrderResponseCustomerInfoAllOf, - $OrderResponseCustomerInfoAllOfBuilder>, - OrderResponseCustomerInfoAllOfBuilder { - _$$OrderResponseCustomerInfoAllOf? _$v; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $OrderResponseCustomerInfoAllOfBuilder() { - $OrderResponseCustomerInfoAllOf._defaults(this); - } - - $OrderResponseCustomerInfoAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderResponseCustomerInfoAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderResponseCustomerInfoAllOf; - } - - @override - void update(void Function($OrderResponseCustomerInfoAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderResponseCustomerInfoAllOf build() => _build(); - - _$$OrderResponseCustomerInfoAllOf _build() { - final _$result = - _$v ?? new _$$OrderResponseCustomerInfoAllOf._(object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_discount_lines.g.dart b/lib/src/model/order_response_discount_lines.g.dart deleted file mode 100644 index 6994a21..0000000 --- a/lib/src/model/order_response_discount_lines.g.dart +++ /dev/null @@ -1,141 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_discount_lines.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseDiscountLines extends OrderResponseDiscountLines { - @override - final BuiltList? data; - @override - final bool hasMore; - @override - final String object; - - factory _$OrderResponseDiscountLines( - [void Function(OrderResponseDiscountLinesBuilder)? updates]) => - (new OrderResponseDiscountLinesBuilder()..update(updates))._build(); - - _$OrderResponseDiscountLines._( - {this.data, required this.hasMore, required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'OrderResponseDiscountLines', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'OrderResponseDiscountLines', 'object'); - } - - @override - OrderResponseDiscountLines rebuild( - void Function(OrderResponseDiscountLinesBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseDiscountLinesBuilder toBuilder() => - new OrderResponseDiscountLinesBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseDiscountLines && - data == other.data && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, data.hashCode), hasMore.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseDiscountLines') - ..add('data', data) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class OrderResponseDiscountLinesBuilder - implements - Builder, - OrderResponseDiscountLinesAllOfBuilder, - PaginationBuilder { - _$OrderResponseDiscountLines? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - OrderResponseDiscountLinesBuilder() { - OrderResponseDiscountLines._defaults(this); - } - - OrderResponseDiscountLinesBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant OrderResponseDiscountLines other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseDiscountLines; - } - - @override - void update(void Function(OrderResponseDiscountLinesBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseDiscountLines build() => _build(); - - _$OrderResponseDiscountLines _build() { - _$OrderResponseDiscountLines _$result; - try { - _$result = _$v ?? - new _$OrderResponseDiscountLines._( - data: _data?.build(), - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'OrderResponseDiscountLines', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'OrderResponseDiscountLines', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponseDiscountLines', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_discount_lines_all_of.g.dart b/lib/src/model/order_response_discount_lines_all_of.g.dart deleted file mode 100644 index e988a05..0000000 --- a/lib/src/model/order_response_discount_lines_all_of.g.dart +++ /dev/null @@ -1,116 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_discount_lines_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderResponseDiscountLinesAllOfBuilder { - void replace(OrderResponseDiscountLinesAllOf other); - void update(void Function(OrderResponseDiscountLinesAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$OrderResponseDiscountLinesAllOf - extends $OrderResponseDiscountLinesAllOf { - @override - final BuiltList? data; - - factory _$$OrderResponseDiscountLinesAllOf( - [void Function($OrderResponseDiscountLinesAllOfBuilder)? updates]) => - (new $OrderResponseDiscountLinesAllOfBuilder()..update(updates))._build(); - - _$$OrderResponseDiscountLinesAllOf._({this.data}) : super._(); - - @override - $OrderResponseDiscountLinesAllOf rebuild( - void Function($OrderResponseDiscountLinesAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderResponseDiscountLinesAllOfBuilder toBuilder() => - new $OrderResponseDiscountLinesAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderResponseDiscountLinesAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderResponseDiscountLinesAllOf') - ..add('data', data)) - .toString(); - } -} - -class $OrderResponseDiscountLinesAllOfBuilder - implements - Builder<$OrderResponseDiscountLinesAllOf, - $OrderResponseDiscountLinesAllOfBuilder>, - OrderResponseDiscountLinesAllOfBuilder { - _$$OrderResponseDiscountLinesAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $OrderResponseDiscountLinesAllOfBuilder() { - $OrderResponseDiscountLinesAllOf._defaults(this); - } - - $OrderResponseDiscountLinesAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderResponseDiscountLinesAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderResponseDiscountLinesAllOf; - } - - @override - void update(void Function($OrderResponseDiscountLinesAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderResponseDiscountLinesAllOf build() => _build(); - - _$$OrderResponseDiscountLinesAllOf _build() { - _$$OrderResponseDiscountLinesAllOf _$result; - try { - _$result = - _$v ?? new _$$OrderResponseDiscountLinesAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$OrderResponseDiscountLinesAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_fiscal_entity.dart b/lib/src/model/order_response_fiscal_entity.dart deleted file mode 100644 index 32d8a8f..0000000 --- a/lib/src/model/order_response_fiscal_entity.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:conekta/src/model/order_response_fiscal_entity_address.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'order_response_fiscal_entity.g.dart'; - -/// OrderResponseFiscalEntity -/// -/// Properties: -/// * [address] -/// * [taxId] -/// * [id] -/// * [object] -@BuiltValue() -abstract class OrderResponseFiscalEntity implements Built { - @BuiltValueField(wireName: r'address') - OrderResponseFiscalEntityAddress? get address; - - @BuiltValueField(wireName: r'tax_id') - String? get taxId; - - @BuiltValueField(wireName: r'id') - String? get id; - - @BuiltValueField(wireName: r'object') - String? get object; - - OrderResponseFiscalEntity._(); - - factory OrderResponseFiscalEntity([void updates(OrderResponseFiscalEntityBuilder b)]) = _$OrderResponseFiscalEntity; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(OrderResponseFiscalEntityBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OrderResponseFiscalEntitySerializer(); -} - -class _$OrderResponseFiscalEntitySerializer implements PrimitiveSerializer { - @override - final Iterable types = const [OrderResponseFiscalEntity, _$OrderResponseFiscalEntity]; - - @override - final String wireName = r'OrderResponseFiscalEntity'; - - Iterable _serializeProperties( - Serializers serializers, - OrderResponseFiscalEntity object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - if (object.address != null) { - yield r'address'; - yield serializers.serialize( - object.address, - specifiedType: const FullType(OrderResponseFiscalEntityAddress), - ); - } - if (object.taxId != null) { - yield r'tax_id'; - yield serializers.serialize( - object.taxId, - specifiedType: const FullType(String), - ); - } - if (object.id != null) { - yield r'id'; - yield serializers.serialize( - object.id, - specifiedType: const FullType(String), - ); - } - if (object.object != null) { - yield r'object'; - yield serializers.serialize( - object.object, - specifiedType: const FullType(String), - ); - } - } - - @override - Object serialize( - Serializers serializers, - OrderResponseFiscalEntity object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required OrderResponseFiscalEntityBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'address': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(OrderResponseFiscalEntityAddress), - ) as OrderResponseFiscalEntityAddress; - result.address.replace(valueDes); - break; - case r'tax_id': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.taxId = valueDes; - break; - case r'id': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.id = valueDes; - break; - case r'object': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.object = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - OrderResponseFiscalEntity deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = OrderResponseFiscalEntityBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/src/model/order_response_fiscal_entity.g.dart b/lib/src/model/order_response_fiscal_entity.g.dart deleted file mode 100644 index 3e696b4..0000000 --- a/lib/src/model/order_response_fiscal_entity.g.dart +++ /dev/null @@ -1,139 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_fiscal_entity.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseFiscalEntity extends OrderResponseFiscalEntity { - @override - final OrderResponseFiscalEntityAddress? address; - @override - final String? taxId; - @override - final String? id; - @override - final String? object; - - factory _$OrderResponseFiscalEntity( - [void Function(OrderResponseFiscalEntityBuilder)? updates]) => - (new OrderResponseFiscalEntityBuilder()..update(updates))._build(); - - _$OrderResponseFiscalEntity._( - {this.address, this.taxId, this.id, this.object}) - : super._(); - - @override - OrderResponseFiscalEntity rebuild( - void Function(OrderResponseFiscalEntityBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseFiscalEntityBuilder toBuilder() => - new OrderResponseFiscalEntityBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseFiscalEntity && - address == other.address && - taxId == other.taxId && - id == other.id && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, address.hashCode), taxId.hashCode), id.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseFiscalEntity') - ..add('address', address) - ..add('taxId', taxId) - ..add('id', id) - ..add('object', object)) - .toString(); - } -} - -class OrderResponseFiscalEntityBuilder - implements - Builder { - _$OrderResponseFiscalEntity? _$v; - - OrderResponseFiscalEntityAddressBuilder? _address; - OrderResponseFiscalEntityAddressBuilder get address => - _$this._address ??= new OrderResponseFiscalEntityAddressBuilder(); - set address(OrderResponseFiscalEntityAddressBuilder? address) => - _$this._address = address; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(String? taxId) => _$this._taxId = taxId; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - OrderResponseFiscalEntityBuilder() { - OrderResponseFiscalEntity._defaults(this); - } - - OrderResponseFiscalEntityBuilder get _$this { - final $v = _$v; - if ($v != null) { - _address = $v.address?.toBuilder(); - _taxId = $v.taxId; - _id = $v.id; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(OrderResponseFiscalEntity other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseFiscalEntity; - } - - @override - void update(void Function(OrderResponseFiscalEntityBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseFiscalEntity build() => _build(); - - _$OrderResponseFiscalEntity _build() { - _$OrderResponseFiscalEntity _$result; - try { - _$result = _$v ?? - new _$OrderResponseFiscalEntity._( - address: _address?.build(), taxId: taxId, id: id, object: object); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - _address?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponseFiscalEntity', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_fiscal_entity_address.g.dart b/lib/src/model/order_response_fiscal_entity_address.g.dart deleted file mode 100644 index 1460aa0..0000000 --- a/lib/src/model/order_response_fiscal_entity_address.g.dart +++ /dev/null @@ -1,214 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_fiscal_entity_address.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseFiscalEntityAddress - extends OrderResponseFiscalEntityAddress { - @override - final String street1; - @override - final String? street2; - @override - final String postalCode; - @override - final String city; - @override - final String? state; - @override - final String? country; - @override - final bool? residential; - @override - final String? externalNumber; - @override - final String? object; - - factory _$OrderResponseFiscalEntityAddress( - [void Function(OrderResponseFiscalEntityAddressBuilder)? updates]) => - (new OrderResponseFiscalEntityAddressBuilder()..update(updates))._build(); - - _$OrderResponseFiscalEntityAddress._( - {required this.street1, - this.street2, - required this.postalCode, - required this.city, - this.state, - this.country, - this.residential, - this.externalNumber, - this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - street1, r'OrderResponseFiscalEntityAddress', 'street1'); - BuiltValueNullFieldError.checkNotNull( - postalCode, r'OrderResponseFiscalEntityAddress', 'postalCode'); - BuiltValueNullFieldError.checkNotNull( - city, r'OrderResponseFiscalEntityAddress', 'city'); - } - - @override - OrderResponseFiscalEntityAddress rebuild( - void Function(OrderResponseFiscalEntityAddressBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseFiscalEntityAddressBuilder toBuilder() => - new OrderResponseFiscalEntityAddressBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseFiscalEntityAddress && - street1 == other.street1 && - street2 == other.street2 && - postalCode == other.postalCode && - city == other.city && - state == other.state && - country == other.country && - residential == other.residential && - externalNumber == other.externalNumber && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, street1.hashCode), street2.hashCode), - postalCode.hashCode), - city.hashCode), - state.hashCode), - country.hashCode), - residential.hashCode), - externalNumber.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseFiscalEntityAddress') - ..add('street1', street1) - ..add('street2', street2) - ..add('postalCode', postalCode) - ..add('city', city) - ..add('state', state) - ..add('country', country) - ..add('residential', residential) - ..add('externalNumber', externalNumber) - ..add('object', object)) - .toString(); - } -} - -class OrderResponseFiscalEntityAddressBuilder - implements - Builder, - CustomerAddressBuilder, - OrderResponseFiscalEntityAddressAllOfBuilder { - _$OrderResponseFiscalEntityAddress? _$v; - - String? _street1; - String? get street1 => _$this._street1; - set street1(covariant String? street1) => _$this._street1 = street1; - - String? _street2; - String? get street2 => _$this._street2; - set street2(covariant String? street2) => _$this._street2 = street2; - - String? _postalCode; - String? get postalCode => _$this._postalCode; - set postalCode(covariant String? postalCode) => - _$this._postalCode = postalCode; - - String? _city; - String? get city => _$this._city; - set city(covariant String? city) => _$this._city = city; - - String? _state; - String? get state => _$this._state; - set state(covariant String? state) => _$this._state = state; - - String? _country; - String? get country => _$this._country; - set country(covariant String? country) => _$this._country = country; - - bool? _residential; - bool? get residential => _$this._residential; - set residential(covariant bool? residential) => - _$this._residential = residential; - - String? _externalNumber; - String? get externalNumber => _$this._externalNumber; - set externalNumber(covariant String? externalNumber) => - _$this._externalNumber = externalNumber; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - OrderResponseFiscalEntityAddressBuilder() { - OrderResponseFiscalEntityAddress._defaults(this); - } - - OrderResponseFiscalEntityAddressBuilder get _$this { - final $v = _$v; - if ($v != null) { - _street1 = $v.street1; - _street2 = $v.street2; - _postalCode = $v.postalCode; - _city = $v.city; - _state = $v.state; - _country = $v.country; - _residential = $v.residential; - _externalNumber = $v.externalNumber; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant OrderResponseFiscalEntityAddress other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseFiscalEntityAddress; - } - - @override - void update(void Function(OrderResponseFiscalEntityAddressBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseFiscalEntityAddress build() => _build(); - - _$OrderResponseFiscalEntityAddress _build() { - final _$result = _$v ?? - new _$OrderResponseFiscalEntityAddress._( - street1: BuiltValueNullFieldError.checkNotNull( - street1, r'OrderResponseFiscalEntityAddress', 'street1'), - street2: street2, - postalCode: BuiltValueNullFieldError.checkNotNull( - postalCode, r'OrderResponseFiscalEntityAddress', 'postalCode'), - city: BuiltValueNullFieldError.checkNotNull( - city, r'OrderResponseFiscalEntityAddress', 'city'), - state: state, - country: country, - residential: residential, - externalNumber: externalNumber, - object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_fiscal_entity_address_all_of.g.dart b/lib/src/model/order_response_fiscal_entity_address_all_of.g.dart deleted file mode 100644 index 2999ef6..0000000 --- a/lib/src/model/order_response_fiscal_entity_address_all_of.g.dart +++ /dev/null @@ -1,108 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_fiscal_entity_address_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderResponseFiscalEntityAddressAllOfBuilder { - void replace(OrderResponseFiscalEntityAddressAllOf other); - void update( - void Function(OrderResponseFiscalEntityAddressAllOfBuilder) updates); - String? get object; - set object(String? object); -} - -class _$$OrderResponseFiscalEntityAddressAllOf - extends $OrderResponseFiscalEntityAddressAllOf { - @override - final String? object; - - factory _$$OrderResponseFiscalEntityAddressAllOf( - [void Function($OrderResponseFiscalEntityAddressAllOfBuilder)? - updates]) => - (new $OrderResponseFiscalEntityAddressAllOfBuilder()..update(updates)) - ._build(); - - _$$OrderResponseFiscalEntityAddressAllOf._({this.object}) : super._(); - - @override - $OrderResponseFiscalEntityAddressAllOf rebuild( - void Function($OrderResponseFiscalEntityAddressAllOfBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderResponseFiscalEntityAddressAllOfBuilder toBuilder() => - new $OrderResponseFiscalEntityAddressAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderResponseFiscalEntityAddressAllOf && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc(0, object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'$OrderResponseFiscalEntityAddressAllOf') - ..add('object', object)) - .toString(); - } -} - -class $OrderResponseFiscalEntityAddressAllOfBuilder - implements - Builder<$OrderResponseFiscalEntityAddressAllOf, - $OrderResponseFiscalEntityAddressAllOfBuilder>, - OrderResponseFiscalEntityAddressAllOfBuilder { - _$$OrderResponseFiscalEntityAddressAllOf? _$v; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $OrderResponseFiscalEntityAddressAllOfBuilder() { - $OrderResponseFiscalEntityAddressAllOf._defaults(this); - } - - $OrderResponseFiscalEntityAddressAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderResponseFiscalEntityAddressAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderResponseFiscalEntityAddressAllOf; - } - - @override - void update( - void Function($OrderResponseFiscalEntityAddressAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderResponseFiscalEntityAddressAllOf build() => _build(); - - _$$OrderResponseFiscalEntityAddressAllOf _build() { - final _$result = - _$v ?? new _$$OrderResponseFiscalEntityAddressAllOf._(object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_products.g.dart b/lib/src/model/order_response_products.g.dart deleted file mode 100644 index 5bb8425..0000000 --- a/lib/src/model/order_response_products.g.dart +++ /dev/null @@ -1,172 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_products.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseProducts extends OrderResponseProducts { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$OrderResponseProducts( - [void Function(OrderResponseProductsBuilder)? updates]) => - (new OrderResponseProductsBuilder()..update(updates))._build(); - - _$OrderResponseProducts._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'OrderResponseProducts', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'OrderResponseProducts', 'object'); - } - - @override - OrderResponseProducts rebuild( - void Function(OrderResponseProductsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseProductsBuilder toBuilder() => - new OrderResponseProductsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseProducts && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseProducts') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class OrderResponseProductsBuilder - implements - Builder, - OrderResponseProductsAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$OrderResponseProducts? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - OrderResponseProductsBuilder() { - OrderResponseProducts._defaults(this); - } - - OrderResponseProductsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant OrderResponseProducts other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseProducts; - } - - @override - void update(void Function(OrderResponseProductsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseProducts build() => _build(); - - _$OrderResponseProducts _build() { - _$OrderResponseProducts _$result; - try { - _$result = _$v ?? - new _$OrderResponseProducts._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'OrderResponseProducts', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'OrderResponseProducts', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponseProducts', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_products_all_of.g.dart b/lib/src/model/order_response_products_all_of.g.dart deleted file mode 100644 index af39bc4..0000000 --- a/lib/src/model/order_response_products_all_of.g.dart +++ /dev/null @@ -1,115 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_products_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderResponseProductsAllOfBuilder { - void replace(OrderResponseProductsAllOf other); - void update(void Function(OrderResponseProductsAllOfBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$OrderResponseProductsAllOf extends $OrderResponseProductsAllOf { - @override - final BuiltList? data; - - factory _$$OrderResponseProductsAllOf( - [void Function($OrderResponseProductsAllOfBuilder)? updates]) => - (new $OrderResponseProductsAllOfBuilder()..update(updates))._build(); - - _$$OrderResponseProductsAllOf._({this.data}) : super._(); - - @override - $OrderResponseProductsAllOf rebuild( - void Function($OrderResponseProductsAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderResponseProductsAllOfBuilder toBuilder() => - new $OrderResponseProductsAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderResponseProductsAllOf && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderResponseProductsAllOf') - ..add('data', data)) - .toString(); - } -} - -class $OrderResponseProductsAllOfBuilder - implements - Builder<$OrderResponseProductsAllOf, - $OrderResponseProductsAllOfBuilder>, - OrderResponseProductsAllOfBuilder { - _$$OrderResponseProductsAllOf? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => - _$this._data = data; - - $OrderResponseProductsAllOfBuilder() { - $OrderResponseProductsAllOf._defaults(this); - } - - $OrderResponseProductsAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderResponseProductsAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderResponseProductsAllOf; - } - - @override - void update(void Function($OrderResponseProductsAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderResponseProductsAllOf build() => _build(); - - _$$OrderResponseProductsAllOf _build() { - _$$OrderResponseProductsAllOf _$result; - try { - _$result = - _$v ?? new _$$OrderResponseProductsAllOf._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$OrderResponseProductsAllOf', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_shipping_contact.dart b/lib/src/model/order_response_shipping_contact.dart index cfc0357..e31e654 100644 --- a/lib/src/model/order_response_shipping_contact.dart +++ b/lib/src/model/order_response_shipping_contact.dart @@ -4,8 +4,10 @@ // ignore_for_file: unused_element import 'package:conekta/src/model/customer_shipping_contacts_response.dart'; +import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/order_response_shipping_contact_all_of.dart'; import 'package:conekta/src/model/customer_shipping_contacts_response_address.dart'; +import 'package:built_value/json_object.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; @@ -23,6 +25,7 @@ part 'order_response_shipping_contact.g.dart'; /// * [address] /// * [parentId] /// * [default_] +/// * [metadata] - Metadata associated with the shipping contact /// * [deleted] @BuiltValue() abstract class OrderResponseShippingContact implements CustomerShippingContactsResponse, OrderResponseShippingContactAllOf, Built { @@ -56,6 +59,13 @@ class _$OrderResponseShippingContactSerializer implements PrimitiveSerializer; + result.metadata.replace(valueDes); + break; case r'address': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/order_response_shipping_contact.g.dart b/lib/src/model/order_response_shipping_contact.g.dart deleted file mode 100644 index ddc03f8..0000000 --- a/lib/src/model/order_response_shipping_contact.g.dart +++ /dev/null @@ -1,232 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_shipping_contact.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderResponseShippingContact extends OrderResponseShippingContact { - @override - final String? phone; - @override - final String? receiver; - @override - final String? betweenStreets; - @override - final CustomerShippingContactsResponseAddress? address; - @override - final String? parentId; - @override - final bool? default_; - @override - final String? id; - @override - final int? createdAt; - @override - final String? object; - @override - final bool? deleted; - - factory _$OrderResponseShippingContact( - [void Function(OrderResponseShippingContactBuilder)? updates]) => - (new OrderResponseShippingContactBuilder()..update(updates))._build(); - - _$OrderResponseShippingContact._( - {this.phone, - this.receiver, - this.betweenStreets, - this.address, - this.parentId, - this.default_, - this.id, - this.createdAt, - this.object, - this.deleted}) - : super._(); - - @override - OrderResponseShippingContact rebuild( - void Function(OrderResponseShippingContactBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderResponseShippingContactBuilder toBuilder() => - new OrderResponseShippingContactBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderResponseShippingContact && - phone == other.phone && - receiver == other.receiver && - betweenStreets == other.betweenStreets && - address == other.address && - parentId == other.parentId && - default_ == other.default_ && - id == other.id && - createdAt == other.createdAt && - object == other.object && - deleted == other.deleted; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, phone.hashCode), - receiver.hashCode), - betweenStreets.hashCode), - address.hashCode), - parentId.hashCode), - default_.hashCode), - id.hashCode), - createdAt.hashCode), - object.hashCode), - deleted.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderResponseShippingContact') - ..add('phone', phone) - ..add('receiver', receiver) - ..add('betweenStreets', betweenStreets) - ..add('address', address) - ..add('parentId', parentId) - ..add('default_', default_) - ..add('id', id) - ..add('createdAt', createdAt) - ..add('object', object) - ..add('deleted', deleted)) - .toString(); - } -} - -class OrderResponseShippingContactBuilder - implements - Builder, - CustomerShippingContactsResponseBuilder, - OrderResponseShippingContactAllOfBuilder { - _$OrderResponseShippingContact? _$v; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - String? _receiver; - String? get receiver => _$this._receiver; - set receiver(covariant String? receiver) => _$this._receiver = receiver; - - String? _betweenStreets; - String? get betweenStreets => _$this._betweenStreets; - set betweenStreets(covariant String? betweenStreets) => - _$this._betweenStreets = betweenStreets; - - CustomerShippingContactsResponseAddressBuilder? _address; - CustomerShippingContactsResponseAddressBuilder get address => - _$this._address ??= new CustomerShippingContactsResponseAddressBuilder(); - set address( - covariant CustomerShippingContactsResponseAddressBuilder? address) => - _$this._address = address; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(covariant bool? deleted) => _$this._deleted = deleted; - - OrderResponseShippingContactBuilder() { - OrderResponseShippingContact._defaults(this); - } - - OrderResponseShippingContactBuilder get _$this { - final $v = _$v; - if ($v != null) { - _phone = $v.phone; - _receiver = $v.receiver; - _betweenStreets = $v.betweenStreets; - _address = $v.address?.toBuilder(); - _parentId = $v.parentId; - _default_ = $v.default_; - _id = $v.id; - _createdAt = $v.createdAt; - _object = $v.object; - _deleted = $v.deleted; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant OrderResponseShippingContact other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderResponseShippingContact; - } - - @override - void update(void Function(OrderResponseShippingContactBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderResponseShippingContact build() => _build(); - - _$OrderResponseShippingContact _build() { - _$OrderResponseShippingContact _$result; - try { - _$result = _$v ?? - new _$OrderResponseShippingContact._( - phone: phone, - receiver: receiver, - betweenStreets: betweenStreets, - address: _address?.build(), - parentId: parentId, - default_: default_, - id: id, - createdAt: createdAt, - object: object, - deleted: deleted); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - _address?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderResponseShippingContact', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_response_shipping_contact_all_of.g.dart b/lib/src/model/order_response_shipping_contact_all_of.g.dart deleted file mode 100644 index e937438..0000000 --- a/lib/src/model/order_response_shipping_contact_all_of.g.dart +++ /dev/null @@ -1,132 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_response_shipping_contact_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderResponseShippingContactAllOfBuilder { - void replace(OrderResponseShippingContactAllOf other); - void update(void Function(OrderResponseShippingContactAllOfBuilder) updates); - int? get createdAt; - set createdAt(int? createdAt); - - String? get id; - set id(String? id); - - String? get object; - set object(String? object); -} - -class _$$OrderResponseShippingContactAllOf - extends $OrderResponseShippingContactAllOf { - @override - final int? createdAt; - @override - final String? id; - @override - final String? object; - - factory _$$OrderResponseShippingContactAllOf( - [void Function($OrderResponseShippingContactAllOfBuilder)? - updates]) => - (new $OrderResponseShippingContactAllOfBuilder()..update(updates)) - ._build(); - - _$$OrderResponseShippingContactAllOf._({this.createdAt, this.id, this.object}) - : super._(); - - @override - $OrderResponseShippingContactAllOf rebuild( - void Function($OrderResponseShippingContactAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderResponseShippingContactAllOfBuilder toBuilder() => - new $OrderResponseShippingContactAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderResponseShippingContactAllOf && - createdAt == other.createdAt && - id == other.id && - object == other.object; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, createdAt.hashCode), id.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderResponseShippingContactAllOf') - ..add('createdAt', createdAt) - ..add('id', id) - ..add('object', object)) - .toString(); - } -} - -class $OrderResponseShippingContactAllOfBuilder - implements - Builder<$OrderResponseShippingContactAllOf, - $OrderResponseShippingContactAllOfBuilder>, - OrderResponseShippingContactAllOfBuilder { - _$$OrderResponseShippingContactAllOf? _$v; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $OrderResponseShippingContactAllOfBuilder() { - $OrderResponseShippingContactAllOf._defaults(this); - } - - $OrderResponseShippingContactAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _createdAt = $v.createdAt; - _id = $v.id; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderResponseShippingContactAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderResponseShippingContactAllOf; - } - - @override - void update( - void Function($OrderResponseShippingContactAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderResponseShippingContactAllOf build() => _build(); - - _$$OrderResponseShippingContactAllOf _build() { - final _$result = _$v ?? - new _$$OrderResponseShippingContactAllOf._( - createdAt: createdAt, id: id, object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_tax_request.g.dart b/lib/src/model/order_tax_request.g.dart deleted file mode 100644 index ac92d35..0000000 --- a/lib/src/model/order_tax_request.g.dart +++ /dev/null @@ -1,152 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_tax_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrderTaxRequestBuilder { - void replace(OrderTaxRequest other); - void update(void Function(OrderTaxRequestBuilder) updates); - int? get amount; - set amount(int? amount); - - String? get description; - set description(String? description); - - MapBuilder get metadata; - set metadata(MapBuilder? metadata); -} - -class _$$OrderTaxRequest extends $OrderTaxRequest { - @override - final int amount; - @override - final String description; - @override - final BuiltMap? metadata; - - factory _$$OrderTaxRequest( - [void Function($OrderTaxRequestBuilder)? updates]) => - (new $OrderTaxRequestBuilder()..update(updates))._build(); - - _$$OrderTaxRequest._( - {required this.amount, required this.description, this.metadata}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'$OrderTaxRequest', 'amount'); - BuiltValueNullFieldError.checkNotNull( - description, r'$OrderTaxRequest', 'description'); - } - - @override - $OrderTaxRequest rebuild(void Function($OrderTaxRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrderTaxRequestBuilder toBuilder() => - new $OrderTaxRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrderTaxRequest && - amount == other.amount && - description == other.description && - metadata == other.metadata; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc(0, amount.hashCode), description.hashCode), metadata.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrderTaxRequest') - ..add('amount', amount) - ..add('description', description) - ..add('metadata', metadata)) - .toString(); - } -} - -class $OrderTaxRequestBuilder - implements - Builder<$OrderTaxRequest, $OrderTaxRequestBuilder>, - OrderTaxRequestBuilder { - _$$OrderTaxRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - $OrderTaxRequestBuilder() { - $OrderTaxRequest._defaults(this); - } - - $OrderTaxRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _description = $v.description; - _metadata = $v.metadata?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrderTaxRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrderTaxRequest; - } - - @override - void update(void Function($OrderTaxRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrderTaxRequest build() => _build(); - - _$$OrderTaxRequest _build() { - _$$OrderTaxRequest _$result; - try { - _$result = _$v ?? - new _$$OrderTaxRequest._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'$OrderTaxRequest', 'amount'), - description: BuiltValueNullFieldError.checkNotNull( - description, r'$OrderTaxRequest', 'description'), - metadata: _metadata?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$OrderTaxRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_update_fiscal_entity_request.dart b/lib/src/model/order_update_fiscal_entity_request.dart new file mode 100644 index 0000000..2a63222 --- /dev/null +++ b/lib/src/model/order_update_fiscal_entity_request.dart @@ -0,0 +1,206 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:conekta/src/model/fiscal_entity_address.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'order_update_fiscal_entity_request.g.dart'; + +/// Fiscal entity of the order, Currently it is a purely informative field +/// +/// Properties: +/// * [address] +/// * [email] - Email of the fiscal entity +/// * [name] - Name of the fiscal entity +/// * [metadata] - Metadata associated with the fiscal entity +/// * [phone] - Phone of the fiscal entity +/// * [taxId] - Tax ID of the fiscal entity +@BuiltValue() +abstract class OrderUpdateFiscalEntityRequest implements Built { + @BuiltValueField(wireName: r'address') + FiscalEntityAddress get address; + + /// Email of the fiscal entity + @BuiltValueField(wireName: r'email') + String? get email; + + /// Name of the fiscal entity + @BuiltValueField(wireName: r'name') + String? get name; + + /// Metadata associated with the fiscal entity + @BuiltValueField(wireName: r'metadata') + BuiltMap? get metadata; + + /// Phone of the fiscal entity + @BuiltValueField(wireName: r'phone') + String? get phone; + + /// Tax ID of the fiscal entity + @BuiltValueField(wireName: r'tax_id') + String? get taxId; + + OrderUpdateFiscalEntityRequest._(); + + factory OrderUpdateFiscalEntityRequest([void updates(OrderUpdateFiscalEntityRequestBuilder b)]) = _$OrderUpdateFiscalEntityRequest; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OrderUpdateFiscalEntityRequestBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OrderUpdateFiscalEntityRequestSerializer(); +} + +class _$OrderUpdateFiscalEntityRequestSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OrderUpdateFiscalEntityRequest, _$OrderUpdateFiscalEntityRequest]; + + @override + final String wireName = r'OrderUpdateFiscalEntityRequest'; + + Iterable _serializeProperties( + Serializers serializers, + OrderUpdateFiscalEntityRequest object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'address'; + yield serializers.serialize( + object.address, + specifiedType: const FullType(FiscalEntityAddress), + ); + if (object.email != null) { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType.nullable(String), + ); + } + if (object.metadata != null) { + yield r'metadata'; + yield serializers.serialize( + object.metadata, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ); + } + if (object.phone != null) { + yield r'phone'; + yield serializers.serialize( + object.phone, + specifiedType: const FullType(String), + ); + } + if (object.taxId != null) { + yield r'tax_id'; + yield serializers.serialize( + object.taxId, + specifiedType: const FullType.nullable(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + OrderUpdateFiscalEntityRequest object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OrderUpdateFiscalEntityRequestBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'address': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(FiscalEntityAddress), + ) as FiscalEntityAddress; + result.address = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.name = valueDes; + break; + case r'metadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltMap, [FullType(String), FullType.nullable(JsonObject)]), + ) as BuiltMap; + result.metadata.replace(valueDes); + break; + case r'phone': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.phone = valueDes; + break; + case r'tax_id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.taxId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OrderUpdateFiscalEntityRequest deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OrderUpdateFiscalEntityRequestBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/lib/src/model/order_update_request.dart b/lib/src/model/order_update_request.dart index 3b52c29..3d96abd 100644 --- a/lib/src/model/order_update_request.dart +++ b/lib/src/model/order_update_request.dart @@ -4,6 +4,7 @@ // ignore_for_file: unused_element import 'package:conekta/src/model/order_update_request_customer_info.dart'; +import 'package:conekta/src/model/order_update_fiscal_entity_request.dart'; import 'package:conekta/src/model/shipping_request.dart'; import 'package:built_collection/built_collection.dart'; import 'package:conekta/src/model/checkout_request.dart'; @@ -25,6 +26,7 @@ part 'order_update_request.g.dart'; /// * [currency] - Currency with which the payment will be made. It uses the 3-letter code of the [International Standard ISO 4217.](https://es.wikipedia.org/wiki/ISO_4217) /// * [customerInfo] /// * [discountLines] - 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. +/// * [fiscalEntity] /// * [lineItems] - 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] /// * [preAuthorize] - Indicates whether the order charges must be preauthorized @@ -50,6 +52,9 @@ abstract class OrderUpdateRequest implements Built? get discountLines; + @BuiltValueField(wireName: r'fiscal_entity') + OrderUpdateFiscalEntityRequest? get fiscalEntity; + /// 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. @BuiltValueField(wireName: r'line_items') BuiltList? get lineItems; @@ -130,6 +135,13 @@ class _$OrderUpdateRequestSerializer implements PrimitiveSerializer; result.discountLines.replace(valueDes); break; + case r'fiscal_entity': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OrderUpdateFiscalEntityRequest), + ) as OrderUpdateFiscalEntityRequest; + result.fiscalEntity.replace(valueDes); + break; case r'line_items': final valueDes = serializers.deserialize( value, diff --git a/lib/src/model/order_update_request.g.dart b/lib/src/model/order_update_request.g.dart deleted file mode 100644 index 12a39ed..0000000 --- a/lib/src/model/order_update_request.g.dart +++ /dev/null @@ -1,267 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_update_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderUpdateRequest extends OrderUpdateRequest { - @override - final BuiltList? charges; - @override - final CheckoutRequest? checkout; - @override - final String? currency; - @override - final OrderUpdateRequestCustomerInfo? customerInfo; - @override - final BuiltList? discountLines; - @override - final BuiltList? lineItems; - @override - final BuiltMap? metadata; - @override - final bool? preAuthorize; - @override - final CustomerShippingContacts? shippingContact; - @override - final BuiltList? shippingLines; - @override - final BuiltList? taxLines; - - factory _$OrderUpdateRequest( - [void Function(OrderUpdateRequestBuilder)? updates]) => - (new OrderUpdateRequestBuilder()..update(updates))._build(); - - _$OrderUpdateRequest._( - {this.charges, - this.checkout, - this.currency, - this.customerInfo, - this.discountLines, - this.lineItems, - this.metadata, - this.preAuthorize, - this.shippingContact, - this.shippingLines, - this.taxLines}) - : super._(); - - @override - OrderUpdateRequest rebuild( - void Function(OrderUpdateRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderUpdateRequestBuilder toBuilder() => - new OrderUpdateRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderUpdateRequest && - charges == other.charges && - checkout == other.checkout && - currency == other.currency && - customerInfo == other.customerInfo && - discountLines == other.discountLines && - lineItems == other.lineItems && - metadata == other.metadata && - preAuthorize == other.preAuthorize && - shippingContact == other.shippingContact && - shippingLines == other.shippingLines && - taxLines == other.taxLines; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, charges.hashCode), - checkout.hashCode), - currency.hashCode), - customerInfo.hashCode), - discountLines.hashCode), - lineItems.hashCode), - metadata.hashCode), - preAuthorize.hashCode), - shippingContact.hashCode), - shippingLines.hashCode), - taxLines.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderUpdateRequest') - ..add('charges', charges) - ..add('checkout', checkout) - ..add('currency', currency) - ..add('customerInfo', customerInfo) - ..add('discountLines', discountLines) - ..add('lineItems', lineItems) - ..add('metadata', metadata) - ..add('preAuthorize', preAuthorize) - ..add('shippingContact', shippingContact) - ..add('shippingLines', shippingLines) - ..add('taxLines', taxLines)) - .toString(); - } -} - -class OrderUpdateRequestBuilder - implements Builder { - _$OrderUpdateRequest? _$v; - - ListBuilder? _charges; - ListBuilder get charges => - _$this._charges ??= new ListBuilder(); - set charges(ListBuilder? charges) => _$this._charges = charges; - - CheckoutRequestBuilder? _checkout; - CheckoutRequestBuilder get checkout => - _$this._checkout ??= new CheckoutRequestBuilder(); - set checkout(CheckoutRequestBuilder? checkout) => _$this._checkout = checkout; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - OrderUpdateRequestCustomerInfoBuilder? _customerInfo; - OrderUpdateRequestCustomerInfoBuilder get customerInfo => - _$this._customerInfo ??= new OrderUpdateRequestCustomerInfoBuilder(); - set customerInfo(OrderUpdateRequestCustomerInfoBuilder? customerInfo) => - _$this._customerInfo = customerInfo; - - ListBuilder? _discountLines; - ListBuilder get discountLines => - _$this._discountLines ??= new ListBuilder(); - set discountLines(ListBuilder? discountLines) => - _$this._discountLines = discountLines; - - ListBuilder? _lineItems; - ListBuilder get lineItems => - _$this._lineItems ??= new ListBuilder(); - set lineItems(ListBuilder? lineItems) => - _$this._lineItems = lineItems; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - bool? _preAuthorize; - bool? get preAuthorize => _$this._preAuthorize; - set preAuthorize(bool? preAuthorize) => _$this._preAuthorize = preAuthorize; - - CustomerShippingContacts? _shippingContact; - CustomerShippingContacts? get shippingContact => _$this._shippingContact; - set shippingContact(CustomerShippingContacts? shippingContact) => - _$this._shippingContact = shippingContact; - - ListBuilder? _shippingLines; - ListBuilder get shippingLines => - _$this._shippingLines ??= new ListBuilder(); - set shippingLines(ListBuilder? shippingLines) => - _$this._shippingLines = shippingLines; - - ListBuilder? _taxLines; - ListBuilder get taxLines => - _$this._taxLines ??= new ListBuilder(); - set taxLines(ListBuilder? taxLines) => - _$this._taxLines = taxLines; - - OrderUpdateRequestBuilder() { - OrderUpdateRequest._defaults(this); - } - - OrderUpdateRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _charges = $v.charges?.toBuilder(); - _checkout = $v.checkout?.toBuilder(); - _currency = $v.currency; - _customerInfo = $v.customerInfo?.toBuilder(); - _discountLines = $v.discountLines?.toBuilder(); - _lineItems = $v.lineItems?.toBuilder(); - _metadata = $v.metadata?.toBuilder(); - _preAuthorize = $v.preAuthorize; - _shippingContact = $v.shippingContact; - _shippingLines = $v.shippingLines?.toBuilder(); - _taxLines = $v.taxLines?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(OrderUpdateRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderUpdateRequest; - } - - @override - void update(void Function(OrderUpdateRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderUpdateRequest build() => _build(); - - _$OrderUpdateRequest _build() { - _$OrderUpdateRequest _$result; - try { - _$result = _$v ?? - new _$OrderUpdateRequest._( - charges: _charges?.build(), - checkout: _checkout?.build(), - currency: currency, - customerInfo: _customerInfo?.build(), - discountLines: _discountLines?.build(), - lineItems: _lineItems?.build(), - metadata: _metadata?.build(), - preAuthorize: preAuthorize, - shippingContact: shippingContact, - shippingLines: _shippingLines?.build(), - taxLines: _taxLines?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'charges'; - _charges?.build(); - _$failedField = 'checkout'; - _checkout?.build(); - - _$failedField = 'customerInfo'; - _customerInfo?.build(); - _$failedField = 'discountLines'; - _discountLines?.build(); - _$failedField = 'lineItems'; - _lineItems?.build(); - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'shippingLines'; - _shippingLines?.build(); - _$failedField = 'taxLines'; - _taxLines?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'OrderUpdateRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/order_update_request_customer_info.g.dart b/lib/src/model/order_update_request_customer_info.g.dart deleted file mode 100644 index 8b859f7..0000000 --- a/lib/src/model/order_update_request_customer_info.g.dart +++ /dev/null @@ -1,97 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'order_update_request_customer_info.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OrderUpdateRequestCustomerInfo extends OrderUpdateRequestCustomerInfo { - @override - final OneOf oneOf; - - factory _$OrderUpdateRequestCustomerInfo( - [void Function(OrderUpdateRequestCustomerInfoBuilder)? updates]) => - (new OrderUpdateRequestCustomerInfoBuilder()..update(updates))._build(); - - _$OrderUpdateRequestCustomerInfo._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'OrderUpdateRequestCustomerInfo', 'oneOf'); - } - - @override - OrderUpdateRequestCustomerInfo rebuild( - void Function(OrderUpdateRequestCustomerInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OrderUpdateRequestCustomerInfoBuilder toBuilder() => - new OrderUpdateRequestCustomerInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OrderUpdateRequestCustomerInfo && oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OrderUpdateRequestCustomerInfo') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class OrderUpdateRequestCustomerInfoBuilder - implements - Builder { - _$OrderUpdateRequestCustomerInfo? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - OrderUpdateRequestCustomerInfoBuilder() { - OrderUpdateRequestCustomerInfo._defaults(this); - } - - OrderUpdateRequestCustomerInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(OrderUpdateRequestCustomerInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$OrderUpdateRequestCustomerInfo; - } - - @override - void update(void Function(OrderUpdateRequestCustomerInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - OrderUpdateRequestCustomerInfo build() => _build(); - - _$OrderUpdateRequestCustomerInfo _build() { - final _$result = _$v ?? - new _$OrderUpdateRequestCustomerInfo._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'OrderUpdateRequestCustomerInfo', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/orders_response.g.dart b/lib/src/model/orders_response.g.dart deleted file mode 100644 index 1b63be6..0000000 --- a/lib/src/model/orders_response.g.dart +++ /dev/null @@ -1,111 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'orders_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class OrdersResponseBuilder { - void replace(OrdersResponse other); - void update(void Function(OrdersResponseBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$OrdersResponse extends $OrdersResponse { - @override - final BuiltList data; - - factory _$$OrdersResponse([void Function($OrdersResponseBuilder)? updates]) => - (new $OrdersResponseBuilder()..update(updates))._build(); - - _$$OrdersResponse._({required this.data}) : super._() { - BuiltValueNullFieldError.checkNotNull(data, r'$OrdersResponse', 'data'); - } - - @override - $OrdersResponse rebuild(void Function($OrdersResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $OrdersResponseBuilder toBuilder() => - new $OrdersResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $OrdersResponse && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$OrdersResponse')..add('data', data)) - .toString(); - } -} - -class $OrdersResponseBuilder - implements - Builder<$OrdersResponse, $OrdersResponseBuilder>, - OrdersResponseBuilder { - _$$OrdersResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $OrdersResponseBuilder() { - $OrdersResponse._defaults(this); - } - - $OrdersResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $OrdersResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$OrdersResponse; - } - - @override - void update(void Function($OrdersResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $OrdersResponse build() => _build(); - - _$$OrdersResponse _build() { - _$$OrdersResponse _$result; - try { - _$result = _$v ?? new _$$OrdersResponse._(data: data.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - data.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$OrdersResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/page.g.dart b/lib/src/model/page.g.dart deleted file mode 100644 index a2ae098..0000000 --- a/lib/src/model/page.g.dart +++ /dev/null @@ -1,109 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'page.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PageBuilder { - void replace(Page other); - void update(void Function(PageBuilder) updates); - String? get nextPageUrl; - set nextPageUrl(String? nextPageUrl); - - String? get previousPageUrl; - set previousPageUrl(String? previousPageUrl); -} - -class _$$Page extends $Page { - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - - factory _$$Page([void Function($PageBuilder)? updates]) => - (new $PageBuilder()..update(updates))._build(); - - _$$Page._({this.nextPageUrl, this.previousPageUrl}) : super._(); - - @override - $Page rebuild(void Function($PageBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PageBuilder toBuilder() => new $PageBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $Page && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl; - } - - @override - int get hashCode { - return $jf($jc($jc(0, nextPageUrl.hashCode), previousPageUrl.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$Page') - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl)) - .toString(); - } -} - -class $PageBuilder implements Builder<$Page, $PageBuilder>, PageBuilder { - _$$Page? _$v; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - $PageBuilder() { - $Page._defaults(this); - } - - $PageBuilder get _$this { - final $v = _$v; - if ($v != null) { - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _$v = null; - } - return this; - } - - @override - void replace(covariant $Page other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$Page; - } - - @override - void update(void Function($PageBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $Page build() => _build(); - - _$$Page _build() { - final _$result = _$v ?? - new _$$Page._( - nextPageUrl: nextPageUrl, previousPageUrl: previousPageUrl); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/pagination.g.dart b/lib/src/model/pagination.g.dart deleted file mode 100644 index e89c445..0000000 --- a/lib/src/model/pagination.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'pagination.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaginationBuilder { - void replace(Pagination other); - void update(void Function(PaginationBuilder) updates); - bool? get hasMore; - set hasMore(bool? hasMore); - - String? get object; - set object(String? object); -} - -class _$$Pagination extends $Pagination { - @override - final bool hasMore; - @override - final String object; - - factory _$$Pagination([void Function($PaginationBuilder)? updates]) => - (new $PaginationBuilder()..update(updates))._build(); - - _$$Pagination._({required this.hasMore, required this.object}) : super._() { - BuiltValueNullFieldError.checkNotNull(hasMore, r'$Pagination', 'hasMore'); - BuiltValueNullFieldError.checkNotNull(object, r'$Pagination', 'object'); - } - - @override - $Pagination rebuild(void Function($PaginationBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaginationBuilder toBuilder() => new $PaginationBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $Pagination && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc($jc(0, hasMore.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$Pagination') - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class $PaginationBuilder - implements Builder<$Pagination, $PaginationBuilder>, PaginationBuilder { - _$$Pagination? _$v; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $PaginationBuilder() { - $Pagination._defaults(this); - } - - $PaginationBuilder get _$this { - final $v = _$v; - if ($v != null) { - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $Pagination other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$Pagination; - } - - @override - void update(void Function($PaginationBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $Pagination build() => _build(); - - _$$Pagination _build() { - final _$result = _$v ?? - new _$$Pagination._( - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'$Pagination', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'$Pagination', 'object')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method.g.dart b/lib/src/model/payment_method.g.dart deleted file mode 100644 index 5c19a61..0000000 --- a/lib/src/model/payment_method.g.dart +++ /dev/null @@ -1,115 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodBuilder { - void replace(PaymentMethod other); - void update(void Function(PaymentMethodBuilder) updates); - String? get type; - set type(String? type); - - String? get object; - set object(String? object); -} - -class _$$PaymentMethod extends $PaymentMethod { - @override - final String? type; - @override - final String object; - - factory _$$PaymentMethod([void Function($PaymentMethodBuilder)? updates]) => - (new $PaymentMethodBuilder()..update(updates))._build(); - - _$$PaymentMethod._({this.type, required this.object}) : super._() { - BuiltValueNullFieldError.checkNotNull(object, r'$PaymentMethod', 'object'); - } - - @override - $PaymentMethod rebuild(void Function($PaymentMethodBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodBuilder toBuilder() => - new $PaymentMethodBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethod && - type == other.type && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc($jc(0, type.hashCode), object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethod') - ..add('type', type) - ..add('object', object)) - .toString(); - } -} - -class $PaymentMethodBuilder - implements - Builder<$PaymentMethod, $PaymentMethodBuilder>, - PaymentMethodBuilder { - _$$PaymentMethod? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - $PaymentMethodBuilder() { - $PaymentMethod._defaults(this); - } - - $PaymentMethodBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethod other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethod; - } - - @override - void update(void Function($PaymentMethodBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethod build() => _build(); - - _$$PaymentMethod _build() { - final _$result = _$v ?? - new _$$PaymentMethod._( - type: type, - object: BuiltValueNullFieldError.checkNotNull( - object, r'$PaymentMethod', 'object')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_bank_transfer.g.dart b/lib/src/model/payment_method_bank_transfer.g.dart deleted file mode 100644 index 3ea4503..0000000 --- a/lib/src/model/payment_method_bank_transfer.g.dart +++ /dev/null @@ -1,359 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_bank_transfer.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodBankTransfer extends PaymentMethodBankTransfer { - @override - final String? bank; - @override - final String? clabe; - @override - final String? description; - @override - final int? executedAt; - @override - final int? expiresAt; - @override - final String? issuingAccountBank; - @override - final String? issuingAccountNumber; - @override - final String? issuingAccountHolderName; - @override - final String? issuingAccountTaxId; - @override - final BuiltList? paymentAttempts; - @override - final String? receivingAccountHolderName; - @override - final String? receivingAccountNumber; - @override - final String? receivingAccountBank; - @override - final String? receivingAccountTaxId; - @override - final String? referenceNumber; - @override - final String? trackingCode; - @override - final String? type; - @override - final String object; - - factory _$PaymentMethodBankTransfer( - [void Function(PaymentMethodBankTransferBuilder)? updates]) => - (new PaymentMethodBankTransferBuilder()..update(updates))._build(); - - _$PaymentMethodBankTransfer._( - {this.bank, - this.clabe, - this.description, - this.executedAt, - this.expiresAt, - this.issuingAccountBank, - this.issuingAccountNumber, - this.issuingAccountHolderName, - this.issuingAccountTaxId, - this.paymentAttempts, - this.receivingAccountHolderName, - this.receivingAccountNumber, - this.receivingAccountBank, - this.receivingAccountTaxId, - this.referenceNumber, - this.trackingCode, - this.type, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodBankTransfer', 'object'); - } - - @override - PaymentMethodBankTransfer rebuild( - void Function(PaymentMethodBankTransferBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodBankTransferBuilder toBuilder() => - new PaymentMethodBankTransferBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodBankTransfer && - bank == other.bank && - clabe == other.clabe && - description == other.description && - executedAt == other.executedAt && - expiresAt == other.expiresAt && - issuingAccountBank == other.issuingAccountBank && - issuingAccountNumber == other.issuingAccountNumber && - issuingAccountHolderName == other.issuingAccountHolderName && - issuingAccountTaxId == other.issuingAccountTaxId && - paymentAttempts == other.paymentAttempts && - receivingAccountHolderName == other.receivingAccountHolderName && - receivingAccountNumber == other.receivingAccountNumber && - receivingAccountBank == other.receivingAccountBank && - receivingAccountTaxId == other.receivingAccountTaxId && - referenceNumber == other.referenceNumber && - trackingCode == other.trackingCode && - type == other.type && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - bank - .hashCode), - clabe - .hashCode), - description - .hashCode), - executedAt - .hashCode), - expiresAt.hashCode), - issuingAccountBank - .hashCode), - issuingAccountNumber - .hashCode), - issuingAccountHolderName - .hashCode), - issuingAccountTaxId.hashCode), - paymentAttempts.hashCode), - receivingAccountHolderName.hashCode), - receivingAccountNumber.hashCode), - receivingAccountBank.hashCode), - receivingAccountTaxId.hashCode), - referenceNumber.hashCode), - trackingCode.hashCode), - type.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodBankTransfer') - ..add('bank', bank) - ..add('clabe', clabe) - ..add('description', description) - ..add('executedAt', executedAt) - ..add('expiresAt', expiresAt) - ..add('issuingAccountBank', issuingAccountBank) - ..add('issuingAccountNumber', issuingAccountNumber) - ..add('issuingAccountHolderName', issuingAccountHolderName) - ..add('issuingAccountTaxId', issuingAccountTaxId) - ..add('paymentAttempts', paymentAttempts) - ..add('receivingAccountHolderName', receivingAccountHolderName) - ..add('receivingAccountNumber', receivingAccountNumber) - ..add('receivingAccountBank', receivingAccountBank) - ..add('receivingAccountTaxId', receivingAccountTaxId) - ..add('referenceNumber', referenceNumber) - ..add('trackingCode', trackingCode) - ..add('type', type) - ..add('object', object)) - .toString(); - } -} - -class PaymentMethodBankTransferBuilder - implements - Builder, - ChargeDataPaymentMethodBankTransferResponseBuilder, - PaymentMethodBuilder { - _$PaymentMethodBankTransfer? _$v; - - String? _bank; - String? get bank => _$this._bank; - set bank(covariant String? bank) => _$this._bank = bank; - - String? _clabe; - String? get clabe => _$this._clabe; - set clabe(covariant String? clabe) => _$this._clabe = clabe; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - int? _executedAt; - int? get executedAt => _$this._executedAt; - set executedAt(covariant int? executedAt) => _$this._executedAt = executedAt; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _issuingAccountBank; - String? get issuingAccountBank => _$this._issuingAccountBank; - set issuingAccountBank(covariant String? issuingAccountBank) => - _$this._issuingAccountBank = issuingAccountBank; - - String? _issuingAccountNumber; - String? get issuingAccountNumber => _$this._issuingAccountNumber; - set issuingAccountNumber(covariant String? issuingAccountNumber) => - _$this._issuingAccountNumber = issuingAccountNumber; - - String? _issuingAccountHolderName; - String? get issuingAccountHolderName => _$this._issuingAccountHolderName; - set issuingAccountHolderName(covariant String? issuingAccountHolderName) => - _$this._issuingAccountHolderName = issuingAccountHolderName; - - String? _issuingAccountTaxId; - String? get issuingAccountTaxId => _$this._issuingAccountTaxId; - set issuingAccountTaxId(covariant String? issuingAccountTaxId) => - _$this._issuingAccountTaxId = issuingAccountTaxId; - - ListBuilder? _paymentAttempts; - ListBuilder get paymentAttempts => - _$this._paymentAttempts ??= new ListBuilder(); - set paymentAttempts(covariant ListBuilder? paymentAttempts) => - _$this._paymentAttempts = paymentAttempts; - - String? _receivingAccountHolderName; - String? get receivingAccountHolderName => _$this._receivingAccountHolderName; - set receivingAccountHolderName( - covariant String? receivingAccountHolderName) => - _$this._receivingAccountHolderName = receivingAccountHolderName; - - String? _receivingAccountNumber; - String? get receivingAccountNumber => _$this._receivingAccountNumber; - set receivingAccountNumber(covariant String? receivingAccountNumber) => - _$this._receivingAccountNumber = receivingAccountNumber; - - String? _receivingAccountBank; - String? get receivingAccountBank => _$this._receivingAccountBank; - set receivingAccountBank(covariant String? receivingAccountBank) => - _$this._receivingAccountBank = receivingAccountBank; - - String? _receivingAccountTaxId; - String? get receivingAccountTaxId => _$this._receivingAccountTaxId; - set receivingAccountTaxId(covariant String? receivingAccountTaxId) => - _$this._receivingAccountTaxId = receivingAccountTaxId; - - String? _referenceNumber; - String? get referenceNumber => _$this._referenceNumber; - set referenceNumber(covariant String? referenceNumber) => - _$this._referenceNumber = referenceNumber; - - String? _trackingCode; - String? get trackingCode => _$this._trackingCode; - set trackingCode(covariant String? trackingCode) => - _$this._trackingCode = trackingCode; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - PaymentMethodBankTransferBuilder() { - PaymentMethodBankTransfer._defaults(this); - } - - PaymentMethodBankTransferBuilder get _$this { - final $v = _$v; - if ($v != null) { - _bank = $v.bank; - _clabe = $v.clabe; - _description = $v.description; - _executedAt = $v.executedAt; - _expiresAt = $v.expiresAt; - _issuingAccountBank = $v.issuingAccountBank; - _issuingAccountNumber = $v.issuingAccountNumber; - _issuingAccountHolderName = $v.issuingAccountHolderName; - _issuingAccountTaxId = $v.issuingAccountTaxId; - _paymentAttempts = $v.paymentAttempts?.toBuilder(); - _receivingAccountHolderName = $v.receivingAccountHolderName; - _receivingAccountNumber = $v.receivingAccountNumber; - _receivingAccountBank = $v.receivingAccountBank; - _receivingAccountTaxId = $v.receivingAccountTaxId; - _referenceNumber = $v.referenceNumber; - _trackingCode = $v.trackingCode; - _type = $v.type; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodBankTransfer other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodBankTransfer; - } - - @override - void update(void Function(PaymentMethodBankTransferBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodBankTransfer build() => _build(); - - _$PaymentMethodBankTransfer _build() { - _$PaymentMethodBankTransfer _$result; - try { - _$result = _$v ?? - new _$PaymentMethodBankTransfer._( - bank: bank, - clabe: clabe, - description: description, - executedAt: executedAt, - expiresAt: expiresAt, - issuingAccountBank: issuingAccountBank, - issuingAccountNumber: issuingAccountNumber, - issuingAccountHolderName: issuingAccountHolderName, - issuingAccountTaxId: issuingAccountTaxId, - paymentAttempts: _paymentAttempts?.build(), - receivingAccountHolderName: receivingAccountHolderName, - receivingAccountNumber: receivingAccountNumber, - receivingAccountBank: receivingAccountBank, - receivingAccountTaxId: receivingAccountTaxId, - referenceNumber: referenceNumber, - trackingCode: trackingCode, - type: type, - object: BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodBankTransfer', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'paymentAttempts'; - _paymentAttempts?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'PaymentMethodBankTransfer', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_card.dart b/lib/src/model/payment_method_card.dart index 5c18811..4b13f79 100644 --- a/lib/src/model/payment_method_card.dart +++ b/lib/src/model/payment_method_card.dart @@ -20,6 +20,7 @@ part 'payment_method_card.g.dart'; /// * [accountType] /// * [authCode] /// * [brand] +/// * [contractId] - Id sent for recurrent charges. /// * [country] /// * [expMonth] /// * [expYear] @@ -108,6 +109,13 @@ class _$PaymentMethodCardSerializer implements PrimitiveSerializer? fraudIndicators; - @override - final String? issuer; - @override - final String? last4; - @override - final String? name; - @override - final String? type; - @override - final String object; - - factory _$PaymentMethodCard( - [void Function(PaymentMethodCardBuilder)? updates]) => - (new PaymentMethodCardBuilder()..update(updates))._build(); - - _$PaymentMethodCard._( - {this.accountType, - this.authCode, - this.brand, - this.country, - this.expMonth, - this.expYear, - this.fraudIndicators, - this.issuer, - this.last4, - this.name, - this.type, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCard', 'object'); - } - - @override - PaymentMethodCard rebuild(void Function(PaymentMethodCardBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodCardBuilder toBuilder() => - new PaymentMethodCardBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodCard && - accountType == other.accountType && - authCode == other.authCode && - brand == other.brand && - country == other.country && - expMonth == other.expMonth && - expYear == other.expYear && - fraudIndicators == other.fraudIndicators && - issuer == other.issuer && - last4 == other.last4 && - name == other.name && - type == other.type && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, accountType.hashCode), - authCode.hashCode), - brand.hashCode), - country.hashCode), - expMonth.hashCode), - expYear.hashCode), - fraudIndicators.hashCode), - issuer.hashCode), - last4.hashCode), - name.hashCode), - type.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodCard') - ..add('accountType', accountType) - ..add('authCode', authCode) - ..add('brand', brand) - ..add('country', country) - ..add('expMonth', expMonth) - ..add('expYear', expYear) - ..add('fraudIndicators', fraudIndicators) - ..add('issuer', issuer) - ..add('last4', last4) - ..add('name', name) - ..add('type', type) - ..add('object', object)) - .toString(); - } -} - -class PaymentMethodCardBuilder - implements - Builder, - ChargeDataPaymentMethodCardResponseBuilder, - PaymentMethodBuilder { - _$PaymentMethodCard? _$v; - - String? _accountType; - String? get accountType => _$this._accountType; - set accountType(covariant String? accountType) => - _$this._accountType = accountType; - - String? _authCode; - String? get authCode => _$this._authCode; - set authCode(covariant String? authCode) => _$this._authCode = authCode; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _country; - String? get country => _$this._country; - set country(covariant String? country) => _$this._country = country; - - String? _expMonth; - String? get expMonth => _$this._expMonth; - set expMonth(covariant String? expMonth) => _$this._expMonth = expMonth; - - String? _expYear; - String? get expYear => _$this._expYear; - set expYear(covariant String? expYear) => _$this._expYear = expYear; - - ListBuilder? _fraudIndicators; - ListBuilder get fraudIndicators => - _$this._fraudIndicators ??= new ListBuilder(); - set fraudIndicators(covariant ListBuilder? fraudIndicators) => - _$this._fraudIndicators = fraudIndicators; - - String? _issuer; - String? get issuer => _$this._issuer; - set issuer(covariant String? issuer) => _$this._issuer = issuer; - - String? _last4; - String? get last4 => _$this._last4; - set last4(covariant String? last4) => _$this._last4 = last4; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - PaymentMethodCardBuilder() { - PaymentMethodCard._defaults(this); - } - - PaymentMethodCardBuilder get _$this { - final $v = _$v; - if ($v != null) { - _accountType = $v.accountType; - _authCode = $v.authCode; - _brand = $v.brand; - _country = $v.country; - _expMonth = $v.expMonth; - _expYear = $v.expYear; - _fraudIndicators = $v.fraudIndicators?.toBuilder(); - _issuer = $v.issuer; - _last4 = $v.last4; - _name = $v.name; - _type = $v.type; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodCard other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodCard; - } - - @override - void update(void Function(PaymentMethodCardBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodCard build() => _build(); - - _$PaymentMethodCard _build() { - _$PaymentMethodCard _$result; - try { - _$result = _$v ?? - new _$PaymentMethodCard._( - accountType: accountType, - authCode: authCode, - brand: brand, - country: country, - expMonth: expMonth, - expYear: expYear, - fraudIndicators: _fraudIndicators?.build(), - issuer: issuer, - last4: last4, - name: name, - type: type, - object: BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCard', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'fraudIndicators'; - _fraudIndicators?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'PaymentMethodCard', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_card_request.g.dart b/lib/src/model/payment_method_card_request.g.dart deleted file mode 100644 index 6d4a7f4..0000000 --- a/lib/src/model/payment_method_card_request.g.dart +++ /dev/null @@ -1,110 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_card_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodCardRequest extends PaymentMethodCardRequest { - @override - final String type; - @override - final String? tokenId; - - factory _$PaymentMethodCardRequest( - [void Function(PaymentMethodCardRequestBuilder)? updates]) => - (new PaymentMethodCardRequestBuilder()..update(updates))._build(); - - _$PaymentMethodCardRequest._({required this.type, this.tokenId}) : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCardRequest', 'type'); - } - - @override - PaymentMethodCardRequest rebuild( - void Function(PaymentMethodCardRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodCardRequestBuilder toBuilder() => - new PaymentMethodCardRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodCardRequest && - type == other.type && - tokenId == other.tokenId; - } - - @override - int get hashCode { - return $jf($jc($jc(0, type.hashCode), tokenId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodCardRequest') - ..add('type', type) - ..add('tokenId', tokenId)) - .toString(); - } -} - -class PaymentMethodCardRequestBuilder - implements - Builder, - CustomerPaymentMethodRequestBuilder, - PaymentMethodCardRequestAllOfBuilder { - _$PaymentMethodCardRequest? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _tokenId; - String? get tokenId => _$this._tokenId; - set tokenId(covariant String? tokenId) => _$this._tokenId = tokenId; - - PaymentMethodCardRequestBuilder() { - PaymentMethodCardRequest._defaults(this); - } - - PaymentMethodCardRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _tokenId = $v.tokenId; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodCardRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodCardRequest; - } - - @override - void update(void Function(PaymentMethodCardRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodCardRequest build() => _build(); - - _$PaymentMethodCardRequest _build() { - final _$result = _$v ?? - new _$PaymentMethodCardRequest._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCardRequest', 'type'), - tokenId: tokenId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_card_request_all_of.g.dart b/lib/src/model/payment_method_card_request_all_of.g.dart deleted file mode 100644 index 9b9cbef..0000000 --- a/lib/src/model/payment_method_card_request_all_of.g.dart +++ /dev/null @@ -1,100 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_card_request_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodCardRequestAllOfBuilder { - void replace(PaymentMethodCardRequestAllOf other); - void update(void Function(PaymentMethodCardRequestAllOfBuilder) updates); - String? get tokenId; - set tokenId(String? tokenId); -} - -class _$$PaymentMethodCardRequestAllOf extends $PaymentMethodCardRequestAllOf { - @override - final String? tokenId; - - factory _$$PaymentMethodCardRequestAllOf( - [void Function($PaymentMethodCardRequestAllOfBuilder)? updates]) => - (new $PaymentMethodCardRequestAllOfBuilder()..update(updates))._build(); - - _$$PaymentMethodCardRequestAllOf._({this.tokenId}) : super._(); - - @override - $PaymentMethodCardRequestAllOf rebuild( - void Function($PaymentMethodCardRequestAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodCardRequestAllOfBuilder toBuilder() => - new $PaymentMethodCardRequestAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethodCardRequestAllOf && tokenId == other.tokenId; - } - - @override - int get hashCode { - return $jf($jc(0, tokenId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethodCardRequestAllOf') - ..add('tokenId', tokenId)) - .toString(); - } -} - -class $PaymentMethodCardRequestAllOfBuilder - implements - Builder<$PaymentMethodCardRequestAllOf, - $PaymentMethodCardRequestAllOfBuilder>, - PaymentMethodCardRequestAllOfBuilder { - _$$PaymentMethodCardRequestAllOf? _$v; - - String? _tokenId; - String? get tokenId => _$this._tokenId; - set tokenId(covariant String? tokenId) => _$this._tokenId = tokenId; - - $PaymentMethodCardRequestAllOfBuilder() { - $PaymentMethodCardRequestAllOf._defaults(this); - } - - $PaymentMethodCardRequestAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _tokenId = $v.tokenId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethodCardRequestAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethodCardRequestAllOf; - } - - @override - void update(void Function($PaymentMethodCardRequestAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethodCardRequestAllOf build() => _build(); - - _$$PaymentMethodCardRequestAllOf _build() { - final _$result = - _$v ?? new _$$PaymentMethodCardRequestAllOf._(tokenId: tokenId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_card_response.g.dart b/lib/src/model/payment_method_card_response.g.dart deleted file mode 100644 index 8ac08ee..0000000 --- a/lib/src/model/payment_method_card_response.g.dart +++ /dev/null @@ -1,296 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_card_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodCardResponse extends PaymentMethodCardResponse { - @override - final String? last4; - @override - final String? bin; - @override - final String? cardType; - @override - final String? expMonth; - @override - final String? expYear; - @override - final String? brand; - @override - final String? name; - @override - final bool? default_; - @override - final bool? visibleOnCheckout; - @override - final String? paymentSourceStatus; - @override - final String type; - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - - factory _$PaymentMethodCardResponse( - [void Function(PaymentMethodCardResponseBuilder)? updates]) => - (new PaymentMethodCardResponseBuilder()..update(updates))._build(); - - _$PaymentMethodCardResponse._( - {this.last4, - this.bin, - this.cardType, - this.expMonth, - this.expYear, - this.brand, - this.name, - this.default_, - this.visibleOnCheckout, - this.paymentSourceStatus, - required this.type, - required this.id, - required this.object, - required this.createdAt, - this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCardResponse', 'type'); - BuiltValueNullFieldError.checkNotNull( - id, r'PaymentMethodCardResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCardResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'PaymentMethodCardResponse', 'createdAt'); - } - - @override - PaymentMethodCardResponse rebuild( - void Function(PaymentMethodCardResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodCardResponseBuilder toBuilder() => - new PaymentMethodCardResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodCardResponse && - last4 == other.last4 && - bin == other.bin && - cardType == other.cardType && - expMonth == other.expMonth && - expYear == other.expYear && - brand == other.brand && - name == other.name && - default_ == other.default_ && - visibleOnCheckout == other.visibleOnCheckout && - paymentSourceStatus == other.paymentSourceStatus && - type == other.type && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc(0, - last4.hashCode), - bin.hashCode), - cardType.hashCode), - expMonth.hashCode), - expYear.hashCode), - brand.hashCode), - name.hashCode), - default_.hashCode), - visibleOnCheckout.hashCode), - paymentSourceStatus.hashCode), - type.hashCode), - id.hashCode), - object.hashCode), - createdAt.hashCode), - parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodCardResponse') - ..add('last4', last4) - ..add('bin', bin) - ..add('cardType', cardType) - ..add('expMonth', expMonth) - ..add('expYear', expYear) - ..add('brand', brand) - ..add('name', name) - ..add('default_', default_) - ..add('visibleOnCheckout', visibleOnCheckout) - ..add('paymentSourceStatus', paymentSourceStatus) - ..add('type', type) - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId)) - .toString(); - } -} - -class PaymentMethodCardResponseBuilder - implements - Builder, - PaymentMethodCardResponseAllOfBuilder, - PaymentMethodResponseBuilder { - _$PaymentMethodCardResponse? _$v; - - String? _last4; - String? get last4 => _$this._last4; - set last4(covariant String? last4) => _$this._last4 = last4; - - String? _bin; - String? get bin => _$this._bin; - set bin(covariant String? bin) => _$this._bin = bin; - - String? _cardType; - String? get cardType => _$this._cardType; - set cardType(covariant String? cardType) => _$this._cardType = cardType; - - String? _expMonth; - String? get expMonth => _$this._expMonth; - set expMonth(covariant String? expMonth) => _$this._expMonth = expMonth; - - String? _expYear; - String? get expYear => _$this._expYear; - set expYear(covariant String? expYear) => _$this._expYear = expYear; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - bool? _visibleOnCheckout; - bool? get visibleOnCheckout => _$this._visibleOnCheckout; - set visibleOnCheckout(covariant bool? visibleOnCheckout) => - _$this._visibleOnCheckout = visibleOnCheckout; - - String? _paymentSourceStatus; - String? get paymentSourceStatus => _$this._paymentSourceStatus; - set paymentSourceStatus(covariant String? paymentSourceStatus) => - _$this._paymentSourceStatus = paymentSourceStatus; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - PaymentMethodCardResponseBuilder() { - PaymentMethodCardResponse._defaults(this); - } - - PaymentMethodCardResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _last4 = $v.last4; - _bin = $v.bin; - _cardType = $v.cardType; - _expMonth = $v.expMonth; - _expYear = $v.expYear; - _brand = $v.brand; - _name = $v.name; - _default_ = $v.default_; - _visibleOnCheckout = $v.visibleOnCheckout; - _paymentSourceStatus = $v.paymentSourceStatus; - _type = $v.type; - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodCardResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodCardResponse; - } - - @override - void update(void Function(PaymentMethodCardResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodCardResponse build() => _build(); - - _$PaymentMethodCardResponse _build() { - final _$result = _$v ?? - new _$PaymentMethodCardResponse._( - last4: last4, - bin: bin, - cardType: cardType, - expMonth: expMonth, - expYear: expYear, - brand: brand, - name: name, - default_: default_, - visibleOnCheckout: visibleOnCheckout, - paymentSourceStatus: paymentSourceStatus, - type: BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCardResponse', 'type'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'PaymentMethodCardResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCardResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'PaymentMethodCardResponse', 'createdAt'), - parentId: parentId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_card_response_all_of.g.dart b/lib/src/model/payment_method_card_response_all_of.g.dart deleted file mode 100644 index 8ba050d..0000000 --- a/lib/src/model/payment_method_card_response_all_of.g.dart +++ /dev/null @@ -1,248 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_card_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodCardResponseAllOfBuilder { - void replace(PaymentMethodCardResponseAllOf other); - void update(void Function(PaymentMethodCardResponseAllOfBuilder) updates); - String? get last4; - set last4(String? last4); - - String? get bin; - set bin(String? bin); - - String? get cardType; - set cardType(String? cardType); - - String? get expMonth; - set expMonth(String? expMonth); - - String? get expYear; - set expYear(String? expYear); - - String? get brand; - set brand(String? brand); - - String? get name; - set name(String? name); - - bool? get default_; - set default_(bool? default_); - - bool? get visibleOnCheckout; - set visibleOnCheckout(bool? visibleOnCheckout); - - String? get paymentSourceStatus; - set paymentSourceStatus(String? paymentSourceStatus); -} - -class _$$PaymentMethodCardResponseAllOf - extends $PaymentMethodCardResponseAllOf { - @override - final String? last4; - @override - final String? bin; - @override - final String? cardType; - @override - final String? expMonth; - @override - final String? expYear; - @override - final String? brand; - @override - final String? name; - @override - final bool? default_; - @override - final bool? visibleOnCheckout; - @override - final String? paymentSourceStatus; - - factory _$$PaymentMethodCardResponseAllOf( - [void Function($PaymentMethodCardResponseAllOfBuilder)? updates]) => - (new $PaymentMethodCardResponseAllOfBuilder()..update(updates))._build(); - - _$$PaymentMethodCardResponseAllOf._( - {this.last4, - this.bin, - this.cardType, - this.expMonth, - this.expYear, - this.brand, - this.name, - this.default_, - this.visibleOnCheckout, - this.paymentSourceStatus}) - : super._(); - - @override - $PaymentMethodCardResponseAllOf rebuild( - void Function($PaymentMethodCardResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodCardResponseAllOfBuilder toBuilder() => - new $PaymentMethodCardResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethodCardResponseAllOf && - last4 == other.last4 && - bin == other.bin && - cardType == other.cardType && - expMonth == other.expMonth && - expYear == other.expYear && - brand == other.brand && - name == other.name && - default_ == other.default_ && - visibleOnCheckout == other.visibleOnCheckout && - paymentSourceStatus == other.paymentSourceStatus; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, last4.hashCode), bin.hashCode), - cardType.hashCode), - expMonth.hashCode), - expYear.hashCode), - brand.hashCode), - name.hashCode), - default_.hashCode), - visibleOnCheckout.hashCode), - paymentSourceStatus.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethodCardResponseAllOf') - ..add('last4', last4) - ..add('bin', bin) - ..add('cardType', cardType) - ..add('expMonth', expMonth) - ..add('expYear', expYear) - ..add('brand', brand) - ..add('name', name) - ..add('default_', default_) - ..add('visibleOnCheckout', visibleOnCheckout) - ..add('paymentSourceStatus', paymentSourceStatus)) - .toString(); - } -} - -class $PaymentMethodCardResponseAllOfBuilder - implements - Builder<$PaymentMethodCardResponseAllOf, - $PaymentMethodCardResponseAllOfBuilder>, - PaymentMethodCardResponseAllOfBuilder { - _$$PaymentMethodCardResponseAllOf? _$v; - - String? _last4; - String? get last4 => _$this._last4; - set last4(covariant String? last4) => _$this._last4 = last4; - - String? _bin; - String? get bin => _$this._bin; - set bin(covariant String? bin) => _$this._bin = bin; - - String? _cardType; - String? get cardType => _$this._cardType; - set cardType(covariant String? cardType) => _$this._cardType = cardType; - - String? _expMonth; - String? get expMonth => _$this._expMonth; - set expMonth(covariant String? expMonth) => _$this._expMonth = expMonth; - - String? _expYear; - String? get expYear => _$this._expYear; - set expYear(covariant String? expYear) => _$this._expYear = expYear; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - bool? _visibleOnCheckout; - bool? get visibleOnCheckout => _$this._visibleOnCheckout; - set visibleOnCheckout(covariant bool? visibleOnCheckout) => - _$this._visibleOnCheckout = visibleOnCheckout; - - String? _paymentSourceStatus; - String? get paymentSourceStatus => _$this._paymentSourceStatus; - set paymentSourceStatus(covariant String? paymentSourceStatus) => - _$this._paymentSourceStatus = paymentSourceStatus; - - $PaymentMethodCardResponseAllOfBuilder() { - $PaymentMethodCardResponseAllOf._defaults(this); - } - - $PaymentMethodCardResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _last4 = $v.last4; - _bin = $v.bin; - _cardType = $v.cardType; - _expMonth = $v.expMonth; - _expYear = $v.expYear; - _brand = $v.brand; - _name = $v.name; - _default_ = $v.default_; - _visibleOnCheckout = $v.visibleOnCheckout; - _paymentSourceStatus = $v.paymentSourceStatus; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethodCardResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethodCardResponseAllOf; - } - - @override - void update(void Function($PaymentMethodCardResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethodCardResponseAllOf build() => _build(); - - _$$PaymentMethodCardResponseAllOf _build() { - final _$result = _$v ?? - new _$$PaymentMethodCardResponseAllOf._( - last4: last4, - bin: bin, - cardType: cardType, - expMonth: expMonth, - expYear: expYear, - brand: brand, - name: name, - default_: default_, - visibleOnCheckout: visibleOnCheckout, - paymentSourceStatus: paymentSourceStatus); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_cash.g.dart b/lib/src/model/payment_method_cash.g.dart deleted file mode 100644 index f0e6a29..0000000 --- a/lib/src/model/payment_method_cash.g.dart +++ /dev/null @@ -1,219 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_cash.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodCash extends PaymentMethodCash { - @override - final int? authCode; - @override - final String? cashierId; - @override - final String? reference; - @override - final String? barcodeUrl; - @override - final int? expiresAt; - @override - final String? serviceName; - @override - final String? store; - @override - final String? storeName; - @override - final String? type; - @override - final String object; - - factory _$PaymentMethodCash( - [void Function(PaymentMethodCashBuilder)? updates]) => - (new PaymentMethodCashBuilder()..update(updates))._build(); - - _$PaymentMethodCash._( - {this.authCode, - this.cashierId, - this.reference, - this.barcodeUrl, - this.expiresAt, - this.serviceName, - this.store, - this.storeName, - this.type, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCash', 'object'); - } - - @override - PaymentMethodCash rebuild(void Function(PaymentMethodCashBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodCashBuilder toBuilder() => - new PaymentMethodCashBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodCash && - authCode == other.authCode && - cashierId == other.cashierId && - reference == other.reference && - barcodeUrl == other.barcodeUrl && - expiresAt == other.expiresAt && - serviceName == other.serviceName && - store == other.store && - storeName == other.storeName && - type == other.type && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, authCode.hashCode), - cashierId.hashCode), - reference.hashCode), - barcodeUrl.hashCode), - expiresAt.hashCode), - serviceName.hashCode), - store.hashCode), - storeName.hashCode), - type.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodCash') - ..add('authCode', authCode) - ..add('cashierId', cashierId) - ..add('reference', reference) - ..add('barcodeUrl', barcodeUrl) - ..add('expiresAt', expiresAt) - ..add('serviceName', serviceName) - ..add('store', store) - ..add('storeName', storeName) - ..add('type', type) - ..add('object', object)) - .toString(); - } -} - -class PaymentMethodCashBuilder - implements - Builder, - ChargeDataPaymentMethodCashResponseBuilder, - PaymentMethodBuilder { - _$PaymentMethodCash? _$v; - - int? _authCode; - int? get authCode => _$this._authCode; - set authCode(covariant int? authCode) => _$this._authCode = authCode; - - String? _cashierId; - String? get cashierId => _$this._cashierId; - set cashierId(covariant String? cashierId) => _$this._cashierId = cashierId; - - String? _reference; - String? get reference => _$this._reference; - set reference(covariant String? reference) => _$this._reference = reference; - - String? _barcodeUrl; - String? get barcodeUrl => _$this._barcodeUrl; - set barcodeUrl(covariant String? barcodeUrl) => - _$this._barcodeUrl = barcodeUrl; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _serviceName; - String? get serviceName => _$this._serviceName; - set serviceName(covariant String? serviceName) => - _$this._serviceName = serviceName; - - String? _store; - String? get store => _$this._store; - set store(covariant String? store) => _$this._store = store; - - String? _storeName; - String? get storeName => _$this._storeName; - set storeName(covariant String? storeName) => _$this._storeName = storeName; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - PaymentMethodCashBuilder() { - PaymentMethodCash._defaults(this); - } - - PaymentMethodCashBuilder get _$this { - final $v = _$v; - if ($v != null) { - _authCode = $v.authCode; - _cashierId = $v.cashierId; - _reference = $v.reference; - _barcodeUrl = $v.barcodeUrl; - _expiresAt = $v.expiresAt; - _serviceName = $v.serviceName; - _store = $v.store; - _storeName = $v.storeName; - _type = $v.type; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodCash other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodCash; - } - - @override - void update(void Function(PaymentMethodCashBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodCash build() => _build(); - - _$PaymentMethodCash _build() { - final _$result = _$v ?? - new _$PaymentMethodCash._( - authCode: authCode, - cashierId: cashierId, - reference: reference, - barcodeUrl: barcodeUrl, - expiresAt: expiresAt, - serviceName: serviceName, - store: store, - storeName: storeName, - type: type, - object: BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCash', 'object')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_cash_request.g.dart b/lib/src/model/payment_method_cash_request.g.dart deleted file mode 100644 index 7be69f2..0000000 --- a/lib/src/model/payment_method_cash_request.g.dart +++ /dev/null @@ -1,111 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_cash_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodCashRequest extends PaymentMethodCashRequest { - @override - final String type; - @override - final int? expiresAt; - - factory _$PaymentMethodCashRequest( - [void Function(PaymentMethodCashRequestBuilder)? updates]) => - (new PaymentMethodCashRequestBuilder()..update(updates))._build(); - - _$PaymentMethodCashRequest._({required this.type, this.expiresAt}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCashRequest', 'type'); - } - - @override - PaymentMethodCashRequest rebuild( - void Function(PaymentMethodCashRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodCashRequestBuilder toBuilder() => - new PaymentMethodCashRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodCashRequest && - type == other.type && - expiresAt == other.expiresAt; - } - - @override - int get hashCode { - return $jf($jc($jc(0, type.hashCode), expiresAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodCashRequest') - ..add('type', type) - ..add('expiresAt', expiresAt)) - .toString(); - } -} - -class PaymentMethodCashRequestBuilder - implements - Builder, - CustomerPaymentMethodRequestBuilder, - PaymentMethodCashRequestAllOfBuilder { - _$PaymentMethodCashRequest? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - PaymentMethodCashRequestBuilder() { - PaymentMethodCashRequest._defaults(this); - } - - PaymentMethodCashRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _expiresAt = $v.expiresAt; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodCashRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodCashRequest; - } - - @override - void update(void Function(PaymentMethodCashRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodCashRequest build() => _build(); - - _$PaymentMethodCashRequest _build() { - final _$result = _$v ?? - new _$PaymentMethodCashRequest._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCashRequest', 'type'), - expiresAt: expiresAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_cash_request_all_of.g.dart b/lib/src/model/payment_method_cash_request_all_of.g.dart deleted file mode 100644 index 73bdff4..0000000 --- a/lib/src/model/payment_method_cash_request_all_of.g.dart +++ /dev/null @@ -1,101 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_cash_request_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodCashRequestAllOfBuilder { - void replace(PaymentMethodCashRequestAllOf other); - void update(void Function(PaymentMethodCashRequestAllOfBuilder) updates); - int? get expiresAt; - set expiresAt(int? expiresAt); -} - -class _$$PaymentMethodCashRequestAllOf extends $PaymentMethodCashRequestAllOf { - @override - final int? expiresAt; - - factory _$$PaymentMethodCashRequestAllOf( - [void Function($PaymentMethodCashRequestAllOfBuilder)? updates]) => - (new $PaymentMethodCashRequestAllOfBuilder()..update(updates))._build(); - - _$$PaymentMethodCashRequestAllOf._({this.expiresAt}) : super._(); - - @override - $PaymentMethodCashRequestAllOf rebuild( - void Function($PaymentMethodCashRequestAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodCashRequestAllOfBuilder toBuilder() => - new $PaymentMethodCashRequestAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethodCashRequestAllOf && - expiresAt == other.expiresAt; - } - - @override - int get hashCode { - return $jf($jc(0, expiresAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethodCashRequestAllOf') - ..add('expiresAt', expiresAt)) - .toString(); - } -} - -class $PaymentMethodCashRequestAllOfBuilder - implements - Builder<$PaymentMethodCashRequestAllOf, - $PaymentMethodCashRequestAllOfBuilder>, - PaymentMethodCashRequestAllOfBuilder { - _$$PaymentMethodCashRequestAllOf? _$v; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - $PaymentMethodCashRequestAllOfBuilder() { - $PaymentMethodCashRequestAllOf._defaults(this); - } - - $PaymentMethodCashRequestAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _expiresAt = $v.expiresAt; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethodCashRequestAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethodCashRequestAllOf; - } - - @override - void update(void Function($PaymentMethodCashRequestAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethodCashRequestAllOf build() => _build(); - - _$$PaymentMethodCashRequestAllOf _build() { - final _$result = - _$v ?? new _$$PaymentMethodCashRequestAllOf._(expiresAt: expiresAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_cash_response.g.dart b/lib/src/model/payment_method_cash_response.g.dart deleted file mode 100644 index 8f49450..0000000 --- a/lib/src/model/payment_method_cash_response.g.dart +++ /dev/null @@ -1,228 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_cash_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodCashResponse extends PaymentMethodCashResponse { - @override - final String? reference; - @override - final String? barcode; - @override - final String? barcodeUrl; - @override - final int? expiresAt; - @override - final String? provider; - @override - final String type; - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - - factory _$PaymentMethodCashResponse( - [void Function(PaymentMethodCashResponseBuilder)? updates]) => - (new PaymentMethodCashResponseBuilder()..update(updates))._build(); - - _$PaymentMethodCashResponse._( - {this.reference, - this.barcode, - this.barcodeUrl, - this.expiresAt, - this.provider, - required this.type, - required this.id, - required this.object, - required this.createdAt, - this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCashResponse', 'type'); - BuiltValueNullFieldError.checkNotNull( - id, r'PaymentMethodCashResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCashResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'PaymentMethodCashResponse', 'createdAt'); - } - - @override - PaymentMethodCashResponse rebuild( - void Function(PaymentMethodCashResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodCashResponseBuilder toBuilder() => - new PaymentMethodCashResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodCashResponse && - reference == other.reference && - barcode == other.barcode && - barcodeUrl == other.barcodeUrl && - expiresAt == other.expiresAt && - provider == other.provider && - type == other.type && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, reference.hashCode), - barcode.hashCode), - barcodeUrl.hashCode), - expiresAt.hashCode), - provider.hashCode), - type.hashCode), - id.hashCode), - object.hashCode), - createdAt.hashCode), - parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodCashResponse') - ..add('reference', reference) - ..add('barcode', barcode) - ..add('barcodeUrl', barcodeUrl) - ..add('expiresAt', expiresAt) - ..add('provider', provider) - ..add('type', type) - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId)) - .toString(); - } -} - -class PaymentMethodCashResponseBuilder - implements - Builder, - PaymentMethodCashResponseAllOfBuilder, - PaymentMethodResponseBuilder { - _$PaymentMethodCashResponse? _$v; - - String? _reference; - String? get reference => _$this._reference; - set reference(covariant String? reference) => _$this._reference = reference; - - String? _barcode; - String? get barcode => _$this._barcode; - set barcode(covariant String? barcode) => _$this._barcode = barcode; - - String? _barcodeUrl; - String? get barcodeUrl => _$this._barcodeUrl; - set barcodeUrl(covariant String? barcodeUrl) => - _$this._barcodeUrl = barcodeUrl; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _provider; - String? get provider => _$this._provider; - set provider(covariant String? provider) => _$this._provider = provider; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - PaymentMethodCashResponseBuilder() { - PaymentMethodCashResponse._defaults(this); - } - - PaymentMethodCashResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _reference = $v.reference; - _barcode = $v.barcode; - _barcodeUrl = $v.barcodeUrl; - _expiresAt = $v.expiresAt; - _provider = $v.provider; - _type = $v.type; - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodCashResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodCashResponse; - } - - @override - void update(void Function(PaymentMethodCashResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodCashResponse build() => _build(); - - _$PaymentMethodCashResponse _build() { - final _$result = _$v ?? - new _$PaymentMethodCashResponse._( - reference: reference, - barcode: barcode, - barcodeUrl: barcodeUrl, - expiresAt: expiresAt, - provider: provider, - type: BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodCashResponse', 'type'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'PaymentMethodCashResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodCashResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'PaymentMethodCashResponse', 'createdAt'), - parentId: parentId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_cash_response_all_of.g.dart b/lib/src/model/payment_method_cash_response_all_of.g.dart deleted file mode 100644 index 5656aa2..0000000 --- a/lib/src/model/payment_method_cash_response_all_of.g.dart +++ /dev/null @@ -1,167 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_cash_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodCashResponseAllOfBuilder { - void replace(PaymentMethodCashResponseAllOf other); - void update(void Function(PaymentMethodCashResponseAllOfBuilder) updates); - String? get reference; - set reference(String? reference); - - String? get barcode; - set barcode(String? barcode); - - String? get barcodeUrl; - set barcodeUrl(String? barcodeUrl); - - int? get expiresAt; - set expiresAt(int? expiresAt); - - String? get provider; - set provider(String? provider); -} - -class _$$PaymentMethodCashResponseAllOf - extends $PaymentMethodCashResponseAllOf { - @override - final String? reference; - @override - final String? barcode; - @override - final String? barcodeUrl; - @override - final int? expiresAt; - @override - final String? provider; - - factory _$$PaymentMethodCashResponseAllOf( - [void Function($PaymentMethodCashResponseAllOfBuilder)? updates]) => - (new $PaymentMethodCashResponseAllOfBuilder()..update(updates))._build(); - - _$$PaymentMethodCashResponseAllOf._( - {this.reference, - this.barcode, - this.barcodeUrl, - this.expiresAt, - this.provider}) - : super._(); - - @override - $PaymentMethodCashResponseAllOf rebuild( - void Function($PaymentMethodCashResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodCashResponseAllOfBuilder toBuilder() => - new $PaymentMethodCashResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethodCashResponseAllOf && - reference == other.reference && - barcode == other.barcode && - barcodeUrl == other.barcodeUrl && - expiresAt == other.expiresAt && - provider == other.provider; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, reference.hashCode), barcode.hashCode), - barcodeUrl.hashCode), - expiresAt.hashCode), - provider.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethodCashResponseAllOf') - ..add('reference', reference) - ..add('barcode', barcode) - ..add('barcodeUrl', barcodeUrl) - ..add('expiresAt', expiresAt) - ..add('provider', provider)) - .toString(); - } -} - -class $PaymentMethodCashResponseAllOfBuilder - implements - Builder<$PaymentMethodCashResponseAllOf, - $PaymentMethodCashResponseAllOfBuilder>, - PaymentMethodCashResponseAllOfBuilder { - _$$PaymentMethodCashResponseAllOf? _$v; - - String? _reference; - String? get reference => _$this._reference; - set reference(covariant String? reference) => _$this._reference = reference; - - String? _barcode; - String? get barcode => _$this._barcode; - set barcode(covariant String? barcode) => _$this._barcode = barcode; - - String? _barcodeUrl; - String? get barcodeUrl => _$this._barcodeUrl; - set barcodeUrl(covariant String? barcodeUrl) => - _$this._barcodeUrl = barcodeUrl; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _provider; - String? get provider => _$this._provider; - set provider(covariant String? provider) => _$this._provider = provider; - - $PaymentMethodCashResponseAllOfBuilder() { - $PaymentMethodCashResponseAllOf._defaults(this); - } - - $PaymentMethodCashResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _reference = $v.reference; - _barcode = $v.barcode; - _barcodeUrl = $v.barcodeUrl; - _expiresAt = $v.expiresAt; - _provider = $v.provider; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethodCashResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethodCashResponseAllOf; - } - - @override - void update(void Function($PaymentMethodCashResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethodCashResponseAllOf build() => _build(); - - _$$PaymentMethodCashResponseAllOf _build() { - final _$result = _$v ?? - new _$$PaymentMethodCashResponseAllOf._( - reference: reference, - barcode: barcode, - barcodeUrl: barcodeUrl, - expiresAt: expiresAt, - provider: provider); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_response.g.dart b/lib/src/model/payment_method_response.g.dart deleted file mode 100644 index f205397..0000000 --- a/lib/src/model/payment_method_response.g.dart +++ /dev/null @@ -1,174 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodResponseBuilder { - void replace(PaymentMethodResponse other); - void update(void Function(PaymentMethodResponseBuilder) updates); - String? get type; - set type(String? type); - - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - int? get createdAt; - set createdAt(int? createdAt); - - String? get parentId; - set parentId(String? parentId); -} - -class _$$PaymentMethodResponse extends $PaymentMethodResponse { - @override - final String type; - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - - factory _$$PaymentMethodResponse( - [void Function($PaymentMethodResponseBuilder)? updates]) => - (new $PaymentMethodResponseBuilder()..update(updates))._build(); - - _$$PaymentMethodResponse._( - {required this.type, - required this.id, - required this.object, - required this.createdAt, - this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'$PaymentMethodResponse', 'type'); - BuiltValueNullFieldError.checkNotNull(id, r'$PaymentMethodResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'$PaymentMethodResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'$PaymentMethodResponse', 'createdAt'); - } - - @override - $PaymentMethodResponse rebuild( - void Function($PaymentMethodResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodResponseBuilder toBuilder() => - new $PaymentMethodResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethodResponse && - type == other.type && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc($jc(0, type.hashCode), id.hashCode), object.hashCode), - createdAt.hashCode), - parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethodResponse') - ..add('type', type) - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId)) - .toString(); - } -} - -class $PaymentMethodResponseBuilder - implements - Builder<$PaymentMethodResponse, $PaymentMethodResponseBuilder>, - PaymentMethodResponseBuilder { - _$$PaymentMethodResponse? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - $PaymentMethodResponseBuilder() { - $PaymentMethodResponse._defaults(this); - } - - $PaymentMethodResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethodResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethodResponse; - } - - @override - void update(void Function($PaymentMethodResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethodResponse build() => _build(); - - _$$PaymentMethodResponse _build() { - final _$result = _$v ?? - new _$$PaymentMethodResponse._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'$PaymentMethodResponse', 'type'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'$PaymentMethodResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'$PaymentMethodResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'$PaymentMethodResponse', 'createdAt'), - parentId: parentId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_spei_recurrent.g.dart b/lib/src/model/payment_method_spei_recurrent.g.dart deleted file mode 100644 index 36788a4..0000000 --- a/lib/src/model/payment_method_spei_recurrent.g.dart +++ /dev/null @@ -1,186 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_spei_recurrent.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodSpeiRecurrent extends PaymentMethodSpeiRecurrent { - @override - final String type; - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - @override - final String? reference; - @override - final String? expiresAt; - - factory _$PaymentMethodSpeiRecurrent( - [void Function(PaymentMethodSpeiRecurrentBuilder)? updates]) => - (new PaymentMethodSpeiRecurrentBuilder()..update(updates))._build(); - - _$PaymentMethodSpeiRecurrent._( - {required this.type, - required this.id, - required this.object, - required this.createdAt, - this.parentId, - this.reference, - this.expiresAt}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodSpeiRecurrent', 'type'); - BuiltValueNullFieldError.checkNotNull( - id, r'PaymentMethodSpeiRecurrent', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodSpeiRecurrent', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'PaymentMethodSpeiRecurrent', 'createdAt'); - } - - @override - PaymentMethodSpeiRecurrent rebuild( - void Function(PaymentMethodSpeiRecurrentBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodSpeiRecurrentBuilder toBuilder() => - new PaymentMethodSpeiRecurrentBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodSpeiRecurrent && - type == other.type && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId && - reference == other.reference && - expiresAt == other.expiresAt; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, type.hashCode), id.hashCode), - object.hashCode), - createdAt.hashCode), - parentId.hashCode), - reference.hashCode), - expiresAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodSpeiRecurrent') - ..add('type', type) - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId) - ..add('reference', reference) - ..add('expiresAt', expiresAt)) - .toString(); - } -} - -class PaymentMethodSpeiRecurrentBuilder - implements - Builder, - PaymentMethodResponseBuilder, - PaymentMethodSpeiRecurrentAllOfBuilder { - _$PaymentMethodSpeiRecurrent? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - String? _reference; - String? get reference => _$this._reference; - set reference(covariant String? reference) => _$this._reference = reference; - - String? _expiresAt; - String? get expiresAt => _$this._expiresAt; - set expiresAt(covariant String? expiresAt) => _$this._expiresAt = expiresAt; - - PaymentMethodSpeiRecurrentBuilder() { - PaymentMethodSpeiRecurrent._defaults(this); - } - - PaymentMethodSpeiRecurrentBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _reference = $v.reference; - _expiresAt = $v.expiresAt; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodSpeiRecurrent other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodSpeiRecurrent; - } - - @override - void update(void Function(PaymentMethodSpeiRecurrentBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodSpeiRecurrent build() => _build(); - - _$PaymentMethodSpeiRecurrent _build() { - final _$result = _$v ?? - new _$PaymentMethodSpeiRecurrent._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodSpeiRecurrent', 'type'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'PaymentMethodSpeiRecurrent', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'PaymentMethodSpeiRecurrent', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'PaymentMethodSpeiRecurrent', 'createdAt'), - parentId: parentId, - reference: reference, - expiresAt: expiresAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_spei_recurrent_all_of.g.dart b/lib/src/model/payment_method_spei_recurrent_all_of.g.dart deleted file mode 100644 index 6e6f6d0..0000000 --- a/lib/src/model/payment_method_spei_recurrent_all_of.g.dart +++ /dev/null @@ -1,116 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_spei_recurrent_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class PaymentMethodSpeiRecurrentAllOfBuilder { - void replace(PaymentMethodSpeiRecurrentAllOf other); - void update(void Function(PaymentMethodSpeiRecurrentAllOfBuilder) updates); - String? get reference; - set reference(String? reference); - - String? get expiresAt; - set expiresAt(String? expiresAt); -} - -class _$$PaymentMethodSpeiRecurrentAllOf - extends $PaymentMethodSpeiRecurrentAllOf { - @override - final String? reference; - @override - final String? expiresAt; - - factory _$$PaymentMethodSpeiRecurrentAllOf( - [void Function($PaymentMethodSpeiRecurrentAllOfBuilder)? updates]) => - (new $PaymentMethodSpeiRecurrentAllOfBuilder()..update(updates))._build(); - - _$$PaymentMethodSpeiRecurrentAllOf._({this.reference, this.expiresAt}) - : super._(); - - @override - $PaymentMethodSpeiRecurrentAllOf rebuild( - void Function($PaymentMethodSpeiRecurrentAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $PaymentMethodSpeiRecurrentAllOfBuilder toBuilder() => - new $PaymentMethodSpeiRecurrentAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $PaymentMethodSpeiRecurrentAllOf && - reference == other.reference && - expiresAt == other.expiresAt; - } - - @override - int get hashCode { - return $jf($jc($jc(0, reference.hashCode), expiresAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$PaymentMethodSpeiRecurrentAllOf') - ..add('reference', reference) - ..add('expiresAt', expiresAt)) - .toString(); - } -} - -class $PaymentMethodSpeiRecurrentAllOfBuilder - implements - Builder<$PaymentMethodSpeiRecurrentAllOf, - $PaymentMethodSpeiRecurrentAllOfBuilder>, - PaymentMethodSpeiRecurrentAllOfBuilder { - _$$PaymentMethodSpeiRecurrentAllOf? _$v; - - String? _reference; - String? get reference => _$this._reference; - set reference(covariant String? reference) => _$this._reference = reference; - - String? _expiresAt; - String? get expiresAt => _$this._expiresAt; - set expiresAt(covariant String? expiresAt) => _$this._expiresAt = expiresAt; - - $PaymentMethodSpeiRecurrentAllOfBuilder() { - $PaymentMethodSpeiRecurrentAllOf._defaults(this); - } - - $PaymentMethodSpeiRecurrentAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _reference = $v.reference; - _expiresAt = $v.expiresAt; - _$v = null; - } - return this; - } - - @override - void replace(covariant $PaymentMethodSpeiRecurrentAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$PaymentMethodSpeiRecurrentAllOf; - } - - @override - void update(void Function($PaymentMethodSpeiRecurrentAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $PaymentMethodSpeiRecurrentAllOf build() => _build(); - - _$$PaymentMethodSpeiRecurrentAllOf _build() { - final _$result = _$v ?? - new _$$PaymentMethodSpeiRecurrentAllOf._( - reference: reference, expiresAt: expiresAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/payment_method_spei_request.g.dart b/lib/src/model/payment_method_spei_request.g.dart deleted file mode 100644 index 779a5db..0000000 --- a/lib/src/model/payment_method_spei_request.g.dart +++ /dev/null @@ -1,111 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'payment_method_spei_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PaymentMethodSpeiRequest extends PaymentMethodSpeiRequest { - @override - final String type; - @override - final int? expiresAt; - - factory _$PaymentMethodSpeiRequest( - [void Function(PaymentMethodSpeiRequestBuilder)? updates]) => - (new PaymentMethodSpeiRequestBuilder()..update(updates))._build(); - - _$PaymentMethodSpeiRequest._({required this.type, this.expiresAt}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodSpeiRequest', 'type'); - } - - @override - PaymentMethodSpeiRequest rebuild( - void Function(PaymentMethodSpeiRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PaymentMethodSpeiRequestBuilder toBuilder() => - new PaymentMethodSpeiRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PaymentMethodSpeiRequest && - type == other.type && - expiresAt == other.expiresAt; - } - - @override - int get hashCode { - return $jf($jc($jc(0, type.hashCode), expiresAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PaymentMethodSpeiRequest') - ..add('type', type) - ..add('expiresAt', expiresAt)) - .toString(); - } -} - -class PaymentMethodSpeiRequestBuilder - implements - Builder, - CustomerPaymentMethodRequestBuilder, - PaymentMethodCashRequestAllOfBuilder { - _$PaymentMethodSpeiRequest? _$v; - - String? _type; - String? get type => _$this._type; - set type(covariant String? type) => _$this._type = type; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(covariant int? expiresAt) => _$this._expiresAt = expiresAt; - - PaymentMethodSpeiRequestBuilder() { - PaymentMethodSpeiRequest._defaults(this); - } - - PaymentMethodSpeiRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _type = $v.type; - _expiresAt = $v.expiresAt; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant PaymentMethodSpeiRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PaymentMethodSpeiRequest; - } - - @override - void update(void Function(PaymentMethodSpeiRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PaymentMethodSpeiRequest build() => _build(); - - _$PaymentMethodSpeiRequest _build() { - final _$result = _$v ?? - new _$PaymentMethodSpeiRequest._( - type: BuiltValueNullFieldError.checkNotNull( - type, r'PaymentMethodSpeiRequest', 'type'), - expiresAt: expiresAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/plan_request.g.dart b/lib/src/model/plan_request.g.dart deleted file mode 100644 index 0900879..0000000 --- a/lib/src/model/plan_request.g.dart +++ /dev/null @@ -1,258 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'plan_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -const PlanRequestIntervalEnum _$planRequestIntervalEnum_week = - const PlanRequestIntervalEnum._('week'); -const PlanRequestIntervalEnum _$planRequestIntervalEnum_halfMonth = - const PlanRequestIntervalEnum._('halfMonth'); -const PlanRequestIntervalEnum _$planRequestIntervalEnum_month = - const PlanRequestIntervalEnum._('month'); -const PlanRequestIntervalEnum _$planRequestIntervalEnum_year = - const PlanRequestIntervalEnum._('year'); - -PlanRequestIntervalEnum _$planRequestIntervalEnumValueOf(String name) { - switch (name) { - case 'week': - return _$planRequestIntervalEnum_week; - case 'halfMonth': - return _$planRequestIntervalEnum_halfMonth; - case 'month': - return _$planRequestIntervalEnum_month; - case 'year': - return _$planRequestIntervalEnum_year; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet _$planRequestIntervalEnumValues = - new BuiltSet(const [ - _$planRequestIntervalEnum_week, - _$planRequestIntervalEnum_halfMonth, - _$planRequestIntervalEnum_month, - _$planRequestIntervalEnum_year, -]); - -Serializer _$planRequestIntervalEnumSerializer = - new _$PlanRequestIntervalEnumSerializer(); - -class _$PlanRequestIntervalEnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'week': 'week', - 'halfMonth': 'half_month', - 'month': 'month', - 'year': 'year', - }; - static const Map _fromWire = const { - 'week': 'week', - 'half_month': 'halfMonth', - 'month': 'month', - 'year': 'year', - }; - - @override - final Iterable types = const [PlanRequestIntervalEnum]; - @override - final String wireName = 'PlanRequestIntervalEnum'; - - @override - Object serialize(Serializers serializers, PlanRequestIntervalEnum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - PlanRequestIntervalEnum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - PlanRequestIntervalEnum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$PlanRequest extends PlanRequest { - @override - final int amount; - @override - final String? currency; - @override - final int? expiryCount; - @override - final int frequency; - @override - final String? id; - @override - final PlanRequestIntervalEnum interval; - @override - final String name; - @override - final int? trialPeriodDays; - - factory _$PlanRequest([void Function(PlanRequestBuilder)? updates]) => - (new PlanRequestBuilder()..update(updates))._build(); - - _$PlanRequest._( - {required this.amount, - this.currency, - this.expiryCount, - required this.frequency, - this.id, - required this.interval, - required this.name, - this.trialPeriodDays}) - : super._() { - BuiltValueNullFieldError.checkNotNull(amount, r'PlanRequest', 'amount'); - BuiltValueNullFieldError.checkNotNull( - frequency, r'PlanRequest', 'frequency'); - BuiltValueNullFieldError.checkNotNull(interval, r'PlanRequest', 'interval'); - BuiltValueNullFieldError.checkNotNull(name, r'PlanRequest', 'name'); - } - - @override - PlanRequest rebuild(void Function(PlanRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PlanRequestBuilder toBuilder() => new PlanRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PlanRequest && - amount == other.amount && - currency == other.currency && - expiryCount == other.expiryCount && - frequency == other.frequency && - id == other.id && - interval == other.interval && - name == other.name && - trialPeriodDays == other.trialPeriodDays; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, amount.hashCode), currency.hashCode), - expiryCount.hashCode), - frequency.hashCode), - id.hashCode), - interval.hashCode), - name.hashCode), - trialPeriodDays.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PlanRequest') - ..add('amount', amount) - ..add('currency', currency) - ..add('expiryCount', expiryCount) - ..add('frequency', frequency) - ..add('id', id) - ..add('interval', interval) - ..add('name', name) - ..add('trialPeriodDays', trialPeriodDays)) - .toString(); - } -} - -class PlanRequestBuilder implements Builder { - _$PlanRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - int? _expiryCount; - int? get expiryCount => _$this._expiryCount; - set expiryCount(int? expiryCount) => _$this._expiryCount = expiryCount; - - int? _frequency; - int? get frequency => _$this._frequency; - set frequency(int? frequency) => _$this._frequency = frequency; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - PlanRequestIntervalEnum? _interval; - PlanRequestIntervalEnum? get interval => _$this._interval; - set interval(PlanRequestIntervalEnum? interval) => - _$this._interval = interval; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - int? _trialPeriodDays; - int? get trialPeriodDays => _$this._trialPeriodDays; - set trialPeriodDays(int? trialPeriodDays) => - _$this._trialPeriodDays = trialPeriodDays; - - PlanRequestBuilder() { - PlanRequest._defaults(this); - } - - PlanRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _currency = $v.currency; - _expiryCount = $v.expiryCount; - _frequency = $v.frequency; - _id = $v.id; - _interval = $v.interval; - _name = $v.name; - _trialPeriodDays = $v.trialPeriodDays; - _$v = null; - } - return this; - } - - @override - void replace(PlanRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PlanRequest; - } - - @override - void update(void Function(PlanRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PlanRequest build() => _build(); - - _$PlanRequest _build() { - final _$result = _$v ?? - new _$PlanRequest._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'PlanRequest', 'amount'), - currency: currency, - expiryCount: expiryCount, - frequency: BuiltValueNullFieldError.checkNotNull( - frequency, r'PlanRequest', 'frequency'), - id: id, - interval: BuiltValueNullFieldError.checkNotNull( - interval, r'PlanRequest', 'interval'), - name: BuiltValueNullFieldError.checkNotNull( - name, r'PlanRequest', 'name'), - trialPeriodDays: trialPeriodDays); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/plan_response.g.dart b/lib/src/model/plan_response.g.dart deleted file mode 100644 index 9be2368..0000000 --- a/lib/src/model/plan_response.g.dart +++ /dev/null @@ -1,221 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'plan_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PlanResponse extends PlanResponse { - @override - final int? amount; - @override - final int? createdAt; - @override - final String? currency; - @override - final int? expiryCount; - @override - final int? frequency; - @override - final String? id; - @override - final String? interval; - @override - final bool? livemode; - @override - final String? name; - @override - final String? object; - @override - final int? trialPeriodDays; - - factory _$PlanResponse([void Function(PlanResponseBuilder)? updates]) => - (new PlanResponseBuilder()..update(updates))._build(); - - _$PlanResponse._( - {this.amount, - this.createdAt, - this.currency, - this.expiryCount, - this.frequency, - this.id, - this.interval, - this.livemode, - this.name, - this.object, - this.trialPeriodDays}) - : super._(); - - @override - PlanResponse rebuild(void Function(PlanResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PlanResponseBuilder toBuilder() => new PlanResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PlanResponse && - amount == other.amount && - createdAt == other.createdAt && - currency == other.currency && - expiryCount == other.expiryCount && - frequency == other.frequency && - id == other.id && - interval == other.interval && - livemode == other.livemode && - name == other.name && - object == other.object && - trialPeriodDays == other.trialPeriodDays; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, amount.hashCode), - createdAt.hashCode), - currency.hashCode), - expiryCount.hashCode), - frequency.hashCode), - id.hashCode), - interval.hashCode), - livemode.hashCode), - name.hashCode), - object.hashCode), - trialPeriodDays.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PlanResponse') - ..add('amount', amount) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('expiryCount', expiryCount) - ..add('frequency', frequency) - ..add('id', id) - ..add('interval', interval) - ..add('livemode', livemode) - ..add('name', name) - ..add('object', object) - ..add('trialPeriodDays', trialPeriodDays)) - .toString(); - } -} - -class PlanResponseBuilder - implements Builder { - _$PlanResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - int? _expiryCount; - int? get expiryCount => _$this._expiryCount; - set expiryCount(int? expiryCount) => _$this._expiryCount = expiryCount; - - int? _frequency; - int? get frequency => _$this._frequency; - set frequency(int? frequency) => _$this._frequency = frequency; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _interval; - String? get interval => _$this._interval; - set interval(String? interval) => _$this._interval = interval; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - int? _trialPeriodDays; - int? get trialPeriodDays => _$this._trialPeriodDays; - set trialPeriodDays(int? trialPeriodDays) => - _$this._trialPeriodDays = trialPeriodDays; - - PlanResponseBuilder() { - PlanResponse._defaults(this); - } - - PlanResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _createdAt = $v.createdAt; - _currency = $v.currency; - _expiryCount = $v.expiryCount; - _frequency = $v.frequency; - _id = $v.id; - _interval = $v.interval; - _livemode = $v.livemode; - _name = $v.name; - _object = $v.object; - _trialPeriodDays = $v.trialPeriodDays; - _$v = null; - } - return this; - } - - @override - void replace(PlanResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PlanResponse; - } - - @override - void update(void Function(PlanResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PlanResponse build() => _build(); - - _$PlanResponse _build() { - final _$result = _$v ?? - new _$PlanResponse._( - amount: amount, - createdAt: createdAt, - currency: currency, - expiryCount: expiryCount, - frequency: frequency, - id: id, - interval: interval, - livemode: livemode, - name: name, - object: object, - trialPeriodDays: trialPeriodDays); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/plan_update_request.g.dart b/lib/src/model/plan_update_request.g.dart deleted file mode 100644 index fb298a3..0000000 --- a/lib/src/model/plan_update_request.g.dart +++ /dev/null @@ -1,126 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'plan_update_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$PlanUpdateRequest extends PlanUpdateRequest { - @override - final int? amount; - @override - final String? currency; - @override - final int? expiryCount; - @override - final String? name; - - factory _$PlanUpdateRequest( - [void Function(PlanUpdateRequestBuilder)? updates]) => - (new PlanUpdateRequestBuilder()..update(updates))._build(); - - _$PlanUpdateRequest._( - {this.amount, this.currency, this.expiryCount, this.name}) - : super._(); - - @override - PlanUpdateRequest rebuild(void Function(PlanUpdateRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - PlanUpdateRequestBuilder toBuilder() => - new PlanUpdateRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is PlanUpdateRequest && - amount == other.amount && - currency == other.currency && - expiryCount == other.expiryCount && - name == other.name; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, amount.hashCode), currency.hashCode), - expiryCount.hashCode), - name.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'PlanUpdateRequest') - ..add('amount', amount) - ..add('currency', currency) - ..add('expiryCount', expiryCount) - ..add('name', name)) - .toString(); - } -} - -class PlanUpdateRequestBuilder - implements Builder { - _$PlanUpdateRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - int? _expiryCount; - int? get expiryCount => _$this._expiryCount; - set expiryCount(int? expiryCount) => _$this._expiryCount = expiryCount; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - PlanUpdateRequestBuilder() { - PlanUpdateRequest._defaults(this); - } - - PlanUpdateRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _currency = $v.currency; - _expiryCount = $v.expiryCount; - _name = $v.name; - _$v = null; - } - return this; - } - - @override - void replace(PlanUpdateRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$PlanUpdateRequest; - } - - @override - void update(void Function(PlanUpdateRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - PlanUpdateRequest build() => _build(); - - _$PlanUpdateRequest _build() { - final _$result = _$v ?? - new _$PlanUpdateRequest._( - amount: amount, - currency: currency, - expiryCount: expiryCount, - name: name); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/product.g.dart b/lib/src/model/product.g.dart deleted file mode 100644 index 12a23ce..0000000 --- a/lib/src/model/product.g.dart +++ /dev/null @@ -1,256 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'product.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ProductBuilder { - void replace(Product other); - void update(void Function(ProductBuilder) updates); - MapBuilder get antifraudInfo; - set antifraudInfo(MapBuilder? antifraudInfo); - - String? get brand; - set brand(String? brand); - - String? get description; - set description(String? description); - - MapBuilder get metadata; - set metadata(MapBuilder? metadata); - - String? get name; - set name(String? name); - - int? get quantity; - set quantity(int? quantity); - - String? get sku; - set sku(String? sku); - - ListBuilder get tags; - set tags(ListBuilder? tags); - - int? get unitPrice; - set unitPrice(int? unitPrice); -} - -class _$$Product extends $Product { - @override - final BuiltMap? antifraudInfo; - @override - final String? brand; - @override - final String? description; - @override - final BuiltMap? metadata; - @override - final String name; - @override - final int quantity; - @override - final String? sku; - @override - final BuiltList? tags; - @override - final int unitPrice; - - factory _$$Product([void Function($ProductBuilder)? updates]) => - (new $ProductBuilder()..update(updates))._build(); - - _$$Product._( - {this.antifraudInfo, - this.brand, - this.description, - this.metadata, - required this.name, - required this.quantity, - this.sku, - this.tags, - required this.unitPrice}) - : super._() { - BuiltValueNullFieldError.checkNotNull(name, r'$Product', 'name'); - BuiltValueNullFieldError.checkNotNull(quantity, r'$Product', 'quantity'); - BuiltValueNullFieldError.checkNotNull(unitPrice, r'$Product', 'unitPrice'); - } - - @override - $Product rebuild(void Function($ProductBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ProductBuilder toBuilder() => new $ProductBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $Product && - antifraudInfo == other.antifraudInfo && - brand == other.brand && - description == other.description && - metadata == other.metadata && - name == other.name && - quantity == other.quantity && - sku == other.sku && - tags == other.tags && - unitPrice == other.unitPrice; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, antifraudInfo.hashCode), - brand.hashCode), - description.hashCode), - metadata.hashCode), - name.hashCode), - quantity.hashCode), - sku.hashCode), - tags.hashCode), - unitPrice.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$Product') - ..add('antifraudInfo', antifraudInfo) - ..add('brand', brand) - ..add('description', description) - ..add('metadata', metadata) - ..add('name', name) - ..add('quantity', quantity) - ..add('sku', sku) - ..add('tags', tags) - ..add('unitPrice', unitPrice)) - .toString(); - } -} - -class $ProductBuilder - implements Builder<$Product, $ProductBuilder>, ProductBuilder { - _$$Product? _$v; - - MapBuilder? _antifraudInfo; - MapBuilder get antifraudInfo => - _$this._antifraudInfo ??= new MapBuilder(); - set antifraudInfo(covariant MapBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - int? _quantity; - int? get quantity => _$this._quantity; - set quantity(covariant int? quantity) => _$this._quantity = quantity; - - String? _sku; - String? get sku => _$this._sku; - set sku(covariant String? sku) => _$this._sku = sku; - - ListBuilder? _tags; - ListBuilder get tags => _$this._tags ??= new ListBuilder(); - set tags(covariant ListBuilder? tags) => _$this._tags = tags; - - int? _unitPrice; - int? get unitPrice => _$this._unitPrice; - set unitPrice(covariant int? unitPrice) => _$this._unitPrice = unitPrice; - - $ProductBuilder() { - $Product._defaults(this); - } - - $ProductBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _brand = $v.brand; - _description = $v.description; - _metadata = $v.metadata?.toBuilder(); - _name = $v.name; - _quantity = $v.quantity; - _sku = $v.sku; - _tags = $v.tags?.toBuilder(); - _unitPrice = $v.unitPrice; - _$v = null; - } - return this; - } - - @override - void replace(covariant $Product other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$Product; - } - - @override - void update(void Function($ProductBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $Product build() => _build(); - - _$$Product _build() { - _$$Product _$result; - try { - _$result = _$v ?? - new _$$Product._( - antifraudInfo: _antifraudInfo?.build(), - brand: brand, - description: description, - metadata: _metadata?.build(), - name: BuiltValueNullFieldError.checkNotNull( - name, r'$Product', 'name'), - quantity: BuiltValueNullFieldError.checkNotNull( - quantity, r'$Product', 'quantity'), - sku: sku, - tags: _tags?.build(), - unitPrice: BuiltValueNullFieldError.checkNotNull( - unitPrice, r'$Product', 'unitPrice')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'tags'; - _tags?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$Product', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/product_data_response.g.dart b/lib/src/model/product_data_response.g.dart deleted file mode 100644 index 47fb5a1..0000000 --- a/lib/src/model/product_data_response.g.dart +++ /dev/null @@ -1,273 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'product_data_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ProductDataResponse extends ProductDataResponse { - @override - final BuiltMap? antifraudInfo; - @override - final String? brand; - @override - final String? description; - @override - final BuiltMap? metadata; - @override - final String name; - @override - final int quantity; - @override - final String? sku; - @override - final BuiltList? tags; - @override - final int unitPrice; - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - - factory _$ProductDataResponse( - [void Function(ProductDataResponseBuilder)? updates]) => - (new ProductDataResponseBuilder()..update(updates))._build(); - - _$ProductDataResponse._( - {this.antifraudInfo, - this.brand, - this.description, - this.metadata, - required this.name, - required this.quantity, - this.sku, - this.tags, - required this.unitPrice, - this.id, - this.object, - this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull(name, r'ProductDataResponse', 'name'); - BuiltValueNullFieldError.checkNotNull( - quantity, r'ProductDataResponse', 'quantity'); - BuiltValueNullFieldError.checkNotNull( - unitPrice, r'ProductDataResponse', 'unitPrice'); - } - - @override - ProductDataResponse rebuild( - void Function(ProductDataResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ProductDataResponseBuilder toBuilder() => - new ProductDataResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ProductDataResponse && - antifraudInfo == other.antifraudInfo && - brand == other.brand && - description == other.description && - metadata == other.metadata && - name == other.name && - quantity == other.quantity && - sku == other.sku && - tags == other.tags && - unitPrice == other.unitPrice && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, antifraudInfo.hashCode), - brand.hashCode), - description.hashCode), - metadata.hashCode), - name.hashCode), - quantity.hashCode), - sku.hashCode), - tags.hashCode), - unitPrice.hashCode), - id.hashCode), - object.hashCode), - parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ProductDataResponse') - ..add('antifraudInfo', antifraudInfo) - ..add('brand', brand) - ..add('description', description) - ..add('metadata', metadata) - ..add('name', name) - ..add('quantity', quantity) - ..add('sku', sku) - ..add('tags', tags) - ..add('unitPrice', unitPrice) - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class ProductDataResponseBuilder - implements - Builder, - ProductBuilder, - ProductDataResponseAllOfBuilder { - _$ProductDataResponse? _$v; - - MapBuilder? _antifraudInfo; - MapBuilder get antifraudInfo => - _$this._antifraudInfo ??= new MapBuilder(); - set antifraudInfo(covariant MapBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - int? _quantity; - int? get quantity => _$this._quantity; - set quantity(covariant int? quantity) => _$this._quantity = quantity; - - String? _sku; - String? get sku => _$this._sku; - set sku(covariant String? sku) => _$this._sku = sku; - - ListBuilder? _tags; - ListBuilder get tags => _$this._tags ??= new ListBuilder(); - set tags(covariant ListBuilder? tags) => _$this._tags = tags; - - int? _unitPrice; - int? get unitPrice => _$this._unitPrice; - set unitPrice(covariant int? unitPrice) => _$this._unitPrice = unitPrice; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - ProductDataResponseBuilder() { - ProductDataResponse._defaults(this); - } - - ProductDataResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _brand = $v.brand; - _description = $v.description; - _metadata = $v.metadata?.toBuilder(); - _name = $v.name; - _quantity = $v.quantity; - _sku = $v.sku; - _tags = $v.tags?.toBuilder(); - _unitPrice = $v.unitPrice; - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant ProductDataResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ProductDataResponse; - } - - @override - void update(void Function(ProductDataResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ProductDataResponse build() => _build(); - - _$ProductDataResponse _build() { - _$ProductDataResponse _$result; - try { - _$result = _$v ?? - new _$ProductDataResponse._( - antifraudInfo: _antifraudInfo?.build(), - brand: brand, - description: description, - metadata: _metadata?.build(), - name: BuiltValueNullFieldError.checkNotNull( - name, r'ProductDataResponse', 'name'), - quantity: BuiltValueNullFieldError.checkNotNull( - quantity, r'ProductDataResponse', 'quantity'), - sku: sku, - tags: _tags?.build(), - unitPrice: BuiltValueNullFieldError.checkNotNull( - unitPrice, r'ProductDataResponse', 'unitPrice'), - id: id, - object: object, - parentId: parentId); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'tags'; - _tags?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ProductDataResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/product_data_response_all_of.g.dart b/lib/src/model/product_data_response_all_of.g.dart deleted file mode 100644 index 372c233..0000000 --- a/lib/src/model/product_data_response_all_of.g.dart +++ /dev/null @@ -1,127 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'product_data_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ProductDataResponseAllOfBuilder { - void replace(ProductDataResponseAllOf other); - void update(void Function(ProductDataResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - String? get parentId; - set parentId(String? parentId); -} - -class _$$ProductDataResponseAllOf extends $ProductDataResponseAllOf { - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - - factory _$$ProductDataResponseAllOf( - [void Function($ProductDataResponseAllOfBuilder)? updates]) => - (new $ProductDataResponseAllOfBuilder()..update(updates))._build(); - - _$$ProductDataResponseAllOf._({this.id, this.object, this.parentId}) - : super._(); - - @override - $ProductDataResponseAllOf rebuild( - void Function($ProductDataResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ProductDataResponseAllOfBuilder toBuilder() => - new $ProductDataResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ProductDataResponseAllOf && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, id.hashCode), object.hashCode), parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ProductDataResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class $ProductDataResponseAllOfBuilder - implements - Builder<$ProductDataResponseAllOf, $ProductDataResponseAllOfBuilder>, - ProductDataResponseAllOfBuilder { - _$$ProductDataResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - $ProductDataResponseAllOfBuilder() { - $ProductDataResponseAllOf._defaults(this); - } - - $ProductDataResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ProductDataResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ProductDataResponseAllOf; - } - - @override - void update(void Function($ProductDataResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ProductDataResponseAllOf build() => _build(); - - _$$ProductDataResponseAllOf _build() { - final _$result = _$v ?? - new _$$ProductDataResponseAllOf._( - id: id, object: object, parentId: parentId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/product_order_response.g.dart b/lib/src/model/product_order_response.g.dart deleted file mode 100644 index 29e38a4..0000000 --- a/lib/src/model/product_order_response.g.dart +++ /dev/null @@ -1,274 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'product_order_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ProductOrderResponse extends ProductOrderResponse { - @override - final BuiltMap? antifraudInfo; - @override - final String? brand; - @override - final String? description; - @override - final BuiltMap? metadata; - @override - final String name; - @override - final int quantity; - @override - final String? sku; - @override - final BuiltList? tags; - @override - final int unitPrice; - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - - factory _$ProductOrderResponse( - [void Function(ProductOrderResponseBuilder)? updates]) => - (new ProductOrderResponseBuilder()..update(updates))._build(); - - _$ProductOrderResponse._( - {this.antifraudInfo, - this.brand, - this.description, - this.metadata, - required this.name, - required this.quantity, - this.sku, - this.tags, - required this.unitPrice, - this.id, - this.object, - this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - name, r'ProductOrderResponse', 'name'); - BuiltValueNullFieldError.checkNotNull( - quantity, r'ProductOrderResponse', 'quantity'); - BuiltValueNullFieldError.checkNotNull( - unitPrice, r'ProductOrderResponse', 'unitPrice'); - } - - @override - ProductOrderResponse rebuild( - void Function(ProductOrderResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ProductOrderResponseBuilder toBuilder() => - new ProductOrderResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ProductOrderResponse && - antifraudInfo == other.antifraudInfo && - brand == other.brand && - description == other.description && - metadata == other.metadata && - name == other.name && - quantity == other.quantity && - sku == other.sku && - tags == other.tags && - unitPrice == other.unitPrice && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, antifraudInfo.hashCode), - brand.hashCode), - description.hashCode), - metadata.hashCode), - name.hashCode), - quantity.hashCode), - sku.hashCode), - tags.hashCode), - unitPrice.hashCode), - id.hashCode), - object.hashCode), - parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ProductOrderResponse') - ..add('antifraudInfo', antifraudInfo) - ..add('brand', brand) - ..add('description', description) - ..add('metadata', metadata) - ..add('name', name) - ..add('quantity', quantity) - ..add('sku', sku) - ..add('tags', tags) - ..add('unitPrice', unitPrice) - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class ProductOrderResponseBuilder - implements - Builder, - ProductBuilder, - ProductOrderResponseAllOfBuilder { - _$ProductOrderResponse? _$v; - - MapBuilder? _antifraudInfo; - MapBuilder get antifraudInfo => - _$this._antifraudInfo ??= new MapBuilder(); - set antifraudInfo(covariant MapBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - String? _brand; - String? get brand => _$this._brand; - set brand(covariant String? brand) => _$this._brand = brand; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _name; - String? get name => _$this._name; - set name(covariant String? name) => _$this._name = name; - - int? _quantity; - int? get quantity => _$this._quantity; - set quantity(covariant int? quantity) => _$this._quantity = quantity; - - String? _sku; - String? get sku => _$this._sku; - set sku(covariant String? sku) => _$this._sku = sku; - - ListBuilder? _tags; - ListBuilder get tags => _$this._tags ??= new ListBuilder(); - set tags(covariant ListBuilder? tags) => _$this._tags = tags; - - int? _unitPrice; - int? get unitPrice => _$this._unitPrice; - set unitPrice(covariant int? unitPrice) => _$this._unitPrice = unitPrice; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - ProductOrderResponseBuilder() { - ProductOrderResponse._defaults(this); - } - - ProductOrderResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _brand = $v.brand; - _description = $v.description; - _metadata = $v.metadata?.toBuilder(); - _name = $v.name; - _quantity = $v.quantity; - _sku = $v.sku; - _tags = $v.tags?.toBuilder(); - _unitPrice = $v.unitPrice; - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant ProductOrderResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ProductOrderResponse; - } - - @override - void update(void Function(ProductOrderResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ProductOrderResponse build() => _build(); - - _$ProductOrderResponse _build() { - _$ProductOrderResponse _$result; - try { - _$result = _$v ?? - new _$ProductOrderResponse._( - antifraudInfo: _antifraudInfo?.build(), - brand: brand, - description: description, - metadata: _metadata?.build(), - name: BuiltValueNullFieldError.checkNotNull( - name, r'ProductOrderResponse', 'name'), - quantity: BuiltValueNullFieldError.checkNotNull( - quantity, r'ProductOrderResponse', 'quantity'), - sku: sku, - tags: _tags?.build(), - unitPrice: BuiltValueNullFieldError.checkNotNull( - unitPrice, r'ProductOrderResponse', 'unitPrice'), - id: id, - object: object, - parentId: parentId); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'tags'; - _tags?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ProductOrderResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/product_order_response_all_of.g.dart b/lib/src/model/product_order_response_all_of.g.dart deleted file mode 100644 index b2dfe69..0000000 --- a/lib/src/model/product_order_response_all_of.g.dart +++ /dev/null @@ -1,127 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'product_order_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ProductOrderResponseAllOfBuilder { - void replace(ProductOrderResponseAllOf other); - void update(void Function(ProductOrderResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - String? get parentId; - set parentId(String? parentId); -} - -class _$$ProductOrderResponseAllOf extends $ProductOrderResponseAllOf { - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - - factory _$$ProductOrderResponseAllOf( - [void Function($ProductOrderResponseAllOfBuilder)? updates]) => - (new $ProductOrderResponseAllOfBuilder()..update(updates))._build(); - - _$$ProductOrderResponseAllOf._({this.id, this.object, this.parentId}) - : super._(); - - @override - $ProductOrderResponseAllOf rebuild( - void Function($ProductOrderResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ProductOrderResponseAllOfBuilder toBuilder() => - new $ProductOrderResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ProductOrderResponseAllOf && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, id.hashCode), object.hashCode), parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ProductOrderResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class $ProductOrderResponseAllOfBuilder - implements - Builder<$ProductOrderResponseAllOf, $ProductOrderResponseAllOfBuilder>, - ProductOrderResponseAllOfBuilder { - _$$ProductOrderResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - $ProductOrderResponseAllOfBuilder() { - $ProductOrderResponseAllOf._defaults(this); - } - - $ProductOrderResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $ProductOrderResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ProductOrderResponseAllOf; - } - - @override - void update(void Function($ProductOrderResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ProductOrderResponseAllOf build() => _build(); - - _$$ProductOrderResponseAllOf _build() { - final _$result = _$v ?? - new _$$ProductOrderResponseAllOf._( - id: id, object: object, parentId: parentId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/risk_rules.g.dart b/lib/src/model/risk_rules.g.dart deleted file mode 100644 index 2655285..0000000 --- a/lib/src/model/risk_rules.g.dart +++ /dev/null @@ -1,106 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'risk_rules.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class RiskRulesBuilder { - void replace(RiskRules other); - void update(void Function(RiskRulesBuilder) updates); - ListBuilder get data; - set data(ListBuilder? data); -} - -class _$$RiskRules extends $RiskRules { - @override - final BuiltList? data; - - factory _$$RiskRules([void Function($RiskRulesBuilder)? updates]) => - (new $RiskRulesBuilder()..update(updates))._build(); - - _$$RiskRules._({this.data}) : super._(); - - @override - $RiskRules rebuild(void Function($RiskRulesBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $RiskRulesBuilder toBuilder() => new $RiskRulesBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $RiskRules && data == other.data; - } - - @override - int get hashCode { - return $jf($jc(0, data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$RiskRules')..add('data', data)) - .toString(); - } -} - -class $RiskRulesBuilder - implements Builder<$RiskRules, $RiskRulesBuilder>, RiskRulesBuilder { - _$$RiskRules? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - $RiskRulesBuilder() { - $RiskRules._defaults(this); - } - - $RiskRulesBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $RiskRules other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$RiskRules; - } - - @override - void update(void Function($RiskRulesBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $RiskRules build() => _build(); - - _$$RiskRules _build() { - _$$RiskRules _$result; - try { - _$result = _$v ?? new _$$RiskRules._(data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$RiskRules', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/risk_rules_data.g.dart b/lib/src/model/risk_rules_data.g.dart deleted file mode 100644 index 78f0da4..0000000 --- a/lib/src/model/risk_rules_data.g.dart +++ /dev/null @@ -1,166 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'risk_rules_data.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$RiskRulesData extends RiskRulesData { - @override - final String? id; - @override - final String? field; - @override - final String? createdAt; - @override - final String? value; - @override - final bool? isGlobal; - @override - final bool? isTest; - @override - final String? description; - - factory _$RiskRulesData([void Function(RiskRulesDataBuilder)? updates]) => - (new RiskRulesDataBuilder()..update(updates))._build(); - - _$RiskRulesData._( - {this.id, - this.field, - this.createdAt, - this.value, - this.isGlobal, - this.isTest, - this.description}) - : super._(); - - @override - RiskRulesData rebuild(void Function(RiskRulesDataBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - RiskRulesDataBuilder toBuilder() => new RiskRulesDataBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is RiskRulesData && - id == other.id && - field == other.field && - createdAt == other.createdAt && - value == other.value && - isGlobal == other.isGlobal && - isTest == other.isTest && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, id.hashCode), field.hashCode), - createdAt.hashCode), - value.hashCode), - isGlobal.hashCode), - isTest.hashCode), - description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'RiskRulesData') - ..add('id', id) - ..add('field', field) - ..add('createdAt', createdAt) - ..add('value', value) - ..add('isGlobal', isGlobal) - ..add('isTest', isTest) - ..add('description', description)) - .toString(); - } -} - -class RiskRulesDataBuilder - implements Builder { - _$RiskRulesData? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _field; - String? get field => _$this._field; - set field(String? field) => _$this._field = field; - - String? _createdAt; - String? get createdAt => _$this._createdAt; - set createdAt(String? createdAt) => _$this._createdAt = createdAt; - - String? _value; - String? get value => _$this._value; - set value(String? value) => _$this._value = value; - - bool? _isGlobal; - bool? get isGlobal => _$this._isGlobal; - set isGlobal(bool? isGlobal) => _$this._isGlobal = isGlobal; - - bool? _isTest; - bool? get isTest => _$this._isTest; - set isTest(bool? isTest) => _$this._isTest = isTest; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - RiskRulesDataBuilder() { - RiskRulesData._defaults(this); - } - - RiskRulesDataBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _field = $v.field; - _createdAt = $v.createdAt; - _value = $v.value; - _isGlobal = $v.isGlobal; - _isTest = $v.isTest; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(RiskRulesData other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$RiskRulesData; - } - - @override - void update(void Function(RiskRulesDataBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - RiskRulesData build() => _build(); - - _$RiskRulesData _build() { - final _$result = _$v ?? - new _$RiskRulesData._( - id: id, - field: field, - createdAt: createdAt, - value: value, - isGlobal: isGlobal, - isTest: isTest, - description: description); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/risk_rules_list.g.dart b/lib/src/model/risk_rules_list.g.dart deleted file mode 100644 index 8ddb4c8..0000000 --- a/lib/src/model/risk_rules_list.g.dart +++ /dev/null @@ -1,166 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'risk_rules_list.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$RiskRulesList extends RiskRulesList { - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - @override - final BuiltList? data; - - factory _$RiskRulesList([void Function(RiskRulesListBuilder)? updates]) => - (new RiskRulesListBuilder()..update(updates))._build(); - - _$RiskRulesList._( - {this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object, - this.data}) - : super._() { - BuiltValueNullFieldError.checkNotNull(hasMore, r'RiskRulesList', 'hasMore'); - BuiltValueNullFieldError.checkNotNull(object, r'RiskRulesList', 'object'); - } - - @override - RiskRulesList rebuild(void Function(RiskRulesListBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - RiskRulesListBuilder toBuilder() => new RiskRulesListBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is RiskRulesList && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object && - data == other.data; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, nextPageUrl.hashCode), previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode), - data.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'RiskRulesList') - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object) - ..add('data', data)) - .toString(); - } -} - -class RiskRulesListBuilder - implements - Builder, - PageBuilder, - PaginationBuilder, - RiskRulesBuilder { - _$RiskRulesList? _$v; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - RiskRulesListBuilder() { - RiskRulesList._defaults(this); - } - - RiskRulesListBuilder get _$this { - final $v = _$v; - if ($v != null) { - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _data = $v.data?.toBuilder(); - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant RiskRulesList other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$RiskRulesList; - } - - @override - void update(void Function(RiskRulesListBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - RiskRulesList build() => _build(); - - _$RiskRulesList _build() { - _$RiskRulesList _$result; - try { - _$result = _$v ?? - new _$RiskRulesList._( - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'RiskRulesList', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'RiskRulesList', 'object'), - data: _data?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'RiskRulesList', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/shipping_order_response.g.dart b/lib/src/model/shipping_order_response.g.dart deleted file mode 100644 index 39e31a9..0000000 --- a/lib/src/model/shipping_order_response.g.dart +++ /dev/null @@ -1,206 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'shipping_order_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ShippingOrderResponse extends ShippingOrderResponse { - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - @override - final int amount; - @override - final String? carrier; - @override - final String? trackingNumber; - @override - final String? method; - @override - final BuiltMap? metadata; - - factory _$ShippingOrderResponse( - [void Function(ShippingOrderResponseBuilder)? updates]) => - (new ShippingOrderResponseBuilder()..update(updates))._build(); - - _$ShippingOrderResponse._( - {this.id, - this.object, - this.parentId, - required this.amount, - this.carrier, - this.trackingNumber, - this.method, - this.metadata}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'ShippingOrderResponse', 'amount'); - } - - @override - ShippingOrderResponse rebuild( - void Function(ShippingOrderResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ShippingOrderResponseBuilder toBuilder() => - new ShippingOrderResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ShippingOrderResponse && - id == other.id && - object == other.object && - parentId == other.parentId && - amount == other.amount && - carrier == other.carrier && - trackingNumber == other.trackingNumber && - method == other.method && - metadata == other.metadata; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, id.hashCode), object.hashCode), - parentId.hashCode), - amount.hashCode), - carrier.hashCode), - trackingNumber.hashCode), - method.hashCode), - metadata.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ShippingOrderResponse') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId) - ..add('amount', amount) - ..add('carrier', carrier) - ..add('trackingNumber', trackingNumber) - ..add('method', method) - ..add('metadata', metadata)) - .toString(); - } -} - -class ShippingOrderResponseBuilder - implements - Builder, - ProductOrderResponseAllOfBuilder, - ShippingRequestBuilder { - _$ShippingOrderResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _carrier; - String? get carrier => _$this._carrier; - set carrier(covariant String? carrier) => _$this._carrier = carrier; - - String? _trackingNumber; - String? get trackingNumber => _$this._trackingNumber; - set trackingNumber(covariant String? trackingNumber) => - _$this._trackingNumber = trackingNumber; - - String? _method; - String? get method => _$this._method; - set method(covariant String? method) => _$this._method = method; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - ShippingOrderResponseBuilder() { - ShippingOrderResponse._defaults(this); - } - - ShippingOrderResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _amount = $v.amount; - _carrier = $v.carrier; - _trackingNumber = $v.trackingNumber; - _method = $v.method; - _metadata = $v.metadata?.toBuilder(); - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant ShippingOrderResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ShippingOrderResponse; - } - - @override - void update(void Function(ShippingOrderResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ShippingOrderResponse build() => _build(); - - _$ShippingOrderResponse _build() { - _$ShippingOrderResponse _$result; - try { - _$result = _$v ?? - new _$ShippingOrderResponse._( - id: id, - object: object, - parentId: parentId, - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'ShippingOrderResponse', 'amount'), - carrier: carrier, - trackingNumber: trackingNumber, - method: method, - metadata: _metadata?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'ShippingOrderResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/shipping_request.g.dart b/lib/src/model/shipping_request.g.dart deleted file mode 100644 index e26edb1..0000000 --- a/lib/src/model/shipping_request.g.dart +++ /dev/null @@ -1,183 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'shipping_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class ShippingRequestBuilder { - void replace(ShippingRequest other); - void update(void Function(ShippingRequestBuilder) updates); - int? get amount; - set amount(int? amount); - - String? get carrier; - set carrier(String? carrier); - - String? get trackingNumber; - set trackingNumber(String? trackingNumber); - - String? get method; - set method(String? method); - - MapBuilder get metadata; - set metadata(MapBuilder? metadata); -} - -class _$$ShippingRequest extends $ShippingRequest { - @override - final int amount; - @override - final String? carrier; - @override - final String? trackingNumber; - @override - final String? method; - @override - final BuiltMap? metadata; - - factory _$$ShippingRequest( - [void Function($ShippingRequestBuilder)? updates]) => - (new $ShippingRequestBuilder()..update(updates))._build(); - - _$$ShippingRequest._( - {required this.amount, - this.carrier, - this.trackingNumber, - this.method, - this.metadata}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'$ShippingRequest', 'amount'); - } - - @override - $ShippingRequest rebuild(void Function($ShippingRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $ShippingRequestBuilder toBuilder() => - new $ShippingRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $ShippingRequest && - amount == other.amount && - carrier == other.carrier && - trackingNumber == other.trackingNumber && - method == other.method && - metadata == other.metadata; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, amount.hashCode), carrier.hashCode), - trackingNumber.hashCode), - method.hashCode), - metadata.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$ShippingRequest') - ..add('amount', amount) - ..add('carrier', carrier) - ..add('trackingNumber', trackingNumber) - ..add('method', method) - ..add('metadata', metadata)) - .toString(); - } -} - -class $ShippingRequestBuilder - implements - Builder<$ShippingRequest, $ShippingRequestBuilder>, - ShippingRequestBuilder { - _$$ShippingRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _carrier; - String? get carrier => _$this._carrier; - set carrier(covariant String? carrier) => _$this._carrier = carrier; - - String? _trackingNumber; - String? get trackingNumber => _$this._trackingNumber; - set trackingNumber(covariant String? trackingNumber) => - _$this._trackingNumber = trackingNumber; - - String? _method; - String? get method => _$this._method; - set method(covariant String? method) => _$this._method = method; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - $ShippingRequestBuilder() { - $ShippingRequest._defaults(this); - } - - $ShippingRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _carrier = $v.carrier; - _trackingNumber = $v.trackingNumber; - _method = $v.method; - _metadata = $v.metadata?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant $ShippingRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$ShippingRequest; - } - - @override - void update(void Function($ShippingRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $ShippingRequest build() => _build(); - - _$$ShippingRequest _build() { - _$$ShippingRequest _$result; - try { - _$result = _$v ?? - new _$$ShippingRequest._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'$ShippingRequest', 'amount'), - carrier: carrier, - trackingNumber: trackingNumber, - method: method, - metadata: _metadata?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'$ShippingRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/sms_checkout_request.g.dart b/lib/src/model/sms_checkout_request.g.dart deleted file mode 100644 index afe70a0..0000000 --- a/lib/src/model/sms_checkout_request.g.dart +++ /dev/null @@ -1,95 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'sms_checkout_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$SmsCheckoutRequest extends SmsCheckoutRequest { - @override - final String phonenumber; - - factory _$SmsCheckoutRequest( - [void Function(SmsCheckoutRequestBuilder)? updates]) => - (new SmsCheckoutRequestBuilder()..update(updates))._build(); - - _$SmsCheckoutRequest._({required this.phonenumber}) : super._() { - BuiltValueNullFieldError.checkNotNull( - phonenumber, r'SmsCheckoutRequest', 'phonenumber'); - } - - @override - SmsCheckoutRequest rebuild( - void Function(SmsCheckoutRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - SmsCheckoutRequestBuilder toBuilder() => - new SmsCheckoutRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is SmsCheckoutRequest && phonenumber == other.phonenumber; - } - - @override - int get hashCode { - return $jf($jc(0, phonenumber.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'SmsCheckoutRequest') - ..add('phonenumber', phonenumber)) - .toString(); - } -} - -class SmsCheckoutRequestBuilder - implements Builder { - _$SmsCheckoutRequest? _$v; - - String? _phonenumber; - String? get phonenumber => _$this._phonenumber; - set phonenumber(String? phonenumber) => _$this._phonenumber = phonenumber; - - SmsCheckoutRequestBuilder() { - SmsCheckoutRequest._defaults(this); - } - - SmsCheckoutRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _phonenumber = $v.phonenumber; - _$v = null; - } - return this; - } - - @override - void replace(SmsCheckoutRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SmsCheckoutRequest; - } - - @override - void update(void Function(SmsCheckoutRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - SmsCheckoutRequest build() => _build(); - - _$SmsCheckoutRequest _build() { - final _$result = _$v ?? - new _$SmsCheckoutRequest._( - phonenumber: BuiltValueNullFieldError.checkNotNull( - phonenumber, r'SmsCheckoutRequest', 'phonenumber')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/subscription_events_response.g.dart b/lib/src/model/subscription_events_response.g.dart deleted file mode 100644 index ac3382e..0000000 --- a/lib/src/model/subscription_events_response.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'subscription_events_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$SubscriptionEventsResponse extends SubscriptionEventsResponse { - @override - final BuiltList? data; - @override - final String? nextPageUrl; - @override - final String? previousPageUrl; - @override - final bool hasMore; - @override - final String object; - - factory _$SubscriptionEventsResponse( - [void Function(SubscriptionEventsResponseBuilder)? updates]) => - (new SubscriptionEventsResponseBuilder()..update(updates))._build(); - - _$SubscriptionEventsResponse._( - {this.data, - this.nextPageUrl, - this.previousPageUrl, - required this.hasMore, - required this.object}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - hasMore, r'SubscriptionEventsResponse', 'hasMore'); - BuiltValueNullFieldError.checkNotNull( - object, r'SubscriptionEventsResponse', 'object'); - } - - @override - SubscriptionEventsResponse rebuild( - void Function(SubscriptionEventsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - SubscriptionEventsResponseBuilder toBuilder() => - new SubscriptionEventsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is SubscriptionEventsResponse && - data == other.data && - nextPageUrl == other.nextPageUrl && - previousPageUrl == other.previousPageUrl && - hasMore == other.hasMore && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc($jc($jc(0, data.hashCode), nextPageUrl.hashCode), - previousPageUrl.hashCode), - hasMore.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'SubscriptionEventsResponse') - ..add('data', data) - ..add('nextPageUrl', nextPageUrl) - ..add('previousPageUrl', previousPageUrl) - ..add('hasMore', hasMore) - ..add('object', object)) - .toString(); - } -} - -class SubscriptionEventsResponseBuilder - implements - Builder, - GetEventsResponseAllOfBuilder, - PageBuilder, - PaginationBuilder { - _$SubscriptionEventsResponse? _$v; - - ListBuilder? _data; - ListBuilder get data => - _$this._data ??= new ListBuilder(); - set data(covariant ListBuilder? data) => _$this._data = data; - - String? _nextPageUrl; - String? get nextPageUrl => _$this._nextPageUrl; - set nextPageUrl(covariant String? nextPageUrl) => - _$this._nextPageUrl = nextPageUrl; - - String? _previousPageUrl; - String? get previousPageUrl => _$this._previousPageUrl; - set previousPageUrl(covariant String? previousPageUrl) => - _$this._previousPageUrl = previousPageUrl; - - bool? _hasMore; - bool? get hasMore => _$this._hasMore; - set hasMore(covariant bool? hasMore) => _$this._hasMore = hasMore; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - SubscriptionEventsResponseBuilder() { - SubscriptionEventsResponse._defaults(this); - } - - SubscriptionEventsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _data = $v.data?.toBuilder(); - _nextPageUrl = $v.nextPageUrl; - _previousPageUrl = $v.previousPageUrl; - _hasMore = $v.hasMore; - _object = $v.object; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant SubscriptionEventsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SubscriptionEventsResponse; - } - - @override - void update(void Function(SubscriptionEventsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - SubscriptionEventsResponse build() => _build(); - - _$SubscriptionEventsResponse _build() { - _$SubscriptionEventsResponse _$result; - try { - _$result = _$v ?? - new _$SubscriptionEventsResponse._( - data: _data?.build(), - nextPageUrl: nextPageUrl, - previousPageUrl: previousPageUrl, - hasMore: BuiltValueNullFieldError.checkNotNull( - hasMore, r'SubscriptionEventsResponse', 'hasMore'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'SubscriptionEventsResponse', 'object')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'data'; - _data?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'SubscriptionEventsResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/subscription_request.g.dart b/lib/src/model/subscription_request.g.dart deleted file mode 100644 index 17431ac..0000000 --- a/lib/src/model/subscription_request.g.dart +++ /dev/null @@ -1,118 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'subscription_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$SubscriptionRequest extends SubscriptionRequest { - @override - final String planId; - @override - final String? cardId; - @override - final int? trialEnd; - - factory _$SubscriptionRequest( - [void Function(SubscriptionRequestBuilder)? updates]) => - (new SubscriptionRequestBuilder()..update(updates))._build(); - - _$SubscriptionRequest._({required this.planId, this.cardId, this.trialEnd}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - planId, r'SubscriptionRequest', 'planId'); - } - - @override - SubscriptionRequest rebuild( - void Function(SubscriptionRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - SubscriptionRequestBuilder toBuilder() => - new SubscriptionRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is SubscriptionRequest && - planId == other.planId && - cardId == other.cardId && - trialEnd == other.trialEnd; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, planId.hashCode), cardId.hashCode), trialEnd.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'SubscriptionRequest') - ..add('planId', planId) - ..add('cardId', cardId) - ..add('trialEnd', trialEnd)) - .toString(); - } -} - -class SubscriptionRequestBuilder - implements Builder { - _$SubscriptionRequest? _$v; - - String? _planId; - String? get planId => _$this._planId; - set planId(String? planId) => _$this._planId = planId; - - String? _cardId; - String? get cardId => _$this._cardId; - set cardId(String? cardId) => _$this._cardId = cardId; - - int? _trialEnd; - int? get trialEnd => _$this._trialEnd; - set trialEnd(int? trialEnd) => _$this._trialEnd = trialEnd; - - SubscriptionRequestBuilder() { - SubscriptionRequest._defaults(this); - } - - SubscriptionRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _planId = $v.planId; - _cardId = $v.cardId; - _trialEnd = $v.trialEnd; - _$v = null; - } - return this; - } - - @override - void replace(SubscriptionRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SubscriptionRequest; - } - - @override - void update(void Function(SubscriptionRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - SubscriptionRequest build() => _build(); - - _$SubscriptionRequest _build() { - final _$result = _$v ?? - new _$SubscriptionRequest._( - planId: BuiltValueNullFieldError.checkNotNull( - planId, r'SubscriptionRequest', 'planId'), - cardId: cardId, - trialEnd: trialEnd); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/subscription_response.g.dart b/lib/src/model/subscription_response.g.dart deleted file mode 100644 index 657d2e3..0000000 --- a/lib/src/model/subscription_response.g.dart +++ /dev/null @@ -1,313 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'subscription_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$SubscriptionResponse extends SubscriptionResponse { - @override - final int? billingCycleStart; - @override - final int? billingCycleEnd; - @override - final int? canceledAt; - @override - final String? cardId; - @override - final String? chargeId; - @override - final int? createdAt; - @override - final String? customerCustomReference; - @override - final String? customerId; - @override - final String? id; - @override - final String? lastBillingCycleOrderId; - @override - final String? object; - @override - final int? pausedAt; - @override - final String? planId; - @override - final String? status; - @override - final int? subscriptionStart; - @override - final int? trialStart; - @override - final int? trialEnd; - - factory _$SubscriptionResponse( - [void Function(SubscriptionResponseBuilder)? updates]) => - (new SubscriptionResponseBuilder()..update(updates))._build(); - - _$SubscriptionResponse._( - {this.billingCycleStart, - this.billingCycleEnd, - this.canceledAt, - this.cardId, - this.chargeId, - this.createdAt, - this.customerCustomReference, - this.customerId, - this.id, - this.lastBillingCycleOrderId, - this.object, - this.pausedAt, - this.planId, - this.status, - this.subscriptionStart, - this.trialStart, - this.trialEnd}) - : super._(); - - @override - SubscriptionResponse rebuild( - void Function(SubscriptionResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - SubscriptionResponseBuilder toBuilder() => - new SubscriptionResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is SubscriptionResponse && - billingCycleStart == other.billingCycleStart && - billingCycleEnd == other.billingCycleEnd && - canceledAt == other.canceledAt && - cardId == other.cardId && - chargeId == other.chargeId && - createdAt == other.createdAt && - customerCustomReference == other.customerCustomReference && - customerId == other.customerId && - id == other.id && - lastBillingCycleOrderId == other.lastBillingCycleOrderId && - object == other.object && - pausedAt == other.pausedAt && - planId == other.planId && - status == other.status && - subscriptionStart == other.subscriptionStart && - trialStart == other.trialStart && - trialEnd == other.trialEnd; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - billingCycleStart - .hashCode), - billingCycleEnd - .hashCode), - canceledAt - .hashCode), - cardId.hashCode), - chargeId.hashCode), - createdAt.hashCode), - customerCustomReference - .hashCode), - customerId.hashCode), - id.hashCode), - lastBillingCycleOrderId.hashCode), - object.hashCode), - pausedAt.hashCode), - planId.hashCode), - status.hashCode), - subscriptionStart.hashCode), - trialStart.hashCode), - trialEnd.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'SubscriptionResponse') - ..add('billingCycleStart', billingCycleStart) - ..add('billingCycleEnd', billingCycleEnd) - ..add('canceledAt', canceledAt) - ..add('cardId', cardId) - ..add('chargeId', chargeId) - ..add('createdAt', createdAt) - ..add('customerCustomReference', customerCustomReference) - ..add('customerId', customerId) - ..add('id', id) - ..add('lastBillingCycleOrderId', lastBillingCycleOrderId) - ..add('object', object) - ..add('pausedAt', pausedAt) - ..add('planId', planId) - ..add('status', status) - ..add('subscriptionStart', subscriptionStart) - ..add('trialStart', trialStart) - ..add('trialEnd', trialEnd)) - .toString(); - } -} - -class SubscriptionResponseBuilder - implements Builder { - _$SubscriptionResponse? _$v; - - int? _billingCycleStart; - int? get billingCycleStart => _$this._billingCycleStart; - set billingCycleStart(int? billingCycleStart) => - _$this._billingCycleStart = billingCycleStart; - - int? _billingCycleEnd; - int? get billingCycleEnd => _$this._billingCycleEnd; - set billingCycleEnd(int? billingCycleEnd) => - _$this._billingCycleEnd = billingCycleEnd; - - int? _canceledAt; - int? get canceledAt => _$this._canceledAt; - set canceledAt(int? canceledAt) => _$this._canceledAt = canceledAt; - - String? _cardId; - String? get cardId => _$this._cardId; - set cardId(String? cardId) => _$this._cardId = cardId; - - String? _chargeId; - String? get chargeId => _$this._chargeId; - set chargeId(String? chargeId) => _$this._chargeId = chargeId; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _customerCustomReference; - String? get customerCustomReference => _$this._customerCustomReference; - set customerCustomReference(String? customerCustomReference) => - _$this._customerCustomReference = customerCustomReference; - - String? _customerId; - String? get customerId => _$this._customerId; - set customerId(String? customerId) => _$this._customerId = customerId; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _lastBillingCycleOrderId; - String? get lastBillingCycleOrderId => _$this._lastBillingCycleOrderId; - set lastBillingCycleOrderId(String? lastBillingCycleOrderId) => - _$this._lastBillingCycleOrderId = lastBillingCycleOrderId; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - int? _pausedAt; - int? get pausedAt => _$this._pausedAt; - set pausedAt(int? pausedAt) => _$this._pausedAt = pausedAt; - - String? _planId; - String? get planId => _$this._planId; - set planId(String? planId) => _$this._planId = planId; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - int? _subscriptionStart; - int? get subscriptionStart => _$this._subscriptionStart; - set subscriptionStart(int? subscriptionStart) => - _$this._subscriptionStart = subscriptionStart; - - int? _trialStart; - int? get trialStart => _$this._trialStart; - set trialStart(int? trialStart) => _$this._trialStart = trialStart; - - int? _trialEnd; - int? get trialEnd => _$this._trialEnd; - set trialEnd(int? trialEnd) => _$this._trialEnd = trialEnd; - - SubscriptionResponseBuilder() { - SubscriptionResponse._defaults(this); - } - - SubscriptionResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _billingCycleStart = $v.billingCycleStart; - _billingCycleEnd = $v.billingCycleEnd; - _canceledAt = $v.canceledAt; - _cardId = $v.cardId; - _chargeId = $v.chargeId; - _createdAt = $v.createdAt; - _customerCustomReference = $v.customerCustomReference; - _customerId = $v.customerId; - _id = $v.id; - _lastBillingCycleOrderId = $v.lastBillingCycleOrderId; - _object = $v.object; - _pausedAt = $v.pausedAt; - _planId = $v.planId; - _status = $v.status; - _subscriptionStart = $v.subscriptionStart; - _trialStart = $v.trialStart; - _trialEnd = $v.trialEnd; - _$v = null; - } - return this; - } - - @override - void replace(SubscriptionResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SubscriptionResponse; - } - - @override - void update(void Function(SubscriptionResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - SubscriptionResponse build() => _build(); - - _$SubscriptionResponse _build() { - final _$result = _$v ?? - new _$SubscriptionResponse._( - billingCycleStart: billingCycleStart, - billingCycleEnd: billingCycleEnd, - canceledAt: canceledAt, - cardId: cardId, - chargeId: chargeId, - createdAt: createdAt, - customerCustomReference: customerCustomReference, - customerId: customerId, - id: id, - lastBillingCycleOrderId: lastBillingCycleOrderId, - object: object, - pausedAt: pausedAt, - planId: planId, - status: status, - subscriptionStart: subscriptionStart, - trialStart: trialStart, - trialEnd: trialEnd); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/subscription_update_request.g.dart b/lib/src/model/subscription_update_request.g.dart deleted file mode 100644 index f1bb5d9..0000000 --- a/lib/src/model/subscription_update_request.g.dart +++ /dev/null @@ -1,113 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'subscription_update_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$SubscriptionUpdateRequest extends SubscriptionUpdateRequest { - @override - final String? planId; - @override - final String? cardId; - @override - final int? trialEnd; - - factory _$SubscriptionUpdateRequest( - [void Function(SubscriptionUpdateRequestBuilder)? updates]) => - (new SubscriptionUpdateRequestBuilder()..update(updates))._build(); - - _$SubscriptionUpdateRequest._({this.planId, this.cardId, this.trialEnd}) - : super._(); - - @override - SubscriptionUpdateRequest rebuild( - void Function(SubscriptionUpdateRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - SubscriptionUpdateRequestBuilder toBuilder() => - new SubscriptionUpdateRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is SubscriptionUpdateRequest && - planId == other.planId && - cardId == other.cardId && - trialEnd == other.trialEnd; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, planId.hashCode), cardId.hashCode), trialEnd.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'SubscriptionUpdateRequest') - ..add('planId', planId) - ..add('cardId', cardId) - ..add('trialEnd', trialEnd)) - .toString(); - } -} - -class SubscriptionUpdateRequestBuilder - implements - Builder { - _$SubscriptionUpdateRequest? _$v; - - String? _planId; - String? get planId => _$this._planId; - set planId(String? planId) => _$this._planId = planId; - - String? _cardId; - String? get cardId => _$this._cardId; - set cardId(String? cardId) => _$this._cardId = cardId; - - int? _trialEnd; - int? get trialEnd => _$this._trialEnd; - set trialEnd(int? trialEnd) => _$this._trialEnd = trialEnd; - - SubscriptionUpdateRequestBuilder() { - SubscriptionUpdateRequest._defaults(this); - } - - SubscriptionUpdateRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _planId = $v.planId; - _cardId = $v.cardId; - _trialEnd = $v.trialEnd; - _$v = null; - } - return this; - } - - @override - void replace(SubscriptionUpdateRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$SubscriptionUpdateRequest; - } - - @override - void update(void Function(SubscriptionUpdateRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - SubscriptionUpdateRequest build() => _build(); - - _$SubscriptionUpdateRequest _build() { - final _$result = _$v ?? - new _$SubscriptionUpdateRequest._( - planId: planId, cardId: cardId, trialEnd: trialEnd); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/token.g.dart b/lib/src/model/token.g.dart deleted file mode 100644 index da7d850..0000000 --- a/lib/src/model/token.g.dart +++ /dev/null @@ -1,110 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'token.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$Token extends Token { - @override - final TokenCard? card; - @override - final TokenCheckout? checkout; - - factory _$Token([void Function(TokenBuilder)? updates]) => - (new TokenBuilder()..update(updates))._build(); - - _$Token._({this.card, this.checkout}) : super._(); - - @override - Token rebuild(void Function(TokenBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TokenBuilder toBuilder() => new TokenBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is Token && card == other.card && checkout == other.checkout; - } - - @override - int get hashCode { - return $jf($jc($jc(0, card.hashCode), checkout.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'Token') - ..add('card', card) - ..add('checkout', checkout)) - .toString(); - } -} - -class TokenBuilder implements Builder { - _$Token? _$v; - - TokenCardBuilder? _card; - TokenCardBuilder get card => _$this._card ??= new TokenCardBuilder(); - set card(TokenCardBuilder? card) => _$this._card = card; - - TokenCheckoutBuilder? _checkout; - TokenCheckoutBuilder get checkout => - _$this._checkout ??= new TokenCheckoutBuilder(); - set checkout(TokenCheckoutBuilder? checkout) => _$this._checkout = checkout; - - TokenBuilder() { - Token._defaults(this); - } - - TokenBuilder get _$this { - final $v = _$v; - if ($v != null) { - _card = $v.card?.toBuilder(); - _checkout = $v.checkout?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(Token other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$Token; - } - - @override - void update(void Function(TokenBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - Token build() => _build(); - - _$Token _build() { - _$Token _$result; - try { - _$result = _$v ?? - new _$Token._(card: _card?.build(), checkout: _checkout?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'card'; - _card?.build(); - _$failedField = 'checkout'; - _checkout?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'Token', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/token_card.g.dart b/lib/src/model/token_card.g.dart deleted file mode 100644 index a4c55d3..0000000 --- a/lib/src/model/token_card.g.dart +++ /dev/null @@ -1,164 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'token_card.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TokenCard extends TokenCard { - @override - final String cvc; - @override - final String? deviceFingerprint; - @override - final String expMonth; - @override - final String expYear; - @override - final String name; - @override - final String number; - - factory _$TokenCard([void Function(TokenCardBuilder)? updates]) => - (new TokenCardBuilder()..update(updates))._build(); - - _$TokenCard._( - {required this.cvc, - this.deviceFingerprint, - required this.expMonth, - required this.expYear, - required this.name, - required this.number}) - : super._() { - BuiltValueNullFieldError.checkNotNull(cvc, r'TokenCard', 'cvc'); - BuiltValueNullFieldError.checkNotNull(expMonth, r'TokenCard', 'expMonth'); - BuiltValueNullFieldError.checkNotNull(expYear, r'TokenCard', 'expYear'); - BuiltValueNullFieldError.checkNotNull(name, r'TokenCard', 'name'); - BuiltValueNullFieldError.checkNotNull(number, r'TokenCard', 'number'); - } - - @override - TokenCard rebuild(void Function(TokenCardBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TokenCardBuilder toBuilder() => new TokenCardBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TokenCard && - cvc == other.cvc && - deviceFingerprint == other.deviceFingerprint && - expMonth == other.expMonth && - expYear == other.expYear && - name == other.name && - number == other.number; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, cvc.hashCode), deviceFingerprint.hashCode), - expMonth.hashCode), - expYear.hashCode), - name.hashCode), - number.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TokenCard') - ..add('cvc', cvc) - ..add('deviceFingerprint', deviceFingerprint) - ..add('expMonth', expMonth) - ..add('expYear', expYear) - ..add('name', name) - ..add('number', number)) - .toString(); - } -} - -class TokenCardBuilder implements Builder { - _$TokenCard? _$v; - - String? _cvc; - String? get cvc => _$this._cvc; - set cvc(String? cvc) => _$this._cvc = cvc; - - String? _deviceFingerprint; - String? get deviceFingerprint => _$this._deviceFingerprint; - set deviceFingerprint(String? deviceFingerprint) => - _$this._deviceFingerprint = deviceFingerprint; - - String? _expMonth; - String? get expMonth => _$this._expMonth; - set expMonth(String? expMonth) => _$this._expMonth = expMonth; - - String? _expYear; - String? get expYear => _$this._expYear; - set expYear(String? expYear) => _$this._expYear = expYear; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - String? _number; - String? get number => _$this._number; - set number(String? number) => _$this._number = number; - - TokenCardBuilder() { - TokenCard._defaults(this); - } - - TokenCardBuilder get _$this { - final $v = _$v; - if ($v != null) { - _cvc = $v.cvc; - _deviceFingerprint = $v.deviceFingerprint; - _expMonth = $v.expMonth; - _expYear = $v.expYear; - _name = $v.name; - _number = $v.number; - _$v = null; - } - return this; - } - - @override - void replace(TokenCard other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TokenCard; - } - - @override - void update(void Function(TokenCardBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TokenCard build() => _build(); - - _$TokenCard _build() { - final _$result = _$v ?? - new _$TokenCard._( - cvc: - BuiltValueNullFieldError.checkNotNull(cvc, r'TokenCard', 'cvc'), - deviceFingerprint: deviceFingerprint, - expMonth: BuiltValueNullFieldError.checkNotNull( - expMonth, r'TokenCard', 'expMonth'), - expYear: BuiltValueNullFieldError.checkNotNull( - expYear, r'TokenCard', 'expYear'), - name: BuiltValueNullFieldError.checkNotNull( - name, r'TokenCard', 'name'), - number: BuiltValueNullFieldError.checkNotNull( - number, r'TokenCard', 'number')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/token_checkout.g.dart b/lib/src/model/token_checkout.g.dart deleted file mode 100644 index d694139..0000000 --- a/lib/src/model/token_checkout.g.dart +++ /dev/null @@ -1,88 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'token_checkout.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TokenCheckout extends TokenCheckout { - @override - final String? returnsControlOn; - - factory _$TokenCheckout([void Function(TokenCheckoutBuilder)? updates]) => - (new TokenCheckoutBuilder()..update(updates))._build(); - - _$TokenCheckout._({this.returnsControlOn}) : super._(); - - @override - TokenCheckout rebuild(void Function(TokenCheckoutBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TokenCheckoutBuilder toBuilder() => new TokenCheckoutBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TokenCheckout && returnsControlOn == other.returnsControlOn; - } - - @override - int get hashCode { - return $jf($jc(0, returnsControlOn.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TokenCheckout') - ..add('returnsControlOn', returnsControlOn)) - .toString(); - } -} - -class TokenCheckoutBuilder - implements Builder { - _$TokenCheckout? _$v; - - String? _returnsControlOn; - String? get returnsControlOn => _$this._returnsControlOn; - set returnsControlOn(String? returnsControlOn) => - _$this._returnsControlOn = returnsControlOn; - - TokenCheckoutBuilder() { - TokenCheckout._defaults(this); - } - - TokenCheckoutBuilder get _$this { - final $v = _$v; - if ($v != null) { - _returnsControlOn = $v.returnsControlOn; - _$v = null; - } - return this; - } - - @override - void replace(TokenCheckout other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TokenCheckout; - } - - @override - void update(void Function(TokenCheckoutBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TokenCheckout build() => _build(); - - _$TokenCheckout _build() { - final _$result = - _$v ?? new _$TokenCheckout._(returnsControlOn: returnsControlOn); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/token_response.g.dart b/lib/src/model/token_response.g.dart deleted file mode 100644 index 0893ad3..0000000 --- a/lib/src/model/token_response.g.dart +++ /dev/null @@ -1,163 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'token_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TokenResponse extends TokenResponse { - @override - final TokenResponseCheckout? checkout; - @override - final String id; - @override - final bool livemode; - @override - final String object; - @override - final bool used; - - factory _$TokenResponse([void Function(TokenResponseBuilder)? updates]) => - (new TokenResponseBuilder()..update(updates))._build(); - - _$TokenResponse._( - {this.checkout, - required this.id, - required this.livemode, - required this.object, - required this.used}) - : super._() { - BuiltValueNullFieldError.checkNotNull(id, r'TokenResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - livemode, r'TokenResponse', 'livemode'); - BuiltValueNullFieldError.checkNotNull(object, r'TokenResponse', 'object'); - BuiltValueNullFieldError.checkNotNull(used, r'TokenResponse', 'used'); - } - - @override - TokenResponse rebuild(void Function(TokenResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TokenResponseBuilder toBuilder() => new TokenResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TokenResponse && - checkout == other.checkout && - id == other.id && - livemode == other.livemode && - object == other.object && - used == other.used; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc($jc(0, checkout.hashCode), id.hashCode), livemode.hashCode), - object.hashCode), - used.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TokenResponse') - ..add('checkout', checkout) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('used', used)) - .toString(); - } -} - -class TokenResponseBuilder - implements Builder { - _$TokenResponse? _$v; - - TokenResponseCheckoutBuilder? _checkout; - TokenResponseCheckoutBuilder get checkout => - _$this._checkout ??= new TokenResponseCheckoutBuilder(); - set checkout(TokenResponseCheckoutBuilder? checkout) => - _$this._checkout = checkout; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - bool? _used; - bool? get used => _$this._used; - set used(bool? used) => _$this._used = used; - - TokenResponseBuilder() { - TokenResponse._defaults(this); - } - - TokenResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _checkout = $v.checkout?.toBuilder(); - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _used = $v.used; - _$v = null; - } - return this; - } - - @override - void replace(TokenResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TokenResponse; - } - - @override - void update(void Function(TokenResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TokenResponse build() => _build(); - - _$TokenResponse _build() { - _$TokenResponse _$result; - try { - _$result = _$v ?? - new _$TokenResponse._( - checkout: _checkout?.build(), - id: BuiltValueNullFieldError.checkNotNull( - id, r'TokenResponse', 'id'), - livemode: BuiltValueNullFieldError.checkNotNull( - livemode, r'TokenResponse', 'livemode'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'TokenResponse', 'object'), - used: BuiltValueNullFieldError.checkNotNull( - used, r'TokenResponse', 'used')); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'checkout'; - _checkout?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'TokenResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/token_response_checkout.g.dart b/lib/src/model/token_response_checkout.g.dart deleted file mode 100644 index 14a09d4..0000000 --- a/lib/src/model/token_response_checkout.g.dart +++ /dev/null @@ -1,408 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'token_response_checkout.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TokenResponseCheckout extends TokenResponseCheckout { - @override - final BuiltList? allowedPaymentMethods; - @override - final bool? canNotExpire; - @override - final int? emailsSent; - @override - final BuiltList? excludeCardNetworks; - @override - final int? expiresAt; - @override - final String? failureUrl; - @override - final bool? force3dsFlow; - @override - final String? id; - @override - final bool? livemode; - @override - final BuiltMap? metadata; - @override - final bool? monthlyInstallmentsEnabled; - @override - final BuiltList? monthlyInstallmentsOptions; - @override - final String? name; - @override - final bool? needsShippingContact; - @override - final String? object; - @override - final bool? onDemandEnabled; - @override - final int? paidPaymentsCount; - @override - final bool? recurrent; - @override - final int? smsSent; - @override - final int? startsAt; - @override - final String? status; - @override - final String? successUrl; - @override - final String? type; - - factory _$TokenResponseCheckout( - [void Function(TokenResponseCheckoutBuilder)? updates]) => - (new TokenResponseCheckoutBuilder()..update(updates))._build(); - - _$TokenResponseCheckout._( - {this.allowedPaymentMethods, - this.canNotExpire, - this.emailsSent, - this.excludeCardNetworks, - this.expiresAt, - this.failureUrl, - this.force3dsFlow, - this.id, - this.livemode, - this.metadata, - this.monthlyInstallmentsEnabled, - this.monthlyInstallmentsOptions, - this.name, - this.needsShippingContact, - this.object, - this.onDemandEnabled, - this.paidPaymentsCount, - this.recurrent, - this.smsSent, - this.startsAt, - this.status, - this.successUrl, - this.type}) - : super._(); - - @override - TokenResponseCheckout rebuild( - void Function(TokenResponseCheckoutBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TokenResponseCheckoutBuilder toBuilder() => - new TokenResponseCheckoutBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TokenResponseCheckout && - allowedPaymentMethods == other.allowedPaymentMethods && - canNotExpire == other.canNotExpire && - emailsSent == other.emailsSent && - excludeCardNetworks == other.excludeCardNetworks && - expiresAt == other.expiresAt && - failureUrl == other.failureUrl && - force3dsFlow == other.force3dsFlow && - id == other.id && - livemode == other.livemode && - metadata == other.metadata && - monthlyInstallmentsEnabled == other.monthlyInstallmentsEnabled && - monthlyInstallmentsOptions == other.monthlyInstallmentsOptions && - name == other.name && - needsShippingContact == other.needsShippingContact && - object == other.object && - onDemandEnabled == other.onDemandEnabled && - paidPaymentsCount == other.paidPaymentsCount && - recurrent == other.recurrent && - smsSent == other.smsSent && - startsAt == other.startsAt && - status == other.status && - successUrl == other.successUrl && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc($jc($jc($jc(0, allowedPaymentMethods.hashCode), canNotExpire.hashCode), emailsSent.hashCode), excludeCardNetworks.hashCode), - expiresAt.hashCode), - failureUrl.hashCode), - force3dsFlow.hashCode), - id.hashCode), - livemode.hashCode), - metadata.hashCode), - monthlyInstallmentsEnabled.hashCode), - monthlyInstallmentsOptions.hashCode), - name.hashCode), - needsShippingContact.hashCode), - object.hashCode), - onDemandEnabled.hashCode), - paidPaymentsCount.hashCode), - recurrent.hashCode), - smsSent.hashCode), - startsAt.hashCode), - status.hashCode), - successUrl.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TokenResponseCheckout') - ..add('allowedPaymentMethods', allowedPaymentMethods) - ..add('canNotExpire', canNotExpire) - ..add('emailsSent', emailsSent) - ..add('excludeCardNetworks', excludeCardNetworks) - ..add('expiresAt', expiresAt) - ..add('failureUrl', failureUrl) - ..add('force3dsFlow', force3dsFlow) - ..add('id', id) - ..add('livemode', livemode) - ..add('metadata', metadata) - ..add('monthlyInstallmentsEnabled', monthlyInstallmentsEnabled) - ..add('monthlyInstallmentsOptions', monthlyInstallmentsOptions) - ..add('name', name) - ..add('needsShippingContact', needsShippingContact) - ..add('object', object) - ..add('onDemandEnabled', onDemandEnabled) - ..add('paidPaymentsCount', paidPaymentsCount) - ..add('recurrent', recurrent) - ..add('smsSent', smsSent) - ..add('startsAt', startsAt) - ..add('status', status) - ..add('successUrl', successUrl) - ..add('type', type)) - .toString(); - } -} - -class TokenResponseCheckoutBuilder - implements Builder { - _$TokenResponseCheckout? _$v; - - ListBuilder? _allowedPaymentMethods; - ListBuilder get allowedPaymentMethods => - _$this._allowedPaymentMethods ??= new ListBuilder(); - set allowedPaymentMethods(ListBuilder? allowedPaymentMethods) => - _$this._allowedPaymentMethods = allowedPaymentMethods; - - bool? _canNotExpire; - bool? get canNotExpire => _$this._canNotExpire; - set canNotExpire(bool? canNotExpire) => _$this._canNotExpire = canNotExpire; - - int? _emailsSent; - int? get emailsSent => _$this._emailsSent; - set emailsSent(int? emailsSent) => _$this._emailsSent = emailsSent; - - ListBuilder? _excludeCardNetworks; - ListBuilder get excludeCardNetworks => - _$this._excludeCardNetworks ??= new ListBuilder(); - set excludeCardNetworks(ListBuilder? excludeCardNetworks) => - _$this._excludeCardNetworks = excludeCardNetworks; - - int? _expiresAt; - int? get expiresAt => _$this._expiresAt; - set expiresAt(int? expiresAt) => _$this._expiresAt = expiresAt; - - String? _failureUrl; - String? get failureUrl => _$this._failureUrl; - set failureUrl(String? failureUrl) => _$this._failureUrl = failureUrl; - - bool? _force3dsFlow; - bool? get force3dsFlow => _$this._force3dsFlow; - set force3dsFlow(bool? force3dsFlow) => _$this._force3dsFlow = force3dsFlow; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - bool? _monthlyInstallmentsEnabled; - bool? get monthlyInstallmentsEnabled => _$this._monthlyInstallmentsEnabled; - set monthlyInstallmentsEnabled(bool? monthlyInstallmentsEnabled) => - _$this._monthlyInstallmentsEnabled = monthlyInstallmentsEnabled; - - ListBuilder? _monthlyInstallmentsOptions; - ListBuilder get monthlyInstallmentsOptions => - _$this._monthlyInstallmentsOptions ??= new ListBuilder(); - set monthlyInstallmentsOptions( - ListBuilder? monthlyInstallmentsOptions) => - _$this._monthlyInstallmentsOptions = monthlyInstallmentsOptions; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - bool? _needsShippingContact; - bool? get needsShippingContact => _$this._needsShippingContact; - set needsShippingContact(bool? needsShippingContact) => - _$this._needsShippingContact = needsShippingContact; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - bool? _onDemandEnabled; - bool? get onDemandEnabled => _$this._onDemandEnabled; - set onDemandEnabled(bool? onDemandEnabled) => - _$this._onDemandEnabled = onDemandEnabled; - - int? _paidPaymentsCount; - int? get paidPaymentsCount => _$this._paidPaymentsCount; - set paidPaymentsCount(int? paidPaymentsCount) => - _$this._paidPaymentsCount = paidPaymentsCount; - - bool? _recurrent; - bool? get recurrent => _$this._recurrent; - set recurrent(bool? recurrent) => _$this._recurrent = recurrent; - - int? _smsSent; - int? get smsSent => _$this._smsSent; - set smsSent(int? smsSent) => _$this._smsSent = smsSent; - - int? _startsAt; - int? get startsAt => _$this._startsAt; - set startsAt(int? startsAt) => _$this._startsAt = startsAt; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _successUrl; - String? get successUrl => _$this._successUrl; - set successUrl(String? successUrl) => _$this._successUrl = successUrl; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - TokenResponseCheckoutBuilder() { - TokenResponseCheckout._defaults(this); - } - - TokenResponseCheckoutBuilder get _$this { - final $v = _$v; - if ($v != null) { - _allowedPaymentMethods = $v.allowedPaymentMethods?.toBuilder(); - _canNotExpire = $v.canNotExpire; - _emailsSent = $v.emailsSent; - _excludeCardNetworks = $v.excludeCardNetworks?.toBuilder(); - _expiresAt = $v.expiresAt; - _failureUrl = $v.failureUrl; - _force3dsFlow = $v.force3dsFlow; - _id = $v.id; - _livemode = $v.livemode; - _metadata = $v.metadata?.toBuilder(); - _monthlyInstallmentsEnabled = $v.monthlyInstallmentsEnabled; - _monthlyInstallmentsOptions = $v.monthlyInstallmentsOptions?.toBuilder(); - _name = $v.name; - _needsShippingContact = $v.needsShippingContact; - _object = $v.object; - _onDemandEnabled = $v.onDemandEnabled; - _paidPaymentsCount = $v.paidPaymentsCount; - _recurrent = $v.recurrent; - _smsSent = $v.smsSent; - _startsAt = $v.startsAt; - _status = $v.status; - _successUrl = $v.successUrl; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(TokenResponseCheckout other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TokenResponseCheckout; - } - - @override - void update(void Function(TokenResponseCheckoutBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TokenResponseCheckout build() => _build(); - - _$TokenResponseCheckout _build() { - _$TokenResponseCheckout _$result; - try { - _$result = _$v ?? - new _$TokenResponseCheckout._( - allowedPaymentMethods: _allowedPaymentMethods?.build(), - canNotExpire: canNotExpire, - emailsSent: emailsSent, - excludeCardNetworks: _excludeCardNetworks?.build(), - expiresAt: expiresAt, - failureUrl: failureUrl, - force3dsFlow: force3dsFlow, - id: id, - livemode: livemode, - metadata: _metadata?.build(), - monthlyInstallmentsEnabled: monthlyInstallmentsEnabled, - monthlyInstallmentsOptions: _monthlyInstallmentsOptions?.build(), - name: name, - needsShippingContact: needsShippingContact, - object: object, - onDemandEnabled: onDemandEnabled, - paidPaymentsCount: paidPaymentsCount, - recurrent: recurrent, - smsSent: smsSent, - startsAt: startsAt, - status: status, - successUrl: successUrl, - type: type); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'allowedPaymentMethods'; - _allowedPaymentMethods?.build(); - - _$failedField = 'excludeCardNetworks'; - _excludeCardNetworks?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - - _$failedField = 'monthlyInstallmentsOptions'; - _monthlyInstallmentsOptions?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'TokenResponseCheckout', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/transaction_response.g.dart b/lib/src/model/transaction_response.g.dart deleted file mode 100644 index bb54b86..0000000 --- a/lib/src/model/transaction_response.g.dart +++ /dev/null @@ -1,251 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'transaction_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TransactionResponse extends TransactionResponse { - @override - final int amount; - @override - final String charge; - @override - final int createdAt; - @override - final String currency; - @override - final int fee; - @override - final String id; - @override - final bool livemode; - @override - final int net; - @override - final String object; - @override - final String status; - @override - final String type; - - factory _$TransactionResponse( - [void Function(TransactionResponseBuilder)? updates]) => - (new TransactionResponseBuilder()..update(updates))._build(); - - _$TransactionResponse._( - {required this.amount, - required this.charge, - required this.createdAt, - required this.currency, - required this.fee, - required this.id, - required this.livemode, - required this.net, - required this.object, - required this.status, - required this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'TransactionResponse', 'amount'); - BuiltValueNullFieldError.checkNotNull( - charge, r'TransactionResponse', 'charge'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'TransactionResponse', 'createdAt'); - BuiltValueNullFieldError.checkNotNull( - currency, r'TransactionResponse', 'currency'); - BuiltValueNullFieldError.checkNotNull(fee, r'TransactionResponse', 'fee'); - BuiltValueNullFieldError.checkNotNull(id, r'TransactionResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - livemode, r'TransactionResponse', 'livemode'); - BuiltValueNullFieldError.checkNotNull(net, r'TransactionResponse', 'net'); - BuiltValueNullFieldError.checkNotNull( - object, r'TransactionResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - status, r'TransactionResponse', 'status'); - BuiltValueNullFieldError.checkNotNull(type, r'TransactionResponse', 'type'); - } - - @override - TransactionResponse rebuild( - void Function(TransactionResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TransactionResponseBuilder toBuilder() => - new TransactionResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TransactionResponse && - amount == other.amount && - charge == other.charge && - createdAt == other.createdAt && - currency == other.currency && - fee == other.fee && - id == other.id && - livemode == other.livemode && - net == other.net && - object == other.object && - status == other.status && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, amount.hashCode), - charge.hashCode), - createdAt.hashCode), - currency.hashCode), - fee.hashCode), - id.hashCode), - livemode.hashCode), - net.hashCode), - object.hashCode), - status.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TransactionResponse') - ..add('amount', amount) - ..add('charge', charge) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('fee', fee) - ..add('id', id) - ..add('livemode', livemode) - ..add('net', net) - ..add('object', object) - ..add('status', status) - ..add('type', type)) - .toString(); - } -} - -class TransactionResponseBuilder - implements Builder { - _$TransactionResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _charge; - String? get charge => _$this._charge; - set charge(String? charge) => _$this._charge = charge; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - int? _fee; - int? get fee => _$this._fee; - set fee(int? fee) => _$this._fee = fee; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - int? _net; - int? get net => _$this._net; - set net(int? net) => _$this._net = net; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - TransactionResponseBuilder() { - TransactionResponse._defaults(this); - } - - TransactionResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _charge = $v.charge; - _createdAt = $v.createdAt; - _currency = $v.currency; - _fee = $v.fee; - _id = $v.id; - _livemode = $v.livemode; - _net = $v.net; - _object = $v.object; - _status = $v.status; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(TransactionResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TransactionResponse; - } - - @override - void update(void Function(TransactionResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TransactionResponse build() => _build(); - - _$TransactionResponse _build() { - final _$result = _$v ?? - new _$TransactionResponse._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'TransactionResponse', 'amount'), - charge: BuiltValueNullFieldError.checkNotNull( - charge, r'TransactionResponse', 'charge'), - createdAt: BuiltValueNullFieldError.checkNotNull( - createdAt, r'TransactionResponse', 'createdAt'), - currency: BuiltValueNullFieldError.checkNotNull( - currency, r'TransactionResponse', 'currency'), - fee: BuiltValueNullFieldError.checkNotNull( - fee, r'TransactionResponse', 'fee'), - id: BuiltValueNullFieldError.checkNotNull( - id, r'TransactionResponse', 'id'), - livemode: BuiltValueNullFieldError.checkNotNull( - livemode, r'TransactionResponse', 'livemode'), - net: BuiltValueNullFieldError.checkNotNull( - net, r'TransactionResponse', 'net'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'TransactionResponse', 'object'), - status: BuiltValueNullFieldError.checkNotNull(status, r'TransactionResponse', 'status'), - type: BuiltValueNullFieldError.checkNotNull(type, r'TransactionResponse', 'type')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/transfer_destination_response.g.dart b/lib/src/model/transfer_destination_response.g.dart deleted file mode 100644 index 51794c2..0000000 --- a/lib/src/model/transfer_destination_response.g.dart +++ /dev/null @@ -1,188 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'transfer_destination_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TransferDestinationResponse extends TransferDestinationResponse { - @override - final String? accountHolder; - @override - final String? accountNumber; - @override - final String? bank; - @override - final int? createdAt; - @override - final String? id; - @override - final String? object; - @override - final String? payeeId; - @override - final String? type; - - factory _$TransferDestinationResponse( - [void Function(TransferDestinationResponseBuilder)? updates]) => - (new TransferDestinationResponseBuilder()..update(updates))._build(); - - _$TransferDestinationResponse._( - {this.accountHolder, - this.accountNumber, - this.bank, - this.createdAt, - this.id, - this.object, - this.payeeId, - this.type}) - : super._(); - - @override - TransferDestinationResponse rebuild( - void Function(TransferDestinationResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TransferDestinationResponseBuilder toBuilder() => - new TransferDestinationResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TransferDestinationResponse && - accountHolder == other.accountHolder && - accountNumber == other.accountNumber && - bank == other.bank && - createdAt == other.createdAt && - id == other.id && - object == other.object && - payeeId == other.payeeId && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, accountHolder.hashCode), - accountNumber.hashCode), - bank.hashCode), - createdAt.hashCode), - id.hashCode), - object.hashCode), - payeeId.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TransferDestinationResponse') - ..add('accountHolder', accountHolder) - ..add('accountNumber', accountNumber) - ..add('bank', bank) - ..add('createdAt', createdAt) - ..add('id', id) - ..add('object', object) - ..add('payeeId', payeeId) - ..add('type', type)) - .toString(); - } -} - -class TransferDestinationResponseBuilder - implements - Builder { - _$TransferDestinationResponse? _$v; - - String? _accountHolder; - String? get accountHolder => _$this._accountHolder; - set accountHolder(String? accountHolder) => - _$this._accountHolder = accountHolder; - - String? _accountNumber; - String? get accountNumber => _$this._accountNumber; - set accountNumber(String? accountNumber) => - _$this._accountNumber = accountNumber; - - String? _bank; - String? get bank => _$this._bank; - set bank(String? bank) => _$this._bank = bank; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _payeeId; - String? get payeeId => _$this._payeeId; - set payeeId(String? payeeId) => _$this._payeeId = payeeId; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - TransferDestinationResponseBuilder() { - TransferDestinationResponse._defaults(this); - } - - TransferDestinationResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _accountHolder = $v.accountHolder; - _accountNumber = $v.accountNumber; - _bank = $v.bank; - _createdAt = $v.createdAt; - _id = $v.id; - _object = $v.object; - _payeeId = $v.payeeId; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(TransferDestinationResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TransferDestinationResponse; - } - - @override - void update(void Function(TransferDestinationResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TransferDestinationResponse build() => _build(); - - _$TransferDestinationResponse _build() { - final _$result = _$v ?? - new _$TransferDestinationResponse._( - accountHolder: accountHolder, - accountNumber: accountNumber, - bank: bank, - createdAt: createdAt, - id: id, - object: object, - payeeId: payeeId, - type: type); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/transfer_method_response.g.dart b/lib/src/model/transfer_method_response.g.dart deleted file mode 100644 index 3129471..0000000 --- a/lib/src/model/transfer_method_response.g.dart +++ /dev/null @@ -1,186 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'transfer_method_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TransferMethodResponse extends TransferMethodResponse { - @override - final String? accountHolder; - @override - final String? accountNumber; - @override - final String? bank; - @override - final int? createdAt; - @override - final String? id; - @override - final String? object; - @override - final String? payeeId; - @override - final String? type; - - factory _$TransferMethodResponse( - [void Function(TransferMethodResponseBuilder)? updates]) => - (new TransferMethodResponseBuilder()..update(updates))._build(); - - _$TransferMethodResponse._( - {this.accountHolder, - this.accountNumber, - this.bank, - this.createdAt, - this.id, - this.object, - this.payeeId, - this.type}) - : super._(); - - @override - TransferMethodResponse rebuild( - void Function(TransferMethodResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TransferMethodResponseBuilder toBuilder() => - new TransferMethodResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TransferMethodResponse && - accountHolder == other.accountHolder && - accountNumber == other.accountNumber && - bank == other.bank && - createdAt == other.createdAt && - id == other.id && - object == other.object && - payeeId == other.payeeId && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, accountHolder.hashCode), - accountNumber.hashCode), - bank.hashCode), - createdAt.hashCode), - id.hashCode), - object.hashCode), - payeeId.hashCode), - type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TransferMethodResponse') - ..add('accountHolder', accountHolder) - ..add('accountNumber', accountNumber) - ..add('bank', bank) - ..add('createdAt', createdAt) - ..add('id', id) - ..add('object', object) - ..add('payeeId', payeeId) - ..add('type', type)) - .toString(); - } -} - -class TransferMethodResponseBuilder - implements Builder { - _$TransferMethodResponse? _$v; - - String? _accountHolder; - String? get accountHolder => _$this._accountHolder; - set accountHolder(String? accountHolder) => - _$this._accountHolder = accountHolder; - - String? _accountNumber; - String? get accountNumber => _$this._accountNumber; - set accountNumber(String? accountNumber) => - _$this._accountNumber = accountNumber; - - String? _bank; - String? get bank => _$this._bank; - set bank(String? bank) => _$this._bank = bank; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _payeeId; - String? get payeeId => _$this._payeeId; - set payeeId(String? payeeId) => _$this._payeeId = payeeId; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - TransferMethodResponseBuilder() { - TransferMethodResponse._defaults(this); - } - - TransferMethodResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _accountHolder = $v.accountHolder; - _accountNumber = $v.accountNumber; - _bank = $v.bank; - _createdAt = $v.createdAt; - _id = $v.id; - _object = $v.object; - _payeeId = $v.payeeId; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(TransferMethodResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TransferMethodResponse; - } - - @override - void update(void Function(TransferMethodResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TransferMethodResponse build() => _build(); - - _$TransferMethodResponse _build() { - final _$result = _$v ?? - new _$TransferMethodResponse._( - accountHolder: accountHolder, - accountNumber: accountNumber, - bank: bank, - createdAt: createdAt, - id: id, - object: object, - payeeId: payeeId, - type: type); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/transfer_response.g.dart b/lib/src/model/transfer_response.g.dart deleted file mode 100644 index fa35aed..0000000 --- a/lib/src/model/transfer_response.g.dart +++ /dev/null @@ -1,226 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'transfer_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TransferResponse extends TransferResponse { - @override - final int? amount; - @override - final int? createdAt; - @override - final String? currency; - @override - final String? id; - @override - final bool? livemode; - @override - final TransferDestinationResponse? destination; - @override - final String? object; - @override - final String? statementDescription; - @override - final String? statementReference; - @override - final String? status; - - factory _$TransferResponse( - [void Function(TransferResponseBuilder)? updates]) => - (new TransferResponseBuilder()..update(updates))._build(); - - _$TransferResponse._( - {this.amount, - this.createdAt, - this.currency, - this.id, - this.livemode, - this.destination, - this.object, - this.statementDescription, - this.statementReference, - this.status}) - : super._(); - - @override - TransferResponse rebuild(void Function(TransferResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TransferResponseBuilder toBuilder() => - new TransferResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TransferResponse && - amount == other.amount && - createdAt == other.createdAt && - currency == other.currency && - id == other.id && - livemode == other.livemode && - destination == other.destination && - object == other.object && - statementDescription == other.statementDescription && - statementReference == other.statementReference && - status == other.status; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, amount.hashCode), - createdAt.hashCode), - currency.hashCode), - id.hashCode), - livemode.hashCode), - destination.hashCode), - object.hashCode), - statementDescription.hashCode), - statementReference.hashCode), - status.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TransferResponse') - ..add('amount', amount) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('id', id) - ..add('livemode', livemode) - ..add('destination', destination) - ..add('object', object) - ..add('statementDescription', statementDescription) - ..add('statementReference', statementReference) - ..add('status', status)) - .toString(); - } -} - -class TransferResponseBuilder - implements Builder { - _$TransferResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - TransferDestinationResponseBuilder? _destination; - TransferDestinationResponseBuilder get destination => - _$this._destination ??= new TransferDestinationResponseBuilder(); - set destination(TransferDestinationResponseBuilder? destination) => - _$this._destination = destination; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _statementDescription; - String? get statementDescription => _$this._statementDescription; - set statementDescription(String? statementDescription) => - _$this._statementDescription = statementDescription; - - String? _statementReference; - String? get statementReference => _$this._statementReference; - set statementReference(String? statementReference) => - _$this._statementReference = statementReference; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - TransferResponseBuilder() { - TransferResponse._defaults(this); - } - - TransferResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _createdAt = $v.createdAt; - _currency = $v.currency; - _id = $v.id; - _livemode = $v.livemode; - _destination = $v.destination?.toBuilder(); - _object = $v.object; - _statementDescription = $v.statementDescription; - _statementReference = $v.statementReference; - _status = $v.status; - _$v = null; - } - return this; - } - - @override - void replace(TransferResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TransferResponse; - } - - @override - void update(void Function(TransferResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TransferResponse build() => _build(); - - _$TransferResponse _build() { - _$TransferResponse _$result; - try { - _$result = _$v ?? - new _$TransferResponse._( - amount: amount, - createdAt: createdAt, - currency: currency, - id: id, - livemode: livemode, - destination: _destination?.build(), - object: object, - statementDescription: statementDescription, - statementReference: statementReference, - status: status); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'destination'; - _destination?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'TransferResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/transfers_response.g.dart b/lib/src/model/transfers_response.g.dart deleted file mode 100644 index bdf2344..0000000 --- a/lib/src/model/transfers_response.g.dart +++ /dev/null @@ -1,225 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'transfers_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TransfersResponse extends TransfersResponse { - @override - final int? amount; - @override - final int? createdAt; - @override - final String? currency; - @override - final String? id; - @override - final bool? livemode; - @override - final TransferMethodResponse? method; - @override - final String? object; - @override - final String? statementDescription; - @override - final String? statementReference; - @override - final String? status; - - factory _$TransfersResponse( - [void Function(TransfersResponseBuilder)? updates]) => - (new TransfersResponseBuilder()..update(updates))._build(); - - _$TransfersResponse._( - {this.amount, - this.createdAt, - this.currency, - this.id, - this.livemode, - this.method, - this.object, - this.statementDescription, - this.statementReference, - this.status}) - : super._(); - - @override - TransfersResponse rebuild(void Function(TransfersResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TransfersResponseBuilder toBuilder() => - new TransfersResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TransfersResponse && - amount == other.amount && - createdAt == other.createdAt && - currency == other.currency && - id == other.id && - livemode == other.livemode && - method == other.method && - object == other.object && - statementDescription == other.statementDescription && - statementReference == other.statementReference && - status == other.status; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, amount.hashCode), - createdAt.hashCode), - currency.hashCode), - id.hashCode), - livemode.hashCode), - method.hashCode), - object.hashCode), - statementDescription.hashCode), - statementReference.hashCode), - status.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TransfersResponse') - ..add('amount', amount) - ..add('createdAt', createdAt) - ..add('currency', currency) - ..add('id', id) - ..add('livemode', livemode) - ..add('method', method) - ..add('object', object) - ..add('statementDescription', statementDescription) - ..add('statementReference', statementReference) - ..add('status', status)) - .toString(); - } -} - -class TransfersResponseBuilder - implements Builder { - _$TransfersResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _currency; - String? get currency => _$this._currency; - set currency(String? currency) => _$this._currency = currency; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - TransferMethodResponseBuilder? _method; - TransferMethodResponseBuilder get method => - _$this._method ??= new TransferMethodResponseBuilder(); - set method(TransferMethodResponseBuilder? method) => _$this._method = method; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _statementDescription; - String? get statementDescription => _$this._statementDescription; - set statementDescription(String? statementDescription) => - _$this._statementDescription = statementDescription; - - String? _statementReference; - String? get statementReference => _$this._statementReference; - set statementReference(String? statementReference) => - _$this._statementReference = statementReference; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - TransfersResponseBuilder() { - TransfersResponse._defaults(this); - } - - TransfersResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _createdAt = $v.createdAt; - _currency = $v.currency; - _id = $v.id; - _livemode = $v.livemode; - _method = $v.method?.toBuilder(); - _object = $v.object; - _statementDescription = $v.statementDescription; - _statementReference = $v.statementReference; - _status = $v.status; - _$v = null; - } - return this; - } - - @override - void replace(TransfersResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$TransfersResponse; - } - - @override - void update(void Function(TransfersResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - TransfersResponse build() => _build(); - - _$TransfersResponse _build() { - _$TransfersResponse _$result; - try { - _$result = _$v ?? - new _$TransfersResponse._( - amount: amount, - createdAt: createdAt, - currency: currency, - id: id, - livemode: livemode, - method: _method?.build(), - object: object, - statementDescription: statementDescription, - statementReference: statementReference, - status: status); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'method'; - _method?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'TransfersResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_customer.g.dart b/lib/src/model/update_customer.g.dart deleted file mode 100644 index f9d4f2c..0000000 --- a/lib/src/model/update_customer.g.dart +++ /dev/null @@ -1,309 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_customer.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateCustomer extends UpdateCustomer { - @override - final UpdateCustomerAntifraudInfo? antifraudInfo; - @override - final String? defaultPaymentSourceId; - @override - final String? email; - @override - final String? name; - @override - final String? phone; - @override - final String? planId; - @override - final String? defaultShippingContactId; - @override - final bool? corporate; - @override - final String? customReference; - @override - final BuiltList? fiscalEntities; - @override - final BuiltMap? metadata; - @override - final BuiltList? paymentSources; - @override - final BuiltList? shippingContacts; - @override - final SubscriptionRequest? subscription; - - factory _$UpdateCustomer([void Function(UpdateCustomerBuilder)? updates]) => - (new UpdateCustomerBuilder()..update(updates))._build(); - - _$UpdateCustomer._( - {this.antifraudInfo, - this.defaultPaymentSourceId, - this.email, - this.name, - this.phone, - this.planId, - this.defaultShippingContactId, - this.corporate, - this.customReference, - this.fiscalEntities, - this.metadata, - this.paymentSources, - this.shippingContacts, - this.subscription}) - : super._(); - - @override - UpdateCustomer rebuild(void Function(UpdateCustomerBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateCustomerBuilder toBuilder() => - new UpdateCustomerBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateCustomer && - antifraudInfo == other.antifraudInfo && - defaultPaymentSourceId == other.defaultPaymentSourceId && - email == other.email && - name == other.name && - phone == other.phone && - planId == other.planId && - defaultShippingContactId == other.defaultShippingContactId && - corporate == other.corporate && - customReference == other.customReference && - fiscalEntities == other.fiscalEntities && - metadata == other.metadata && - paymentSources == other.paymentSources && - shippingContacts == other.shippingContacts && - subscription == other.subscription; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - 0, - antifraudInfo - .hashCode), - defaultPaymentSourceId - .hashCode), - email.hashCode), - name.hashCode), - phone.hashCode), - planId.hashCode), - defaultShippingContactId.hashCode), - corporate.hashCode), - customReference.hashCode), - fiscalEntities.hashCode), - metadata.hashCode), - paymentSources.hashCode), - shippingContacts.hashCode), - subscription.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateCustomer') - ..add('antifraudInfo', antifraudInfo) - ..add('defaultPaymentSourceId', defaultPaymentSourceId) - ..add('email', email) - ..add('name', name) - ..add('phone', phone) - ..add('planId', planId) - ..add('defaultShippingContactId', defaultShippingContactId) - ..add('corporate', corporate) - ..add('customReference', customReference) - ..add('fiscalEntities', fiscalEntities) - ..add('metadata', metadata) - ..add('paymentSources', paymentSources) - ..add('shippingContacts', shippingContacts) - ..add('subscription', subscription)) - .toString(); - } -} - -class UpdateCustomerBuilder - implements Builder { - _$UpdateCustomer? _$v; - - UpdateCustomerAntifraudInfoBuilder? _antifraudInfo; - UpdateCustomerAntifraudInfoBuilder get antifraudInfo => - _$this._antifraudInfo ??= new UpdateCustomerAntifraudInfoBuilder(); - set antifraudInfo(UpdateCustomerAntifraudInfoBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - String? _defaultPaymentSourceId; - String? get defaultPaymentSourceId => _$this._defaultPaymentSourceId; - set defaultPaymentSourceId(String? defaultPaymentSourceId) => - _$this._defaultPaymentSourceId = defaultPaymentSourceId; - - String? _email; - String? get email => _$this._email; - set email(String? email) => _$this._email = email; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - String? _phone; - String? get phone => _$this._phone; - set phone(String? phone) => _$this._phone = phone; - - String? _planId; - String? get planId => _$this._planId; - set planId(String? planId) => _$this._planId = planId; - - String? _defaultShippingContactId; - String? get defaultShippingContactId => _$this._defaultShippingContactId; - set defaultShippingContactId(String? defaultShippingContactId) => - _$this._defaultShippingContactId = defaultShippingContactId; - - bool? _corporate; - bool? get corporate => _$this._corporate; - set corporate(bool? corporate) => _$this._corporate = corporate; - - String? _customReference; - String? get customReference => _$this._customReference; - set customReference(String? customReference) => - _$this._customReference = customReference; - - ListBuilder? _fiscalEntities; - ListBuilder get fiscalEntities => - _$this._fiscalEntities ??= - new ListBuilder(); - set fiscalEntities( - ListBuilder? fiscalEntities) => - _$this._fiscalEntities = fiscalEntities; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - ListBuilder? _paymentSources; - ListBuilder get paymentSources => - _$this._paymentSources ??= - new ListBuilder(); - set paymentSources( - ListBuilder? paymentSources) => - _$this._paymentSources = paymentSources; - - ListBuilder? _shippingContacts; - ListBuilder get shippingContacts => - _$this._shippingContacts ??= new ListBuilder(); - set shippingContacts( - ListBuilder? shippingContacts) => - _$this._shippingContacts = shippingContacts; - - SubscriptionRequestBuilder? _subscription; - SubscriptionRequestBuilder get subscription => - _$this._subscription ??= new SubscriptionRequestBuilder(); - set subscription(SubscriptionRequestBuilder? subscription) => - _$this._subscription = subscription; - - UpdateCustomerBuilder() { - UpdateCustomer._defaults(this); - } - - UpdateCustomerBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _defaultPaymentSourceId = $v.defaultPaymentSourceId; - _email = $v.email; - _name = $v.name; - _phone = $v.phone; - _planId = $v.planId; - _defaultShippingContactId = $v.defaultShippingContactId; - _corporate = $v.corporate; - _customReference = $v.customReference; - _fiscalEntities = $v.fiscalEntities?.toBuilder(); - _metadata = $v.metadata?.toBuilder(); - _paymentSources = $v.paymentSources?.toBuilder(); - _shippingContacts = $v.shippingContacts?.toBuilder(); - _subscription = $v.subscription?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(UpdateCustomer other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateCustomer; - } - - @override - void update(void Function(UpdateCustomerBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateCustomer build() => _build(); - - _$UpdateCustomer _build() { - _$UpdateCustomer _$result; - try { - _$result = _$v ?? - new _$UpdateCustomer._( - antifraudInfo: _antifraudInfo?.build(), - defaultPaymentSourceId: defaultPaymentSourceId, - email: email, - name: name, - phone: phone, - planId: planId, - defaultShippingContactId: defaultShippingContactId, - corporate: corporate, - customReference: customReference, - fiscalEntities: _fiscalEntities?.build(), - metadata: _metadata?.build(), - paymentSources: _paymentSources?.build(), - shippingContacts: _shippingContacts?.build(), - subscription: _subscription?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'fiscalEntities'; - _fiscalEntities?.build(); - _$failedField = 'metadata'; - _metadata?.build(); - _$failedField = 'paymentSources'; - _paymentSources?.build(); - _$failedField = 'shippingContacts'; - _shippingContacts?.build(); - _$failedField = 'subscription'; - _subscription?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'UpdateCustomer', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_customer_antifraud_info.g.dart b/lib/src/model/update_customer_antifraud_info.g.dart deleted file mode 100644 index d2f3333..0000000 --- a/lib/src/model/update_customer_antifraud_info.g.dart +++ /dev/null @@ -1,105 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_customer_antifraud_info.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateCustomerAntifraudInfo extends UpdateCustomerAntifraudInfo { - @override - final int? accountCreatedAt; - @override - final int? firstPaidAt; - - factory _$UpdateCustomerAntifraudInfo( - [void Function(UpdateCustomerAntifraudInfoBuilder)? updates]) => - (new UpdateCustomerAntifraudInfoBuilder()..update(updates))._build(); - - _$UpdateCustomerAntifraudInfo._({this.accountCreatedAt, this.firstPaidAt}) - : super._(); - - @override - UpdateCustomerAntifraudInfo rebuild( - void Function(UpdateCustomerAntifraudInfoBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateCustomerAntifraudInfoBuilder toBuilder() => - new UpdateCustomerAntifraudInfoBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateCustomerAntifraudInfo && - accountCreatedAt == other.accountCreatedAt && - firstPaidAt == other.firstPaidAt; - } - - @override - int get hashCode { - return $jf($jc($jc(0, accountCreatedAt.hashCode), firstPaidAt.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateCustomerAntifraudInfo') - ..add('accountCreatedAt', accountCreatedAt) - ..add('firstPaidAt', firstPaidAt)) - .toString(); - } -} - -class UpdateCustomerAntifraudInfoBuilder - implements - Builder { - _$UpdateCustomerAntifraudInfo? _$v; - - int? _accountCreatedAt; - int? get accountCreatedAt => _$this._accountCreatedAt; - set accountCreatedAt(int? accountCreatedAt) => - _$this._accountCreatedAt = accountCreatedAt; - - int? _firstPaidAt; - int? get firstPaidAt => _$this._firstPaidAt; - set firstPaidAt(int? firstPaidAt) => _$this._firstPaidAt = firstPaidAt; - - UpdateCustomerAntifraudInfoBuilder() { - UpdateCustomerAntifraudInfo._defaults(this); - } - - UpdateCustomerAntifraudInfoBuilder get _$this { - final $v = _$v; - if ($v != null) { - _accountCreatedAt = $v.accountCreatedAt; - _firstPaidAt = $v.firstPaidAt; - _$v = null; - } - return this; - } - - @override - void replace(UpdateCustomerAntifraudInfo other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateCustomerAntifraudInfo; - } - - @override - void update(void Function(UpdateCustomerAntifraudInfoBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateCustomerAntifraudInfo build() => _build(); - - _$UpdateCustomerAntifraudInfo _build() { - final _$result = _$v ?? - new _$UpdateCustomerAntifraudInfo._( - accountCreatedAt: accountCreatedAt, firstPaidAt: firstPaidAt); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_customer_fiscal_entities_response.g.dart b/lib/src/model/update_customer_fiscal_entities_response.g.dart deleted file mode 100644 index 28feb67..0000000 --- a/lib/src/model/update_customer_fiscal_entities_response.g.dart +++ /dev/null @@ -1,267 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_customer_fiscal_entities_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateCustomerFiscalEntitiesResponse - extends UpdateCustomerFiscalEntitiesResponse { - @override - final CustomerFiscalEntitiesRequestAddress address; - @override - final String? taxId; - @override - final String? email; - @override - final String? phone; - @override - final BuiltMap? metadata; - @override - final String? companyName; - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - @override - final bool? default_; - - factory _$UpdateCustomerFiscalEntitiesResponse( - [void Function(UpdateCustomerFiscalEntitiesResponseBuilder)? - updates]) => - (new UpdateCustomerFiscalEntitiesResponseBuilder()..update(updates)) - ._build(); - - _$UpdateCustomerFiscalEntitiesResponse._( - {required this.address, - this.taxId, - this.email, - this.phone, - this.metadata, - this.companyName, - required this.id, - required this.object, - required this.createdAt, - this.parentId, - this.default_}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - address, r'UpdateCustomerFiscalEntitiesResponse', 'address'); - BuiltValueNullFieldError.checkNotNull( - id, r'UpdateCustomerFiscalEntitiesResponse', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'UpdateCustomerFiscalEntitiesResponse', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'UpdateCustomerFiscalEntitiesResponse', 'createdAt'); - } - - @override - UpdateCustomerFiscalEntitiesResponse rebuild( - void Function(UpdateCustomerFiscalEntitiesResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateCustomerFiscalEntitiesResponseBuilder toBuilder() => - new UpdateCustomerFiscalEntitiesResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateCustomerFiscalEntitiesResponse && - address == other.address && - taxId == other.taxId && - email == other.email && - phone == other.phone && - metadata == other.metadata && - companyName == other.companyName && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId && - default_ == other.default_; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, address.hashCode), - taxId.hashCode), - email.hashCode), - phone.hashCode), - metadata.hashCode), - companyName.hashCode), - id.hashCode), - object.hashCode), - createdAt.hashCode), - parentId.hashCode), - default_.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateCustomerFiscalEntitiesResponse') - ..add('address', address) - ..add('taxId', taxId) - ..add('email', email) - ..add('phone', phone) - ..add('metadata', metadata) - ..add('companyName', companyName) - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId) - ..add('default_', default_)) - .toString(); - } -} - -class UpdateCustomerFiscalEntitiesResponseBuilder - implements - Builder, - CustomerFiscalEntitiesRequestBuilder, - UpdateCustomerFiscalEntitiesResponseAllOfBuilder { - _$UpdateCustomerFiscalEntitiesResponse? _$v; - - CustomerFiscalEntitiesRequestAddressBuilder? _address; - CustomerFiscalEntitiesRequestAddressBuilder get address => - _$this._address ??= new CustomerFiscalEntitiesRequestAddressBuilder(); - set address(covariant CustomerFiscalEntitiesRequestAddressBuilder? address) => - _$this._address = address; - - String? _taxId; - String? get taxId => _$this._taxId; - set taxId(covariant String? taxId) => _$this._taxId = taxId; - - String? _email; - String? get email => _$this._email; - set email(covariant String? email) => _$this._email = email; - - String? _phone; - String? get phone => _$this._phone; - set phone(covariant String? phone) => _$this._phone = phone; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _companyName; - String? get companyName => _$this._companyName; - set companyName(covariant String? companyName) => - _$this._companyName = companyName; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - UpdateCustomerFiscalEntitiesResponseBuilder() { - UpdateCustomerFiscalEntitiesResponse._defaults(this); - } - - UpdateCustomerFiscalEntitiesResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _address = $v.address.toBuilder(); - _taxId = $v.taxId; - _email = $v.email; - _phone = $v.phone; - _metadata = $v.metadata?.toBuilder(); - _companyName = $v.companyName; - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _default_ = $v.default_; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant UpdateCustomerFiscalEntitiesResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateCustomerFiscalEntitiesResponse; - } - - @override - void update( - void Function(UpdateCustomerFiscalEntitiesResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateCustomerFiscalEntitiesResponse build() => _build(); - - _$UpdateCustomerFiscalEntitiesResponse _build() { - _$UpdateCustomerFiscalEntitiesResponse _$result; - try { - _$result = _$v ?? - new _$UpdateCustomerFiscalEntitiesResponse._( - address: address.build(), - taxId: taxId, - email: email, - phone: phone, - metadata: _metadata?.build(), - companyName: companyName, - id: BuiltValueNullFieldError.checkNotNull( - id, r'UpdateCustomerFiscalEntitiesResponse', 'id'), - object: BuiltValueNullFieldError.checkNotNull( - object, r'UpdateCustomerFiscalEntitiesResponse', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'UpdateCustomerFiscalEntitiesResponse', 'createdAt'), - parentId: parentId, - default_: default_); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'address'; - address.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'UpdateCustomerFiscalEntitiesResponse', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_customer_fiscal_entities_response_all_of.g.dart b/lib/src/model/update_customer_fiscal_entities_response_all_of.g.dart deleted file mode 100644 index 7e2fcc5..0000000 --- a/lib/src/model/update_customer_fiscal_entities_response_all_of.g.dart +++ /dev/null @@ -1,181 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_customer_fiscal_entities_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class UpdateCustomerFiscalEntitiesResponseAllOfBuilder { - void replace(UpdateCustomerFiscalEntitiesResponseAllOf other); - void update( - void Function(UpdateCustomerFiscalEntitiesResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - int? get createdAt; - set createdAt(int? createdAt); - - String? get parentId; - set parentId(String? parentId); - - bool? get default_; - set default_(bool? default_); -} - -class _$$UpdateCustomerFiscalEntitiesResponseAllOf - extends $UpdateCustomerFiscalEntitiesResponseAllOf { - @override - final String id; - @override - final String object; - @override - final int createdAt; - @override - final String? parentId; - @override - final bool? default_; - - factory _$$UpdateCustomerFiscalEntitiesResponseAllOf( - [void Function($UpdateCustomerFiscalEntitiesResponseAllOfBuilder)? - updates]) => - (new $UpdateCustomerFiscalEntitiesResponseAllOfBuilder()..update(updates)) - ._build(); - - _$$UpdateCustomerFiscalEntitiesResponseAllOf._( - {required this.id, - required this.object, - required this.createdAt, - this.parentId, - this.default_}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - id, r'$UpdateCustomerFiscalEntitiesResponseAllOf', 'id'); - BuiltValueNullFieldError.checkNotNull( - object, r'$UpdateCustomerFiscalEntitiesResponseAllOf', 'object'); - BuiltValueNullFieldError.checkNotNull( - createdAt, r'$UpdateCustomerFiscalEntitiesResponseAllOf', 'createdAt'); - } - - @override - $UpdateCustomerFiscalEntitiesResponseAllOf rebuild( - void Function($UpdateCustomerFiscalEntitiesResponseAllOfBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - $UpdateCustomerFiscalEntitiesResponseAllOfBuilder toBuilder() => - new $UpdateCustomerFiscalEntitiesResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $UpdateCustomerFiscalEntitiesResponseAllOf && - id == other.id && - object == other.object && - createdAt == other.createdAt && - parentId == other.parentId && - default_ == other.default_; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc($jc(0, id.hashCode), object.hashCode), createdAt.hashCode), - parentId.hashCode), - default_.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'$UpdateCustomerFiscalEntitiesResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('createdAt', createdAt) - ..add('parentId', parentId) - ..add('default_', default_)) - .toString(); - } -} - -class $UpdateCustomerFiscalEntitiesResponseAllOfBuilder - implements - Builder<$UpdateCustomerFiscalEntitiesResponseAllOf, - $UpdateCustomerFiscalEntitiesResponseAllOfBuilder>, - UpdateCustomerFiscalEntitiesResponseAllOfBuilder { - _$$UpdateCustomerFiscalEntitiesResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(covariant int? createdAt) => _$this._createdAt = createdAt; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - bool? _default_; - bool? get default_ => _$this._default_; - set default_(covariant bool? default_) => _$this._default_ = default_; - - $UpdateCustomerFiscalEntitiesResponseAllOfBuilder() { - $UpdateCustomerFiscalEntitiesResponseAllOf._defaults(this); - } - - $UpdateCustomerFiscalEntitiesResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _createdAt = $v.createdAt; - _parentId = $v.parentId; - _default_ = $v.default_; - _$v = null; - } - return this; - } - - @override - void replace(covariant $UpdateCustomerFiscalEntitiesResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$UpdateCustomerFiscalEntitiesResponseAllOf; - } - - @override - void update( - void Function($UpdateCustomerFiscalEntitiesResponseAllOfBuilder)? - updates) { - if (updates != null) updates(this); - } - - @override - $UpdateCustomerFiscalEntitiesResponseAllOf build() => _build(); - - _$$UpdateCustomerFiscalEntitiesResponseAllOf _build() { - final _$result = _$v ?? - new _$$UpdateCustomerFiscalEntitiesResponseAllOf._( - id: BuiltValueNullFieldError.checkNotNull( - id, r'$UpdateCustomerFiscalEntitiesResponseAllOf', 'id'), - object: BuiltValueNullFieldError.checkNotNull(object, - r'$UpdateCustomerFiscalEntitiesResponseAllOf', 'object'), - createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, - r'$UpdateCustomerFiscalEntitiesResponseAllOf', 'createdAt'), - parentId: parentId, - default_: default_); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_customer_payment_methods_response.g.dart b/lib/src/model/update_customer_payment_methods_response.g.dart deleted file mode 100644 index c3fd8ae..0000000 --- a/lib/src/model/update_customer_payment_methods_response.g.dart +++ /dev/null @@ -1,102 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_customer_payment_methods_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateCustomerPaymentMethodsResponse - extends UpdateCustomerPaymentMethodsResponse { - @override - final OneOf oneOf; - - factory _$UpdateCustomerPaymentMethodsResponse( - [void Function(UpdateCustomerPaymentMethodsResponseBuilder)? - updates]) => - (new UpdateCustomerPaymentMethodsResponseBuilder()..update(updates)) - ._build(); - - _$UpdateCustomerPaymentMethodsResponse._({required this.oneOf}) : super._() { - BuiltValueNullFieldError.checkNotNull( - oneOf, r'UpdateCustomerPaymentMethodsResponse', 'oneOf'); - } - - @override - UpdateCustomerPaymentMethodsResponse rebuild( - void Function(UpdateCustomerPaymentMethodsResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateCustomerPaymentMethodsResponseBuilder toBuilder() => - new UpdateCustomerPaymentMethodsResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateCustomerPaymentMethodsResponse && - oneOf == other.oneOf; - } - - @override - int get hashCode { - return $jf($jc(0, oneOf.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateCustomerPaymentMethodsResponse') - ..add('oneOf', oneOf)) - .toString(); - } -} - -class UpdateCustomerPaymentMethodsResponseBuilder - implements - Builder { - _$UpdateCustomerPaymentMethodsResponse? _$v; - - OneOf? _oneOf; - OneOf? get oneOf => _$this._oneOf; - set oneOf(OneOf? oneOf) => _$this._oneOf = oneOf; - - UpdateCustomerPaymentMethodsResponseBuilder() { - UpdateCustomerPaymentMethodsResponse._defaults(this); - } - - UpdateCustomerPaymentMethodsResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _oneOf = $v.oneOf; - _$v = null; - } - return this; - } - - @override - void replace(UpdateCustomerPaymentMethodsResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateCustomerPaymentMethodsResponse; - } - - @override - void update( - void Function(UpdateCustomerPaymentMethodsResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateCustomerPaymentMethodsResponse build() => _build(); - - _$UpdateCustomerPaymentMethodsResponse _build() { - final _$result = _$v ?? - new _$UpdateCustomerPaymentMethodsResponse._( - oneOf: BuiltValueNullFieldError.checkNotNull( - oneOf, r'UpdateCustomerPaymentMethodsResponse', 'oneOf')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_order_discount_lines_request.g.dart b/lib/src/model/update_order_discount_lines_request.g.dart deleted file mode 100644 index 48e2d60..0000000 --- a/lib/src/model/update_order_discount_lines_request.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_order_discount_lines_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateOrderDiscountLinesRequest - extends UpdateOrderDiscountLinesRequest { - @override - final int? amount; - @override - final String? code; - @override - final String? type; - - factory _$UpdateOrderDiscountLinesRequest( - [void Function(UpdateOrderDiscountLinesRequestBuilder)? updates]) => - (new UpdateOrderDiscountLinesRequestBuilder()..update(updates))._build(); - - _$UpdateOrderDiscountLinesRequest._({this.amount, this.code, this.type}) - : super._(); - - @override - UpdateOrderDiscountLinesRequest rebuild( - void Function(UpdateOrderDiscountLinesRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateOrderDiscountLinesRequestBuilder toBuilder() => - new UpdateOrderDiscountLinesRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateOrderDiscountLinesRequest && - amount == other.amount && - code == other.code && - type == other.type; - } - - @override - int get hashCode { - return $jf($jc($jc($jc(0, amount.hashCode), code.hashCode), type.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateOrderDiscountLinesRequest') - ..add('amount', amount) - ..add('code', code) - ..add('type', type)) - .toString(); - } -} - -class UpdateOrderDiscountLinesRequestBuilder - implements - Builder { - _$UpdateOrderDiscountLinesRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _code; - String? get code => _$this._code; - set code(String? code) => _$this._code = code; - - String? _type; - String? get type => _$this._type; - set type(String? type) => _$this._type = type; - - UpdateOrderDiscountLinesRequestBuilder() { - UpdateOrderDiscountLinesRequest._defaults(this); - } - - UpdateOrderDiscountLinesRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _code = $v.code; - _type = $v.type; - _$v = null; - } - return this; - } - - @override - void replace(UpdateOrderDiscountLinesRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateOrderDiscountLinesRequest; - } - - @override - void update(void Function(UpdateOrderDiscountLinesRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateOrderDiscountLinesRequest build() => _build(); - - _$UpdateOrderDiscountLinesRequest _build() { - final _$result = _$v ?? - new _$UpdateOrderDiscountLinesRequest._( - amount: amount, code: code, type: type); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_order_tax_request.g.dart b/lib/src/model/update_order_tax_request.g.dart deleted file mode 100644 index 9766a56..0000000 --- a/lib/src/model/update_order_tax_request.g.dart +++ /dev/null @@ -1,129 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_order_tax_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateOrderTaxRequest extends UpdateOrderTaxRequest { - @override - final int? amount; - @override - final String? description; - @override - final BuiltMap? metadata; - - factory _$UpdateOrderTaxRequest( - [void Function(UpdateOrderTaxRequestBuilder)? updates]) => - (new UpdateOrderTaxRequestBuilder()..update(updates))._build(); - - _$UpdateOrderTaxRequest._({this.amount, this.description, this.metadata}) - : super._(); - - @override - UpdateOrderTaxRequest rebuild( - void Function(UpdateOrderTaxRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateOrderTaxRequestBuilder toBuilder() => - new UpdateOrderTaxRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateOrderTaxRequest && - amount == other.amount && - description == other.description && - metadata == other.metadata; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc(0, amount.hashCode), description.hashCode), metadata.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateOrderTaxRequest') - ..add('amount', amount) - ..add('description', description) - ..add('metadata', metadata)) - .toString(); - } -} - -class UpdateOrderTaxRequestBuilder - implements Builder { - _$UpdateOrderTaxRequest? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(int? amount) => _$this._amount = amount; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - UpdateOrderTaxRequestBuilder() { - UpdateOrderTaxRequest._defaults(this); - } - - UpdateOrderTaxRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _description = $v.description; - _metadata = $v.metadata?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(UpdateOrderTaxRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateOrderTaxRequest; - } - - @override - void update(void Function(UpdateOrderTaxRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateOrderTaxRequest build() => _build(); - - _$UpdateOrderTaxRequest _build() { - _$UpdateOrderTaxRequest _$result; - try { - _$result = _$v ?? - new _$UpdateOrderTaxRequest._( - amount: amount, - description: description, - metadata: _metadata?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'UpdateOrderTaxRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_order_tax_response.g.dart b/lib/src/model/update_order_tax_response.g.dart deleted file mode 100644 index f09e23a..0000000 --- a/lib/src/model/update_order_tax_response.g.dart +++ /dev/null @@ -1,183 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_order_tax_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateOrderTaxResponse extends UpdateOrderTaxResponse { - @override - final int amount; - @override - final String description; - @override - final BuiltMap? metadata; - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - - factory _$UpdateOrderTaxResponse( - [void Function(UpdateOrderTaxResponseBuilder)? updates]) => - (new UpdateOrderTaxResponseBuilder()..update(updates))._build(); - - _$UpdateOrderTaxResponse._( - {required this.amount, - required this.description, - this.metadata, - this.id, - this.object, - this.parentId}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - amount, r'UpdateOrderTaxResponse', 'amount'); - BuiltValueNullFieldError.checkNotNull( - description, r'UpdateOrderTaxResponse', 'description'); - } - - @override - UpdateOrderTaxResponse rebuild( - void Function(UpdateOrderTaxResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateOrderTaxResponseBuilder toBuilder() => - new UpdateOrderTaxResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateOrderTaxResponse && - amount == other.amount && - description == other.description && - metadata == other.metadata && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, amount.hashCode), description.hashCode), - metadata.hashCode), - id.hashCode), - object.hashCode), - parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateOrderTaxResponse') - ..add('amount', amount) - ..add('description', description) - ..add('metadata', metadata) - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class UpdateOrderTaxResponseBuilder - implements - Builder, - OrderTaxRequestBuilder, - UpdateOrderTaxResponseAllOfBuilder { - _$UpdateOrderTaxResponse? _$v; - - int? _amount; - int? get amount => _$this._amount; - set amount(covariant int? amount) => _$this._amount = amount; - - String? _description; - String? get description => _$this._description; - set description(covariant String? description) => - _$this._description = description; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(covariant MapBuilder? metadata) => - _$this._metadata = metadata; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - UpdateOrderTaxResponseBuilder() { - UpdateOrderTaxResponse._defaults(this); - } - - UpdateOrderTaxResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _amount = $v.amount; - _description = $v.description; - _metadata = $v.metadata?.toBuilder(); - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override -// ignore: override_on_non_overriding_method - void replace(covariant UpdateOrderTaxResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateOrderTaxResponse; - } - - @override - void update(void Function(UpdateOrderTaxResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateOrderTaxResponse build() => _build(); - - _$UpdateOrderTaxResponse _build() { - _$UpdateOrderTaxResponse _$result; - try { - _$result = _$v ?? - new _$UpdateOrderTaxResponse._( - amount: BuiltValueNullFieldError.checkNotNull( - amount, r'UpdateOrderTaxResponse', 'amount'), - description: BuiltValueNullFieldError.checkNotNull( - description, r'UpdateOrderTaxResponse', 'description'), - metadata: _metadata?.build(), - id: id, - object: object, - parentId: parentId); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'UpdateOrderTaxResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_order_tax_response_all_of.g.dart b/lib/src/model/update_order_tax_response_all_of.g.dart deleted file mode 100644 index 574781b..0000000 --- a/lib/src/model/update_order_tax_response_all_of.g.dart +++ /dev/null @@ -1,128 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_order_tax_response_all_of.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -abstract class UpdateOrderTaxResponseAllOfBuilder { - void replace(UpdateOrderTaxResponseAllOf other); - void update(void Function(UpdateOrderTaxResponseAllOfBuilder) updates); - String? get id; - set id(String? id); - - String? get object; - set object(String? object); - - String? get parentId; - set parentId(String? parentId); -} - -class _$$UpdateOrderTaxResponseAllOf extends $UpdateOrderTaxResponseAllOf { - @override - final String? id; - @override - final String? object; - @override - final String? parentId; - - factory _$$UpdateOrderTaxResponseAllOf( - [void Function($UpdateOrderTaxResponseAllOfBuilder)? updates]) => - (new $UpdateOrderTaxResponseAllOfBuilder()..update(updates))._build(); - - _$$UpdateOrderTaxResponseAllOf._({this.id, this.object, this.parentId}) - : super._(); - - @override - $UpdateOrderTaxResponseAllOf rebuild( - void Function($UpdateOrderTaxResponseAllOfBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - $UpdateOrderTaxResponseAllOfBuilder toBuilder() => - new $UpdateOrderTaxResponseAllOfBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is $UpdateOrderTaxResponseAllOf && - id == other.id && - object == other.object && - parentId == other.parentId; - } - - @override - int get hashCode { - return $jf( - $jc($jc($jc(0, id.hashCode), object.hashCode), parentId.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'$UpdateOrderTaxResponseAllOf') - ..add('id', id) - ..add('object', object) - ..add('parentId', parentId)) - .toString(); - } -} - -class $UpdateOrderTaxResponseAllOfBuilder - implements - Builder<$UpdateOrderTaxResponseAllOf, - $UpdateOrderTaxResponseAllOfBuilder>, - UpdateOrderTaxResponseAllOfBuilder { - _$$UpdateOrderTaxResponseAllOf? _$v; - - String? _id; - String? get id => _$this._id; - set id(covariant String? id) => _$this._id = id; - - String? _object; - String? get object => _$this._object; - set object(covariant String? object) => _$this._object = object; - - String? _parentId; - String? get parentId => _$this._parentId; - set parentId(covariant String? parentId) => _$this._parentId = parentId; - - $UpdateOrderTaxResponseAllOfBuilder() { - $UpdateOrderTaxResponseAllOf._defaults(this); - } - - $UpdateOrderTaxResponseAllOfBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _object = $v.object; - _parentId = $v.parentId; - _$v = null; - } - return this; - } - - @override - void replace(covariant $UpdateOrderTaxResponseAllOf other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$$UpdateOrderTaxResponseAllOf; - } - - @override - void update(void Function($UpdateOrderTaxResponseAllOfBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - $UpdateOrderTaxResponseAllOf build() => _build(); - - _$$UpdateOrderTaxResponseAllOf _build() { - final _$result = _$v ?? - new _$$UpdateOrderTaxResponseAllOf._( - id: id, object: object, parentId: parentId); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_payment_methods.g.dart b/lib/src/model/update_payment_methods.g.dart deleted file mode 100644 index a081e4c..0000000 --- a/lib/src/model/update_payment_methods.g.dart +++ /dev/null @@ -1,89 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_payment_methods.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdatePaymentMethods extends UpdatePaymentMethods { - @override - final String? name; - - factory _$UpdatePaymentMethods( - [void Function(UpdatePaymentMethodsBuilder)? updates]) => - (new UpdatePaymentMethodsBuilder()..update(updates))._build(); - - _$UpdatePaymentMethods._({this.name}) : super._(); - - @override - UpdatePaymentMethods rebuild( - void Function(UpdatePaymentMethodsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdatePaymentMethodsBuilder toBuilder() => - new UpdatePaymentMethodsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdatePaymentMethods && name == other.name; - } - - @override - int get hashCode { - return $jf($jc(0, name.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdatePaymentMethods') - ..add('name', name)) - .toString(); - } -} - -class UpdatePaymentMethodsBuilder - implements Builder { - _$UpdatePaymentMethods? _$v; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - UpdatePaymentMethodsBuilder() { - UpdatePaymentMethods._defaults(this); - } - - UpdatePaymentMethodsBuilder get _$this { - final $v = _$v; - if ($v != null) { - _name = $v.name; - _$v = null; - } - return this; - } - - @override - void replace(UpdatePaymentMethods other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdatePaymentMethods; - } - - @override - void update(void Function(UpdatePaymentMethodsBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdatePaymentMethods build() => _build(); - - _$UpdatePaymentMethods _build() { - final _$result = _$v ?? new _$UpdatePaymentMethods._(name: name); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/update_product.g.dart b/lib/src/model/update_product.g.dart deleted file mode 100644 index e35dabc..0000000 --- a/lib/src/model/update_product.g.dart +++ /dev/null @@ -1,217 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'update_product.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UpdateProduct extends UpdateProduct { - @override - final BuiltMap? antifraudInfo; - @override - final String? description; - @override - final String? sku; - @override - final String? name; - @override - final int? unitPrice; - @override - final int? quantity; - @override - final BuiltList? tags; - @override - final String? brand; - @override - final BuiltMap? metadata; - - factory _$UpdateProduct([void Function(UpdateProductBuilder)? updates]) => - (new UpdateProductBuilder()..update(updates))._build(); - - _$UpdateProduct._( - {this.antifraudInfo, - this.description, - this.sku, - this.name, - this.unitPrice, - this.quantity, - this.tags, - this.brand, - this.metadata}) - : super._(); - - @override - UpdateProduct rebuild(void Function(UpdateProductBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UpdateProductBuilder toBuilder() => new UpdateProductBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UpdateProduct && - antifraudInfo == other.antifraudInfo && - description == other.description && - sku == other.sku && - name == other.name && - unitPrice == other.unitPrice && - quantity == other.quantity && - tags == other.tags && - brand == other.brand && - metadata == other.metadata; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, antifraudInfo.hashCode), - description.hashCode), - sku.hashCode), - name.hashCode), - unitPrice.hashCode), - quantity.hashCode), - tags.hashCode), - brand.hashCode), - metadata.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UpdateProduct') - ..add('antifraudInfo', antifraudInfo) - ..add('description', description) - ..add('sku', sku) - ..add('name', name) - ..add('unitPrice', unitPrice) - ..add('quantity', quantity) - ..add('tags', tags) - ..add('brand', brand) - ..add('metadata', metadata)) - .toString(); - } -} - -class UpdateProductBuilder - implements Builder { - _$UpdateProduct? _$v; - - MapBuilder? _antifraudInfo; - MapBuilder get antifraudInfo => - _$this._antifraudInfo ??= new MapBuilder(); - set antifraudInfo(MapBuilder? antifraudInfo) => - _$this._antifraudInfo = antifraudInfo; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - String? _sku; - String? get sku => _$this._sku; - set sku(String? sku) => _$this._sku = sku; - - String? _name; - String? get name => _$this._name; - set name(String? name) => _$this._name = name; - - int? _unitPrice; - int? get unitPrice => _$this._unitPrice; - set unitPrice(int? unitPrice) => _$this._unitPrice = unitPrice; - - int? _quantity; - int? get quantity => _$this._quantity; - set quantity(int? quantity) => _$this._quantity = quantity; - - ListBuilder? _tags; - ListBuilder get tags => _$this._tags ??= new ListBuilder(); - set tags(ListBuilder? tags) => _$this._tags = tags; - - String? _brand; - String? get brand => _$this._brand; - set brand(String? brand) => _$this._brand = brand; - - MapBuilder? _metadata; - MapBuilder get metadata => - _$this._metadata ??= new MapBuilder(); - set metadata(MapBuilder? metadata) => - _$this._metadata = metadata; - - UpdateProductBuilder() { - UpdateProduct._defaults(this); - } - - UpdateProductBuilder get _$this { - final $v = _$v; - if ($v != null) { - _antifraudInfo = $v.antifraudInfo?.toBuilder(); - _description = $v.description; - _sku = $v.sku; - _name = $v.name; - _unitPrice = $v.unitPrice; - _quantity = $v.quantity; - _tags = $v.tags?.toBuilder(); - _brand = $v.brand; - _metadata = $v.metadata?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(UpdateProduct other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UpdateProduct; - } - - @override - void update(void Function(UpdateProductBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UpdateProduct build() => _build(); - - _$UpdateProduct _build() { - _$UpdateProduct _$result; - try { - _$result = _$v ?? - new _$UpdateProduct._( - antifraudInfo: _antifraudInfo?.build(), - description: description, - sku: sku, - name: name, - unitPrice: unitPrice, - quantity: quantity, - tags: _tags?.build(), - brand: brand, - metadata: _metadata?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'antifraudInfo'; - _antifraudInfo?.build(); - - _$failedField = 'tags'; - _tags?.build(); - - _$failedField = 'metadata'; - _metadata?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'UpdateProduct', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_key_create_response.g.dart b/lib/src/model/webhook_key_create_response.g.dart deleted file mode 100644 index 4ffafa4..0000000 --- a/lib/src/model/webhook_key_create_response.g.dart +++ /dev/null @@ -1,157 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_key_create_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookKeyCreateResponse extends WebhookKeyCreateResponse { - @override - final bool? active; - @override - final int? createdAt; - @override - final String? id; - @override - final bool? livemode; - @override - final String? object; - @override - final String? publicKey; - - factory _$WebhookKeyCreateResponse( - [void Function(WebhookKeyCreateResponseBuilder)? updates]) => - (new WebhookKeyCreateResponseBuilder()..update(updates))._build(); - - _$WebhookKeyCreateResponse._( - {this.active, - this.createdAt, - this.id, - this.livemode, - this.object, - this.publicKey}) - : super._(); - - @override - WebhookKeyCreateResponse rebuild( - void Function(WebhookKeyCreateResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookKeyCreateResponseBuilder toBuilder() => - new WebhookKeyCreateResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookKeyCreateResponse && - active == other.active && - createdAt == other.createdAt && - id == other.id && - livemode == other.livemode && - object == other.object && - publicKey == other.publicKey; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, active.hashCode), createdAt.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - publicKey.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookKeyCreateResponse') - ..add('active', active) - ..add('createdAt', createdAt) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('publicKey', publicKey)) - .toString(); - } -} - -class WebhookKeyCreateResponseBuilder - implements - Builder { - _$WebhookKeyCreateResponse? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - String? _publicKey; - String? get publicKey => _$this._publicKey; - set publicKey(String? publicKey) => _$this._publicKey = publicKey; - - WebhookKeyCreateResponseBuilder() { - WebhookKeyCreateResponse._defaults(this); - } - - WebhookKeyCreateResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _createdAt = $v.createdAt; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _publicKey = $v.publicKey; - _$v = null; - } - return this; - } - - @override - void replace(WebhookKeyCreateResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookKeyCreateResponse; - } - - @override - void update(void Function(WebhookKeyCreateResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookKeyCreateResponse build() => _build(); - - _$WebhookKeyCreateResponse _build() { - final _$result = _$v ?? - new _$WebhookKeyCreateResponse._( - active: active, - createdAt: createdAt, - id: id, - livemode: livemode, - object: object, - publicKey: publicKey); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_key_delete_response.g.dart b/lib/src/model/webhook_key_delete_response.g.dart deleted file mode 100644 index cddbb3e..0000000 --- a/lib/src/model/webhook_key_delete_response.g.dart +++ /dev/null @@ -1,157 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_key_delete_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookKeyDeleteResponse extends WebhookKeyDeleteResponse { - @override - final bool? active; - @override - final int? createdAt; - @override - final bool? deleted; - @override - final String? id; - @override - final bool? livemode; - @override - final String? object; - - factory _$WebhookKeyDeleteResponse( - [void Function(WebhookKeyDeleteResponseBuilder)? updates]) => - (new WebhookKeyDeleteResponseBuilder()..update(updates))._build(); - - _$WebhookKeyDeleteResponse._( - {this.active, - this.createdAt, - this.deleted, - this.id, - this.livemode, - this.object}) - : super._(); - - @override - WebhookKeyDeleteResponse rebuild( - void Function(WebhookKeyDeleteResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookKeyDeleteResponseBuilder toBuilder() => - new WebhookKeyDeleteResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookKeyDeleteResponse && - active == other.active && - createdAt == other.createdAt && - deleted == other.deleted && - id == other.id && - livemode == other.livemode && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc($jc($jc(0, active.hashCode), createdAt.hashCode), - deleted.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookKeyDeleteResponse') - ..add('active', active) - ..add('createdAt', createdAt) - ..add('deleted', deleted) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object)) - .toString(); - } -} - -class WebhookKeyDeleteResponseBuilder - implements - Builder { - _$WebhookKeyDeleteResponse? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(bool? deleted) => _$this._deleted = deleted; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - WebhookKeyDeleteResponseBuilder() { - WebhookKeyDeleteResponse._defaults(this); - } - - WebhookKeyDeleteResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _createdAt = $v.createdAt; - _deleted = $v.deleted; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(WebhookKeyDeleteResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookKeyDeleteResponse; - } - - @override - void update(void Function(WebhookKeyDeleteResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookKeyDeleteResponse build() => _build(); - - _$WebhookKeyDeleteResponse _build() { - final _$result = _$v ?? - new _$WebhookKeyDeleteResponse._( - active: active, - createdAt: createdAt, - deleted: deleted, - id: id, - livemode: livemode, - object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_key_request.g.dart b/lib/src/model/webhook_key_request.g.dart deleted file mode 100644 index d5cb957..0000000 --- a/lib/src/model/webhook_key_request.g.dart +++ /dev/null @@ -1,88 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_key_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookKeyRequest extends WebhookKeyRequest { - @override - final bool? active; - - factory _$WebhookKeyRequest( - [void Function(WebhookKeyRequestBuilder)? updates]) => - (new WebhookKeyRequestBuilder()..update(updates))._build(); - - _$WebhookKeyRequest._({this.active}) : super._(); - - @override - WebhookKeyRequest rebuild(void Function(WebhookKeyRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookKeyRequestBuilder toBuilder() => - new WebhookKeyRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookKeyRequest && active == other.active; - } - - @override - int get hashCode { - return $jf($jc(0, active.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookKeyRequest') - ..add('active', active)) - .toString(); - } -} - -class WebhookKeyRequestBuilder - implements Builder { - _$WebhookKeyRequest? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - WebhookKeyRequestBuilder() { - WebhookKeyRequest._defaults(this); - } - - WebhookKeyRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _$v = null; - } - return this; - } - - @override - void replace(WebhookKeyRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookKeyRequest; - } - - @override - void update(void Function(WebhookKeyRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookKeyRequest build() => _build(); - - _$WebhookKeyRequest _build() { - final _$result = _$v ?? new _$WebhookKeyRequest._(active: active); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_key_response.g.dart b/lib/src/model/webhook_key_response.g.dart deleted file mode 100644 index 24c3fc1..0000000 --- a/lib/src/model/webhook_key_response.g.dart +++ /dev/null @@ -1,170 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_key_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookKeyResponse extends WebhookKeyResponse { - @override - final String? id; - @override - final bool? active; - @override - final int? createdAt; - @override - final int? deactivatedAt; - @override - final String? publicKey; - @override - final bool? livemode; - @override - final String? object; - - factory _$WebhookKeyResponse( - [void Function(WebhookKeyResponseBuilder)? updates]) => - (new WebhookKeyResponseBuilder()..update(updates))._build(); - - _$WebhookKeyResponse._( - {this.id, - this.active, - this.createdAt, - this.deactivatedAt, - this.publicKey, - this.livemode, - this.object}) - : super._(); - - @override - WebhookKeyResponse rebuild( - void Function(WebhookKeyResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookKeyResponseBuilder toBuilder() => - new WebhookKeyResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookKeyResponse && - id == other.id && - active == other.active && - createdAt == other.createdAt && - deactivatedAt == other.deactivatedAt && - publicKey == other.publicKey && - livemode == other.livemode && - object == other.object; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, id.hashCode), active.hashCode), - createdAt.hashCode), - deactivatedAt.hashCode), - publicKey.hashCode), - livemode.hashCode), - object.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookKeyResponse') - ..add('id', id) - ..add('active', active) - ..add('createdAt', createdAt) - ..add('deactivatedAt', deactivatedAt) - ..add('publicKey', publicKey) - ..add('livemode', livemode) - ..add('object', object)) - .toString(); - } -} - -class WebhookKeyResponseBuilder - implements Builder { - _$WebhookKeyResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - int? _createdAt; - int? get createdAt => _$this._createdAt; - set createdAt(int? createdAt) => _$this._createdAt = createdAt; - - int? _deactivatedAt; - int? get deactivatedAt => _$this._deactivatedAt; - set deactivatedAt(int? deactivatedAt) => - _$this._deactivatedAt = deactivatedAt; - - String? _publicKey; - String? get publicKey => _$this._publicKey; - set publicKey(String? publicKey) => _$this._publicKey = publicKey; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - WebhookKeyResponseBuilder() { - WebhookKeyResponse._defaults(this); - } - - WebhookKeyResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _active = $v.active; - _createdAt = $v.createdAt; - _deactivatedAt = $v.deactivatedAt; - _publicKey = $v.publicKey; - _livemode = $v.livemode; - _object = $v.object; - _$v = null; - } - return this; - } - - @override - void replace(WebhookKeyResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookKeyResponse; - } - - @override - void update(void Function(WebhookKeyResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookKeyResponse build() => _build(); - - _$WebhookKeyResponse _build() { - final _$result = _$v ?? - new _$WebhookKeyResponse._( - id: id, - active: active, - createdAt: createdAt, - deactivatedAt: deactivatedAt, - publicKey: publicKey, - livemode: livemode, - object: object); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_key_update_request.g.dart b/lib/src/model/webhook_key_update_request.g.dart deleted file mode 100644 index d617aca..0000000 --- a/lib/src/model/webhook_key_update_request.g.dart +++ /dev/null @@ -1,90 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_key_update_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookKeyUpdateRequest extends WebhookKeyUpdateRequest { - @override - final bool? active; - - factory _$WebhookKeyUpdateRequest( - [void Function(WebhookKeyUpdateRequestBuilder)? updates]) => - (new WebhookKeyUpdateRequestBuilder()..update(updates))._build(); - - _$WebhookKeyUpdateRequest._({this.active}) : super._(); - - @override - WebhookKeyUpdateRequest rebuild( - void Function(WebhookKeyUpdateRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookKeyUpdateRequestBuilder toBuilder() => - new WebhookKeyUpdateRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookKeyUpdateRequest && active == other.active; - } - - @override - int get hashCode { - return $jf($jc(0, active.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookKeyUpdateRequest') - ..add('active', active)) - .toString(); - } -} - -class WebhookKeyUpdateRequestBuilder - implements - Builder { - _$WebhookKeyUpdateRequest? _$v; - - bool? _active; - bool? get active => _$this._active; - set active(bool? active) => _$this._active = active; - - WebhookKeyUpdateRequestBuilder() { - WebhookKeyUpdateRequest._defaults(this); - } - - WebhookKeyUpdateRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _active = $v.active; - _$v = null; - } - return this; - } - - @override - void replace(WebhookKeyUpdateRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookKeyUpdateRequest; - } - - @override - void update(void Function(WebhookKeyUpdateRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookKeyUpdateRequest build() => _build(); - - _$WebhookKeyUpdateRequest _build() { - final _$result = _$v ?? new _$WebhookKeyUpdateRequest._(active: active); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_log.g.dart b/lib/src/model/webhook_log.g.dart deleted file mode 100644 index fa10250..0000000 --- a/lib/src/model/webhook_log.g.dart +++ /dev/null @@ -1,183 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_log.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookLog extends WebhookLog { - @override - final int? failedAttempts; - @override - final String? id; - @override - final int? lastAttemptedAt; - @override - final int? lastHttpResponseStatus; - @override - final String? object; - @override - final BuiltMap? responseData; - @override - final String? url; - - factory _$WebhookLog([void Function(WebhookLogBuilder)? updates]) => - (new WebhookLogBuilder()..update(updates))._build(); - - _$WebhookLog._( - {this.failedAttempts, - this.id, - this.lastAttemptedAt, - this.lastHttpResponseStatus, - this.object, - this.responseData, - this.url}) - : super._(); - - @override - WebhookLog rebuild(void Function(WebhookLogBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookLogBuilder toBuilder() => new WebhookLogBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookLog && - failedAttempts == other.failedAttempts && - id == other.id && - lastAttemptedAt == other.lastAttemptedAt && - lastHttpResponseStatus == other.lastHttpResponseStatus && - object == other.object && - responseData == other.responseData && - url == other.url; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc($jc($jc(0, failedAttempts.hashCode), id.hashCode), - lastAttemptedAt.hashCode), - lastHttpResponseStatus.hashCode), - object.hashCode), - responseData.hashCode), - url.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookLog') - ..add('failedAttempts', failedAttempts) - ..add('id', id) - ..add('lastAttemptedAt', lastAttemptedAt) - ..add('lastHttpResponseStatus', lastHttpResponseStatus) - ..add('object', object) - ..add('responseData', responseData) - ..add('url', url)) - .toString(); - } -} - -class WebhookLogBuilder implements Builder { - _$WebhookLog? _$v; - - int? _failedAttempts; - int? get failedAttempts => _$this._failedAttempts; - set failedAttempts(int? failedAttempts) => - _$this._failedAttempts = failedAttempts; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - int? _lastAttemptedAt; - int? get lastAttemptedAt => _$this._lastAttemptedAt; - set lastAttemptedAt(int? lastAttemptedAt) => - _$this._lastAttemptedAt = lastAttemptedAt; - - int? _lastHttpResponseStatus; - int? get lastHttpResponseStatus => _$this._lastHttpResponseStatus; - set lastHttpResponseStatus(int? lastHttpResponseStatus) => - _$this._lastHttpResponseStatus = lastHttpResponseStatus; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - MapBuilder? _responseData; - MapBuilder get responseData => - _$this._responseData ??= new MapBuilder(); - set responseData(MapBuilder? responseData) => - _$this._responseData = responseData; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - WebhookLogBuilder() { - WebhookLog._defaults(this); - } - - WebhookLogBuilder get _$this { - final $v = _$v; - if ($v != null) { - _failedAttempts = $v.failedAttempts; - _id = $v.id; - _lastAttemptedAt = $v.lastAttemptedAt; - _lastHttpResponseStatus = $v.lastHttpResponseStatus; - _object = $v.object; - _responseData = $v.responseData?.toBuilder(); - _url = $v.url; - _$v = null; - } - return this; - } - - @override - void replace(WebhookLog other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookLog; - } - - @override - void update(void Function(WebhookLogBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookLog build() => _build(); - - _$WebhookLog _build() { - _$WebhookLog _$result; - try { - _$result = _$v ?? - new _$WebhookLog._( - failedAttempts: failedAttempts, - id: id, - lastAttemptedAt: lastAttemptedAt, - lastHttpResponseStatus: lastHttpResponseStatus, - object: object, - responseData: _responseData?.build(), - url: url); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'responseData'; - _responseData?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'WebhookLog', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_request.g.dart b/lib/src/model/webhook_request.g.dart deleted file mode 100644 index 5766288..0000000 --- a/lib/src/model/webhook_request.g.dart +++ /dev/null @@ -1,107 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookRequest extends WebhookRequest { - @override - final String url; - @override - final bool synchronous; - - factory _$WebhookRequest([void Function(WebhookRequestBuilder)? updates]) => - (new WebhookRequestBuilder()..update(updates))._build(); - - _$WebhookRequest._({required this.url, required this.synchronous}) - : super._() { - BuiltValueNullFieldError.checkNotNull(url, r'WebhookRequest', 'url'); - BuiltValueNullFieldError.checkNotNull( - synchronous, r'WebhookRequest', 'synchronous'); - } - - @override - WebhookRequest rebuild(void Function(WebhookRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookRequestBuilder toBuilder() => - new WebhookRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookRequest && - url == other.url && - synchronous == other.synchronous; - } - - @override - int get hashCode { - return $jf($jc($jc(0, url.hashCode), synchronous.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookRequest') - ..add('url', url) - ..add('synchronous', synchronous)) - .toString(); - } -} - -class WebhookRequestBuilder - implements Builder { - _$WebhookRequest? _$v; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - bool? _synchronous; - bool? get synchronous => _$this._synchronous; - set synchronous(bool? synchronous) => _$this._synchronous = synchronous; - - WebhookRequestBuilder() { - WebhookRequest._defaults(this); - } - - WebhookRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _url = $v.url; - _synchronous = $v.synchronous; - _$v = null; - } - return this; - } - - @override - void replace(WebhookRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookRequest; - } - - @override - void update(void Function(WebhookRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookRequest build() => _build(); - - _$WebhookRequest _build() { - final _$result = _$v ?? - new _$WebhookRequest._( - url: BuiltValueNullFieldError.checkNotNull( - url, r'WebhookRequest', 'url'), - synchronous: BuiltValueNullFieldError.checkNotNull( - synchronous, r'WebhookRequest', 'synchronous')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_response.g.dart b/lib/src/model/webhook_response.g.dart deleted file mode 100644 index 90521bb..0000000 --- a/lib/src/model/webhook_response.g.dart +++ /dev/null @@ -1,225 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookResponse extends WebhookResponse { - @override - final bool? deleted; - @override - final bool? developmentEnabled; - @override - final String? id; - @override - final bool? livemode; - @override - final String? object; - @override - final bool? productionEnabled; - @override - final String? status; - @override - final BuiltList? subscribedEvents; - @override - final bool? synchronous; - @override - final String? url; - - factory _$WebhookResponse([void Function(WebhookResponseBuilder)? updates]) => - (new WebhookResponseBuilder()..update(updates))._build(); - - _$WebhookResponse._( - {this.deleted, - this.developmentEnabled, - this.id, - this.livemode, - this.object, - this.productionEnabled, - this.status, - this.subscribedEvents, - this.synchronous, - this.url}) - : super._(); - - @override - WebhookResponse rebuild(void Function(WebhookResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookResponseBuilder toBuilder() => - new WebhookResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookResponse && - deleted == other.deleted && - developmentEnabled == other.developmentEnabled && - id == other.id && - livemode == other.livemode && - object == other.object && - productionEnabled == other.productionEnabled && - status == other.status && - subscribedEvents == other.subscribedEvents && - synchronous == other.synchronous && - url == other.url; - } - - @override - int get hashCode { - return $jf($jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc( - $jc($jc(0, deleted.hashCode), - developmentEnabled.hashCode), - id.hashCode), - livemode.hashCode), - object.hashCode), - productionEnabled.hashCode), - status.hashCode), - subscribedEvents.hashCode), - synchronous.hashCode), - url.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookResponse') - ..add('deleted', deleted) - ..add('developmentEnabled', developmentEnabled) - ..add('id', id) - ..add('livemode', livemode) - ..add('object', object) - ..add('productionEnabled', productionEnabled) - ..add('status', status) - ..add('subscribedEvents', subscribedEvents) - ..add('synchronous', synchronous) - ..add('url', url)) - .toString(); - } -} - -class WebhookResponseBuilder - implements Builder { - _$WebhookResponse? _$v; - - bool? _deleted; - bool? get deleted => _$this._deleted; - set deleted(bool? deleted) => _$this._deleted = deleted; - - bool? _developmentEnabled; - bool? get developmentEnabled => _$this._developmentEnabled; - set developmentEnabled(bool? developmentEnabled) => - _$this._developmentEnabled = developmentEnabled; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - bool? _livemode; - bool? get livemode => _$this._livemode; - set livemode(bool? livemode) => _$this._livemode = livemode; - - String? _object; - String? get object => _$this._object; - set object(String? object) => _$this._object = object; - - bool? _productionEnabled; - bool? get productionEnabled => _$this._productionEnabled; - set productionEnabled(bool? productionEnabled) => - _$this._productionEnabled = productionEnabled; - - String? _status; - String? get status => _$this._status; - set status(String? status) => _$this._status = status; - - ListBuilder? _subscribedEvents; - ListBuilder get subscribedEvents => - _$this._subscribedEvents ??= new ListBuilder(); - set subscribedEvents(ListBuilder? subscribedEvents) => - _$this._subscribedEvents = subscribedEvents; - - bool? _synchronous; - bool? get synchronous => _$this._synchronous; - set synchronous(bool? synchronous) => _$this._synchronous = synchronous; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - WebhookResponseBuilder() { - WebhookResponse._defaults(this); - } - - WebhookResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _deleted = $v.deleted; - _developmentEnabled = $v.developmentEnabled; - _id = $v.id; - _livemode = $v.livemode; - _object = $v.object; - _productionEnabled = $v.productionEnabled; - _status = $v.status; - _subscribedEvents = $v.subscribedEvents?.toBuilder(); - _synchronous = $v.synchronous; - _url = $v.url; - _$v = null; - } - return this; - } - - @override - void replace(WebhookResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookResponse; - } - - @override - void update(void Function(WebhookResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookResponse build() => _build(); - - _$WebhookResponse _build() { - _$WebhookResponse _$result; - try { - _$result = _$v ?? - new _$WebhookResponse._( - deleted: deleted, - developmentEnabled: developmentEnabled, - id: id, - livemode: livemode, - object: object, - productionEnabled: productionEnabled, - status: status, - subscribedEvents: _subscribedEvents?.build(), - synchronous: synchronous, - url: url); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'subscribedEvents'; - _subscribedEvents?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'WebhookResponse', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/webhook_update_request.dart b/lib/src/model/webhook_update_request.dart index 9e5b078..17d059d 100644 --- a/lib/src/model/webhook_update_request.dart +++ b/lib/src/model/webhook_update_request.dart @@ -14,7 +14,7 @@ part 'webhook_update_request.g.dart'; /// Properties: /// * [url] - Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. /// * [synchronous] - It is a value that allows to decide if the events will be synchronous or asynchronous. We recommend asynchronous = false -/// * [subscribedEvents] +/// * [events] @BuiltValue() abstract class WebhookUpdateRequest implements Built { /// Here you must place the URL of your Webhook remember that you must program what you will do with the events received. Also do not forget to handle the HTTPS protocol for greater security. @@ -25,8 +25,8 @@ abstract class WebhookUpdateRequest implements Built? get subscribedEvents; + @BuiltValueField(wireName: r'events') + BuiltList? get events; WebhookUpdateRequest._(); @@ -64,10 +64,10 @@ class _$WebhookUpdateRequestSerializer implements PrimitiveSerializer; - result.subscribedEvents.replace(valueDes); + result.events.replace(valueDes); break; default: unhandled.add(key); diff --git a/lib/src/model/webhook_update_request.g.dart b/lib/src/model/webhook_update_request.g.dart deleted file mode 100644 index cdf1518..0000000 --- a/lib/src/model/webhook_update_request.g.dart +++ /dev/null @@ -1,133 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'webhook_update_request.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WebhookUpdateRequest extends WebhookUpdateRequest { - @override - final String url; - @override - final bool? synchronous; - @override - final BuiltList? subscribedEvents; - - factory _$WebhookUpdateRequest( - [void Function(WebhookUpdateRequestBuilder)? updates]) => - (new WebhookUpdateRequestBuilder()..update(updates))._build(); - - _$WebhookUpdateRequest._( - {required this.url, this.synchronous, this.subscribedEvents}) - : super._() { - BuiltValueNullFieldError.checkNotNull(url, r'WebhookUpdateRequest', 'url'); - } - - @override - WebhookUpdateRequest rebuild( - void Function(WebhookUpdateRequestBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WebhookUpdateRequestBuilder toBuilder() => - new WebhookUpdateRequestBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WebhookUpdateRequest && - url == other.url && - synchronous == other.synchronous && - subscribedEvents == other.subscribedEvents; - } - - @override - int get hashCode { - return $jf($jc($jc($jc(0, url.hashCode), synchronous.hashCode), - subscribedEvents.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WebhookUpdateRequest') - ..add('url', url) - ..add('synchronous', synchronous) - ..add('subscribedEvents', subscribedEvents)) - .toString(); - } -} - -class WebhookUpdateRequestBuilder - implements Builder { - _$WebhookUpdateRequest? _$v; - - String? _url; - String? get url => _$this._url; - set url(String? url) => _$this._url = url; - - bool? _synchronous; - bool? get synchronous => _$this._synchronous; - set synchronous(bool? synchronous) => _$this._synchronous = synchronous; - - ListBuilder? _subscribedEvents; - ListBuilder get subscribedEvents => - _$this._subscribedEvents ??= new ListBuilder(); - set subscribedEvents(ListBuilder? subscribedEvents) => - _$this._subscribedEvents = subscribedEvents; - - WebhookUpdateRequestBuilder() { - WebhookUpdateRequest._defaults(this); - } - - WebhookUpdateRequestBuilder get _$this { - final $v = _$v; - if ($v != null) { - _url = $v.url; - _synchronous = $v.synchronous; - _subscribedEvents = $v.subscribedEvents?.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(WebhookUpdateRequest other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WebhookUpdateRequest; - } - - @override - void update(void Function(WebhookUpdateRequestBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WebhookUpdateRequest build() => _build(); - - _$WebhookUpdateRequest _build() { - _$WebhookUpdateRequest _$result; - try { - _$result = _$v ?? - new _$WebhookUpdateRequest._( - url: BuiltValueNullFieldError.checkNotNull( - url, r'WebhookUpdateRequest', 'url'), - synchronous: synchronous, - subscribedEvents: _subscribedEvents?.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'subscribedEvents'; - _subscribedEvents?.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'WebhookUpdateRequest', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/model/whitelistlist_rule_response.g.dart b/lib/src/model/whitelistlist_rule_response.g.dart deleted file mode 100644 index 4efe1b3..0000000 --- a/lib/src/model/whitelistlist_rule_response.g.dart +++ /dev/null @@ -1,124 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'whitelistlist_rule_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$WhitelistlistRuleResponse extends WhitelistlistRuleResponse { - @override - final String? id; - @override - final String? field; - @override - final String? value; - @override - final String? description; - - factory _$WhitelistlistRuleResponse( - [void Function(WhitelistlistRuleResponseBuilder)? updates]) => - (new WhitelistlistRuleResponseBuilder()..update(updates))._build(); - - _$WhitelistlistRuleResponse._( - {this.id, this.field, this.value, this.description}) - : super._(); - - @override - WhitelistlistRuleResponse rebuild( - void Function(WhitelistlistRuleResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - WhitelistlistRuleResponseBuilder toBuilder() => - new WhitelistlistRuleResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is WhitelistlistRuleResponse && - id == other.id && - field == other.field && - value == other.value && - description == other.description; - } - - @override - int get hashCode { - return $jf($jc( - $jc($jc($jc(0, id.hashCode), field.hashCode), value.hashCode), - description.hashCode)); - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'WhitelistlistRuleResponse') - ..add('id', id) - ..add('field', field) - ..add('value', value) - ..add('description', description)) - .toString(); - } -} - -class WhitelistlistRuleResponseBuilder - implements - Builder { - _$WhitelistlistRuleResponse? _$v; - - String? _id; - String? get id => _$this._id; - set id(String? id) => _$this._id = id; - - String? _field; - String? get field => _$this._field; - set field(String? field) => _$this._field = field; - - String? _value; - String? get value => _$this._value; - set value(String? value) => _$this._value = value; - - String? _description; - String? get description => _$this._description; - set description(String? description) => _$this._description = description; - - WhitelistlistRuleResponseBuilder() { - WhitelistlistRuleResponse._defaults(this); - } - - WhitelistlistRuleResponseBuilder get _$this { - final $v = _$v; - if ($v != null) { - _id = $v.id; - _field = $v.field; - _value = $v.value; - _description = $v.description; - _$v = null; - } - return this; - } - - @override - void replace(WhitelistlistRuleResponse other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$WhitelistlistRuleResponse; - } - - @override - void update(void Function(WhitelistlistRuleResponseBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - WhitelistlistRuleResponse build() => _build(); - - _$WhitelistlistRuleResponse _build() { - final _$result = _$v ?? - new _$WhitelistlistRuleResponse._( - id: id, field: field, value: value, description: description); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/serializers.dart b/lib/src/serializers.dart index b07ae5f..fbbe7b4 100644 --- a/lib/src/serializers.dart +++ b/lib/src/serializers.dart @@ -18,6 +18,7 @@ import 'package:conekta/src/model/api_key_create_response.dart'; import 'package:conekta/src/model/api_key_create_response_all_of.dart'; import 'package:conekta/src/model/api_key_request.dart'; import 'package:conekta/src/model/api_key_response.dart'; +import 'package:conekta/src/model/api_key_response_on_delete.dart'; import 'package:conekta/src/model/api_key_update_request.dart'; import 'package:conekta/src/model/balance_common_field.dart'; import 'package:conekta/src/model/balance_response.dart'; @@ -35,6 +36,7 @@ import 'package:conekta/src/model/charge_response_payment_method.dart'; import 'package:conekta/src/model/charge_response_refunds.dart'; import 'package:conekta/src/model/charge_response_refunds_all_of.dart'; import 'package:conekta/src/model/charge_response_refunds_data.dart'; +import 'package:conekta/src/model/charge_update_request.dart'; import 'package:conekta/src/model/charges_data_response.dart'; import 'package:conekta/src/model/checkout.dart'; import 'package:conekta/src/model/checkout_order_template.dart'; @@ -64,7 +66,6 @@ import 'package:conekta/src/model/customer_fiscal_entities_response_all_of.dart' import 'package:conekta/src/model/customer_info.dart'; import 'package:conekta/src/model/customer_info_just_customer_id.dart'; import 'package:conekta/src/model/customer_info_just_customer_id_response.dart'; -import 'package:conekta/src/model/customer_info_response.dart'; import 'package:conekta/src/model/customer_payment_method_request.dart'; import 'package:conekta/src/model/customer_payment_methods.dart'; import 'package:conekta/src/model/customer_payment_methods_data.dart'; @@ -97,6 +98,7 @@ import 'package:conekta/src/model/error.dart'; import 'package:conekta/src/model/error_all_of.dart'; import 'package:conekta/src/model/event_response.dart'; import 'package:conekta/src/model/events_resend_response.dart'; +import 'package:conekta/src/model/fiscal_entity_address.dart'; import 'package:conekta/src/model/get_api_keys_response.dart'; import 'package:conekta/src/model/get_api_keys_response_all_of.dart'; import 'package:conekta/src/model/get_charges_response.dart'; @@ -125,7 +127,14 @@ import 'package:conekta/src/model/log_response.dart'; import 'package:conekta/src/model/logs_response.dart'; import 'package:conekta/src/model/logs_response_data.dart'; import 'package:conekta/src/model/order_capture_request.dart'; +import 'package:conekta/src/model/order_customer_info_response.dart'; import 'package:conekta/src/model/order_discount_lines_request.dart'; +import 'package:conekta/src/model/order_fiscal_entity_address_response.dart'; +import 'package:conekta/src/model/order_fiscal_entity_address_response_all_of.dart'; +import 'package:conekta/src/model/order_fiscal_entity_request.dart'; +import 'package:conekta/src/model/order_fiscal_entity_response.dart'; +import 'package:conekta/src/model/order_next_action_response.dart'; +import 'package:conekta/src/model/order_next_action_response_redirect_to_url.dart'; import 'package:conekta/src/model/order_refund_request.dart'; import 'package:conekta/src/model/order_request.dart'; import 'package:conekta/src/model/order_request_customer_info.dart'; @@ -137,14 +146,12 @@ import 'package:conekta/src/model/order_response_customer_info.dart'; import 'package:conekta/src/model/order_response_customer_info_all_of.dart'; import 'package:conekta/src/model/order_response_discount_lines.dart'; import 'package:conekta/src/model/order_response_discount_lines_all_of.dart'; -import 'package:conekta/src/model/order_response_fiscal_entity.dart'; -import 'package:conekta/src/model/order_response_fiscal_entity_address.dart'; -import 'package:conekta/src/model/order_response_fiscal_entity_address_all_of.dart'; import 'package:conekta/src/model/order_response_products.dart'; import 'package:conekta/src/model/order_response_products_all_of.dart'; import 'package:conekta/src/model/order_response_shipping_contact.dart'; import 'package:conekta/src/model/order_response_shipping_contact_all_of.dart'; import 'package:conekta/src/model/order_tax_request.dart'; +import 'package:conekta/src/model/order_update_fiscal_entity_request.dart'; import 'package:conekta/src/model/order_update_request.dart'; import 'package:conekta/src/model/order_update_request_customer_info.dart'; import 'package:conekta/src/model/orders_response.dart'; @@ -223,6 +230,7 @@ part 'serializers.g.dart'; ApiKeyCreateResponseAllOf,$ApiKeyCreateResponseAllOf, ApiKeyRequest, ApiKeyResponse,$ApiKeyResponse, + ApiKeyResponseOnDelete,$ApiKeyResponseOnDelete, ApiKeyUpdateRequest, BalanceCommonField, BalanceResponse, @@ -240,6 +248,7 @@ part 'serializers.g.dart'; ChargeResponseRefunds, ChargeResponseRefundsAllOf,$ChargeResponseRefundsAllOf, ChargeResponseRefundsData, + ChargeUpdateRequest, ChargesDataResponse, Checkout, CheckoutOrderTemplate, @@ -269,7 +278,6 @@ part 'serializers.g.dart'; CustomerInfo, CustomerInfoJustCustomerId, CustomerInfoJustCustomerIdResponse,$CustomerInfoJustCustomerIdResponse, - CustomerInfoResponse,$CustomerInfoResponse, CustomerPaymentMethodRequest,$CustomerPaymentMethodRequest, CustomerPaymentMethods,$CustomerPaymentMethods, CustomerPaymentMethodsData, @@ -302,6 +310,7 @@ part 'serializers.g.dart'; ErrorAllOf,$ErrorAllOf, EventResponse, EventsResendResponse, + FiscalEntityAddress,$FiscalEntityAddress, GetApiKeysResponse, GetApiKeysResponseAllOf,$GetApiKeysResponseAllOf, GetChargesResponse, @@ -330,7 +339,14 @@ part 'serializers.g.dart'; LogsResponse, LogsResponseData, OrderCaptureRequest, + OrderCustomerInfoResponse,$OrderCustomerInfoResponse, OrderDiscountLinesRequest,$OrderDiscountLinesRequest, + OrderFiscalEntityAddressResponse, + OrderFiscalEntityAddressResponseAllOf,$OrderFiscalEntityAddressResponseAllOf, + OrderFiscalEntityRequest, + OrderFiscalEntityResponse, + OrderNextActionResponse, + OrderNextActionResponseRedirectToUrl, OrderRefundRequest, OrderRequest, OrderRequestCustomerInfo, @@ -342,14 +358,12 @@ part 'serializers.g.dart'; OrderResponseCustomerInfoAllOf,$OrderResponseCustomerInfoAllOf, OrderResponseDiscountLines, OrderResponseDiscountLinesAllOf,$OrderResponseDiscountLinesAllOf, - OrderResponseFiscalEntity, - OrderResponseFiscalEntityAddress, - OrderResponseFiscalEntityAddressAllOf,$OrderResponseFiscalEntityAddressAllOf, OrderResponseProducts, OrderResponseProductsAllOf,$OrderResponseProductsAllOf, OrderResponseShippingContact, OrderResponseShippingContactAllOf,$OrderResponseShippingContactAllOf, OrderTaxRequest,$OrderTaxRequest, + OrderUpdateFiscalEntityRequest, OrderUpdateRequest, OrderUpdateRequestCustomerInfo, OrdersResponse,$OrdersResponse, @@ -424,6 +438,7 @@ part 'serializers.g.dart'; Serializers serializers = (_$serializers.toBuilder() ..add(ApiKeyCreateResponseAllOf.serializer) ..add(ApiKeyResponse.serializer) + ..add(ApiKeyResponseOnDelete.serializer) ..add(ChargeDataPaymentMethodBankTransferResponse.serializer) ..add(ChargeDataPaymentMethodCardResponse.serializer) ..add(ChargeDataPaymentMethodCashResponse.serializer) @@ -435,7 +450,6 @@ Serializers serializers = (_$serializers.toBuilder() ..add(CustomerFiscalEntitiesRequest.serializer) ..add(CustomerFiscalEntitiesResponseAllOf.serializer) ..add(CustomerInfoJustCustomerIdResponse.serializer) - ..add(CustomerInfoResponse.serializer) ..add(CustomerPaymentMethodRequest.serializer) ..add(CustomerPaymentMethods.serializer) ..add(CustomerResponseShippingContactsAllOf.serializer) @@ -448,6 +462,7 @@ Serializers serializers = (_$serializers.toBuilder() ..add(DiscountLinesResponse.serializer) ..add(DiscountLinesResponseAllOf.serializer) ..add(ErrorAllOf.serializer) + ..add(FiscalEntityAddress.serializer) ..add(GetApiKeysResponseAllOf.serializer) ..add(GetChargesResponseAllOf.serializer) ..add(GetCompaniesResponseAllOf.serializer) @@ -459,11 +474,12 @@ Serializers serializers = (_$serializers.toBuilder() ..add(GetTransfersResponseAllOf.serializer) ..add(GetWebhookKeysResponseAllOf.serializer) ..add(GetWebhooksResponseAllOf.serializer) + ..add(OrderCustomerInfoResponse.serializer) ..add(OrderDiscountLinesRequest.serializer) + ..add(OrderFiscalEntityAddressResponseAllOf.serializer) ..add(OrderResponseChargesAllOf.serializer) ..add(OrderResponseCustomerInfoAllOf.serializer) ..add(OrderResponseDiscountLinesAllOf.serializer) - ..add(OrderResponseFiscalEntityAddressAllOf.serializer) ..add(OrderResponseProductsAllOf.serializer) ..add(OrderResponseShippingContactAllOf.serializer) ..add(OrderTaxRequest.serializer) diff --git a/lib/src/serializers.g.dart b/lib/src/serializers.g.dart deleted file mode 100644 index 93e7a36..0000000 --- a/lib/src/serializers.g.dart +++ /dev/null @@ -1,738 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'serializers.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -Serializers _$serializers = (new Serializers().toBuilder() - ..add($ApiKeyCreateResponseAllOf.serializer) - ..add($ApiKeyResponse.serializer) - ..add($ChargeDataPaymentMethodBankTransferResponse.serializer) - ..add($ChargeDataPaymentMethodCardResponse.serializer) - ..add($ChargeDataPaymentMethodCashResponse.serializer) - ..add($ChargeResponse.serializer) - ..add($ChargeResponseRefundsAllOf.serializer) - ..add($CheckoutsResponseAllOf.serializer) - ..add($CreateCustomerFiscalEntitiesResponseAllOf.serializer) - ..add($CustomerAddress.serializer) - ..add($CustomerFiscalEntitiesRequest.serializer) - ..add($CustomerFiscalEntitiesResponseAllOf.serializer) - ..add($CustomerInfoJustCustomerIdResponse.serializer) - ..add($CustomerInfoResponse.serializer) - ..add($CustomerPaymentMethodRequest.serializer) - ..add($CustomerPaymentMethods.serializer) - ..add($CustomerResponseShippingContactsAllOf.serializer) - ..add($CustomerShippingContacts.serializer) - ..add($CustomerShippingContactsDataResponseAllOf.serializer) - ..add($CustomerShippingContactsResponse.serializer) - ..add($CustomersResponseAllOf.serializer) - ..add($DeleteApiKeysResponseAllOf.serializer) - ..add($Details.serializer) - ..add($DiscountLinesResponse.serializer) - ..add($DiscountLinesResponseAllOf.serializer) - ..add($ErrorAllOf.serializer) - ..add($GetApiKeysResponseAllOf.serializer) - ..add($GetChargesResponseAllOf.serializer) - ..add($GetCompaniesResponseAllOf.serializer) - ..add($GetEventsResponseAllOf.serializer) - ..add($GetOrderDiscountLinesResponseAllOf.serializer) - ..add($GetPaymentMethodResponseAllOf.serializer) - ..add($GetPlansResponseAllOf.serializer) - ..add($GetTransactionsResponseAllOf.serializer) - ..add($GetTransfersResponseAllOf.serializer) - ..add($GetWebhookKeysResponseAllOf.serializer) - ..add($GetWebhooksResponseAllOf.serializer) - ..add($OrderDiscountLinesRequest.serializer) - ..add($OrderResponseChargesAllOf.serializer) - ..add($OrderResponseCustomerInfoAllOf.serializer) - ..add($OrderResponseDiscountLinesAllOf.serializer) - ..add($OrderResponseFiscalEntityAddressAllOf.serializer) - ..add($OrderResponseProductsAllOf.serializer) - ..add($OrderResponseShippingContactAllOf.serializer) - ..add($OrderTaxRequest.serializer) - ..add($OrdersResponse.serializer) - ..add($Page.serializer) - ..add($Pagination.serializer) - ..add($PaymentMethod.serializer) - ..add($PaymentMethodCardRequestAllOf.serializer) - ..add($PaymentMethodCardResponseAllOf.serializer) - ..add($PaymentMethodCashRequestAllOf.serializer) - ..add($PaymentMethodCashResponseAllOf.serializer) - ..add($PaymentMethodResponse.serializer) - ..add($PaymentMethodSpeiRecurrentAllOf.serializer) - ..add($Product.serializer) - ..add($ProductDataResponseAllOf.serializer) - ..add($ProductOrderResponseAllOf.serializer) - ..add($RiskRules.serializer) - ..add($ShippingRequest.serializer) - ..add($UpdateCustomerFiscalEntitiesResponseAllOf.serializer) - ..add($UpdateOrderTaxResponseAllOf.serializer) - ..add(ApiKeyCreateResponse.serializer) - ..add(ApiKeyRequest.serializer) - ..add(ApiKeyUpdateRequest.serializer) - ..add(BalanceCommonField.serializer) - ..add(BalanceResponse.serializer) - ..add(BlacklistRuleResponse.serializer) - ..add(ChargeOrderResponse.serializer) - ..add(ChargeOrderResponsePaymentMethod.serializer) - ..add(ChargeRequest.serializer) - ..add(ChargeRequestPaymentMethod.serializer) - ..add(ChargeResponseChannel.serializer) - ..add(ChargeResponsePaymentMethod.serializer) - ..add(ChargeResponseRefunds.serializer) - ..add(ChargeResponseRefundsData.serializer) - ..add(ChargesDataResponse.serializer) - ..add(Checkout.serializer) - ..add(CheckoutOrderTemplate.serializer) - ..add(CheckoutOrderTemplateCustomerInfo.serializer) - ..add(CheckoutRequest.serializer) - ..add(CheckoutResponse.serializer) - ..add(CheckoutsResponse.serializer) - ..add(CompanyFiscalInfoAddressResponse.serializer) - ..add(CompanyFiscalInfoAddressResponseObjectEnum.serializer) - ..add(CompanyFiscalInfoResponse.serializer) - ..add(CompanyFiscalInfoResponseObjectEnum.serializer) - ..add(CompanyPayoutDestinationResponse.serializer) - ..add(CompanyPayoutDestinationResponseObjectEnum.serializer) - ..add(CompanyPayoutDestinationResponseTypeEnum.serializer) - ..add(CompanyResponse.serializer) - ..add(CompanyResponseObjectEnum.serializer) - ..add(CreateCustomerFiscalEntitiesResponse.serializer) - ..add(CreateCustomerPaymentMethodsRequest.serializer) - ..add(CreateCustomerPaymentMethodsResponse.serializer) - ..add(CreateRiskRulesData.serializer) - ..add(Customer.serializer) - ..add(CustomerAntifraudInfo.serializer) - ..add(CustomerAntifraudInfoResponse.serializer) - ..add(CustomerFiscalEntitiesDataResponse.serializer) - ..add(CustomerFiscalEntitiesRequestAddress.serializer) - ..add(CustomerFiscalEntitiesResponse.serializer) - ..add(CustomerInfo.serializer) - ..add(CustomerInfoJustCustomerId.serializer) - ..add(CustomerPaymentMethodsData.serializer) - ..add(CustomerPaymentMethodsRequest.serializer) - ..add(CustomerPaymentMethodsResponse.serializer) - ..add(CustomerResponse.serializer) - ..add(CustomerResponseShippingContacts.serializer) - ..add(CustomerShippingContactsAddress.serializer) - ..add(CustomerShippingContactsDataResponse.serializer) - ..add(CustomerShippingContactsResponseAddress.serializer) - ..add(CustomerUpdateFiscalEntitiesRequest.serializer) - ..add(CustomerUpdateShippingContacts.serializer) - ..add(CustomersResponse.serializer) - ..add(DeleteApiKeysResponse.serializer) - ..add(DeletedBlacklistRuleResponse.serializer) - ..add(DeletedWhitelistRuleResponse.serializer) - ..add(DetailsError.serializer) - ..add(DiscountLinesDataResponse.serializer) - ..add(EmailCheckoutRequest.serializer) - ..add(Error.serializer) - ..add(EventResponse.serializer) - ..add(EventsResendResponse.serializer) - ..add(GetApiKeysResponse.serializer) - ..add(GetChargesResponse.serializer) - ..add(GetCompaniesResponse.serializer) - ..add(GetCustomerPaymentMethodDataResponse.serializer) - ..add(GetEventsResponse.serializer) - ..add(GetOrderDiscountLinesResponse.serializer) - ..add(GetOrdersResponse.serializer) - ..add(GetPaymentMethodResponse.serializer) - ..add(GetPlansResponse.serializer) - ..add(GetTransactionsResponse.serializer) - ..add(GetTransfersResponse.serializer) - ..add(GetWebhookKeysResponse.serializer) - ..add(GetWebhooksResponse.serializer) - ..add(LogResponse.serializer) - ..add(LogsResponse.serializer) - ..add(LogsResponseData.serializer) - ..add(OrderCaptureRequest.serializer) - ..add(OrderRefundRequest.serializer) - ..add(OrderRequest.serializer) - ..add(OrderRequestCustomerInfo.serializer) - ..add(OrderResponse.serializer) - ..add(OrderResponseCharges.serializer) - ..add(OrderResponseCheckout.serializer) - ..add(OrderResponseCustomerInfo.serializer) - ..add(OrderResponseDiscountLines.serializer) - ..add(OrderResponseFiscalEntity.serializer) - ..add(OrderResponseFiscalEntityAddress.serializer) - ..add(OrderResponseProducts.serializer) - ..add(OrderResponseShippingContact.serializer) - ..add(OrderUpdateRequest.serializer) - ..add(OrderUpdateRequestCustomerInfo.serializer) - ..add(PaymentMethodBankTransfer.serializer) - ..add(PaymentMethodCard.serializer) - ..add(PaymentMethodCardRequest.serializer) - ..add(PaymentMethodCardResponse.serializer) - ..add(PaymentMethodCash.serializer) - ..add(PaymentMethodCashRequest.serializer) - ..add(PaymentMethodCashResponse.serializer) - ..add(PaymentMethodSpeiRecurrent.serializer) - ..add(PaymentMethodSpeiRequest.serializer) - ..add(PlanRequest.serializer) - ..add(PlanRequestIntervalEnum.serializer) - ..add(PlanResponse.serializer) - ..add(PlanUpdateRequest.serializer) - ..add(ProductDataResponse.serializer) - ..add(ProductOrderResponse.serializer) - ..add(RiskRulesData.serializer) - ..add(RiskRulesList.serializer) - ..add(ShippingOrderResponse.serializer) - ..add(SmsCheckoutRequest.serializer) - ..add(SubscriptionEventsResponse.serializer) - ..add(SubscriptionRequest.serializer) - ..add(SubscriptionResponse.serializer) - ..add(SubscriptionUpdateRequest.serializer) - ..add(Token.serializer) - ..add(TokenCard.serializer) - ..add(TokenCheckout.serializer) - ..add(TokenResponse.serializer) - ..add(TokenResponseCheckout.serializer) - ..add(TransactionResponse.serializer) - ..add(TransferDestinationResponse.serializer) - ..add(TransferMethodResponse.serializer) - ..add(TransferResponse.serializer) - ..add(TransfersResponse.serializer) - ..add(UpdateCustomer.serializer) - ..add(UpdateCustomerAntifraudInfo.serializer) - ..add(UpdateCustomerFiscalEntitiesResponse.serializer) - ..add(UpdateCustomerPaymentMethodsResponse.serializer) - ..add(UpdateOrderDiscountLinesRequest.serializer) - ..add(UpdateOrderTaxRequest.serializer) - ..add(UpdateOrderTaxResponse.serializer) - ..add(UpdatePaymentMethods.serializer) - ..add(UpdateProduct.serializer) - ..add(WebhookKeyCreateResponse.serializer) - ..add(WebhookKeyDeleteResponse.serializer) - ..add(WebhookKeyRequest.serializer) - ..add(WebhookKeyResponse.serializer) - ..add(WebhookKeyUpdateRequest.serializer) - ..add(WebhookLog.serializer) - ..add(WebhookRequest.serializer) - ..add(WebhookResponse.serializer) - ..add(WebhookUpdateRequest.serializer) - ..add(WhitelistlistRuleResponse.serializer) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ApiKeyResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ApiKeyResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(BalanceCommonField)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ChargeRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(OrderDiscountLinesRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(Product)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ShippingRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(OrderTaxRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ChargeRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(OrderDiscountLinesRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(Product)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ShippingRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(OrderTaxRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ChargeResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ChargeResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(ChargeResponseRefundsData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(ChargeResponseRefundsData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(ChargesDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(ChargesDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CheckoutResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CheckoutResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CompanyResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CompanyResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(CustomerFiscalEntitiesDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(CustomerFiscalEntitiesDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerFiscalEntitiesRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerPaymentMethodsRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerShippingContacts)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerFiscalEntitiesRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerPaymentMethodsRequest)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerShippingContacts)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerPaymentMethodsData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(CustomerPaymentMethodsData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CustomerResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(CustomerResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(CustomerShippingContactsDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(CustomerShippingContactsDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(DetailsError)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(DetailsError)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(DiscountLinesDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(DiscountLinesDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(DiscountLinesResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(DiscountLinesResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(EventResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(EventResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(EventResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(GetCustomerPaymentMethodDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, - const [const FullType(GetCustomerPaymentMethodDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(LogsResponseData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(OrderResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(OrderResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(PlanResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(PlanResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(Product)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(ProductDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(ProductDataResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(RiskRulesData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(RiskRulesData)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(int)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(int)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(int)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(int)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(int)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(TransactionResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType(TransactionResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(TransfersResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(TransfersResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(WebhookKeyResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(WebhookKeyResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(WebhookResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(WebhookResponse)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType.nullable(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType.nullable(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType.nullable(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltList, const [const FullType.nullable(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, - const [const FullType(String), const FullType(JsonObject)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(WebhookLog)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltMap, const [ - const FullType(String), - const FullType.nullable(JsonObject) - ]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder())) - .build(); - -// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,deprecated_member_use_from_same_package,lines_longer_than_80_chars,no_leading_underscores_for_local_identifiers,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new,unnecessary_lambdas diff --git a/lib/src/utils/utils.dart b/lib/src/utils/utils.dart index fae35f9..6d8faac 100644 --- a/lib/src/utils/utils.dart +++ b/lib/src/utils/utils.dart @@ -4,7 +4,10 @@ import 'dart:io'; final String UnknownPlatform = "unknown platform"; /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. -final RegExp jsonRegex = RegExp(r"(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t](;.)?$"); +final RegExp jsonRegex = RegExp( + r'^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)([ \t](;.*)?)?$', + caseSensitive: false, +); String cachedUserClient = ""; @@ -68,7 +71,7 @@ String getConektaClientUserAgent() { return cachedUserClient; } Map cachedData = { - "bindings_version": "6.0.0-beta.1", + "bindings_version": "6.0.0", "lang": "Dart", "publisher": "conekta", "lang_version": Platform.version.split(' ')[0], diff --git a/pubspec.yaml b/pubspec.yaml index 4988e18..bcf7f44 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: conekta -version: 6.0.0-beta.2 +version: 6.0.0 description: Conekta dart Library homepage: https://www.github.com/conekta/conekta-dart repository: https://www.github.com/conekta/conekta-dart @@ -8,11 +8,12 @@ environment: sdk: '>=2.15.0 <3.0.0' dependencies: - dio: '^5.0.0' + dio: '^5.2.0' one_of: '>=1.5.0 <2.0.0' one_of_serializer: '>=1.5.0 <2.0.0' built_value: '>=8.4.0 <9.0.0' built_collection: '>=5.1.1 <6.0.0' + meta: 1.9.1 dev_dependencies: built_value_generator: '>=8.4.0 <9.0.0' diff --git a/templates/dart/VERSION.mustache b/templates/dart/VERSION.mustache new file mode 100644 index 0000000..653cae5 --- /dev/null +++ b/templates/dart/VERSION.mustache @@ -0,0 +1 @@ +{{pubVersion}} diff --git a/templates/dart/api.mustache b/templates/dart/api.mustache new file mode 100644 index 0000000..ac8d56f --- /dev/null +++ b/templates/dart/api.mustache @@ -0,0 +1,167 @@ +{{>header}} +import 'dart:async'; + +{{#includeLibraryTemplate}}api/imports{{/includeLibraryTemplate}} +import 'package:dio/dio.dart'; + +{{#operations}} +{{#imports}}import '{{.}}'; +{{/imports}} +import 'package:conekta/src/utils/utils.dart'; + +class {{classname}} { + + final Dio _dio; + +{{#includeLibraryTemplate}}api/constructor{{/includeLibraryTemplate}} + + {{#operation}} + /// {{summary}}{{^summary}}{{nickname}}{{/summary}} + /// {{notes}} + /// + /// Parameters: + {{#allParams}} + /// * [{{paramName}}] {{#description}}- {{{.}}}{{/description}} + {{/allParams}} + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future]{{#returnType}} containing a [Response] with a [{{{.}}}] as data{{/returnType}} + /// Throws [DioException] if API call or serialization fails + {{#externalDocs}} + /// {{description}} + /// Also see [{{summary}} Documentation]({{url}}) + {{/externalDocs}} + {{#isDeprecated}} + @Deprecated('This operation has been deprecated') + {{/isDeprecated}} + Future> {{nickname}}({ {{#allParams}}{{#isPathParam}} + {{#isDeprecated}}@Deprecated('{{paramName}} is deprecated') {{/isDeprecated}}required {{{dataType}}} {{paramName}},{{/isPathParam}}{{#isQueryParam}} + {{#isDeprecated}}@Deprecated('{{paramName}} is deprecated') {{/isDeprecated}}{{#required}}{{^isNullable}}{{^defaultValue}}required {{/defaultValue}}{{/isNullable}}{{/required}}{{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}} {{paramName}}{{^isContainer}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isContainer}},{{/isQueryParam}}{{#isHeaderParam}} + {{#isDeprecated}}@Deprecated('{{paramName}} is deprecated') {{/isDeprecated}}{{#required}}{{^isNullable}}{{^defaultValue}}required {{/defaultValue}}{{/isNullable}}{{/required}}{{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}} {{paramName}}{{^isContainer}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}{{/isContainer}},{{/isHeaderParam}}{{#isBodyParam}} + {{#isDeprecated}}@Deprecated('{{paramName}} is deprecated') {{/isDeprecated}}{{#required}}{{^isNullable}}required {{/isNullable}}{{/required}}{{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}} {{paramName}},{{/isBodyParam}}{{#isFormParam}} + {{#isDeprecated}}@Deprecated('{{paramName}} is deprecated') {{/isDeprecated}}{{#required}}{{^isNullable}}required {{/isNullable}}{{/required}}{{{dataType}}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^required}}?{{/required}} {{paramName}},{{/isFormParam}}{{/allParams}} + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'{{{path}}}'{{#pathParams}}.replaceAll('{' r'{{{baseName}}}' '}', {{#includeLibraryTemplate}}api/query_param{{/includeLibraryTemplate}}.toString()){{/pathParams}}; + // to determine the Accept header + List _contentTypes = [ + {{#consumes}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/consumes}} + ]; + var localVarContentType = selectHeaderContentType(_contentTypes); + + // to determine the Accept header + List _accepts = [ + {{#produces}} + "{{{mediaType}}}"{{^-last}},{{/-last}} + {{/produces}} + ]; + final localVarAccept = selectHeaderAccept(_accepts); + final _options = Options( + method: r'{{#lambda.uppercase}}{{httpMethod}}{{/lambda.uppercase}}', + {{#isResponseFile}} + responseType: ResponseType.bytes, + {{/isResponseFile}} + headers: { + {{#httpUserAgent}} + r'User-Agent': r'{{{.}}}/{{pubVersion}}', + {{/httpUserAgent}} + {{#headerParams}} + {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{baseName}}': {{paramName}}, + {{/headerParams}} + if (localVarAccept != null) r'Accept': localVarAccept, + if (localVarContentType != null) r'Content-Type': localVarContentType, + r'X-Conekta-Client-User-Agent' : getConektaClientUserAgent(), + ...?headers, + }, + extra: { + 'secure': >[{{^hasAuthMethods}}],{{/hasAuthMethods}}{{#hasAuthMethods}} + {{#authMethods}}{ + 'type': '{{type}}',{{#scheme}} + 'scheme': '{{.}}',{{/scheme}} + 'name': '{{name}}',{{#isApiKey}} + 'keyName': '{{keyParamName}}', + 'where': '{{#isKeyInQuery}}query{{/isKeyInQuery}}{{#isKeyInHeader}}header{{/isKeyInHeader}}',{{/isApiKey}} + },{{/authMethods}} + ],{{/hasAuthMethods}} + ...?extra, + },{{#hasConsumes}} + contentType: '{{#prioritizedContentTypes}}{{#-first}}{{{mediaType}}}{{/-first}}{{/prioritizedContentTypes}}',{{/hasConsumes}} + validateStatus: validateStatus, + );{{#hasQueryParams}} + + final _queryParameters = { + {{#queryParams}} + {{^required}}{{^isNullable}}if ({{{paramName}}} != null) {{/isNullable}}{{/required}}r'{{baseName}}': {{#includeLibraryTemplate}}api/query_param{{/includeLibraryTemplate}}, + {{/queryParams}} + };{{/hasQueryParams}}{{#hasBodyOrFormParams}} + + dynamic _bodyData; + + try { +{{#includeLibraryTemplate}}api/serialize{{/includeLibraryTemplate}} + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path,{{#hasQueryParams}} + queryParameters: _queryParameters,{{/hasQueryParams}} + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + }{{/hasBodyOrFormParams}} + + final _response = await _dio.request( + _path,{{#hasBodyOrFormParams}} + data: _bodyData,{{/hasBodyOrFormParams}} + options: _options,{{#hasQueryParams}} + queryParameters: _queryParameters,{{/hasQueryParams}} + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + {{#returnType}} + + {{{.}}}? _responseData; + + try { +{{#includeLibraryTemplate}}api/deserialize{{/includeLibraryTemplate}} + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response<{{{returnType}}}>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + );{{/returnType}}{{^returnType}} + return _response;{{/returnType}} + } + + {{/operation}} +} +{{/operations}} diff --git a/templates/dart/pubspec.mustache b/templates/dart/pubspec.mustache new file mode 100644 index 0000000..356246f --- /dev/null +++ b/templates/dart/pubspec.mustache @@ -0,0 +1,40 @@ +name: {{pubName}} +version: {{pubVersion}} +description: {{pubDescription}} +homepage: {{pubHomepage}} +{{#pubRepository}} +repository: {{.}} +{{/pubRepository}} +{{#pubPublishTo}} +publish_to: {{.}} +{{/pubPublishTo}} + +environment: + sdk: '>={{#useJsonSerializable}}2.17.0{{/useJsonSerializable}}{{^useJsonSerializable}}2.15.0{{/useJsonSerializable}} <3.0.0' + +dependencies: + dio: '^5.2.0' +{{#useBuiltValue}} + one_of: '>=1.5.0 <2.0.0' + one_of_serializer: '>=1.5.0 <2.0.0' + built_value: '>=8.4.0 <9.0.0' + built_collection: '>=5.1.1 <6.0.0' +{{/useBuiltValue}} +{{#useJsonSerializable}} + json_annotation: '^4.4.0' +{{/useJsonSerializable}} +{{#useDateLibTimeMachine}} + time_machine: ^0.9.16 +{{/useDateLibTimeMachine}} + meta: 1.9.1 + +dev_dependencies: +{{#useBuiltValue}} + built_value_generator: '>=8.4.0 <9.0.0' + build_runner: any +{{/useBuiltValue}} +{{#useJsonSerializable}} + build_runner: any + json_serializable: '^6.1.5' +{{/useJsonSerializable}} + test: ^1.16.0 diff --git a/templates/dart/utils.mustache b/templates/dart/utils.mustache new file mode 100644 index 0000000..e0aeead --- /dev/null +++ b/templates/dart/utils.mustache @@ -0,0 +1,93 @@ +import 'dart:convert'; +import 'dart:io'; + +final String UnknownPlatform = "unknown platform"; + +/// Provides a case-insensitive check that a provided content type is a known JSON-like content type. +final RegExp jsonRegex = RegExp( + r'^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)([ \t](;.*)?)?$', + caseSensitive: false, +); + +String cachedUserClient = ""; + +/// Select the Accept header's value from the given accepts list: +/// if JSON exists in the given list, use it; +/// otherwise use all of them (joining into a string) +String? selectHeaderAccept(List accepts) { + if (accepts.isEmpty) { + return null; + } + + if (accepts.contains("application/json")) { + return "application/json"; + } + + return accepts.join(","); +} + +/// Selects the Content-Type header's value from the given content-type array: +/// If a JSON type exists in the given array, it is used; +/// Otherwise, the first one defined in 'consumes' is used. +/// +/// Parameters: +/// - contentTypes: The Content-Type array to select from. +/// +/// Returns: +/// The Content-Type header to use. +String? selectHeaderContentType(List contentTypes) { + if (contentTypes.isEmpty) { + return null; + } + + for (var contentType in contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + + return contentTypes[0]; // Use the first content type specified in 'consumes' +} + +/// Checks if the given MIME is a JSON MIME. +/// +/// JSON MIME examples: +/// - application/json +/// - application/json; charset=UTF8 +/// - APPLICATION/JSON +/// - application/vnd.company+json +/// +/// Returns true if the MIME type is JSON. +bool isJsonMime(String mime) { + if (mime.trim().isEmpty) { + return false; + } + + return jsonRegex.hasMatch(mime) || mime.toLowerCase() == "application/json-patch+json"; +} + +String getConektaClientUserAgent() { + if (!cachedUserClient.isEmpty) { + return cachedUserClient; + } + Map cachedData = { + "bindings_version": "{{pubVersion}}", + "lang": "Dart", + "publisher": "conekta", + "lang_version": Platform.version.split(' ')[0], + "uname": getUname(), + }; + + cachedUserClient = JsonEncoder().convert(cachedData); + return cachedUserClient; +} + +String getUname() { + var unameResult = Process.runSync('uname', ['-a']); + + if (unameResult.exitCode != 0) { + return UnknownPlatform; + } + + return unameResult.stdout.toString(); +} diff --git a/test/tokens_api_test.dart b/test/tokens_api_test.dart index 1e24c3e..a4f3ec5 100644 --- a/test/tokens_api_test.dart +++ b/test/tokens_api_test.dart @@ -1,20 +1,34 @@ import 'package:test/test.dart'; import 'package:conekta/conekta.dart'; - +import 'base.dart'; /// tests for TokensApi void main() { - final instance = Conekta().getTokensApi(); + var instance = Conekta(basePathOverride: Base.basePath); + instance.setBearerAuth("bearerAuth", "key_xxxx"); + final api = instance.getTokensApi(); group(TokensApi, () { // Create Token // - // Generate a payment token, to associate it with a card + // Generate a payment token, to associate it with a card // //Future createToken(Token token, { String acceptLanguage }) async test('test createToken', () async { - // TODO - }); + var tokenCard = TokenCard((b) => b + ..cvc = '123' + ..deviceFingerprint = 'device_fingerprint_value' + ..expMonth = '12' + ..expYear = '2023' + ..name = 'Nombre del Titular' + ..number = '5475040095304607'); + + var token = Token((b) => b..card.replace(tokenCard)); + final response = await api.createToken(token: token); + + expect(response, isNotNull); + expect("tok_2toPJUcZ27AH5LsZk", response.data?.id); + }); }); }